@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Sora:wght@400;500;600;700&family=Oxanium:wght@500;700&family=Rajdhani:wght@400;600;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --bg: #05070b;
  --bg-2: #0d141d;
  --panel: rgba(10, 14, 20, 0.94);
  --panel-2: rgba(15, 20, 28, 0.9);
  --ink: #030509;
  --bone: #e6edf3;
  --ash: #9aa7b5;
  --blood: #ff375f;
  --miasma: #7b5cff;
  --sol: #20f29b;
  --glow-red: rgba(255, 55, 95, 0.35);
  --glow-purple: rgba(123, 92, 255, 0.45);
  --glow-green: rgba(32, 242, 155, 0.35);
  --tierW: clamp(260px, 24vw, 340px);
  --tierH: clamp(96px, 12vh, 132px);
  --rewardTileH: 68px;
  --outline: 1px solid rgba(18, 26, 36, 0.9);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Rajdhani', 'Oxanium', 'Segoe UI', sans-serif;
  color: var(--bone);
  background: radial-gradient(circle at 52% 18%, rgba(46, 116, 96, 0.35), transparent 36%),
    radial-gradient(circle at 78% 66%, rgba(26, 102, 87, 0.28), transparent 40%),
    linear-gradient(135deg, #03060c 0%, #05090f 48%, #020409 100%);
  min-height: 100vh;
  overflow: hidden;
}

/* Global smoke layer: fixed, subtle, and non-interactive. */
#global-smoke {
  position: fixed;
  inset: -20%;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(60% 45% at 8% 18%, rgba(32, 242, 155, 0.16), transparent 62%),
    radial-gradient(55% 40% at 88% 12%, rgba(57, 244, 255, 0.14), transparent 60%),
    radial-gradient(70% 50% at 12% 88%, rgba(57, 244, 255, 0.12), transparent 64%),
    radial-gradient(65% 48% at 92% 82%, rgba(32, 242, 155, 0.14), transparent 62%);
  background-size: 180% 180%;
  background-position: 0% 0%;
  opacity: 0.6;
  filter: blur(14px);
  transform: translateZ(0);
  animation: smokeDrift 48s linear infinite;
  will-change: background-position;
}

@keyframes smokeDrift {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 40% 20%;
  }
  100% {
    background-position: 0% 0%;
  }
}

h1,
h2,
h3 {
  font-family: 'Oxanium', 'Space Grotesk', sans-serif;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 0;
}

#game-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: radial-gradient(circle at 70% 20%, #141b26 0%, #070b10 60%);
}

#app.ui-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

#app.ui-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.04) 1px,
    transparent 1px,
    transparent 7px
  );
  opacity: 0.08;
  transform: translateY(0);
  animation: scanShift 6s steps(8, end) infinite;
}

.ui-interactive {
  pointer-events: auto;
}

.status-bar {
  display: flex;
  gap: 12px;
  font-size: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.status-bar > div {
  padding: 4px 8px;
  border: 1px solid rgba(26, 36, 50, 0.7);
  border-radius: 6px;
  background: rgba(10, 14, 20, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-bar button {
  margin-left: auto;
}

.menu-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #13202a;
  border-radius: 12px;
  background: rgba(8, 12, 18, 0.92);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  pointer-events: auto;
  position: sticky;
  top: 0;
  z-index: 5;
}

.menu-brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--bone);
  filter: brightness(1.1);
  animation: brandPulse 3.5s steps(6, end) infinite;
}

.menu-tabs-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.tab-badge {
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(32, 242, 155, 0.6), rgba(123, 92, 255, 0.6));
  color: var(--bone);
  font-size: 10px;
  letter-spacing: 0.6px;
}

main {
  flex: 1;
  overflow: hidden;
  max-width: none;
  width: 100%;
  margin: 0;
  padding-top: 24px;
  pointer-events: none;
}

.screen {
  padding: 8px 0 24px;
  pointer-events: auto;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(8px);
  filter: blur(3px);
  transition: opacity 0.3s steps(4, end), transform 0.3s steps(4, end), filter 0.3s steps(4, end);
}

.screen.is-active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

body.is-game main {
  max-width: none;
  margin: 0;
  padding-top: 0;
  height: 100%;
  min-height: 0;
}

body.is-game #game-screen {
  max-height: none;
  height: 100vh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  transform: none;
  filter: none;
}

.battlefield {
  position: relative;
  min-height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  isolation: isolate;
  padding: 12px 18px 18px;
}

.battlefield-frame {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  margin: 0 auto;
}

body.is-game #game-screen .board {
  width: 100%;
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

body.is-game #game-screen .board-column,
body.is-game #game-screen .board-center {
  min-height: 0;
}

body.is-game .hand {
  margin-top: 0;
}

#collection-screen {
  scrollbar-width: thin;
  scrollbar-color: rgba(32, 242, 155, 0.35) rgba(8, 12, 18, 0.85);
}

#collection-screen::-webkit-scrollbar {
  width: 8px;
}

#collection-screen::-webkit-scrollbar-track {
  background: rgba(8, 12, 18, 0.85);
  border-radius: 999px;
}

#collection-screen::-webkit-scrollbar-thumb {
  background: rgba(32, 242, 155, 0.35);
  border-radius: 999px;
}

#collection-screen::-webkit-scrollbar-thumb:hover {
  background: rgba(32, 242, 155, 0.5);
}

#menu-screen {
  position: relative;
  display: grid;
  gap: 24px;
  padding: 8px 4px 18px;
  font-family: 'Sora', 'Space Grotesk', sans-serif;
}

#menu-screen::before {
  content: '';
  position: absolute;
  inset: -40% 15% auto;
  height: 240px;
  background: radial-gradient(circle, rgba(32, 242, 155, 0.2), transparent 70%);
  opacity: 0.6;
  filter: blur(18px);
  pointer-events: none;
  animation: menuGlow 10s ease-in-out infinite;
}

#menu-screen::after {
  content: '';
  position: absolute;
  inset: auto 12% -30% 12%;
  height: 220px;
  background: radial-gradient(circle, rgba(123, 92, 255, 0.18), transparent 70%);
  opacity: 0.55;
  filter: blur(24px);
  pointer-events: none;
  animation: menuGlow 12s ease-in-out infinite reverse;
}

.menu-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.menu-hero-copy {
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(140deg, rgba(8, 12, 18, 0.94), rgba(6, 9, 14, 0.88));
  border: 1px solid rgba(32, 242, 155, 0.2);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 28px rgba(32, 242, 155, 0.1);
  backdrop-filter: blur(12px);
  animation: menuRise 0.6s ease both;
}

.menu-kicker {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sol);
}

.menu-title {
  margin: 10px 0 8px;
  font-size: clamp(28px, 3.6vw, 48px);
  letter-spacing: 3px;
  font-family: 'Bebas Neue', 'Oxanium', sans-serif;
}

.menu-subtitle {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--ash);
  max-width: 520px;
}

.menu-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.menu-hero-actions button {
  min-width: 160px;
}

.menu-meta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.menu-credits {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ash);
  position: relative;
  padding-left: 14px;
}

.menu-credits::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sol);
  transform: translateY(-50%);
  animation: livePulse 1.2s steps(3, end) infinite;
}

.menu-speed-toggle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(32, 242, 155, 0.2);
  background: rgba(8, 12, 18, 0.85);
  margin: 0;
}

.menu-speed-toggle input {
  appearance: none;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(32, 242, 155, 0.3);
  background: rgba(8, 12, 18, 0.9);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.menu-speed-toggle input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(32, 242, 155, 0.65);
  box-shadow: 0 0 10px rgba(32, 242, 155, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.menu-speed-toggle input:checked {
  background: rgba(32, 242, 155, 0.25);
  border-color: rgba(32, 242, 155, 0.6);
}

.menu-speed-toggle input:checked::after {
  transform: translateX(20px);
  background: rgba(32, 242, 155, 0.9);
}

.menu-hero-panel {
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(10, 16, 24, 0.95), rgba(8, 12, 18, 0.9));
  border: 1px solid rgba(123, 92, 255, 0.2);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.55), 0 0 28px rgba(123, 92, 255, 0.12);
  display: grid;
  gap: 16px;
  animation: menuRise 0.6s ease both;
  animation-delay: 0.08s;
}

.menu-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.menu-panel-title {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.menu-panel-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(123, 92, 255, 0.2);
  border: 1px solid rgba(123, 92, 255, 0.35);
  color: var(--bone);
}

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

.menu-stat {
  padding: 12px;
  border-radius: 14px;
  background: rgba(8, 12, 18, 0.8);
  border: 1px solid rgba(32, 242, 155, 0.12);
  box-shadow: inset 0 0 18px rgba(32, 242, 155, 0.08);
}

.menu-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash);
  margin-bottom: 6px;
}

.menu-stat-value {
  font-size: 14px;
  letter-spacing: 1px;
}

.menu-panel-note {
  font-size: 12px;
  color: var(--ash);
  line-height: 1.4;
}

.menu-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.menu-feature-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(8, 12, 18, 0.92), rgba(6, 10, 16, 0.88));
  border: 1px solid rgba(32, 242, 155, 0.16);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(32, 242, 155, 0.08);
  animation: menuRise 0.6s ease both;
}

.menu-feature-card:nth-child(2) {
  animation-delay: 0.12s;
}

.menu-feature-card:nth-child(3) {
  animation-delay: 0.18s;
}

.menu-feature-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  margin-bottom: 8px;
}

.menu-feature-body {
  font-size: 12px;
  color: var(--ash);
  line-height: 1.4;
}

@keyframes menuGlow {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes menuRise {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .menu-hero {
    grid-template-columns: 1fr;
  }

  .menu-feature-grid {
    grid-template-columns: 1fr;
  }

  .menu-stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .menu-hero-copy,
  .menu-hero-panel {
    padding: 18px;
  }

  .menu-hero-actions button {
    min-width: 140px;
    flex: 1 1 auto;
  }

  .menu-title {
    font-size: clamp(24px, 8vw, 34px);
  }
}

.hidden {
  display: none !important;
}

.speed-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ash);
}

.builder-header,
.builder-actions,
.builder-name,
.builder-counts,
.profile-panel,
.builder-profile,
.collection-note,
.collection-group,
.profile-deck,
.shop-card,
.board-column,
.board-center,
.hand,
.modal-content,
.trap-window,
.log {
  background: var(--panel);
  border: var(--outline);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  position: relative;
}

.builder-header::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 1px;
  background: linear-gradient(90deg, rgba(32, 242, 155, 0.5), rgba(123, 92, 255, 0.4), transparent);
  opacity: 0.6;
}

.builder-header h2 {
  font-size: 18px;
  letter-spacing: 2px;
  margin: 0;
}

.builder-actions {
  display: grid;
  gap: 10px;
}

.builder-name {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.builder-name input {
  padding: 6px 8px;
  border: 1px solid rgba(32, 242, 155, 0.25);
  border-radius: 6px;
  min-width: 0;
  width: 100%;
  background: #0b1018;
  color: var(--bone);
}

.builder-name input:focus {
  outline: none;
  border-color: rgba(32, 242, 155, 0.6);
  filter: brightness(1.1);
}

.builder-counts {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.builder-sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 110px;
}

.builder-panel {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(26, 36, 50, 0.7);
  background: linear-gradient(150deg, rgba(14, 18, 26, 0.92), rgba(8, 12, 18, 0.88));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), var(--shadow);
  position: relative;
  overflow: hidden;
}

.builder-panel::before,
.builder-block::before {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  top: 10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(32, 242, 155, 0.35), transparent);
  opacity: 0.35;
  pointer-events: none;
}

.builder-panel::after,
.builder-block::after {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at top, rgba(32, 242, 155, 0.12), transparent 60%);
  opacity: 0.45;
  pointer-events: none;
}

.builder-panel-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash);
  margin-bottom: 8px;
}

.builder-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.builder-action-grid button {
  width: 100%;
}

.builder-name label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ash);
}

.builder-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.builder-count-grid > div {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(32, 242, 155, 0.15);
  background: rgba(10, 14, 20, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  line-height: 1.4;
}

.builder-main {
  display: grid;
  gap: 14px;
}

.builder-block {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(26, 36, 50, 0.7);
  background: linear-gradient(150deg, rgba(14, 18, 26, 0.92), rgba(8, 12, 18, 0.9));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), var(--shadow);
  position: relative;
  overflow: hidden;
}

.builder-block-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.builder-block-header h3 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.builder-block-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ash);
}

.builder-filters {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(26, 36, 50, 0.7);
  background: rgba(8, 12, 18, 0.85);
  position: relative;
  overflow: hidden;
}

.builder-filters::after {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at top, rgba(32, 242, 155, 0.1), transparent 65%);
  opacity: 0.5;
  pointer-events: none;
}

.builder-filter-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.builder-filter-search {
  flex: 1;
  min-width: 200px;
}

.builder-filter-search input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(26, 36, 50, 0.8);
  background: rgba(8, 12, 18, 0.9);
  color: var(--bone);
}

.builder-filter-search input:focus {
  outline: none;
  border-color: rgba(32, 242, 155, 0.6);
  filter: brightness(1.1);
}

.builder-filter-meta {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ash);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px dashed rgba(32, 242, 155, 0.2);
  background: rgba(8, 12, 18, 0.8);
}

.builder-filter-row {
  display: grid;
  gap: 6px;
}

.builder-filter-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--ash);
}

.builder-hero-grid,
.builder-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.deck-summary {
  font-size: 12px;
  display: grid;
  gap: 8px;
}

.deck-summary > div {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(26, 36, 50, 0.7);
  background: rgba(10, 14, 20, 0.75);
  line-height: 1.4;
}

.builder-profile {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.profile-panel {
  padding: 12px 14px;
  display: grid;
  gap: 12px;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.profile-main {
  display: grid;
  gap: 12px;
}

.profile-side {
  display: grid;
  gap: 12px;
}

.profile-section {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(26, 36, 50, 0.8);
  border-radius: 10px;
  background: rgba(10, 14, 20, 0.85);
}

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

.pill.subtle {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(32, 242, 155, 0.25);
  background: rgba(32, 242, 155, 0.08);
  color: var(--ash);
  letter-spacing: 0.8px;
}

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

.profile-stat {
  padding: 8px 10px;
  border: 1px dashed rgba(32, 242, 155, 0.2);
  border-radius: 10px;
  background: rgba(8, 12, 18, 0.8);
  display: grid;
  gap: 6px;
}

.profile-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ash);
}

.profile-stat-value {
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0.8px;
}

.profile-summary {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.profile-identity {
  display: grid;
  gap: 8px;
}

.profile-name-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--ash);
}

.profile-name-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.profile-name-input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(32, 242, 155, 0.2);
  background: rgba(8, 12, 18, 0.85);
  color: var(--bone);
  font-size: 12px;
  letter-spacing: 0.6px;
}

.profile-name-input:focus {
  outline: none;
  border-color: rgba(32, 242, 155, 0.45);
  box-shadow: 0 0 0 2px rgba(32, 242, 155, 0.1);
}

.profile-name-status {
  font-size: 11px;
  color: var(--ash);
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border: 1px dashed rgba(32, 242, 155, 0.15);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.85);
}

.profile-row-label {
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 11px;
}

.profile-row-value {
  font-weight: bold;
  font-size: 12px;
}
/* ============================================
   BATTLE PASS - Complete Redesign
   Modern, immersive, Fortnite-inspired
   ============================================ */

#battlepass-screen {
  /* Color Palette */
  --bp-cyan: #00e5ff;
  --bp-cyan-soft: rgba(0, 229, 255, 0.15);
  --bp-cyan-glow: rgba(0, 229, 255, 0.4);
  --bp-gold: #ffd700;
  --bp-gold-soft: rgba(255, 215, 0, 0.15);
  --bp-gold-glow: rgba(255, 215, 0, 0.4);
  --bp-purple: #a855f7;
  --bp-purple-soft: rgba(168, 85, 247, 0.15);
  --bp-pink: #ff6b9d;
  --bp-panel: rgba(8, 12, 20, 0.95);
  --bp-panel-border: rgba(255, 255, 255, 0.08);
  --bp-surface: rgba(15, 20, 30, 0.9);
  
  /* Tier sizing */
  --tierW: clamp(200px, 18vw, 260px);
  --tierH: auto;
  
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  padding: 0;
  height: calc(100vh - 140px);
  min-height: 500px;
  max-height: calc(100vh - 140px);
  overflow: hidden;
  isolation: isolate;
}

/* Ambient background effects */
#battlepass-screen::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, var(--bp-cyan-soft), transparent 60%);
  filter: blur(80px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
  animation: bpAmbient1 15s ease-in-out infinite;
}

#battlepass-screen::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, var(--bp-gold-soft), transparent 60%);
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  animation: bpAmbient2 18s ease-in-out infinite reverse;
}

@keyframes bpAmbient1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(5%, 5%) scale(1.1); opacity: 0.7; }
}

@keyframes bpAmbient2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  50% { transform: translate(-5%, -5%) scale(1.15); opacity: 0.6; }
}

@keyframes bpShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes bpPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

@keyframes bpFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes bpGlow {
  0%, 100% { box-shadow: 0 0 20px var(--bp-cyan-glow); }
  50% { box-shadow: 0 0 40px var(--bp-cyan-glow), 0 0 60px var(--bp-cyan-soft); }
}

@keyframes bpRingPulse {
  0%, 100% { stroke-opacity: 0.8; }
  50% { stroke-opacity: 1; }
}

/* ============================================
   HERO BAR - Top status bar
   ============================================ */

.bp-hero-bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
  border-bottom: 1px solid var(--bp-panel-border);
}

.bp-hero-bar__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bp-hero-bar__center {
  display: flex;
  align-items: center;
  gap: 20px;
}

.bp-hero-bar__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Season Badge */
.bp-season-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--bp-cyan-soft), var(--bp-purple-soft));
  border: 1px solid var(--bp-cyan);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--bp-cyan);
  box-shadow: 0 0 20px var(--bp-cyan-soft), inset 0 0 20px var(--bp-cyan-soft);
}

.bp-season-badge__icon {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

/* Season Info */
.bp-season-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bp-season-info__name {
  margin: 0;
  font-family: 'Bebas Neue', 'Oxanium', sans-serif;
  font-size: clamp(20px, 2.5vw, 28px);
  letter-spacing: 2px;
  color: var(--bone);
  line-height: 1;
}

.bp-season-info__timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timer-icon {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  opacity: 0.7;
}

/* Level Ring - Circular tier indicator */
.bp-level-ring {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.bp-level-ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.bp-level-ring__bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 6;
}

.bp-level-ring__fill {
  fill: none;
  stroke: url(#bp-ring-gradient);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 0.8s ease;
  filter: drop-shadow(0 0 6px var(--bp-cyan-glow));
  animation: bpRingPulse 3s ease-in-out infinite;
}

.bp-level-ring__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bp-level-ring__label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ash);
}

.bp-level-ring__value {
  font-family: 'Bebas Neue', 'Oxanium', sans-serif;
  font-size: 28px;
  letter-spacing: 1px;
  color: var(--bone);
  line-height: 1;
}

/* XP Block */
.bp-xp-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.bp-xp-block__bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.bp-xp-block__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--bp-cyan), var(--bp-purple), var(--bp-pink));
  border-radius: 999px;
  transition: width 0.5s ease;
  position: relative;
}

.bp-xp-block__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: bpShine 2s ease-in-out infinite;
}

.bp-xp-block__text {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Wallet Chip */
.bp-wallet-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bp-gold-soft);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
}

.bp-wallet-chip__icon {
  font-size: 14px;
  color: var(--bp-gold);
}

.bp-wallet-chip__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash);
}

.bp-wallet-chip__value {
  font-family: 'Oxanium', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--bp-gold);
}

/* Boost Chip */
.bp-boost-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bp-purple-soft);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 8px;
  font-size: 11px;
  color: var(--ash);
}

.bp-boost-chip__icon {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

/* ============================================
   MAIN GRID - Sidebar + Track
   ============================================ */

.bp-main-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* ============================================
   SIDEBAR - Season Card, Premium, Boosts
   ============================================ */

.bp-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(180deg, var(--bp-panel), rgba(5, 8, 15, 0.98));
  border-right: 1px solid var(--bp-panel-border);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Season Card */
.bp-season-card {
  position: relative;
  padding: 20px;
  background: linear-gradient(135deg, rgba(20, 30, 50, 0.9), rgba(10, 15, 30, 0.95));
  border: 1px solid var(--bp-panel-border);
  border-radius: 16px;
  overflow: hidden;
}

.bp-season-card__glow {
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 100%;
  background: radial-gradient(circle, var(--bp-cyan-soft), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}

.bp-season-card__content {
  position: relative;
  z-index: 1;
}

.bp-season-card__badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bp-cyan-soft);
  border: 1px solid var(--bp-cyan);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--bp-cyan);
  margin-bottom: 12px;
}

.bp-season-card__title {
  font-family: 'Bebas Neue', 'Oxanium', sans-serif;
  font-size: 32px;
  letter-spacing: 3px;
  color: var(--bone);
  line-height: 1;
  margin-bottom: 4px;
}

.bp-season-card__subtitle {
  font-size: 13px;
  color: var(--ash);
  margin-bottom: 16px;
}

.bp-season-card__divider {
  height: 1px;
  background: linear-gradient(90deg, var(--bp-cyan), transparent);
  margin-bottom: 16px;
  opacity: 0.5;
}

.bp-season-card__rewards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bp-season-card__reward {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ash);
}

.bp-season-card__reward .reward-icon {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  width: 32px;
  text-align: center;
}

/* Premium Panel */
.bp-premium-panel {
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 215, 0, 0.02));
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
}

.bp-premium-panel__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.bp-premium-panel__icon {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.bp-premium-panel__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bp-gold);
}

.bp-premium-panel__desc {
  font-size: 11px;
  color: var(--ash);
  line-height: 1.5;
  margin: 0 0 12px;
}

.bp-premium-panel__status {
  margin-bottom: 12px;
}

.bp-premium-panel__tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash);
}

.bp-premium-panel__btn {
  position: relative;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--bp-gold), #ffaa00);
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #000;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bp-premium-panel__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--bp-gold-glow);
}

.bp-premium-panel__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.bp-premium-panel__btn .btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  animation: bpShine 3s ease-in-out infinite;
}

.bp-premium-panel__btn.hidden {
  display: none;
}

/* Boost Panel */
.bp-boost-panel {
  padding: 16px;
  background: var(--bp-surface);
  border: 1px solid var(--bp-panel-border);
  border-radius: 12px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.bp-boost-panel__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.bp-boost-panel__icon {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.bp-boost-panel__title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bone);
}

.bp-boost-panel__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

/* Boost Items */
.bp-boost-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
}

.bp-boost-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--bone);
}

.bp-boost-meta {
  font-size: 10px;
  color: var(--ash);
}

.bp-boost-cta {
  padding: 6px 12px;
  background: var(--bp-purple);
  border: none;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.bp-boost-cta:hover {
  transform: scale(1.05);
}

.bp-boost-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   TRACK AREA - Horizontal scrolling rewards
   ============================================ */

.bp-track-area {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.bp-track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--bp-panel-border);
  background: rgba(0, 0, 0, 0.3);
}

.bp-track-header__labels {
  display: flex;
  gap: 24px;
}

.bp-track-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.bp-track-label .label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.bp-track-label--free {
  color: var(--bp-cyan);
}

.bp-track-label--free .label-dot {
  background: var(--bp-cyan);
  box-shadow: 0 0 10px var(--bp-cyan-glow);
}

.bp-track-label--premium {
  color: var(--bp-gold);
}

.bp-track-label--premium .label-dot {
  background: var(--bp-gold);
  box-shadow: 0 0 10px var(--bp-gold-glow);
}

/* Claim All Button */
.bp-claim-all-btn {
  position: relative;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--bp-cyan), var(--bp-purple));
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bp-claim-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--bp-cyan-glow);
}

.bp-claim-all-btn .btn-pulse {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  animation: bpPulse 2s ease-in-out infinite;
  pointer-events: none;
}

.bp-claim-all-btn.hidden {
  display: none;
}

/* Track Container */
.bp-track-container {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.bp-track-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    var(--bp-cyan) 0%, 
    var(--bp-purple) 50%, 
    rgba(255, 255, 255, 0.1) 100%
  );
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
}

.bp-track-scroll {
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 20px 24px;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 24px;
}

.bp-track-scroll::-webkit-scrollbar {
  height: 6px;
}

.bp-track-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.bp-track-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--bp-cyan), var(--bp-purple));
  border-radius: 3px;
}

.bp-track {
  display: flex;
  gap: 16px;
  height: 100%;
  width: max-content;
  align-items: stretch;
}

/* ============================================
   TIER CARDS - Individual reward tiers
   ============================================ */

.bp-tier {
  position: relative;
  width: var(--tierW);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bp-panel);
  border: 1px solid var(--bp-panel-border);
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.bp-tier:hover:not(.is-locked) {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--bp-cyan);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--bp-cyan-soft);
}

.bp-tier.is-locked {
  opacity: 0.5;
  filter: grayscale(0.3);
}

.bp-tier.is-claimable {
  border-color: var(--bp-cyan);
  box-shadow: 0 0 20px var(--bp-cyan-soft);
  animation: bpGlow 3s ease-in-out infinite;
}

.bp-tier.is-claimed {
  opacity: 0.7;
}

.bp-tier.is-current {
  border-color: var(--bp-gold);
  box-shadow: 0 0 25px var(--bp-gold-soft);
}

/* Claimed Badge */
.bp-tier__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: var(--bp-cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 0 15px var(--bp-cyan-glow);
}

.bp-tier__badge::before {
  content: '✓';
  font-size: 14px;
  color: #000;
  font-weight: bold;
}

/* Tier Header */
.bp-tier__header {
  position: relative;
  padding: 0;
}

.bp-tier__art {
  position: relative;
  height: 120px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(168, 85, 247, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bp-tier__art::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
  z-index: 1;
}

.tier-icon-wrap {
  position: relative;
  z-index: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tier-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 15px var(--bp-cyan-glow));
  transition: transform 0.3s ease;
}

.bp-tier:hover:not(.is-locked) .tier-icon {
  transform: scale(1.1);
}

.tier-icon-fallback {
  position: absolute;
  width: 50px;
  height: 50px;
  border: 2px solid var(--bp-cyan);
  border-radius: 50%;
  opacity: 0;
}

.tier-icon-wrap.is-fallback .tier-icon {
  opacity: 0;
}

.tier-icon-wrap.is-fallback .tier-icon-fallback {
  opacity: 1;
}

.bp-tier__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.bp-tier__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bp-tier__label {
  font-family: 'Oxanium', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bone);
}

.bp-tier__xp {
  font-size: 10px;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bp-tier__meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bp-tier__state {
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bp-tier__state[data-state="locked"] {
  color: var(--ash);
}

.bp-tier__state[data-state="claimable"] {
  color: var(--bp-cyan);
  background: var(--bp-cyan-soft);
}

.bp-tier__state[data-state="claimed"] {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
}

.bp-tier__lock {
  font-size: 12px;
}

.bp-tier__lock::before {
  content: 'LOCK';
}

/* Tier Rewards */
.bp-tier__rewards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  flex: 1;
}

.bp-tier__tile {
  position: relative;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bp-panel-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.bp-tier__tile.is-free {
  border-color: rgba(0, 229, 255, 0.2);
}

.bp-tier__tile.is-premium {
  border-color: rgba(255, 215, 0, 0.2);
  background: rgba(255, 215, 0, 0.03);
}

.bp-tier__tile.is-locked {
  opacity: 0.5;
}

.bp-tier__tile.is-premium-locked {
  opacity: 0.4;
}

.bp-tier__tile.is-claimed {
  opacity: 0.6;
}

.bp-tier__tile-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bp-tier__tile.is-free .bp-tier__tile-label {
  color: var(--bp-cyan);
}

.bp-tier__tile.is-premium .bp-tier__tile-label {
  color: var(--bp-gold);
}

.bp-tier__tile-body {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bp-tier__reward-icon {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.bp-tier__reward-text {
  flex: 1;
  min-width: 0;
}

.bp-tier__reward-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bp-tier__reward-meta {
  font-size: 9px;
  color: var(--ash);
}

.bp-tier__reward-qty {
  font-size: 10px;
  font-weight: 700;
  color: var(--bp-cyan);
}

.bp-tier__tile-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bp-gold);
}

/* Tier CTA */
.bp-tier__cta {
  padding: 12px;
  border-top: 1px solid var(--bp-panel-border);
}

.bp-tier__cta-btn {
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ash);
  cursor: pointer;
  transition: all 0.2s ease;
}

.bp-tier__cta-btn:not(:disabled):hover {
  background: linear-gradient(135deg, var(--bp-cyan), var(--bp-purple));
  border-color: var(--bp-cyan);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--bp-cyan-soft);
}

.bp-tier__cta-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.bp-tier.is-claimable .bp-tier__cta-btn {
  background: linear-gradient(135deg, var(--bp-cyan), var(--bp-purple));
  border-color: var(--bp-cyan);
  color: #fff;
}

.bp-tier.is-flash {
  animation: bpFlash 0.6s ease;
}

@keyframes bpFlash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.battlepass-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}

.battlepass-toast-item {
  padding: 12px 20px;
  background: var(--bp-panel);
  border: 1px solid var(--bp-cyan);
  border-radius: 8px;
  font-size: 12px;
  color: var(--bone);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--bp-cyan-soft);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto;
}

.battlepass-toast-item.is-live {
  opacity: 1;
  transform: translateY(0);
}

.battlepass-toast-item.is-leaving {
  opacity: 0;
  transform: translateY(-10px);
}

.battlepass-empty {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--ash);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
  .bp-main-grid {
    grid-template-columns: 260px 1fr;
  }
  
  #battlepass-screen {
    --tierW: clamp(180px, 20vw, 240px);
  }
}

@media (max-width: 1000px) {
  .bp-hero-bar {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .bp-hero-bar__left,
  .bp-hero-bar__center,
  .bp-hero-bar__right {
    justify-content: center;
  }
  
  .bp-main-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  
  .bp-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid var(--bp-panel-border);
    overflow: visible;
  }
  
  .bp-season-card,
  .bp-premium-panel,
  .bp-boost-panel {
    flex: 1 1 280px;
    min-width: 280px;
  }
  
  .bp-boost-panel {
    max-height: 200px;
  }
}

@media (max-width: 700px) {
  #battlepass-screen {
    --tierW: 200px;
    height: auto;
    max-height: none;
    overflow-y: auto;
  }
  
  .bp-hero-bar {
    padding: 12px 16px;
  }
  
  .bp-level-ring {
    width: 60px;
    height: 60px;
  }
  
  .bp-level-ring__value {
    font-size: 22px;
  }
  
  .bp-xp-block {
    min-width: 140px;
  }
  
  .bp-season-badge {
    padding: 6px 10px;
    font-size: 10px;
  }
  
  .bp-season-info__name {
    font-size: 18px;
  }
  
  .bp-wallet-chip,
  .bp-boost-chip {
    padding: 6px 10px;
    font-size: 10px;
  }
  
  .bp-sidebar {
    flex-direction: column;
  }
  
  .bp-season-card,
  .bp-premium-panel,
  .bp-boost-panel {
    flex: none;
    min-width: 0;
  }
  
  .bp-track-scroll {
    padding: 16px;
  }
  
  .bp-tier__rewards {
    grid-template-columns: 1fr;
  }
  
  .bp-tier__art {
    height: 100px;
  }
}

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

.badge-card {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(32, 242, 155, 0.18);
  background: linear-gradient(140deg, rgba(12, 18, 26, 0.94), rgba(8, 12, 18, 0.88));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 12px 24px rgba(0, 0, 0, 0.4);
  display: grid;
  gap: 6px;
}

.badge-card .badge-title {
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-tier {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  background: rgba(32, 242, 155, 0.18);
  border: 1px solid rgba(32, 242, 155, 0.4);
  color: var(--bone);
}

.badge-tier.tier-legendary {
  background: rgba(255, 203, 96, 0.18);
  border-color: rgba(255, 203, 96, 0.45);
  color: #ffd36a;
}

.badge-tier.tier-rare {
  background: rgba(123, 92, 255, 0.16);
  border-color: rgba(123, 92, 255, 0.4);
  color: #d2c2ff;
}

.badge-description {
  font-size: 12px;
  color: var(--ash);
  line-height: 1.5;
}

.leaderboard-section {
  display: grid;
  gap: 10px;
}

.leaderboard-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.leaderboard-season {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ash);
}

.leaderboard-rank {
  font-size: 18px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 1px;
}

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

.leaderboard-row {
  display: grid;
  grid-template-columns: 52px 1fr 80px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(26, 36, 50, 0.75);
  background: linear-gradient(120deg, rgba(8, 12, 18, 0.92), rgba(6, 10, 16, 0.9));
}

.leaderboard-row.is-self {
  border-color: rgba(32, 242, 155, 0.35);
  box-shadow: 0 0 0 1px rgba(32, 242, 155, 0.1), 0 10px 20px rgba(0, 0, 0, 0.35);
}

.leaderboard-rank-pill {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(32, 242, 155, 0.08);
  border: 1px solid rgba(32, 242, 155, 0.25);
  font-weight: 700;
  letter-spacing: 1px;
}

.leaderboard-name {
  font-weight: 700;
  letter-spacing: 0.8px;
}

.leaderboard-meta-line {
  font-size: 11px;
  color: var(--ash);
}

.leaderboard-score {
  text-align: right;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.builder-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.builder-column {
  padding: 12px;
  border: var(--outline);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(12, 16, 22, 0.95), rgba(8, 12, 18, 0.92));
  box-shadow: var(--shadow);
}

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

.deck-summary {
  font-size: 12px;
  display: grid;
  gap: 8px;
}

.builder-profile {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.collection-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: linear-gradient(150deg, rgba(14, 18, 26, 0.9), rgba(8, 12, 18, 0.85));
  border: 1px solid rgba(26, 36, 50, 0.7);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), var(--shadow);
  position: relative;
  overflow: hidden;
}

.collection-toolbar::after,
.collection-filters::after,
.collection-stats::after,
.collection-group::after {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at top, rgba(32, 242, 155, 0.12), transparent 60%);
  opacity: 0.45;
  pointer-events: none;
}

.collection-summary {
  display: grid;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.85);
  border: 1px solid rgba(26, 36, 50, 0.65);
  min-width: 120px;
  line-height: 1.4;
}

.collection-summary-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash);
}

.collection-summary-value {
  font-size: 14px;
  letter-spacing: 1px;
  font-weight: bold;
}

.collection-search input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(26, 36, 50, 0.8);
  background: rgba(8, 12, 18, 0.9);
  color: var(--bone);
  min-width: 240px;
}

.collection-search input:focus {
  outline: none;
  border-color: rgba(32, 242, 155, 0.6);
  filter: brightness(1.1);
}

.collection-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  align-items: start;
}

.collection-filters {
  padding: 12px 14px;
  border: 1px solid rgba(26, 36, 50, 0.7);
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(12, 16, 22, 0.92), rgba(8, 12, 18, 0.9));
  position: sticky;
  top: 110px;
  display: grid;
  gap: 12px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), var(--shadow);
  overflow: hidden;
}

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

.collection-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(26, 36, 50, 0.7);
  background: linear-gradient(150deg, rgba(12, 16, 22, 0.92), rgba(8, 12, 18, 0.88));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), var(--shadow);
  position: relative;
  overflow: hidden;
}

.collection-stat {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(32, 242, 155, 0.15);
  background: rgba(10, 14, 20, 0.75);
  line-height: 1.4;
}

.collection-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ash);
}

.collection-stat-value {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.6px;
}

.collection-list {
  display: grid;
  gap: 14px;
}

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

.collection-note {
  font-size: 11px;
  color: var(--ash);
  margin-bottom: 10px;
  padding: 10px 12px;
  background: rgba(8, 12, 18, 0.85);
  border-radius: 8px;
  border: 1px dashed rgba(32, 242, 155, 0.15);
}

.collection-group {
  margin-bottom: 0;
  padding: 12px;
  background: linear-gradient(160deg, rgba(14, 18, 26, 0.94), rgba(8, 12, 18, 0.9));
  border-radius: 10px;
  border: 1px solid rgba(26, 36, 50, 0.65);
  position: relative;
  overflow: hidden;
  animation: collectionGroupIn 0.35s steps(4, end) both;
  animation-delay: var(--delay, 0s);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), var(--shadow);
}

.collection-group::before {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(32, 242, 155, 0.35), transparent);
  opacity: 0.4;
  transform: translateX(-120%);
  animation: collectionScan 6.5s linear infinite;
}

.collection-group-title {
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  color: var(--bone);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  line-height: 1.4;
}

.profile-active {
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--sol);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.profile-deck-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-deck {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(8, 12, 18, 0.85);
  border-radius: 8px;
}

.profile-deck-title {
  font-weight: bold;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.profile-deck-meta {
  font-size: 11px;
  color: var(--ash);
}

.profile-deck-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.shop-credits {
  font-size: 12px;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash);
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.shop-search input {
  padding: 8px 10px;
  border: 1px solid rgba(32, 242, 155, 0.25);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.9);
  color: var(--bone);
  min-width: 220px;
}

.shop-search input:focus {
  outline: none;
  border-color: rgba(32, 242, 155, 0.6);
  filter: brightness(1.1);
}

.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  align-items: start;
}

.shop-filters {
  padding: 12px;
  border: 1px solid rgba(26, 36, 50, 0.8);
  border-radius: 12px;
  background: rgba(8, 12, 18, 0.9);
  position: sticky;
  top: 84px;
  display: grid;
  gap: 12px;
}

.filter-group {
  display: grid;
  gap: 8px;
}

.filter-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(26, 36, 50, 0.8);
  background: rgba(8, 12, 18, 0.9);
  color: var(--ash);
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.filter-chip.active {
  color: var(--bone);
  border-color: rgba(32, 242, 155, 0.6);
  background: linear-gradient(120deg, rgba(32, 242, 155, 0.2), rgba(123, 92, 255, 0.2));
}

.shop-select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(26, 36, 50, 0.8);
  background: rgba(8, 12, 18, 0.9);
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 11px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.shop-grid .empty {
  grid-column: 1 / -1;
}

.shop-card {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(26, 36, 50, 0.8);
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(10, 14, 20, 0.95), rgba(8, 12, 18, 0.95));
  box-shadow: var(--shadow);
  transition: transform 0.2s steps(3, end), filter 0.2s steps(3, end);
  --shop-accent: var(--sol);
}

.shop-card::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  height: 3px;
  border-radius: 999px;
  background: var(--shop-accent);
  opacity: 0.6;
}

.shop-card[data-type='bundle'] {
  --shop-accent: var(--miasma);
  background: linear-gradient(150deg, rgba(18, 16, 28, 0.96), rgba(8, 12, 18, 0.94));
}

.shop-card[data-type='deck'] {
  --shop-accent: var(--blood);
  background: linear-gradient(150deg, rgba(22, 14, 18, 0.96), rgba(8, 12, 18, 0.94));
}

.shop-card.is-featured {
  border-color: rgba(32, 242, 155, 0.45);
  box-shadow: 0 0 18px rgba(32, 242, 155, 0.18), var(--shadow);
}

.shop-card.is-featured::after {
  content: 'Featured';
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 6px;
  border-radius: 999px;
  border: 1px solid rgba(32, 242, 155, 0.6);
  color: var(--sol);
  background: rgba(8, 12, 18, 0.9);
}

.shop-card:hover {
  transform: translateY(-4px) scale(1.01);
  filter: brightness(1.1);
}

.shop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.shop-card-title {
  font-weight: bold;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.shop-card-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--shop-accent);
  background: rgba(8, 12, 18, 0.9);
  color: var(--shop-accent);
}

.shop-card-price {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--shop-accent);
  margin-top: 6px;
}

.shop-card-description {
  font-size: 12px;
  color: var(--ash);
  margin-top: 6px;
}

.shop-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.shop-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.9);
  border: 1px solid rgba(26, 36, 50, 0.7);
  color: var(--ash);
}

.shop-card-meta {
  margin-top: 8px;
  font-size: 11px;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.shop-card-breakdown {
  margin-top: 6px;
  font-size: 11px;
  color: var(--ash);
}

.shop-card-bundle {
  margin-top: 8px;
  display: grid;
  gap: 4px;
}

.shop-card-bundle-row {
  font-size: 11px;
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.shop-card-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

button {
  padding: 8px 12px;
  border: 1px solid #1a2432;
  background: #0c1119;
  color: var(--bone);
  cursor: pointer;
  border-radius: 6px;
  font-family: 'Rajdhani', 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: transform 0.12s steps(2, end), filter 0.12s steps(2, end), opacity 0.12s steps(2, end);
}

button:hover {
  transform: translateY(-1px) rotate(-0.2deg);
  filter: brightness(1.15) drop-shadow(0 0 8px rgba(32, 242, 155, 0.18));
}

button:active {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.95);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  filter: grayscale(0.4);
}

.menu-tabs .tab-btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: #0c1119;
  color: var(--ash);
  font-size: 12px;
}

.menu-tabs .tab-btn.active {
  color: var(--bone);
  background: linear-gradient(120deg, rgba(32, 242, 155, 0.18), rgba(123, 92, 255, 0.22));
  border-color: rgba(32, 242, 155, 0.5);
  filter: drop-shadow(0 0 6px rgba(32, 242, 155, 0.25));
}

.btn-primary {
  border-color: rgba(32, 242, 155, 0.7);
  background: linear-gradient(120deg, rgba(32, 242, 155, 0.3), rgba(123, 92, 255, 0.25));
  color: var(--bone);
}

.cta-end.cta-ready:not(:disabled) {
  animation: ctaPulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 1px rgba(32, 242, 155, 0.35), 0 12px 26px rgba(0, 0, 0, 0.55), 0 0 24px rgba(32, 242, 155, 0.24);
}

.btn-primary:hover {
  filter: brightness(1.2) drop-shadow(0 0 10px rgba(32, 242, 155, 0.35));
}

.btn-ghost {
  background: rgba(10, 14, 20, 0.6);
  border-color: rgba(26, 36, 50, 0.8);
  color: var(--ash);
}

.board {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 0.9fr) minmax(360px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  height: 100%;
  position: relative;
  z-index: 2;
  padding: 12px 16px 14px;
  perspective: 1400px;
}

.board-column,
.board-center {
  padding: 12px;
  position: relative;
}

#player-0-column {
  grid-row: 1;
  grid-column: 1;
  align-self: stretch;
}

#player-1-column {
  grid-row: 1;
  grid-column: 3;
  align-self: stretch;
}

.board-center {
  grid-row: 1;
  grid-column: 2;
  align-self: stretch;
}

.board-column {
  transition: transform 0.3s ease-out, filter 0.3s ease-out, opacity 0.3s ease-out;
  filter: var(--depth-filter, none) var(--state-filter, none);
  background: radial-gradient(circle at 30% 0%, rgba(32, 242, 155, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(10, 16, 22, 0.88), rgba(6, 10, 16, 0.72));
  border: 1px solid rgba(32, 242, 155, 0.16);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 24px rgba(32, 242, 155, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  overflow: hidden;
  min-height: 42vh;
}

.board-center {
  background: radial-gradient(circle at 60% 0%, rgba(123, 92, 255, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(8, 12, 18, 0.9), rgba(5, 8, 12, 0.82));
  border: 1px solid rgba(32, 242, 155, 0.2);
  border-radius: 18px;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.5), 0 0 32px rgba(32, 242, 155, 0.12);
  padding: 16px;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.player-field {
  display: grid;
  gap: 12px;
}

.player-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid rgba(32, 242, 155, 0.18);
  background: linear-gradient(120deg, rgba(32, 242, 155, 0.08), rgba(123, 92, 255, 0.06));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35), 0 0 14px rgba(32, 242, 155, 0.08);
}

.player-rail .zone-title {
  margin: 0;
  letter-spacing: 1.2px;
}

.player-rail .meta {
  margin: 0;
  color: var(--ash);
}

.board-column::before,
.board-center::before {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  height: 1px;
  background: linear-gradient(90deg, rgba(32, 242, 155, 0.35), rgba(123, 92, 255, 0.25), transparent);
  opacity: 0.6;
}

.board-column h2 {
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bone);
}

.board-column.is-active {
  border-color: rgba(32, 242, 155, 0.32);
  box-shadow: 0 0 0 1px rgba(32, 242, 155, 0.12), 0 20px 36px rgba(0, 0, 0, 0.55);
  background: linear-gradient(160deg, rgba(18, 24, 34, 0.96), rgba(8, 12, 18, 0.9));
  --state-filter: none;
}

.board-column.is-active h2 {
  text-shadow: 0 0 10px rgba(32, 242, 155, 0.25);
}

.board-column.is-inactive {
  opacity: 0.92;
  --state-filter: saturate(0.9) brightness(0.95);
}

.board-column.is-local {
  transform: scale(1.02);
  --depth-filter: saturate(1.03) brightness(1.02);
}

.board-column.is-opponent {
  transform: scale(0.96);
  --depth-filter: saturate(0.95) brightness(0.97);
}

.board-column.slot-highlight::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 14px;
  border: 1px solid var(--slot-color, rgba(32, 242, 155, 0.35));
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), 0 0 18px var(--slot-color, rgba(32, 242, 155, 0.3));
  opacity: 0.6;
  transition: opacity 0.2s ease-out, box-shadow 0.2s ease-out;
  pointer-events: none;
  animation: slotPulse 2.8s ease-in-out infinite;
}

.board-column.slot-highlight.slot-hovered::after {
  opacity: 0.85;
  box-shadow: 0 0 26px rgba(0, 0, 0, 0.45), 0 0 24px var(--slot-color, rgba(32, 242, 155, 0.4));
}

.board-column.slot-project {
  --slot-color: rgba(32, 242, 155, 0.45);
}

.meta {
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--ash);
}

.meta.active {
  color: var(--sol);
  text-shadow: 0 0 8px rgba(32, 242, 155, 0.35);
}

.player-zone {
  position: relative;
}

.zone-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(32, 242, 155, 0.2);
  margin-bottom: 6px;
}

.zone-title {
  margin: 0;
  font-size: 16px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #e9fff7;
  text-shadow: 0 0 10px rgba(32, 242, 155, 0.35);
}

.zone {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 16, 22, 0.55), rgba(6, 10, 16, 0.34));
  border: 1px solid rgba(32, 242, 155, 0.12);
  box-shadow: inset 0 0 28px rgba(32, 242, 155, 0.08), 0 0 18px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: visible;
}

.zone::before {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(32, 242, 155, 0.5), rgba(123, 92, 255, 0.3), transparent);
  opacity: 0.8;
  filter: drop-shadow(0 0 8px rgba(32, 242, 155, 0.35));
}

.zone h3 {
  margin: 2px 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--ash);
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.board .card-list {
  position: relative;
  min-height: 96px;
}

.board .card-list.slot-highlight::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 12px;
  border: 1px solid var(--slot-color, rgba(32, 242, 155, 0.35));
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.35), 0 0 16px var(--slot-color, rgba(32, 242, 155, 0.25));
  opacity: 0.7;
  transition: opacity 0.2s ease-out, box-shadow 0.2s ease-out;
  pointer-events: none;
  animation: slotPulse 2.6s ease-in-out infinite;
}

.board .card-list.slot-highlight.slot-hovered::before {
  opacity: 0.95;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.4), 0 0 22px var(--slot-color, rgba(32, 242, 155, 0.32));
}

.board .card-list.slot-project {
  --slot-color: rgba(32, 242, 155, 0.45);
}

.board .card-list.slot-protocol {
  --slot-color: rgba(123, 92, 255, 0.45);
}

.board .card-list.slot-trap {
  --slot-color: rgba(255, 55, 95, 0.45);
}

.card {
  border: 1px solid rgba(26, 36, 50, 0.85);
  padding: 8px;
  background-image: linear-gradient(160deg, rgba(18, 24, 34, 0.95), rgba(8, 12, 18, 0.92)),
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 60%);
  background-size: 100% 100%, 200% 200%;
  background-position: 0 0, 120% 0;
  background-repeat: no-repeat;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), var(--shadow), 0 0 14px var(--card-glow);
  position: relative;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.18s ease-out, box-shadow 0.18s ease-out;
  will-change: transform, filter, box-shadow;
  overflow: visible;
  transform-origin: center;
  --card-accent: rgba(32, 242, 155, 0.25);
  --card-glow: rgba(32, 242, 155, 0.12);
  --card-outline: rgba(32, 242, 155, 0.28);
}

.card:hover,
.hand-grid.hand-fanned > .hand-card:hover {
  box-shadow: 0 0 0 1px var(--card-outline), 0 18px 32px rgba(0, 0, 0, 0.55), 0 0 26px var(--card-glow);
  filter: brightness(1.08) saturate(1.08);
}

.card::before {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 6px;
  height: 3px;
  border-radius: 999px;
  background: var(--card-accent);
  opacity: 0.8;
}

.card::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  pointer-events: none;
  opacity: 0.35;
  transition: opacity 0.2s ease-out;
}

.card-project {
  --card-accent: rgba(32, 242, 155, 0.5);
  --card-glow: rgba(32, 242, 155, 0.2);
  --card-outline: rgba(32, 242, 155, 0.3);
}

.card-protocol {
  --card-accent: rgba(123, 92, 255, 0.55);
  --card-glow: rgba(123, 92, 255, 0.2);
  --card-outline: rgba(123, 92, 255, 0.3);
}

.card-trap {
  --card-accent: rgba(255, 55, 95, 0.5);
  --card-glow: rgba(255, 55, 95, 0.18);
  --card-outline: rgba(255, 55, 95, 0.28);
}

.card-rugpull {
  --card-accent: rgba(255, 55, 95, 0.7);
  --card-glow: rgba(255, 55, 95, 0.22);
  --card-outline: rgba(255, 55, 95, 0.32);
}

.card-hero {
  --card-accent: rgba(123, 92, 255, 0.65);
  --card-glow: rgba(123, 92, 255, 0.24);
  --card-outline: rgba(123, 92, 255, 0.32);
}

.card-unowned {
  opacity: 0.4;
  filter: grayscale(1);
}

.card-selected {
  outline: 2px solid var(--sol);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow), 0 0 16px var(--glow-green);
}

.card-title {
  font-weight: bold;
  margin-bottom: 4px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-meta {
  font-size: 10px;
  color: var(--ash);
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.card-art {
  margin: 6px 0 8px;
  height: 150px;
  border-radius: 12px;
  border: 1px dashed rgba(32, 242, 155, 0.35);
  background: radial-gradient(circle at top, rgba(32, 242, 155, 0.18), rgba(8, 12, 18, 0.9));
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.card-art::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: drop-shadow(0 0 12px rgba(32, 242, 155, 0.45));
}

.card-has-art .card-art {
  border-color: var(--card-accent);
  box-shadow: inset 0 0 16px var(--card-glow);
}

.card-jupiter .card-art {
  border-color: rgba(32, 242, 155, 0.45);
  box-shadow: inset 0 0 18px rgba(32, 242, 155, 0.12);
}

.card-degods {
  --card-accent: rgba(255, 203, 96, 0.6);
  --card-glow: rgba(255, 203, 96, 0.22);
  --card-outline: rgba(255, 203, 96, 0.32);
}

.card-degods .card-art {
  border-color: rgba(255, 203, 96, 0.45);
  box-shadow: inset 0 0 18px rgba(255, 203, 96, 0.18);
}

.card-text {
  font-size: 11px;
  color: var(--bone);
  line-height: 1.45;
  white-space: normal;
  position: relative;
  z-index: 2;
}

.card-text::before {
  content: '';
  position: absolute;
  inset: -6px -8px;
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.16s ease-out;
  z-index: -1;
}

.card-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card-actions button {
  font-size: 11px;
  padding: 6px 10px;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, filter 0.12s ease-out;
}

.card-actions button:hover {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 0 0 1px var(--card-outline), 0 8px 18px rgba(0, 0, 0, 0.45), 0 0 12px var(--card-glow);
  filter: brightness(1.08) saturate(1.05);
}

.card-actions button:active {
  transform: translateY(0) scale(0.96);
  filter: brightness(0.96);
}

.card-status {
  margin-top: 6px;
  font-size: 11px;
  color: var(--blood);
  position: relative;
  z-index: 2;
}

.card-preview {
  position: absolute;
  inset: 6px;
  border-radius: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.92), rgba(10, 14, 20, 0.86) 70%, rgba(10, 14, 20, 0.25) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.55), 0 0 16px rgba(0, 0, 0, 0.3);
  display: grid;
  gap: 6px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease-out, transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 5;
}

.card-preview-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.card-preview-meta {
  font-size: 10px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--ash);
}

.card-preview-text {
  font-size: 11px;
  line-height: 1.5;
  color: var(--bone);
}

.card-keyword {
  display: inline-block;
  padding: 0 4px;
  margin: 0 1px;
  border-radius: 4px;
  border: 1px solid rgba(32, 242, 155, 0.2);
  background: rgba(32, 242, 155, 0.12);
  color: #e8fef7;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.card-flash {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: radial-gradient(circle at top, rgba(32, 242, 155, 0.35), transparent 65%);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
}

.card-ghost {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.92;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55));
  transform: translate3d(-9999px, -9999px, 0);
}

body.hand-dragging .hand-grid.hand-fanned > .hand-card {
  filter: saturate(0.9) brightness(0.95);
}

@supports (backdrop-filter: blur(4px)) {
  .card-text::before {
    backdrop-filter: blur(4px);
  }

  .card-preview {
    backdrop-filter: blur(6px);
  }
}

@media (hover: hover) and (pointer: fine) {
  .card:hover,
  .card:focus-within {
    transform: translateY(-12px) scale(1.15);
    filter: brightness(1.1) saturate(1.08) contrast(1.06);
    box-shadow: 0 0 0 1px var(--card-outline), 0 24px 42px rgba(0, 0, 0, 0.6), 0 0 32px var(--card-glow),
      0 0 18px rgba(32, 242, 155, 0.45);
    z-index: 40;
  }

  .card-unowned:hover,
  .card-unowned:focus-within {
    filter: grayscale(1) brightness(0.9);
  }

  .card-meta,
  .card-text,
  .card-status {
    transition: opacity 0.16s ease-out, transform 0.16s ease-out;
    opacity: 0.86;
    transform: translateY(6px);
  }

  .card:hover,
  .card:focus-within {
    animation: cardShimmer 4.4s ease-in-out infinite;
  }

  .card:hover .card-meta,
  .card:hover .card-text,
  .card:hover .card-status,
  .card:focus-within .card-meta,
  .card:focus-within .card-text,
  .card:focus-within .card-status {
    opacity: 1;
    transform: translateY(0);
  }

  .card:hover .card-text::before,
  .card:focus-within .card-text::before {
    opacity: 1;
  }

  .card:hover::after,
  .card:focus-within::after {
    animation: cardBreath 2.6s ease-in-out infinite;
    opacity: 0.6;
  }

  .card:hover .card-preview,
  .card:focus-within .card-preview {
    opacity: 1;
    transform: translateY(0);
  }

  .card:hover .card-keyword,
  .card:focus-within .card-keyword {
    animation: keywordPulse 2.8s ease-in-out infinite;
  }

  .hand-grid:hover {
    --hand-spread-current: var(--hand-spread-hover);
  }

  .hand-grid.hand-fanned > .hand-card:hover {
    transform: translate3d(
        calc(var(--hand-offset) * var(--hand-spread-current)),
        calc(calc(var(--hand-abs-offset) * var(--hand-drop)) - var(--hand-hover-lift)),
        0
      )
      rotate(0deg)
      scale(1.12)
      translateZ(12px);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 18px rgba(32, 242, 155, 0.35));
    z-index: 300;
  }
}

.card.card-committing {
  transform: translateY(-2px) scale(0.97);
  opacity: 0.75;
  box-shadow: 0 0 0 1px var(--card-outline), 0 12px 22px rgba(0, 0, 0, 0.55), 0 0 18px var(--card-glow);
  transition: transform 0.16s ease-out, opacity 0.16s ease-out;
}

.card.card-committing .card-flash {
  animation: cardFlash 0.28s ease-out 1;
}

.booster-results {
  margin-top: 12px;
  border: var(--outline);
  padding: 10px;
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.9);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.booster-results::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 30%, rgba(32, 242, 155, 0.22), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(123, 92, 255, 0.12), transparent 60%);
  opacity: 0.35;
  filter: blur(8px);
  transform: translateY(6px) scale(0.98);
  animation: boosterSmoke 6.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.booster-results::after {
  content: '';
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  border: 1px solid rgba(32, 242, 155, 0.18);
  box-shadow: 0 0 16px rgba(32, 242, 155, 0.18);
  opacity: 0.22;
  transform: translateY(10px) scale(0.92) rotate(0deg);
  animation: boosterLoop 8s linear infinite;
  pointer-events: none;
  z-index: 0;
}

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

.booster-results-title {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--sol);
}

.booster-open {
  animation: boosterFlash 0.6s steps(3, end) 1;
}

.booster-card-reveal {
  opacity: 0;
  animation: burstOut 0.6s steps(4, end) forwards;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid rgba(26, 36, 50, 0.7);
  background: linear-gradient(160deg, rgba(16, 22, 30, 0.92), rgba(8, 12, 18, 0.86));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 6px 16px rgba(0, 0, 0, 0.45), 0 0 10px rgba(32, 242, 155, 0.08);
}

.booster-card-reveal:nth-child(2) {
  animation-delay: 0.05s;
}

.booster-card-reveal:nth-child(3) {
  animation-delay: 0.1s;
}

.booster-card-reveal:nth-child(4) {
  animation-delay: 0.15s;
}

.booster-card-reveal:nth-child(5) {
  animation-delay: 0.2s;
}

.center-panel,
.center-core {
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.center-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.center-panel {
  height: 100%;
}

.turn-ribbon {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(32, 242, 155, 0.25);
  background: linear-gradient(120deg, rgba(32, 242, 155, 0.24), rgba(123, 92, 255, 0.18));
  color: #e9fff7;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35), 0 0 12px rgba(32, 242, 155, 0.18);
}

.center-pillar {
  display: grid;
  gap: 12px;
  height: 100%;
}

.vol-stack {
  display: grid;
  gap: 12px;
}

.center-actions {
  justify-content: center;
}

.vol-meter {
  border: 1px solid rgba(26, 36, 50, 0.8);
  padding: 12px;
  text-align: center;
  border-radius: 10px;
  background: rgba(10, 14, 20, 0.9);
}

.vol-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  color: var(--ash);
}

.vol-value {
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 1px;
}

.value-pop {
  animation: valuePop 0.45s steps(4, end) 1;
}

.vol-bar {
  height: 10px;
  border: 1px solid rgba(26, 36, 50, 0.7);
  margin-top: 8px;
  background: #0a0f15;
  border-radius: 6px;
  overflow: hidden;
}

.vol-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(32, 242, 155, 0.9), rgba(123, 92, 255, 0.9));
  width: 0;
  animation: volPulse 1.4s steps(4, end) infinite;
}

.turn-info {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

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

.trap-window {
  border: 1px solid rgba(26, 36, 50, 0.8);
  padding: 10px;
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.92);
  animation: trapIn 0.3s steps(4, end) 1;
}

.trap-header {
  font-weight: bold;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.trap-context {
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--ash);
}

.log {
  border: 1px solid rgba(26, 36, 50, 0.8);
  padding: 10px;
  border-radius: 8px;
  background: rgba(6, 10, 16, 0.85);
  position: relative;
}

.log h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

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

.log-toggle {
  border: 1px solid rgba(32, 242, 155, 0.25);
  background: rgba(8, 12, 18, 0.8);
  color: var(--bone);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.log-toggle:hover {
  filter: brightness(1.1) drop-shadow(0 0 6px rgba(32, 242, 155, 0.25));
  transform: translateY(-1px);
}

.log-output {
  max-height: 200px;
  overflow-y: auto;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: max-height 0.28s ease, opacity 0.28s ease;

.log-collapsible {
  position: relative;
}

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.log-toggle {
  font-size: 10px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  border: 1px solid rgba(32, 242, 155, 0.35);
  background: rgba(8, 12, 18, 0.8);
  color: var(--bone);
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
}

.log-collapsible.log-collapsed .log-output {
  max-height: 0;
  overflow: hidden;
  padding: 0;
}
}

.log-entry {
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(8, 12, 18, 0.75);
  border: 1px solid rgba(26, 36, 50, 0.7);
  animation: logPop 0.4s steps(4, end) 1;
}

.card-focus {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  z-index: 6;
}

.card-focus.card-focus-open {
  opacity: 1;
  pointer-events: auto;
}

.card-focus-shell {
  position: relative;
  padding: 12px;
  border-radius: 16px;
  background: rgba(6, 10, 16, 0.92);
  border: 1px solid rgba(32, 242, 155, 0.3);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(32, 242, 155, 0.16);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card-focus.card-focus-open .card-focus-shell {
  transform: translateY(0) scale(1);
}

.card-focus-content .card {
  transform: none;
  width: min(360px, 62vw);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 26px 52px rgba(0, 0, 0, 0.6), 0 0 32px rgba(32, 242, 155, 0.2);
}

.focus-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(32, 242, 155, 0.3);
  background: rgba(10, 14, 20, 0.85);
  color: var(--bone);
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.focus-close:hover {
  filter: brightness(1.1) drop-shadow(0 0 6px rgba(32, 242, 155, 0.25));
  transform: translateY(-1px);
}

.log.log-collapsed .log-output {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}


.hand-rail {
  position: relative;
  width: 100%;
  margin: 0 auto 10px;
  z-index: 4;
}

.hand {
  margin-top: 0;
  padding: 18px 18px 14px;
  background: linear-gradient(160deg, rgba(12, 18, 26, 0.94), rgba(4, 8, 12, 0.9));
  border: 1px solid rgba(32, 242, 155, 0.28);
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 30px 60px rgba(0, 0, 0, 0.65),
    0 0 32px rgba(32, 242, 155, 0.14);
  position: relative;
  overflow: visible;
  transform-origin: center bottom;
  backdrop-filter: blur(10px);
  filter: saturate(1.05) brightness(1.02);
}

.hand::before {
  content: '';
  position: absolute;
  left: -10%;
  right: -10%;
  top: -30%;
  height: 180%;
  background: radial-gradient(circle at top, rgba(32, 242, 155, 0.18), transparent 60%);
  opacity: 0.6;
  filter: blur(2px);
  pointer-events: none;
  z-index: 0;
  animation: handAura 6s ease-in-out infinite;
}

.hand::after {
  content: '';
  position: absolute;
  left: -30%;
  right: -30%;
  top: 10px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(32, 242, 155, 0.45), transparent);
  opacity: 0.35;
  pointer-events: none;
  z-index: 1;
  animation: borderSweepHorizontal 12s linear infinite;
}

.hand > * {
  position: relative;
  z-index: 2;
}

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

.hand h2 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 16px;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  text-shadow: 0 0 14px rgba(32, 242, 155, 0.26);
}

.hand h2::after {
  content: '';
  position: absolute;
  left: 0;
  right: -25%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(32, 242, 155, 0.7), rgba(123, 92, 255, 0.45), transparent);
  opacity: 0.7;
}

.hand-meta {
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ash);
}

.hand-grid {
  display: block;
  position: relative;
  height: 380px;
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(6, 10, 16, 0.7);
  box-shadow: inset 0 0 22px rgba(32, 242, 155, 0.12);
  overflow: visible;
  perspective: 1400px;
  --hand-spread: 110px;
  --hand-spread-scale: 1;
  --hand-spread-current: calc(var(--hand-spread) * var(--hand-spread-scale));
  --hand-spread-hover: calc(calc(var(--hand-spread) * var(--hand-spread-scale)) + 34px);
  --hand-drop: 9px;
  --hand-hover-lift: 54px;
  --hand-floor: 14px;
}

.hand-grid::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at top, rgba(32, 242, 155, 0.14), transparent 60%);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.hand-grid::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
  z-index: 1;
}

.hand-grid > * {
  position: relative;
  z-index: 2;
}

.hand-grid.hand-fanned > .hand-card {
  position: absolute;
  left: 50%;
  bottom: var(--hand-floor);
  width: min(260px, 58vw);
  transform: translate3d(calc(var(--hand-offset) * var(--hand-spread-current)), calc(var(--hand-abs-offset) * var(--hand-drop)), 0)
    rotate(var(--hand-rot))
    rotateX(12deg)
    translateZ(0);
  transform-origin: bottom center;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.24s ease-out;
  will-change: transform;
  z-index: var(--hand-z);
  transform-style: preserve-3d;
  animation: handParallaxGlow 9s ease-in-out infinite;
}

.hand-grid.hand-fanned > .hand-card:nth-child(odd) {
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
}

.hand-grid.hand-fanned > .hand-card[data-playable='1'] {
  cursor: grab;
}

.hand-grid.hand-fanned > .hand-card::after {
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.06), transparent 55%),
    radial-gradient(circle at 70% 65%, var(--card-glow), transparent 70%);
  background-size: 140% 140%, 180% 180%;
  mix-blend-mode: screen;
  opacity: 0.45;
  animation: handSmokeDrift 11s ease-in-out infinite;
}

body.hand-dragging .hand-grid.hand-fanned > .hand-card[data-playable='1'] {
  cursor: grabbing;
}

.empty {
  font-size: 11px;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 8, 12, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1200;
}

.modal.hidden {
  display: none;
}

.modal-content {
  padding: 20px;
  max-width: 520px;
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(12, 16, 22, 0.98) 0%, rgba(8, 12, 18, 0.95) 100%);
  border: 1px solid rgba(32, 242, 155, 0.2);
  box-shadow: 0 0 20px rgba(32, 242, 155, 0.12), var(--shadow);
  animation: modalIn 0.35s steps(5, end) 1;
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(8, 12, 18, 0.95);
  border: 1px solid rgba(32, 242, 155, 0.35);
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 8px;
  z-index: 1300;
  opacity: 0;
}

.toast.toast-show {
  animation: toastIn 0.25s steps(4, end) forwards;
}

.toast.toast-hide {
  animation: toastOut 0.2s steps(3, end) forwards;
}

.lore-anchor {
  position: relative;
}

.lore-anchor::after {
  content: attr(data-lore);
  position: absolute;
  bottom: -68px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  padding: 10px 12px;
  background: rgba(10, 14, 20, 0.95);
  border: 1px solid rgba(32, 242, 155, 0.2);
  border-radius: 10px;
  font-size: 11px;
  color: var(--bone);
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s steps(3, end);
}

.lore-anchor:hover::after {
  opacity: 1;
}

body.market-active #game-canvas {
  filter: blur(6px) brightness(0.4) saturate(0.9);
}

body.market-active main {
  filter: blur(1px) brightness(0.7);
}

.market-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  pointer-events: none;
}

.market-overlay.is-active {
  display: block;
  pointer-events: auto;
}

.market-dim {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.75);
  backdrop-filter: blur(6px);
  opacity: 0.9;
}

.market-border {
  position: absolute;
  pointer-events: none;
  opacity: 0.7;
  z-index: 1;
  background: rgba(32, 242, 155, 0.08);
  filter: drop-shadow(0 0 6px rgba(32, 242, 155, 0.2));
  overflow: hidden;
}

.market-border::before {
  content: '';
  position: absolute;
  opacity: 0.9;
}

.market-border-top,
.market-border-bottom {
  height: 2px;
  left: 4%;
  right: 4%;
}

.market-border-top {
  top: 3%;
}

.market-border-bottom {
  bottom: 3%;
}

.market-border-top::before,
.market-border-bottom::before {
  top: 0;
  left: 0;
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, transparent, rgba(32, 242, 155, 0.65), transparent);
  transform: translateX(-120%);
  animation: borderSweepHorizontal 6s linear infinite;
}

.market-border-bottom::before {
  animation-delay: 1.6s;
}

.market-border-left,
.market-border-right {
  width: 2px;
  top: 6%;
  bottom: 6%;
}

.market-border-left {
  left: 3%;
}

.market-border-right {
  right: 3%;
}

.market-border-left::before,
.market-border-right::before {
  left: 0;
  top: 0;
  width: 100%;
  height: 35%;
  background: linear-gradient(180deg, transparent, rgba(32, 242, 155, 0.65), transparent);
  transform: translateY(-120%);
  animation: borderSweepVertical 6.4s linear infinite;
}

.market-border-right::before {
  animation-delay: 0.9s;
}

.market-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(32, 242, 155, 0.4);
  background: rgba(10, 14, 20, 0.85);
  color: var(--bone);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  z-index: 6;
  display: grid;
  place-items: center;
  pointer-events: auto;
  transition: transform 0.25s steps(4, end), filter 0.25s steps(4, end), border-color 0.25s steps(4, end);
}

.market-close:hover {
  transform: scale(0.96);
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(32, 242, 155, 0.35));
  border-color: rgba(32, 242, 155, 0.8);
}

.market-overlay.trade-pulse .market-dim {
  animation: tradePulse 0.45s steps(3, end) 1;
}

.market-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
  z-index: 2;
  transition: opacity 0.3s steps(4, end);
}

.market-halo {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 242, 155, 0.22), transparent 70%);
  border: 1px solid rgba(123, 92, 255, 0.35);
  opacity: 0;
  pointer-events: none;
}

.market-overlay[data-state='purchase'] .market-halo {
  opacity: 0.35;
  animation: slowSpin 10s steps(12, end) infinite;
}

.market-overlay[data-state='opening'] .market-halo {
  animation: haloFlash 0.5s steps(2, end) 1;
}

.market-pack {
  width: 200px;
  height: 260px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.35s steps(5, end), opacity 0.35s steps(5, end), filter 0.35s steps(5, end);
}

.pack-shell {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 2px solid #1b2432;
  background: linear-gradient(150deg, #151c26, #0b0f16);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.6), var(--shadow);
}

.pack-shell::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 14px;
  width: 52px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(32, 242, 155, 0.8), transparent);
  filter: drop-shadow(0 0 8px rgba(32, 242, 155, 0.45));
}

.pack-shell::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.pack-glow {
  position: absolute;
  inset: -12px;
  border-radius: 20px;
  background: radial-gradient(circle, rgba(32, 242, 155, 0.25), rgba(123, 92, 255, 0.1) 55%, transparent 70%);
  opacity: 0.6;
  filter: blur(8px);
}

.pack-crack {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 2px solid transparent;
  background: linear-gradient(120deg, transparent 45%, rgba(255, 55, 95, 0.6) 50%, transparent 55%);
  opacity: 0;
}

.market-overlay[data-state='purchase'] .market-pack {
  animation: packFloat 3.6s steps(8, end) infinite;
}

.market-overlay[data-state='purchase'] .market-pack:hover {
  animation: packFloat 3.6s steps(8, end) infinite, packJitter 0.4s steps(4, end) infinite;
}

.market-overlay[data-state='opening'] .market-pack {
  animation: packZoom 1.1s steps(6, end) forwards;
}

.market-overlay[data-state='opening'] .pack-glow {
  opacity: 0.9;
  animation: glowSurge 0.6s steps(4, end) infinite;
}

.market-overlay[data-state='opening'] .pack-crack {
  animation: packCrack 0.8s steps(5, end) forwards;
}

.market-overlay[data-state='opening'] .market-stage {
  animation: stageJolt 0.5s steps(6, end) 1;
}

.market-copy {
  display: grid;
  gap: 6px;
  transition: transform 0.3s steps(4, end), opacity 0.3s steps(4, end);
  position: relative;
  z-index: 4;
  pointer-events: none;
}

.market-title {
  font-size: 22px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.market-sub {
  font-size: 12px;
  color: var(--ash);
}

.market-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  pointer-events: auto;
  transition: transform 0.3s steps(4, end), opacity 0.3s steps(4, end);
}

.execute-btn {
  position: relative;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid rgba(32, 242, 155, 0.6);
  background: linear-gradient(120deg, rgba(32, 242, 155, 0.18), rgba(123, 92, 255, 0.22));
  color: var(--bone);
  letter-spacing: 1px;
}

.execute-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0.5;
}

.execute-btn:hover {
  transform: scale(0.98);
  filter: brightness(1.2) drop-shadow(0 0 10px rgba(32, 242, 155, 0.35));
}

.market-cancel {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #1c2432;
  background: #0b1018;
  color: var(--ash);
}

.market-hint {
  font-size: 11px;
  color: rgba(230, 237, 243, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: opacity 0.3s steps(4, end), transform 0.3s steps(4, end);
}

.market-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  --card-offset: 0px;
  overflow: visible;
}

.market-cards::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  height: 280px;
  transform: translate(-50%, -42%);
  border-radius: 40%;
  background: radial-gradient(circle, rgba(32, 242, 155, 0.18), transparent 70%);
  opacity: 0;
  filter: blur(3px);
  transition: opacity 0.3s steps(4, end);
  z-index: 0;
  pointer-events: none;
}

.market-cards::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  height: 520px;
  transform: translate(-50%, -46%) scale(0.96);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 242, 155, 0.18), rgba(32, 242, 155, 0.08) 45%, transparent 70%);
  opacity: 0;
  filter: blur(12px);
  transition: opacity 0.3s steps(4, end);
  z-index: 0;
  pointer-events: none;
}

.market-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 160px;
  height: 230px;
  margin-left: -80px;
  margin-top: -120px;
  opacity: 0;
  transform: translate(0, 0) scale(0.6) rotate(-8deg);
  color: var(--bone);
  z-index: 1;
  --market-card-glow: rgba(32, 242, 155, 0.12);
  --market-card-outline: rgba(255, 255, 255, 0.22);
  overflow: visible;
}

.market-card-surface {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid #1a2330;
  background-image: linear-gradient(160deg, rgba(22, 30, 42, 0.96), rgba(8, 12, 18, 0.92)),
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 60%);
  background-size: 100% 100%, 200% 200%;
  background-position: 0 0, 120% 0;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 18px 30px rgba(0, 0, 0, 0.65), 0 0 18px var(--market-card-glow);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.18s ease-out, box-shadow 0.18s ease-out;
  will-change: transform, filter, box-shadow;
  transform-origin: center;
  color: var(--bone);
}

.market-card-surface::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  opacity: 0.35;
  transition: opacity 0.2s ease-out;
  pointer-events: none;
}

.market-card-title {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.market-card-art {
  position: absolute;
  top: 36px;
  left: 12px;
  right: 12px;
  height: 150px;
  border-radius: 10px;
  border: 1px dashed rgba(32, 242, 155, 0.3);
  background: radial-gradient(circle at top, rgba(32, 242, 155, 0.18), rgba(8, 12, 18, 0.9));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.market-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: drop-shadow(0 0 12px rgba(32, 242, 155, 0.45));
}

.market-card-has-art .market-card-art {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 16px var(--market-card-glow);
}

.market-card.card-degods {
  --market-card-glow: rgba(255, 203, 96, 0.28);
  --market-card-outline: rgba(255, 203, 96, 0.32);
}

.market-card.card-degods .market-card-art {
  border-color: rgba(255, 203, 96, 0.38);
  box-shadow: inset 0 0 16px rgba(255, 203, 96, 0.2);
}

.market-card-type {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 10px;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.market-card-details {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, 8px) rotate(var(--rot-inverse, 0deg));
  width: min(260px, 70vw);
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(9, 13, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.55), 0 0 16px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  transition: opacity 0.18s ease-out, transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-align: left;
}

.market-card-meta {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ash);
  margin-bottom: 6px;
}

.market-card-detail-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.market-card-text {
  font-size: 11px;
  color: var(--bone);
  white-space: normal;
  line-height: 1.5;
}

@supports (backdrop-filter: blur(4px)) {
  .market-card-details {
    backdrop-filter: blur(4px);
  }
}

.market-overlay[data-state='reveal'] .market-card {
  animation: cardLaunch 1.1s steps(6, end) forwards;
  animation-delay: var(--delay);
  transform-origin: center;
}

@media (hover: hover) and (pointer: fine) {
  .market-card {
    cursor: pointer;
  }

  .market-card:hover {
    z-index: 6;
  }

  .market-card:hover .market-card-surface {
    transform: translateY(-8px) scale(1.03);
    filter: brightness(1.05) saturate(1.05) contrast(1.03);
    box-shadow: 0 0 0 1px var(--market-card-outline), 0 22px 36px rgba(0, 0, 0, 0.65), 0 0 22px var(--market-card-glow);
    animation: cardShimmer 4.4s ease-in-out infinite;
  }

  .market-card:hover .market-card-details {
    opacity: 1;
    transform: translate(-50%, 0) rotate(var(--rot-inverse, 0deg));
    pointer-events: auto;
  }

  .market-card:hover .market-card-surface::after {
    animation: cardBreath 2.6s ease-in-out infinite;
    opacity: 0.6;
  }

  .market-card:hover .card-keyword {
    animation: keywordPulse 2.8s ease-in-out infinite;
  }
}

.market-card.rarity-common::before,
.market-card.rarity-rare::before,
.market-card.rarity-legendary::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.market-card.rarity-common::before {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 60%);
  animation: dustPuff 0.6s steps(4, end) var(--delay) 1;
}

.market-card.rarity-rare::before {
  background: radial-gradient(circle, rgba(123, 92, 255, 0.55), transparent 65%);
  animation: rareMist 1.2s steps(6, end) var(--delay) 1;
}

.market-card.rarity-legendary::before {
  background: radial-gradient(circle, rgba(32, 242, 155, 0.65), transparent 65%);
  animation: legendaryHit 0.8s steps(5, end) var(--delay) 1;
}

.market-card.rarity-legendary {
  --market-card-glow: rgba(32, 242, 155, 0.35);
  --market-card-outline: rgba(32, 242, 155, 0.32);
}

.market-card.rarity-rare {
  --market-card-glow: rgba(123, 92, 255, 0.28);
  --market-card-outline: rgba(123, 92, 255, 0.3);
}

.market-prompt {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.9);
  border: 1px solid #1a2432;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

.market-overlay[data-state='reveal'] .market-prompt {
  animation: promptRise 1.1s steps(4, end) forwards;
  animation-delay: 0.8s;
}

.market-overlay[data-state='opening'] .market-copy {
  transform: translateY(-80px);
}

.market-overlay[data-state='reveal'] .market-stage {
  justify-content: flex-start;
  padding-top: 40px;
  gap: 8px;
}

.market-overlay[data-state='reveal'] .market-pack {
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
}

.market-overlay[data-state='reveal'] .market-actions,
.market-overlay[data-state='reveal'] .market-hint {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.market-overlay[data-state='reveal'] .market-cards {
  --card-offset: 60px;
  pointer-events: auto;
  z-index: 5;
}

.market-overlay[data-state='reveal'] .market-cards::before {
  opacity: 0.6;
  animation: cardsAura 4.8s steps(6, end) infinite;
}

.market-overlay[data-state='reveal'] .market-cards::after {
  opacity: 0.5;
  animation: cardsSmokeRing 6.6s ease-in-out infinite;
}

@keyframes packWiggle {
  0% {
    transform: rotate(0deg);
  }
  35% {
    transform: rotate(0.6deg) translateY(-1px);
  }
  70% {
    transform: rotate(-0.6deg) translateY(1px);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes modalIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    filter: brightness(0.8);
  }
  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.2);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes toastIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes bgDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(6px, -10px, 0) scale(1.04);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes smokeDrift {
  0% {
    transform: translate3d(calc(var(--smoke-drift) * -1), 0, var(--smoke-depth)) scale(var(--smoke-scale));
  }
  50% {
    transform: translate3d(var(--smoke-drift), -4%, var(--smoke-depth)) scale(var(--smoke-scale-mid));
  }
  100% {
    transform: translate3d(calc(var(--smoke-drift) * -1), 0, var(--smoke-depth)) scale(var(--smoke-scale));
  }
}

@keyframes gridPan {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 120px 80px, 120px 80px;
  }
}

@keyframes ctaPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(32, 242, 155, 0.3), 0 12px 26px rgba(0, 0, 0, 0.55), 0 0 18px rgba(32, 242, 155, 0.18);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(32, 242, 155, 0.12), 0 14px 30px rgba(0, 0, 0, 0.6), 0 0 26px rgba(32, 242, 155, 0.32);
    transform: translateY(-1px);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(32, 242, 155, 0.3), 0 12px 26px rgba(0, 0, 0, 0.55), 0 0 18px rgba(32, 242, 155, 0.18);
    transform: translateY(0);
  }
}

@keyframes toastOut {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px) scale(0.98);
  }
}

@keyframes logPop {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes trapIn {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes collectionGroupIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    filter: brightness(0.85);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
    filter: brightness(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes collectionScan {
  0% {
    transform: translateX(-120%);
    opacity: 0.2;
  }
  40% {
    opacity: 0.6;
  }
  100% {
    transform: translateX(120%);
    opacity: 0.2;
  }
}

@keyframes brandPulse {
  0% {
    filter: brightness(0.95);
  }
  50% {
    filter: brightness(1.25);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes scanShift {
  0% {
    transform: translateY(0);
    opacity: 0.06;
  }
  50% {
    transform: translateY(6px);
    opacity: 0.1;
  }
  100% {
    transform: translateY(0);
    opacity: 0.08;
  }
}

@keyframes livePulse {
  0% {
    opacity: 0.6;
    transform: translateY(-50%) scale(0.9);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
  }
  100% {
    opacity: 0.7;
    transform: translateY(-50%) scale(0.95);
  }
}

@keyframes volPulse {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.25);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes valuePop {
  0% {
    opacity: 0.6;
    transform: translateY(2px) scale(0.98);
    filter: brightness(0.85);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.05);
    filter: brightness(1.3);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes packFloat {
  0% {
    transform: translateY(0) rotate(-0.5deg);
  }
  50% {
    transform: translateY(-6px) rotate(0.6deg);
  }
  100% {
    transform: translateY(0) rotate(-0.4deg);
  }
}

@keyframes packJitter {
  0% {
    transform: translateY(0) rotate(-0.4deg);
  }
  50% {
    transform: translateY(-2px) rotate(0.8deg);
  }
  100% {
    transform: translateY(1px) rotate(-0.6deg);
  }
}

@keyframes packZoom {
  0% {
    transform: scale(1) translateZ(0);
  }
  60% {
    transform: scale(1.2) translateZ(0);
  }
  100% {
    transform: scale(1.45) translateZ(0);
  }
}

@keyframes packCrack {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  40% {
    opacity: 0.8;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes tradePulse {
  0% {
    opacity: 0.75;
    filter: brightness(0.9);
  }
  50% {
    opacity: 0.95;
    filter: brightness(1.1);
  }
  100% {
    opacity: 0.78;
    filter: brightness(0.95);
  }
}

@keyframes glowSurge {
  0% {
    opacity: 0.6;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.7;
    transform: scale(0.95);
  }
}

@keyframes slowSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes haloFlash {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.7;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.1);
  }
}

@keyframes stageJolt {
  0% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(2px);
  }
  70% {
    transform: translateX(-2px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes cardShimmer {
  0% {
    background-position: 0 0, 140% 0;
  }
  50% {
    background-position: 0 0, 40% 100%;
  }
  100% {
    background-position: 0 0, -40% 0;
  }
}

@keyframes cardBreath {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.65;
  }
}

@keyframes keywordPulse {
  0%,
  100% {
    text-shadow: 0 0 6px rgba(32, 242, 155, 0.2);
  }
  50% {
    text-shadow: 0 0 10px rgba(32, 242, 155, 0.4);
  }
}

@keyframes cardFlash {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }
  40% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: scale(1.02);
  }
}

@keyframes slotPulse {
  0% {
    opacity: 0.45;
    transform: scale(0.99);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.01);
  }
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
}

@keyframes boosterSmoke {
  0% {
    opacity: 0.25;
    transform: translateY(6px) scale(0.98);
  }
  50% {
    opacity: 0.45;
    transform: translateY(-4px) scale(1.02);
  }
  100% {
    opacity: 0.3;
    transform: translateY(4px) scale(1);
  }
}

@keyframes boosterLoop {
  0% {
    opacity: 0.18;
    transform: translateY(10px) scale(0.92) rotate(0deg);
  }
  50% {
    opacity: 0.3;
    transform: translateY(-6px) scale(1) rotate(180deg);
  }
  100% {
    opacity: 0.2;
    transform: translateY(10px) scale(0.94) rotate(360deg);
  }
}

@keyframes handAura {
  0% {
    opacity: 0.4;
    transform: translateY(0) scale(0.98);
  }
  50% {
    opacity: 0.7;
    transform: translateY(-2px) scale(1.02);
  }
  100% {
    opacity: 0.5;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardLaunch {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6) rotate(-8deg);
  }
  60% {
    opacity: 1;
    transform: translate(var(--x), calc(var(--y) + var(--card-offset, 0px) - 10px)) scale(1.06) rotate(var(--rot));
  }
  100% {
    opacity: 1;
    transform: translate(var(--x), calc(var(--y) + var(--card-offset, 0px))) scale(1) rotate(var(--rot));
  }
}

@keyframes dustPuff {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  60% {
    opacity: 0.6;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes rareMist {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(1.3);
  }
}

@keyframes legendaryHit {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  40% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

@keyframes promptRise {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  60% {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes cardsAura {
  0% {
    opacity: 0.45;
    transform: translate(-50%, -42%) scale(0.98);
  }
  50% {
    opacity: 0.7;
    transform: translate(-50%, -44%) scale(1.03);
  }
  100% {
    opacity: 0.5;
    transform: translate(-50%, -42%) scale(1);
  }
}

@keyframes cardsSmokeRing {
  0% {
    opacity: 0.3;
    transform: translate(-50%, -46%) scale(0.96);
  }
  50% {
    opacity: 0.55;
    transform: translate(-50%, -48%) scale(1.02);
  }
  100% {
    opacity: 0.35;
    transform: translate(-50%, -46%) scale(0.98);
  }
}

@keyframes boosterFlash {
  0% {
    opacity: 1;
    filter: brightness(1) drop-shadow(0 0 0 rgba(32, 242, 155, 0));
  }
  40% {
    opacity: 1;
    filter: brightness(1.2) drop-shadow(0 0 18px rgba(32, 242, 155, 0.4));
  }
  100% {
    opacity: 1;
    filter: brightness(1) drop-shadow(0 0 0 rgba(32, 242, 155, 0));
  }
}

@keyframes borderSweepHorizontal {
  0% {
    transform: translateX(-120%);
    opacity: 0.2;
  }
  40% {
    opacity: 0.9;
  }
  100% {
    transform: translateX(320%);
    opacity: 0.2;
  }
}

@keyframes borderSweepVertical {
  0% {
    transform: translateY(-120%);
    opacity: 0.2;
  }
  40% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(320%);
    opacity: 0.2;
  }
}

@keyframes burstOut {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.9);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card:hover,
  .card:focus-within,
  .market-card:hover .market-card-surface,
  .card:hover::after,
  .card:focus-within::after,
  .market-card:hover .market-card-surface::after,
  .card:hover .card-keyword,
  .card:focus-within .card-keyword,
  .market-card:hover .card-keyword,
  .card-committing .card-flash,
  .board .card-list.slot-highlight::before,
  .board-column.slot-highlight::after,
  .booster-results::before,
  .booster-results::after,
  .hand::before,
  .hand::after,
  #menu-screen::before,
  #menu-screen::after,
  .menu-hero-copy,
  .menu-hero-panel,
  .menu-feature-card,
  .market-cards::before,
  .market-cards::after {
    animation: none;
  }
}

@media (min-width: 1200px) {
  body.is-game #game-screen .board {
    grid-template-columns: minmax(420px, 1.25fr) minmax(320px, 0.7fr) minmax(420px, 1.25fr);
  }

  body.is-game #game-screen .board-column,
  body.is-game #game-screen .board-center {
    padding: 16px;
  }

  body.is-game #game-screen .board-column {
    min-height: 48vh;
  }

  body.is-game #game-screen .card {
    padding: 10px;
  }

  body.is-game #game-screen .card-title {
    font-size: 15px;
  }

  body.is-game #game-screen .card-art {
    height: 170px;
  }

  body.is-game #game-screen .hand {
    padding: 20px 22px 18px;
  }

  body.is-game #game-screen .hand-grid {
    height: 420px;
    --hand-spread-scale: 1.2;
  }

  body.is-game #game-screen .hand-grid.hand-fanned > .hand-card {
    width: min(300px, 60vw);
  }
}

@media (max-width: 900px) {
  .board {
    grid-template-columns: 1fr;
  }

  #player-0-column {
    grid-row: 1;
    grid-column: 1;
  }

  .board-center {
    grid-row: 2;
    grid-column: 1;
  }

  #player-1-column {
    grid-row: 3;
    grid-column: 1;
  }

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

  .actions {
    flex-direction: column;
  }

  .status-bar {
    flex-direction: column;
    align-items: flex-end;
  }

  main {
    padding-top: 16px;
  }

  .market-pack {
    width: 160px;
    height: 210px;
  }

  .market-cards::before {
    width: 360px;
    height: 200px;
  }

  .market-cards::after {
    width: 360px;
    height: 360px;
  }

  .market-close {
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
  }

  .builder-layout {
    grid-template-columns: 1fr;
  }

  .builder-sidebar {
    position: relative;
    top: 0;
  }

  .builder-block-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .builder-filter-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .builder-filter-search {
    width: 100%;
  }

  .market-card {
    width: 120px;
    height: 170px;
    margin-left: -60px;
    margin-top: -90px;
  }

  .market-title {
    font-size: 18px;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-filters {
    position: relative;
    top: 0;
  }

  .collection-layout {
    grid-template-columns: 1fr;
  }

  .collection-filters {
    position: relative;
    top: 0;
  }

  .collection-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .collection-search input {
    width: 100%;
  }

  .shop-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .shop-search input {
    width: 100%;
  }

  .hand {
    padding: 12px;
    transform: scale(1.01);
  }

  .hand-grid {
    height: 260px;
    padding: 10px;
  }

  .hand-grid.hand-fanned > .hand-card {
    width: min(200px, 70vw);
  }
}

/* Cinematic battle overhaul */
body.is-game {
  --arena-bg: #05070b;
  --arena-panel: rgba(9, 13, 18, 0.92);
  --arena-panel-strong: rgba(12, 18, 24, 0.96);
  --arena-border: rgba(86, 235, 220, 0.25);
  --arena-accent: #3cf1d2;
  --arena-cool: #6fd3ff;
  --arena-hot: #f5b84a;
  --arena-danger: #ff5757;
  --arena-text: #eef6fb;
  --arena-muted: #9fb3c2;
  font-family: 'Sora', 'Space Grotesk', sans-serif;
  color: var(--arena-text);
  background: radial-gradient(circle at 50% -10%, rgba(60, 241, 210, 0.18), transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(111, 211, 255, 0.12), transparent 40%),
    linear-gradient(180deg, #04070b 0%, #050a10 45%, #030508 100%);
}

body.is-game h1,
body.is-game h2,
body.is-game h3,
body.is-game .zone-title,
body.is-game .hand h2,
body.is-game .vol-value {
  font-family: 'Bebas Neue', 'Oxanium', sans-serif;
  letter-spacing: 1.4px;
}

body.is-game #game-canvas {
  background: radial-gradient(circle at 50% 10%, rgba(12, 32, 42, 0.9), rgba(5, 8, 12, 0.95) 45%, #020306 100%);
  filter: saturate(1.15);
}

body.is-game #game-screen {
  padding: 0;
}

body.is-game .menu-tabs {
  border-color: rgba(86, 235, 220, 0.2);
  background: rgba(6, 10, 14, 0.85);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.45), 0 0 18px rgba(60, 241, 210, 0.12);
}

body.is-game .menu-tabs .tab-btn {
  background: rgba(6, 10, 14, 0.9);
  color: var(--arena-muted);
  border-color: rgba(86, 235, 220, 0.2);
}

body.is-game .menu-tabs .tab-btn.active {
  color: var(--arena-text);
  background: linear-gradient(120deg, rgba(60, 241, 210, 0.35), rgba(111, 211, 255, 0.25));
  border-color: rgba(86, 235, 220, 0.5);
  filter: drop-shadow(0 0 10px rgba(60, 241, 210, 0.3));
}

body.is-game .battlefield {
  padding: 16px 20px 22px;
  gap: 18px;
}

body.is-game .board {
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 0.95fr) minmax(280px, 1fr);
  gap: 18px;
  padding: 8px 12px 0;
  align-items: stretch;
}

body.is-game .board-column,
body.is-game .board-center {
  border-radius: 20px;
  border: 1px solid rgba(86, 235, 220, 0.2);
  background: linear-gradient(160deg, rgba(8, 12, 18, 0.94), rgba(5, 8, 12, 0.88));
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 28px rgba(60, 241, 210, 0.12);
  backdrop-filter: blur(14px);
}

body.is-game .board-center {
  border-color: rgba(245, 184, 74, 0.25);
  background: linear-gradient(160deg, rgba(12, 16, 22, 0.96), rgba(6, 9, 13, 0.9));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.6), 0 0 32px rgba(245, 184, 74, 0.16);
}

body.is-game .board-column::before,
body.is-game .board-center::before {
  left: 16px;
  right: 16px;
  top: 10px;
  height: 2px;
  opacity: 0.55;
  background: linear-gradient(90deg, transparent, rgba(60, 241, 210, 0.55), rgba(245, 184, 74, 0.4), transparent);
}

body.is-game .player-rail {
  border-radius: 14px;
  border-color: rgba(86, 235, 220, 0.24);
  background: linear-gradient(120deg, rgba(60, 241, 210, 0.14), rgba(111, 211, 255, 0.1));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45), 0 0 14px rgba(60, 241, 210, 0.12);
}

body.is-game .player-rail .meta {
  color: var(--arena-muted);
}

body.is-game .zone {
  border-radius: 16px;
  border-color: rgba(86, 235, 220, 0.14);
  background: linear-gradient(180deg, rgba(7, 10, 14, 0.75), rgba(5, 8, 12, 0.6));
  box-shadow: inset 0 0 24px rgba(60, 241, 210, 0.08), 0 0 16px rgba(0, 0, 0, 0.4);
}

body.is-game .zone h3 {
  color: var(--arena-muted);
  letter-spacing: 1.6px;
}

body.is-game .board .card-list.slot-project,
body.is-game .board-column.slot-project {
  --slot-color: rgba(60, 241, 210, 0.45);
}

body.is-game .board .card-list.slot-protocol {
  --slot-color: rgba(111, 211, 255, 0.45);
}

body.is-game .board .card-list.slot-trap {
  --slot-color: rgba(255, 87, 87, 0.45);
}

body.is-game .meta {
  color: var(--arena-muted);
}

body.is-game .meta.active {
  color: var(--arena-accent);
  text-shadow: 0 0 10px rgba(60, 241, 210, 0.4);
}

body.is-game .turn-ribbon {
  gap: 10px;
}

body.is-game .pill {
  border-color: rgba(86, 235, 220, 0.32);
  background: linear-gradient(120deg, rgba(60, 241, 210, 0.22), rgba(111, 211, 255, 0.2));
  color: var(--arena-text);
  font-size: 12px;
  letter-spacing: 1.2px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45), 0 0 16px rgba(60, 241, 210, 0.2);
}

body.is-game .vol-meter {
  border-color: rgba(245, 184, 74, 0.35);
  background: rgba(6, 9, 13, 0.92);
  box-shadow: inset 0 0 24px rgba(245, 184, 74, 0.12);
}

body.is-game .vol-label {
  color: var(--arena-muted);
  letter-spacing: 1.6px;
}

body.is-game .vol-value {
  font-size: 40px;
  color: var(--arena-hot);
  text-shadow: 0 0 18px rgba(245, 184, 74, 0.35);
}

body.is-game .vol-bar {
  height: 12px;
  border-color: rgba(245, 184, 74, 0.3);
  background: #070b10;
}

body.is-game .vol-bar-fill {
  background: linear-gradient(90deg, rgba(60, 241, 210, 0.95), rgba(245, 184, 74, 0.95));
  animation: volShimmer 1.4s ease-in-out infinite;
}

body.is-game .center-actions button,
body.is-game .actions button,
body.is-game #hero-btn {
  border-radius: 10px;
  border: 1px solid rgba(86, 235, 220, 0.45);
  background: linear-gradient(135deg, rgba(60, 241, 210, 0.2), rgba(111, 211, 255, 0.2));
  color: var(--arena-text);
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.is-game .center-actions button:hover,
body.is-game .actions button:hover,
body.is-game #hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45), 0 0 18px rgba(60, 241, 210, 0.3);
}

body.is-game .cta-end {
  border-color: rgba(245, 184, 74, 0.7);
  background: linear-gradient(135deg, rgba(245, 184, 74, 0.75), rgba(245, 184, 74, 0.3));
  color: #1c1202;
  text-shadow: none;
}

body.is-game .btn-primary {
  border-color: rgba(86, 235, 220, 0.55);
  background: linear-gradient(135deg, rgba(60, 241, 210, 0.35), rgba(111, 211, 255, 0.2));
  color: var(--arena-text);
}

body.is-game .btn-ghost {
  border-color: rgba(86, 235, 220, 0.3);
  background: rgba(8, 12, 18, 0.75);
  color: var(--arena-muted);
}

body.is-game .cta-end.cta-ready:not(:disabled) {
  box-shadow: 0 0 0 1px rgba(245, 184, 74, 0.35), 0 18px 36px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(245, 184, 74, 0.35);
}

body.is-game .card {
  border-radius: 12px;
  border-color: rgba(86, 235, 220, 0.18);
  background-image: linear-gradient(160deg, rgba(12, 17, 24, 0.96), rgba(6, 8, 12, 0.92));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55), 0 0 20px var(--card-glow);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

body.is-game .card::before {
  left: 8px;
  right: 8px;
  top: 8px;
  height: 4px;
  border-radius: 999px;
  opacity: 0.85;
}

body.is-game .card::after {
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  opacity: 0.4;
}

body.is-game .card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.6), 0 0 28px var(--card-glow);
}

body.is-game .card-title {
  font-size: 16px;
  letter-spacing: 1.6px;
}

body.is-game .card-meta {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--arena-muted);
}

body.is-game .card-text {
  font-size: 11px;
  line-height: 1.35;
  color: #cfe0ea;
}

body.is-game .card-project {
  --card-accent: rgba(60, 241, 210, 0.65);
  --card-glow: rgba(60, 241, 210, 0.28);
  --card-outline: rgba(60, 241, 210, 0.4);
}

body.is-game .card-protocol {
  --card-accent: rgba(111, 211, 255, 0.7);
  --card-glow: rgba(111, 211, 255, 0.28);
  --card-outline: rgba(111, 211, 255, 0.4);
}

body.is-game .card-trap {
  --card-accent: rgba(255, 87, 87, 0.7);
  --card-glow: rgba(255, 87, 87, 0.28);
  --card-outline: rgba(255, 87, 87, 0.4);
}

body.is-game .card-rugpull {
  --card-accent: rgba(245, 184, 74, 0.75);
  --card-glow: rgba(245, 184, 74, 0.28);
  --card-outline: rgba(245, 184, 74, 0.4);
}

body.is-game .card-hero {
  --card-accent: rgba(245, 184, 74, 0.8);
  --card-glow: rgba(245, 184, 74, 0.32);
  --card-outline: rgba(245, 184, 74, 0.45);
}

body.is-game .card-actions button {
  border-radius: 8px;
  border: 1px solid rgba(86, 235, 220, 0.35);
  background: rgba(8, 12, 18, 0.85);
  color: var(--arena-text);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

body.is-game .hand {
  border-radius: 18px;
  border-color: rgba(86, 235, 220, 0.28);
  background: linear-gradient(180deg, rgba(9, 14, 20, 0.94), rgba(4, 6, 10, 0.96));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.65), 0 0 32px rgba(60, 241, 210, 0.16);
}

body.is-game .hand h2::after {
  background: linear-gradient(90deg, rgba(60, 241, 210, 0.7), rgba(111, 211, 255, 0.45), transparent);
}

body.is-game .hand-meta {
  color: var(--arena-muted);
}

body.is-game .hand-grid {
  border-color: rgba(86, 235, 220, 0.18);
  background: rgba(5, 8, 12, 0.78);
  box-shadow: inset 0 0 22px rgba(60, 241, 210, 0.12);
}

body.is-game .trap-window {
  border-color: rgba(245, 184, 74, 0.3);
  background: rgba(8, 12, 18, 0.94);
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.6), 0 0 24px rgba(245, 184, 74, 0.18);
}

body.is-game .trap-header {
  letter-spacing: 1.2px;
}

body.is-game .log {
  border-color: rgba(86, 235, 220, 0.2);
  background: rgba(6, 9, 12, 0.78);
  box-shadow: inset 0 0 20px rgba(60, 241, 210, 0.08);
}

body.is-game .log-entry {
  border-color: rgba(86, 235, 220, 0.18);
  background: rgba(9, 13, 18, 0.85);
}

body.is-game .card-focus-shell {
  border-color: rgba(245, 184, 74, 0.32);
  background: rgba(6, 10, 14, 0.96);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.6), 0 0 28px rgba(245, 184, 74, 0.2);
}

body.is-game .focus-close {
  border-color: rgba(245, 184, 74, 0.35);
}

@keyframes arenaDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -12px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes arenaGlow {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes volShimmer {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.2);
  }
}

@media (max-width: 1100px) {
  body.is-game .board {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 8px 0 0;
  }

  body.is-game .board-column,
  body.is-game .board-center {
    min-height: unset;
  }

  body.is-game .battlefield {
    padding: 14px 14px 18px;
  }
}

@media (max-width: 700px) {
  body.is-game .vol-value {
    font-size: 32px;
  }

  body.is-game .hand-grid {
    height: 240px;
  }

  body.is-game .card {
    border-radius: 10px;
  }
}

/* Battlefield wireframe layout (structure only). */
body.is-game #game-screen .battlefield {
  display: block;
  height: 100%;
  min-height: 100vh;
  padding: 12px 16px 16px;
  outline: 2px solid rgba(255, 255, 255, 0.14);
}

body.is-game #game-screen .battlefield-frame {
  display: block;
  height: 100%;
  min-height: 0;
}

body.is-game #game-screen .bf-grid {
  display: grid;
  grid-template-columns: 20% 60% 20%;
  column-gap: 16px;
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

body.is-game #game-screen .bf-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

body.is-game #game-screen .bf-center {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-height: 0;
  position: relative;
  padding-bottom: var(--bf-hand-height, clamp(160px, 22vh, 220px));
  height: 100%;
}

body.is-game #game-screen .bf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

body.is-game #game-screen .bf-name {
  font-weight: 600;
}

body.is-game #game-screen .bf-turn {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash);
}

body.is-game #game-screen .bf-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.is-game #game-screen .bf-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash);
}

body.is-game #game-screen .bf-card-slot {
  display: flex;
  justify-content: center;
}

body.is-game #game-screen .bf-card-slot .card {
  width: 100%;
  max-width: 220px;
  max-height: 22vh;
}

body.is-game #game-screen .bf-list {
  display: grid;
  gap: 6px;
}

body.is-game #game-screen .bf-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

body.is-game #game-screen .bf-key {
  color: var(--ash);
}

body.is-game #game-screen .bf-value {
  color: var(--bone);
  font-weight: 600;
}

body.is-game #game-screen .bf-logs {
  margin-top: auto;
  height: clamp(120px, 18vh, 200px);
  overflow: hidden;
}

body.is-game #game-screen .bf-logs .log-output {
  max-height: calc(100% - 36px);
  overflow-y: auto;
}

body.is-game #game-screen .bf-opponent-area,
body.is-game #game-screen .bf-player-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

body.is-game #game-screen .bf-combat-space {
  min-height: 120px;
}

body.is-game #game-screen .bf-lanes {
  display: flex;
  gap: 16px;
  min-height: 0;
}

body.is-game #game-screen .bf-lane {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

body.is-game #game-screen .bf-lane-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash);
}

body.is-game #game-screen .bf-cards {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  min-height: 110px;
}

body.is-game #game-screen .bf-cards .card {
  width: clamp(110px, 11vw, 150px);
  max-height: 20vh;
}

body.is-game #game-screen .hand-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: var(--bf-hand-height, clamp(160px, 22vh, 220px));
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  outline: 2px dashed rgba(86, 235, 220, 0.65);
  background: rgba(12, 64, 86, 0.25);
  transform: none;
}

body.is-game #game-screen .hand-overlay .hand-header,
body.is-game #game-screen .hand-overlay .hand-grid {
  width: 100%;
}

body.is-game #game-screen .hand-overlay .hand-grid {
  margin: 0 auto;
}

body.is-game #game-screen .bf-hand .hand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 8px;
}

body.is-game #game-screen .bf-hand-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

body.is-game #game-screen .bf-hand .hand-grid {
  height: clamp(140px, 20vh, 200px);
}

body.is-game #game-screen .bf-hand .hand-card {
  max-height: 20vh;
}

body.is-game #game-screen .dropzone.slot-highlight {
  outline: 1px solid rgba(57, 244, 255, 0.35);
  outline-offset: 2px;
}

body.is-game #game-screen .bf-cards.slot-highlight {
  box-shadow: inset 0 0 0 1px rgba(57, 244, 255, 0.35);
}

body.is-game #game-screen .bf-hidden-ui {
  display: none;
}

/* Battlefield rebuild */
body.is-game #game-screen {
  padding: 0;
}

body.is-game #game-screen .battlefield {
  display: block;
  height: 100%;
  min-height: 100vh;
  padding: 12px 16px 16px;
}

body.is-game #game-screen .battlefield-frame {
  display: block;
  height: 100%;
  min-height: 0;
  padding: 0;
}

body.is-game #game-screen .battlefield-shell {
  --bf-radius: 16px;
  --bf-panel: rgba(8, 12, 18, 0.92);
  --bf-line: rgba(255, 255, 255, 0.08);
  --bf-accent: rgba(57, 244, 255, 0.85);
  --bf-accent-hot: rgba(255, 95, 162, 0.9);
  display: grid;
  grid-template-columns: minmax(180px, 20%) minmax(0, 60%) minmax(180px, 20%);
  grid-template-areas: "player center opponent";
  gap: 14px;
  height: 100%;
  min-height: 0;
  align-items: stretch;
  position: relative;
  z-index: 2;
}

body.is-game #game-screen #player-1-column {
  grid-area: player;
}

body.is-game #game-screen #player-0-column {
  grid-area: opponent;
}

body.is-game #game-screen .battlefield-center {
  grid-area: center;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  position: relative;
  padding: 8px 10px;
}

body.is-game #game-screen .battlefield-center::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: calc(var(--bf-radius) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(6, 10, 16, 0.65);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

body.is-game #game-screen .battlefield-center > * {
  position: relative;
  z-index: 1;
}

body.is-game #game-screen .battlefield-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  position: relative;
  max-width: 320px;
  width: 100%;
}

body.is-game #game-screen .battlefield-side.is-active .panel-accent {
  background: var(--bf-accent);
  box-shadow: 0 0 10px rgba(57, 244, 255, 0.35);
}

body.is-game #game-screen .panel {
  border-radius: var(--bf-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(6, 10, 16, 0.7);
  padding: 10px;
  box-shadow: none;
}

body.is-game #game-screen .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 11px;
  color: var(--ash);
  padding: 8px 10px;
  border-radius: var(--bf-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(6, 10, 16, 0.72);
}

body.is-game #game-screen .panel-tag {
  font-weight: 600;
}

body.is-game #game-screen .panel-accent {
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

body.is-game #game-screen .panel-identity {
  display: grid;
  gap: 6px;
  padding: 8px 12px 4px;
}

body.is-game #game-screen .player-name {
  font-family: 'Oxanium', 'Space Grotesk', sans-serif;
  font-size: 18px;
  letter-spacing: 1.4px;
}

body.is-game #game-screen .turn-indicator {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--bf-line);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ash);
  background: rgba(6, 10, 16, 0.85);
}

body.is-game #game-screen .turn-indicator.is-active {
  border-color: rgba(57, 244, 255, 0.6);
  color: var(--bone);
  box-shadow: 0 0 12px rgba(57, 244, 255, 0.35);
}

body.is-game #game-screen .panel-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ash);
  margin-bottom: 8px;
}

body.is-game #game-screen .panel-card {
  padding: 10px;
}

body.is-game #game-screen .card-slot {
  display: grid;
  place-items: center;
  min-height: 150px;
}

body.is-game #game-screen .card-slot .card {
  width: 100%;
  max-width: 220px;
  max-height: 22vh;
  border-radius: 14px;
  overflow: hidden;
}

body.is-game #game-screen .stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.is-game #game-screen .stat-list {
  display: grid;
  gap: 8px;
}

body.is-game #game-screen .stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(6, 10, 16, 0.65);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
}

body.is-game #game-screen .stat-icon {
  font-weight: 700;
  color: var(--ash);
}

body.is-game #game-screen .stat-value {
  font-weight: 700;
  color: var(--bone);
}

body.is-game #game-screen .log-panel {
  margin-top: auto;
  height: clamp(120px, 16vh, 160px);
  padding: 0;
  overflow: hidden;
}

body.is-game #game-screen .log-panel .log-header {
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--bf-line);
  background: rgba(6, 10, 16, 0.88);
}

body.is-game #game-screen .log-panel .log-output {
  max-height: calc(100% - 42px);
  overflow-y: auto;
  padding: 8px 10px 12px;
}

body.is-game #game-screen .battlefield-zone {
  border-radius: 0;
  border: none;
  background: transparent;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

body.is-game #game-screen .battlefield-zone.opponent-zone {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.is-game #game-screen .zone-header {
  display: flex;
  justify-content: center;
  align-items: center;
}

body.is-game #game-screen .zone-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--ash);
  width: 100%;
  text-align: center;
}

body.is-game #game-screen .play-row {
  display: flex;
  gap: 18px;
  min-height: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid transparent;
}

body.is-game #game-screen .zone-slot {
  border-radius: 0;
  border: none;
  background: transparent;
  padding: 0;
  display: grid;
  gap: 8px;
  min-height: 0;
  flex: 1;
}

body.is-game #game-screen .zone-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ash);
}

body.is-game #game-screen .card-row.card-list {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  padding-bottom: 4px;
  min-height: 110px;
}

body.is-game #game-screen .battlefield-zone .card {
  width: clamp(110px, 11vw, 150px);
  max-height: 20vh;
  border-radius: 12px;
  overflow: hidden;
}

body.is-game #game-screen .battlefield-zone .card:hover,
body.is-game #game-screen .hand-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.55), 0 0 16px rgba(57, 244, 255, 0.2);
}

body.is-game #game-screen .battlefield-interaction {
  border-radius: 0;
  border: none;
  padding: 8px 12px;
  background: transparent;
  display: grid;
  gap: 14px;
  align-items: center;
  justify-items: center;
  min-height: 120px;
}

body.is-game #game-screen .center-status {
  display: grid;
  gap: 12px;
  justify-items: center;
}

body.is-game #game-screen .turn-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

body.is-game #game-screen .vol-stack {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

body.is-game #game-screen .center-actions button {
  min-width: 120px;
}

body.is-game #game-screen .dropzone.slot-highlight {
  border-color: var(--slot-color, rgba(57, 244, 255, 0.5));
  box-shadow: 0 0 18px rgba(57, 244, 255, 0.2);
}

body.is-game #game-screen .card-row.slot-highlight {
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--slot-color, rgba(57, 244, 255, 0.4)),
    0 0 16px rgba(57, 244, 255, 0.2);
}

body.is-game #game-screen .dropzone.slot-project {
  --slot-color: rgba(57, 244, 255, 0.5);
}

body.is-game #game-screen .card-row.slot-protocol {
  --slot-color: rgba(91, 199, 255, 0.5);
}

body.is-game #game-screen .card-row.slot-trap {
  --slot-color: rgba(255, 95, 162, 0.5);
}

body.is-game #game-screen .battlefield-side.slot-highlight,
body.is-game #game-screen .board-center.slot-highlight {
  box-shadow: 0 0 20px rgba(57, 244, 255, 0.25);
  border-color: rgba(57, 244, 255, 0.35);
  outline: 1px solid rgba(57, 244, 255, 0.35);
  outline-offset: 2px;
}

body.is-game #game-screen .hand {
  margin: 0;
  padding: 8px 0 0;
  border: none;
  background: transparent;
  box-shadow: none;
  width: 100%;
}

body.is-game #game-screen .hand::before,
body.is-game #game-screen .hand::after {
  content: none;
}

body.is-game #game-screen .hand h2::after,
body.is-game #game-screen .hand-grid::before,
body.is-game #game-screen .hand-grid::after {
  content: none;
}

body.is-game #game-screen .hand-header {
  padding: 0 4px 8px;
}

body.is-game #game-screen .hand-grid {
  height: clamp(140px, 20vh, 200px);
}

body.is-game #game-screen .hand-grid.hand-fanned > .hand-card {
  animation: none;
}

body.is-game #game-screen .hand-card {
  max-height: 20vh;
  overflow: hidden;
}

body.is-game #game-screen .board-center {
  border: none;
  background: transparent;
  box-shadow: none;
}

body.is-game #game-screen #card-focus {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

body.is-game #game-screen #card-focus.hidden {
  display: none;
}

body.is-game #game-screen #trap-window {
  width: min(420px, 92%);
}

@media (max-width: 1200px) {
  body.is-game #game-screen .battlefield-shell {
    grid-template-columns: minmax(180px, 22%) minmax(0, 56%) minmax(180px, 22%);
  }
}

@media (max-width: 1000px) {
  body.is-game #game-screen .battlefield-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "center"
      "player"
      "opponent";
  }

  body.is-game #game-screen .battlefield-center {
    min-height: 60vh;
  }
}

@media (max-width: 700px) {
  body.is-game #game-screen .play-row {
    flex-direction: column;
  }

  body.is-game #game-screen .battlefield-center {
    grid-template-rows: minmax(0, 1fr) minmax(0, 0.6fr) minmax(0, 1fr) auto;
  }

  body.is-game #game-screen .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* Battle UI rewrite */
body.is-game #game-screen {
  --battle-panel: rgba(9, 13, 18, 0.92);
  --battle-panel-strong: rgba(12, 18, 24, 0.96);
  --battle-line: rgba(255, 255, 255, 0.08);
  --battle-muted: rgba(170, 184, 198, 0.8);
  --battle-text: #eef6fb;
  --battle-accent: rgba(60, 241, 210, 0.8);
  --battle-hot: rgba(255, 95, 162, 0.8);
  --battle-cold: rgba(91, 199, 255, 0.8);
  --battle-hand-height: clamp(170px, 22vh, 240px);
  height: 100vh;
  min-height: 100vh;
  max-height: none;
  padding: 0;
  overflow: hidden;
  display: block;
  transform: none;
  filter: none;
  opacity: 1;
  color: var(--battle-text);
}

body.is-game main {
  pointer-events: auto;
}

body.is-game #app.ui-overlay {
  pointer-events: auto;
}

body.is-game #game-canvas {
  pointer-events: none;
}

body.is-game #game-screen .battle-root {
  position: relative;
  height: 100%;
  min-height: 100vh;
  padding: 16px 18px 20px;
  pointer-events: auto;
}

body.is-game #game-screen .battle-grid {
  display: grid;
  grid-template-columns: 20% 60% 20%;
  gap: 16px;
  height: 100%;
  min-height: 0;
  align-items: stretch;
  pointer-events: auto;
}

body.is-game #game-screen #player-0-column,
body.is-game #game-screen #player-1-column {
  grid-area: auto;
}

body.is-game #game-screen .battle-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  pointer-events: auto;
}

body.is-game #game-screen .battle-side {
  min-width: 0;
}

body.is-game #game-screen .battle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
}

body.is-game #game-screen .battle-name {
  font-weight: 600;
}

body.is-game #game-screen .battle-turn {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--battle-muted);
}

body.is-game #game-screen .battle-panel {
  border-radius: 14px;
  border: 1px solid var(--battle-line);
  background: var(--battle-panel);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

body.is-game #game-screen .battle-panel-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--battle-muted);
}

body.is-game #game-screen .battle-card-slot {
  display: flex;
  justify-content: center;
  min-height: 0;
}

body.is-game #game-screen .battle-card-slot .card {
  width: 100%;
  max-width: 220px;
  max-height: 22vh;
}

body.is-game #game-screen .battle-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

body.is-game #game-screen .battle-stat-key {
  color: var(--battle-muted);
}

body.is-game #game-screen .battle-stat-value {
  font-weight: 600;
}

body.is-game #game-screen .battle-log {
  margin-top: auto;
  min-height: 160px;
  max-height: 220px;
}

body.is-game #game-screen .battle-center {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  height: 100%;
  padding-bottom: var(--battle-hand-height);
  pointer-events: auto;
}

body.is-game #game-screen .battle-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--battle-line);
  background: var(--battle-panel-strong);
  position: relative;
  z-index: 5;
}

body.is-game #game-screen .battle-hud-turn {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--battle-muted);
}

body.is-game #game-screen .battle-hud-vol {
  display: grid;
  grid-template-columns: auto auto 120px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

body.is-game #game-screen .battle-vol-label {
  color: var(--battle-muted);
}

body.is-game #game-screen .battle-vol-value {
  font-weight: 700;
}

body.is-game #game-screen .battle-vol-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

body.is-game #game-screen .battle-vol-fill {
  height: 100%;
  width: 0;
  background: var(--battle-accent);
}

body.is-game #game-screen .battlefield-surface {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  flex: 1;
  position: relative;
  z-index: 5;
}

body.is-game #game-screen .battle-zone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--battle-line);
  background: rgba(8, 12, 18, 0.7);
  pointer-events: auto;
}

body.is-game #game-screen .battle-zone-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--battle-muted);
}

body.is-game #game-screen .battle-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
  pointer-events: auto;
}

body.is-game #game-screen .battle-lane {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

body.is-game #game-screen .battle-lane-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--battle-muted);
}

body.is-game #game-screen .battle-card-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 110px;
  overflow-x: auto;
  padding-bottom: 4px;
  pointer-events: auto;
}

body.is-game #game-screen .battle-card-row .card {
  width: clamp(110px, 11vw, 150px);
  max-height: 20vh;
}

body.is-game #game-screen .battle-combat {
  flex: 1;
  min-height: 120px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(6, 9, 14, 0.6);
  display: grid;
  place-items: center;
  pointer-events: none;
}

body.is-game #game-screen .battle-combat-line {
  width: min(65%, 420px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}

body.is-game #game-screen .hand {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

body.is-game #game-screen .hand::before,
body.is-game #game-screen .hand::after {
  content: none;
}

body.is-game #game-screen .hand-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: var(--battle-hand-height);
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: stretch;
  transform: none;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  outline: none;
  pointer-events: none;
  z-index: 30;
}

body.is-game #game-screen .hand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 8px;
  width: 100%;
  pointer-events: auto;
}

body.is-game #game-screen .hand-meta {
  color: var(--battle-muted);
}

body.is-game #game-screen .battle-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

body.is-game #game-screen .action-bar {
  position: relative;
  z-index: 120;
  pointer-events: auto;
}

body.is-game #game-screen .action-bar button {
  pointer-events: auto;
}

body.is-game #game-screen .hand-grid {
  width: 100%;
  height: 100%;
  overflow: visible;
  min-height: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 10, 16, 0.7);
  box-shadow: none;
  pointer-events: auto;
}

body.is-game #game-screen .hand-cards {
  pointer-events: auto;
}

body.is-game #game-screen .hand-card {
  max-height: 20vh;
  overflow: hidden;
  position: relative;
  z-index: 90;
  pointer-events: auto;
}

body.is-game #game-screen .card {
  position: relative;
  z-index: 90;
  pointer-events: auto;
}

body.is-game #game-screen .battle-dropzone.slot-highlight,
body.is-game #game-screen .battle-center.slot-highlight {
  outline: 1px solid var(--battle-accent);
  outline-offset: 2px;
  box-shadow: 0 0 16px rgba(60, 241, 210, 0.18);
}

body.is-game #game-screen .battle-card-row.slot-highlight {
  box-shadow: inset 0 0 0 1px var(--battle-accent);
}

body.is-game #game-screen .battle-dropzone.slot-protocol,
body.is-game #game-screen .battle-card-row.slot-protocol {
  --battle-accent: var(--battle-cold);
}

body.is-game #game-screen .battle-dropzone.slot-trap,
body.is-game #game-screen .battle-card-row.slot-trap {
  --battle-accent: var(--battle-hot);
}

body.is-game #game-screen .battle-dropzone.slot-project,
body.is-game #game-screen .battle-card-row.slot-project {
  --battle-accent: rgba(60, 241, 210, 0.8);
}

body.is-game #game-screen #trap-window {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 92%);
  z-index: 30;
}

body.is-game #game-screen #card-focus {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 40;
}

body.is-game #game-screen #card-focus.hidden,
body.is-game #game-screen #trap-window.hidden {
  display: none;
}

@media (max-width: 1100px) {
  body.is-game #game-screen .battle-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "center"
      "left"
      "right";
  }

  body.is-game #game-screen .battle-center {
    grid-area: center;
    min-height: 60vh;
  }

  body.is-game #game-screen .battle-side--left {
    grid-area: left;
  }

  body.is-game #game-screen .battle-side--right {
    grid-area: right;
  }
}

@media (max-width: 720px) {
  body.is-game #game-screen {
    --battle-hand-height: clamp(150px, 26vh, 220px);
  }

  body.is-game #game-screen .battle-hud {
    flex-direction: column;
    align-items: flex-start;
  }

  body.is-game #game-screen .battle-lanes {
    grid-template-columns: 1fr;
  }
}
