:root {
  --theme-base-rgb: 15, 23, 42;
  --theme-base: rgb(var(--theme-base-rgb));
  --theme-surface-96: rgba(var(--theme-base-rgb), 0.96);
  --theme-surface-95: rgba(var(--theme-base-rgb), 0.95);
  --theme-surface-92: rgba(var(--theme-base-rgb), 0.92);
  --theme-surface-90: rgba(var(--theme-base-rgb), 0.9);
  --theme-surface-85: rgba(var(--theme-base-rgb), 0.85);
  --theme-surface-82: rgba(var(--theme-base-rgb), 0.82);
  --theme-surface-80: rgba(var(--theme-base-rgb), 0.8);
  --theme-surface-75: rgba(var(--theme-base-rgb), 0.75);
  --theme-surface-70: rgba(var(--theme-base-rgb), 0.7);
  --theme-surface-65: rgba(var(--theme-base-rgb), 0.65);
  --theme-surface-60: rgba(var(--theme-base-rgb), 0.6);
  --theme-surface-55: rgba(var(--theme-base-rgb), 0.55);
  --theme-surface-50: rgba(var(--theme-base-rgb), 0.5);
  --theme-surface-45: rgba(var(--theme-base-rgb), 0.45);
  --theme-surface-40: rgba(var(--theme-base-rgb), 0.4);
  --theme-surface-35: rgba(var(--theme-base-rgb), 0.35);
  --theme-surface-30: rgba(var(--theme-base-rgb), 0.3);
  --theme-surface-25: rgba(var(--theme-base-rgb), 0.25);
  --theme-surface-18: rgba(var(--theme-base-rgb), 0.18);
  --theme-surface-15: rgba(var(--theme-base-rgb), 0.15);
  --theme-surface-12: rgba(var(--theme-base-rgb), 0.12);
  --theme-surface-10: rgba(var(--theme-base-rgb), 0.1);
  --theme-surface-08: rgba(var(--theme-base-rgb), 0.08);
  --theme-surface-06: rgba(var(--theme-base-rgb), 0.06);
  --theme-surface-05: rgba(var(--theme-base-rgb), 0.05);
  --theme-surface-04: rgba(var(--theme-base-rgb), 0.04);
  --theme-border: rgba(148, 163, 184, 0.35);
  --theme-border-strong: rgba(148, 163, 184, 0.5);
  --theme-border-soft: rgba(148, 163, 184, 0.25);
  --theme-border-faint: rgba(148, 163, 184, 0.18);
  --theme-text-primary: #f8fafc;
  --theme-text-muted: rgba(226, 232, 240, 0.78);
  --theme-text-subtle: rgba(148, 163, 184, 0.75);
  --theme-text-dark: #020617;
  --theme-accent-primary: #38bdf8;
  --theme-accent-primary-rgb: 56, 189, 248;
  --theme-accent-secondary: #6366f1;
  --theme-accent-secondary-rgb: 99, 102, 241;
  --theme-accent-tertiary: #818cf8;
  --theme-accent-shadow: rgba(99, 102, 241, 0.35);
  --theme-accent-shadow-strong: rgba(99, 102, 241, 0.45);
  --theme-accent-sheen: rgba(var(--theme-accent-primary-rgb), 0.55);
  --theme-accent-outline: rgba(var(--theme-accent-primary-rgb), 0.35);
  --theme-accent-gradient: linear-gradient(
    135deg,
    var(--theme-accent-primary),
    var(--theme-accent-secondary)
  );
  --theme-panel-shadow: rgba(2, 6, 23, 0.5);
  --theme-panel-border: rgba(148, 163, 184, 0.32);
  --theme-toast-shadow: rgba(var(--theme-base-rgb), 0.32);
  --theme-win-shadow: rgba(var(--theme-base-rgb), 0.25);
}

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
  text-align: center;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px;
}

.card {
  image-rendering: auto;
  border: 2px solid #333;
  border-radius: 10px;
  background-color: white;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
  align-items: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  text-align: center;
  padding: 10px;
  width: 120px;
  height: 160px;
  justify-content: flex-end; /* Ensures content stacks to bottom */
}

.card-text {
  background: white;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
  border-top: 2px solid #ccc;
  font-size: 12px;
  text-align: center;
}

.card:hover {
  background-color: #f0f8ff;
  /* transform: scale(1.05); */
}

.card-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.card-health {
  margin-bottom: 5px;
}

.fly-text {
  position: fixed;
  top: 50%;
  left: -200px; /* start off-screen left */
  font-size: 32px;
  font-weight: bold;
  color: gold;
  pointer-events: none;
  z-index: 1000;
  animation: fly-across 2s ease-out forwards;
}

@keyframes fly-across {
  0% {
    transform: translateX(0) translateY(-50%);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateX(120vw) translateY(-50%);
    opacity: 0;
  }
}

.health-bar-container {
  width: 100%;
  background-color: #ddd;
  border-radius: 5px;
  height: 8px;
  overflow: hidden;
}

.health-bar {
  background-color: #4caf50;
  height: 100%;
  transition: width 0.3s ease;
}

.main-card.selected {
  /* border: 8px solid; */
  animation: shimmer-man 3s infinite linear;
  background-blend-mode: multiply;
}

.bench-card.selected {
  animation: shimmer-man 3s infinite linear;
  background-blend-mode: multiply;
}

.player-main.selected {
  animation: shimmer-man 3s infinite linear;
  background-blend-mode: multiply;
}

@keyframes shimmer-man {
  0% {
    background-color: purple;
  }
  50% {
    background-color: white;
  }
  100% {
    background-color: purple;
  }
}

.selected::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 255, 0, 0.6); /* adjust strength */
  pointer-events: none;
}

.selected-offensive::after {
  background: rgba(255, 0, 0, 0.6);
}

.great-sea-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 5000;
  pointer-events: none;
}

.great-sea-overlay.is-active {
  display: flex;
}

.great-sea-overlay__panel {
  position: relative;
  z-index: 7000;
  max-width: 360px;
  padding: 22px 28px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  text-align: center;
  box-shadow: 0 24px 68px rgba(2, 6, 23, 0.45);
  pointer-events: all;
}

.great-sea-overlay__title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.great-sea-overlay__body {
  font-size: 15px;
  line-height: 1.4;
  opacity: 0.9;
}

#hand.great-sea-discard-mode {
  position: relative;
  z-index: 6000;
}

#hand.great-sea-discard-mode .hand-card {
  cursor: pointer;
}

.idle-countdown {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5100;
  pointer-events: none;
}

.idle-countdown.is-active {
  display: flex;
}

.idle-countdown__panel {
  padding: 14px 22px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.4);
  text-align: center;
  min-width: 220px;
}

.idle-countdown__label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #fbbf24;
}

.idle-countdown__timer {
  font-size: 28px;
  font-weight: 900;
  margin: 4px 0;
  color: #f87171;
}

.idle-countdown__hint {
  font-size: 12px;
  opacity: 0.75;
}

.card-hover-bubble {
  --card-hover-accent: #38bdf8;
  --card-hover-accent-soft: rgba(56, 189, 248, 0.26);
  --card-hover-accent-fade: rgba(56, 189, 248, 0.16);
  position: absolute;
  min-width: 220px;
  max-width: min(320px, 88vw);
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.94),
    rgba(9, 13, 24, 0.95)
  );
  border: 1px solid var(--card-hover-accent-fade, rgba(148, 163, 184, 0.26));
  color: #e2e8f0;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.55);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  pointer-events: none;
  z-index: 2147483600;
  backdrop-filter: blur(3px);
}

.card-hover-bubble::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(148, 163, 184, 0.14);
  pointer-events: none;
}

.card-hover-bubble__media {
  position: relative;
  min-height: 136px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.card-hover-bubble__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.25)
  );
}

.card-hover-bubble__media--fallback {
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.85),
    rgba(15, 23, 42, 0.92)
  );
}

.card-hover-bubble__overlay {
  position: relative;
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}

.card-hover-bubble__name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(2, 6, 23, 0.6);
}

.card-hover-bubble__meta {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--card-hover-accent-soft, rgba(148, 163, 184, 0.72));
}

.card-hover-bubble__body {
  position: relative;
  padding: 14px 18px 16px;
  display: grid;
  gap: 12px;
  background: linear-gradient(
    180deg,
    rgba(14, 23, 42, 0.96),
    rgba(7, 11, 22, 0.98)
  );
}

.card-hover-bubble__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 8px;
}

.card-hover-bubble__stat {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--card-hover-accent-fade, rgba(148, 163, 184, 0.2));
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.card-hover-bubble__stat-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.68);
}

.card-hover-bubble__stat-value {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
}

.card-hover-bubble__section {
  display: grid;
  gap: 4px;
}

.card-hover-bubble__section-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.74);
}

.card-hover-bubble__section-text {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.9);
  white-space: pre-wrap;
}

.builder-hover-card {
  --builder-hover-accent: #4b5563;
  --builder-hover-accent-soft: rgba(75, 85, 99, 0.18);
  position: absolute;
  width: 230px;
  border-radius: 14px;
  background: #ffffff;
  color: #1f2937;
  border: 2px solid var(--builder-hover-accent-soft);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: none;
  z-index: 2147483600;
}

.builder-hover-card__header {
  background: linear-gradient(
    140deg,
    var(--builder-hover-accent),
    rgba(15, 23, 42, 0.8)
  );
  color: #fff;
  padding: 12px 16px;
  display: grid;
  gap: 4px;
}

.builder-hover-card__title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.builder-hover-card__meta {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
}

.builder-hover-card__body {
  padding: 12px 16px;
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

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

.builder-hover-card__stat {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.builder-hover-card__stat-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.8);
}

.builder-hover-card__stat-value {
  font-size: 14px;
  font-weight: 800;
  color: #1f2937;
}

.builder-hover-card__section {
  display: grid;
  gap: 4px;
}

.builder-hover-card__section-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.8);
}

.builder-hover-card__section-text {
  font-size: 12px;
  line-height: 1.45;
  color: #111827;
  white-space: pre-wrap;
}

.stage-shield-badge {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    rgba(148, 163, 184, 0.95),
    rgba(15, 23, 42, 0.9)
  );
  border: 2px solid rgba(94, 234, 212, 0.6);
  box-shadow: 0 0 18px rgba(94, 234, 212, 0.45), 0 8px 24px rgba(2, 6, 23, 0.55);
  background-image: url("./IMAGES/ITEMS/SHIELD OF FAITH.JPEG");
  background-size: cover;
  background-position: center;
  z-index: 8700;
  cursor: pointer;
}
.stage-shield-badge::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  pointer-events: none;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  text-align: center; /* Centers content horizontally */
  pointer-events: none; /* Optional: let clicks pass through */
}

.card.highlight {
  animation: pulse 0.5s infinite alternate;
}

.card.main-card {
  width: 360px;
  height: 480px;
  border: 2px solid #333;
  border-radius: 10px;
  background-color: white;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.shrink-me {
  /* transform: scale(0.6); */
  transform-origin: top center;
  display: flex;
  justify-content: center;
  height: 100vh; /* optional: full screen height */
  width: 100vw;
}

.bench,
.fighter-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fighter-slot .card,
.bench .card {
  margin: 5px;
}

.bench {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fighter-slot {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

#controls {
  margin-top: 20px;
}

.stage-slot {
  width: 180px;
  height: 240px;
  min-width: 180px;
  min-height: 240px;
  border: 3px dashed #aaa;
  margin: 10px auto;
  /* text-align: center; */
  /* display: flex; */
  justify-content: center;
  align-items: center;
  /* line-height: 180px; */
  /* color: #666; */
  font-weight: bold;
  background-color: #f8f8f8;
  border-radius: 12px;
  position: relative;
  pointer-events: none;
  padding: 10px;
}

.dummy-card {
  width: 120px;
  height: 160px;
  border: 3px dashed #aaa;
  margin: 10px auto;
  text-align: center;
  line-height: 180px;
  color: #666;
  font-weight: bold;
  background-color: #f8f8f8;
  border-radius: 12px;
  position: relative;
  pointer-events: none;
}

.action-log {
  max-height: 150px;
  overflow-y: auto;
  text-align: left;
  margin: 20px auto;
  padding: 10px;
  border: 1px solid #aaa;
  width: 60%;
  background: #fff;
  font-family: monospace;
  font-size: 14px;
  animation: fadeIn 0.4s ease-in;
}

.actions {
  margin-top: 8px;
  display: flex;
  gap: 6px; /* reduced from 10px to 6px */
  justify-content: center;
}

.action-btn {
  background: none;
  border: none;
  font-size: 22px; /* slightly smaller for tighter spacing */
  cursor: pointer;
  padding: 2px;
  transition: transform 0.2s ease;
}

.action-btn:hover {
  transform: scale(1.2);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
}

.card.hand-card {
  cursor: pointer;
}

.battlefield-wrapper {
  width: 100%;
  overflow: visible;
  display: flex;
  justify-content: center;
}

.battlefield {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  box-sizing: border-box;
  transform-origin: top center;
  transition: transform 0.2s ease;
}

.battle-chat {
  flex: 0 0 300px;
  width: 300px;
  max-width: 600px;
  height: 1000px;
  box-sizing: border-box;
  background: var(--theme-surface-75, rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--theme-text-primary, #e2e8f0);
  align-self: flex-start;
  backdrop-filter: blur(4px);
}

.battle-chat[hidden] {
  display: none !important;
}

.battle-chat__header {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-text-muted, #cbd5f5);
}

.battle-chat__log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.45);
  border-radius: 6px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
}

.battle-chat__log::-webkit-scrollbar {
  width: 6px;
}
.battle-chat__log::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 6px;
}

.battle-chat__line {
  font-size: 0.75rem;
  line-height: 1.2;
  color: #dbeafe;
  word-break: break-word;
}

.battle-chat__line--self {
  color: #f8fafc;
  font-weight: 600;
}

.battle-chat__author {
  font-weight: 700;
  color: #38bdf8;
  margin-right: 4px;
}

.battle-chat__message {
  color: inherit;
}

.battle-chat__form {
  display: flex;
  gap: 6px;
}

.battle-chat__form input {
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.6);
  color: inherit;
  font-size: 0.75rem;
}

.battle-chat__form button {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.25);
  color: #e0f2fe;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease;
}

.battle-chat__form button:hover:not(:disabled),
.battle-chat__form button:focus-visible:not(:disabled) {
  background: rgba(56, 189, 248, 0.45);
  outline: none;
}

.battle-chat__form button:disabled,
.battle-chat__form input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .battle-chat {
    display: none !important;
  }
}

.nameplate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.nameplate {
  flex: 1;
  padding: 10px 16px;
  border-radius: 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  text-align: center;
  background: var(--theme-surface-82);
  color: #f8fafc;
  box-shadow: 0 16px 32px var(--theme-toast-shadow);
}
.nameplate--player {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.92),
    rgba(56, 189, 248, 0.85)
  );
  color: #052e16;
}
.nameplate--enemy {
  background: linear-gradient(
    135deg,
    rgba(185, 28, 28, 0.92),
    rgba(248, 113, 113, 0.85)
  );
}

@media (max-width: 720px) {
  .nameplate-row {
    flex-direction: column;
    gap: 12px;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483600;
}
.modal-card {
  width: min(92vw, 420px);
  background: #111;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  padding: 18px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.modal-card--surrender {
  background: linear-gradient(
    160deg,
    var(--theme-surface-95),
    rgba(67, 20, 20, 0.95)
  );
  border: 1px solid rgba(248, 113, 113, 0.4);
  padding: 24px;
  text-align: center;
}
.modal-card--stats {
  width: min(620px, 92vw);
  background: linear-gradient(
    160deg,
    var(--theme-surface-96),
    rgba(30, 41, 59, 0.96)
  );
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 26px 60px rgba(2, 6, 23, 0.55);
}
.tutorial-modal {
  display: grid;
  gap: 16px;
  color: var(--theme-text-primary);
  text-align: left;
  line-height: 1.6;
}
.tutorial-modal p {
  margin: 0;
}
.tutorial-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--theme-text-muted);
}
.tutorial-steps li {
  margin-left: 4px;
}
.tutorial-note {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--theme-text-muted);
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--theme-surface-45);
  border: 1px solid var(--theme-border);
}
.settings-modal {
  display: grid;
  gap: 20px;
  text-align: left;
  color: var(--theme-text-primary);
}
.settings-group h3 {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-text-muted);
}
.settings-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.settings-presets button {
  appearance: none;
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--theme-surface-60);
  color: var(--theme-text-primary);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.settings-presets button:hover,
.settings-presets button:focus-visible {
  background: var(--theme-surface-75);
  box-shadow: 0 12px 24px var(--theme-toast-shadow);
  transform: translateY(-1px);
  outline: none;
}
.settings-presets button[data-active=\"true\"] {
  background: var(--theme-accent-gradient);
  color: var(--theme-text-dark);
  box-shadow: 0 16px 26px var(--theme-accent-shadow);
}
.settings-color-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--theme-surface-55);
  border: 1px solid var(--theme-border);
}
.settings-color-row label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-text-muted);
}
.settings-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--theme-surface-55);
  border: 1px solid var(--theme-border);
  font-size: 13px;
  color: var(--theme-text-primary);
}
.settings-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--theme-accent, #38bdf8);
}
.settings-help-text {
  margin: 8px 0 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--theme-text-muted);
}
.settings-color-row input[type=\"color\"] {
  appearance: none;
  border: none;
  background: transparent;
  width: 48px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
}
.settings-color-row input[type=\"color\"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 8px;
}
.settings-color-row input[type=\"color\"]::-webkit-color-swatch {
  border-radius: 8px;
  border: 2px solid var(--theme-border);
}
.settings-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 1fr));
  gap: 12px;
}
.settings-preview__swatch {
  border-radius: 16px;
  padding: 18px 12px;
  display: grid;
  place-items: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--theme-text-dark);
  box-shadow: 0 16px 26px var(--theme-panel-shadow);
}
.settings-preview__swatch--base {
  background: var(--theme-surface-70);
  color: var(--theme-text-primary);
}
.settings-preview__swatch--accent {
  background: var(--theme-accent-primary);
}
.settings-preview__swatch--accent-alt {
  background: var(--theme-accent-secondary);
}
.settings-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.settings-footer .home-btn {
  letter-spacing: 0.1em;
}
.modal-card--surrender .modal-title {
  font-size: 20px;
  letter-spacing: 0.24em;
  color: #fecaca;
  text-transform: uppercase;
}
.modal-card--surrender .modal-body {
  color: rgba(255, 241, 242, 0.88);
}
.modal-card__icon {
  font-size: 34px;
  margin-bottom: 12px;
}
.modal-card--surrender .modal-actions {
  justify-content: center;
}
.modal-card--surrender .btn-cancel {
  background: var(--theme-surface-70);
  color: #e2e8f0;
}
.modal-card--surrender .btn-danger {
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.9),
    rgba(190, 24, 45, 0.9)
  );
}
.modal-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}
.modal-body {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 14px;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}
.btn-cancel {
  background: #2f2f2f;
  color: #fff;
}
.btn-danger {
  background: #e74c3c;
  color: #fff;
}
.btn:hover {
  filter: brightness(1.05);
}

.action-toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2147483600;
  pointer-events: none;
}
.action-toast__item {
  min-width: 260px;
  max-width: min(480px, 90vw);
  padding: 14px 20px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    var(--theme-surface-92),
    rgba(30, 41, 59, 0.92)
  );
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.6);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f8fafc;
  opacity: 0;
  transform: translateY(-16px) scale(0.97);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.action-toast__item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.action-toast__item.is-fading {
  opacity: 0;
  transform: translateY(-12px) scale(0.95);
}
.action-toast__item[data-tone="success"] {
  background: linear-gradient(
    135deg,
    rgba(22, 163, 74, 0.92),
    rgba(101, 163, 13, 0.92)
  );
  border-color: rgba(190, 242, 100, 0.4);
}
.action-toast__item[data-tone="danger"] {
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.92),
    rgba(244, 114, 182, 0.9)
  );
  border-color: rgba(248, 113, 113, 0.45);
}
.action-toast__item[data-tone="ability"] {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.92),
    rgba(192, 132, 252, 0.92)
  );
  border-color: rgba(192, 132, 252, 0.45);
}

.might-counter {
  position: absolute;
  left: 50vw;
  top: 0;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 18px;
  padding: 12px 20px;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.92),
    var(--theme-surface-92)
  );
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.55);
  color: #f8fafc;
  pointer-events: none;
  z-index: 2147483600;
  letter-spacing: 0.08em;
}
.might-counter__title {
  font-size: 12px;
  letter-spacing: 0.28em;
  opacity: 0.8;
}
.might-counter__meter {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  font-weight: 800;
}
.might-counter__value {
  font-size: 28px;
  line-height: 1;
}
.might-counter__max {
  font-size: 14px;
  opacity: 0.7;
}
.might-counter__stars {
  display: flex;
  gap: 6px;
  font-size: 18px;
  letter-spacing: 0.22em;
}
.might-counter__star {
  color: rgba(148, 163, 184, 0.5);
  text-shadow: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.might-counter__star.is-active {
  color: #facc15;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.85),
    0 0 4px rgba(250, 204, 21, 0.6);
}

.game {
  max-height: 800px;
}

.game-scale-wrapper {
  transform-origin: top center;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.surrenderButton {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  z-index: 1000;
}

.surrenderButton:hover {
  background-color: #d32f2f;
}

@media (max-width: 2000px) {
  .game-scale-wrapper {
    transform: scale(0.6);
  }
}
@media (max-width: 1600px) {
  .game-scale-wrapper {
    transform: scale(0.56);
  }
}
@media (max-width: 1300px) {
  .game-scale-wrapper {
    transform: scale(0.56);
  }
}
@media (max-width: 1100px) {
  .game-scale-wrapper {
    transform: scale(0.56);
  }
}
@media (max-width: 900px) {
  .game-scale-wrapper {
    transform: scale(0.5);
  }
}
@media (max-width: 750px) {
  .game-scale-wrapper {
    transform: scale(0.4);
  }
}
@media (max-width: 600px) {
  .game-scale-wrapper {
    transform: scale(0.3);
  }
}

.bench {
  width: 20%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.center-area {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.fighter-slot {
  width: 100%;
  display: flex;
  justify-content: center;
}

.hand {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 5px;
  transform-origin: top center;
}

/* --- Animations --- */

@keyframes pulse {
  from {
    box-shadow: 0 0 0px rgba(0, 128, 255, 0.3);
  }
  to {
    box-shadow: 0 0 15px rgba(0, 128, 255, 0.7);
  }
}

@keyframes popIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideInBattlefield {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes damageFlash {
  0% {
    background-color: white;
  }
  50% {
    background-color: #de1717;
  }
  100% {
    background-color: white;
  }
}

/* make the bg a gradient*/
.bg {
  background-color: var(--theme-base);
  background-image: radial-gradient(
      circle at 20% 20%,
      rgba(var(--theme-accent-primary-rgb), 0.25),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 10%,
      rgba(var(--theme-accent-secondary-rgb), 0.22),
      transparent 55%
    ),
    linear-gradient(
      180deg,
      rgba(var(--theme-base-rgb), 0.95) 0%,
      var(--theme-base) 100%
    );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.card.damage {
  animation: damageFlash 0.4s ease;
  background-blend-mode: multiply;
}

#savedDecks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  justify-items: center;
  margin-top: 20px;
}

.savedDeck-entry {
  background: #f4f4f4;
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 12px;
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer; /* whole box clickable */
}

.savedDeck-entry:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.savedDeck-entry button {
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.savedDeck-entry button:first-child {
  background: #7e15f4; /* main button color */
  color: white;
  font-weight: bold;
}

.savedDeck-entry button:first-child:hover {
  background: #6312c7;
}

.actions button {
  background: #ddd;
  color: #333;
}

.actions button:hover {
  background: #bbb;
}

.actions button:last-child {
  background: #f44336; /* delete button red */
  color: white; /* white text */
  font-weight: bold;
}

.actions button:last-child:hover {
  background: #d32f2f;
}

.actions {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: center;
}

.effect-badge,
.item-badge,
.stage-effect-badge {
  position: absolute;
  width: 80px; /* bigger circle */
  height: 80px;
  border-radius: 50%;
  border: 2px solid #fff; /* optional outline for contrast */
  background-color: #000; /* fallback in case image fails */
  cursor: pointer;
}

.item-badge {
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-badge__count {
  position: absolute;
  bottom: -6px;
  right: -6px;
  min-width: 26px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.7);
  pointer-events: none;
  text-align: center;
}

/* .effect-badge {
  color: limegreen;
}

.item-badge {
  color: gold;
} */

.savedDeck-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: 100%;
  justify-items: center;
}

.savedDeck-preview img {
  width: 36px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #aaa;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.popup-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  min-width: 250px;
}
.popup-buttons button {
  margin: 5px;
  padding: 5px 15px;
  cursor: pointer;
}

.iteming {
  /* make it flash blue by using background and multiply */
  animation: shimmer-man2 3s infinite linear;
  background-blend-mode: multiply;
  background-color: rgba(10, 150, 255, 0.9);
}

@keyframes shimmer-man2 {
  0% {
    background-color: rgba(10, 150, 255, 1);
  }
  50% {
    background-color: white;
  }
  100% {
    background-color: rgba(10, 150, 255, 1);
  }
}

.turn-indicator {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* =========================================================
   EXTRA STYLES: Effect & Stage Badges
   ========================================================= */
.effect-badges {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  width: 80px;
}
.effect-badge-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #000000aa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
}
.effect-badge-dot:hover {
  transform: scale(1.05);
}
.effect-tooltip {
  position: absolute;
  z-index: 10000;
  padding: 8px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  pointer-events: none;
}
.stage-badge {
  background-size: cover;
  background-position: center;
}

/* --- Home Screen --- */
.home-screen {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(32px, 6vw, 72px);
  background: radial-gradient(
      circle at top,
      rgba(30, 41, 59, 0.65),
      rgba(2, 6, 23, 0.95)
    ),
    #020617;
  overflow: hidden;
  isolation: isolate;
}
.home-collage {
  position: absolute;
  inset: -12%;
  display: grid;
  grid-template-columns: repeat(8, minmax(80px, 1fr));
  grid-auto-rows: minmax(80px, 1fr);
  gap: clamp(12px, 3vw, 28px);
  opacity: 0.8;
  filter: saturate(1.1);
  pointer-events: none;
  transform: scale(1.05);
}
.home-collage::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(
    135deg,
    var(--theme-surface-60),
    rgba(2, 6, 23, 0.9)
  );
  z-index: 2;
}
.collage-tile {
  border-radius: 26px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 22px 44px rgba(2, 6, 23, 0.55);
  position: relative;
  overflow: hidden;
}
.collage-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.35));
}
.collage-tile--1 {
  background-image: url("./IMAGES/PEOPLE/ABINADI.JPEG");
  grid-column: span 2;
  grid-row: span 2;
}
.collage-tile--2 {
  background-image: url("./IMAGES/PEOPLE/ALMA THE YOUNGER.JPEG");
  grid-row: span 2;
}
.collage-tile--3 {
  background-image: url("./IMAGES/TRAPS/ENCIRCLING FIRE.JPEG");
  grid-column: span 2;
}
.collage-tile--4 {
  background-image: url("./IMAGES/ITEMS/BREASTPLATE OF RIGHTEOUSNESS.JPEG");
}
.collage-tile--5 {
  background-image: url("./IMAGES/STAGES/HILL CUMORAH.JPEG");
  grid-column: span 2;
  grid-row: span 2;
}
.collage-tile--6 {
  background-image: url("./IMAGES/TRAPS/BURIED WEAPONS.JPEG");
}
.collage-tile--7 {
  background-image: url("./IMAGES/PEOPLE/STRIPLING WARRIORS.JPEG");
  grid-column: span 2;
}
.collage-tile--8 {
  background-image: url("./IMAGES/ITEMS/BELT OF TRUTH.JPEG");
}
.collage-tile--9 {
  background-image: url("./IMAGES/TRAPS/FAITH.JPEG");
}
.collage-tile--10 {
  background-image: url("./IMAGES/STAGES/TREE OF LIFE.JPEG");
  grid-column: span 2;
}
.collage-tile--11 {
  background-image: url("./IMAGES/TRAPS/ENCIRCLING FIRE.JPEG");
}
.collage-tile--12 {
  background-image: url("./IMAGES/PEOPLE/AMMON.JPEG");
}
.collage-tile--13 {
  background-image: url("./IMAGES/STAGES/WATERS OF MORMON.JPEG");
  grid-column: span 2;
}
.collage-tile--14 {
  background-image: url("./IMAGES/ITEMS/FRUIT OF THE TREE OF LIFE.JPEG");
}
.home-panel {
  position: relative;
  z-index: 5;
  box-sizing: border-box; /* include padding in width */
  width: min(1120px, 92vw);
  margin-inline: auto; /* center for equal outside gutters */
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, 500px);
  grid-template-areas:
    "logo logo"
    "bug deck"
    "preview deck"
    "actions code";
  row-gap: clamp(18px, 3vw, 32px);
  column-gap: clamp(32px, 4.5vw, 56px);
  padding: clamp(24px, 5vw, 40px);
  background: var(--theme-surface-82);
  border: 1px solid var(--theme-panel-border);
  border-radius: 28px;
  box-shadow: 0 40px 70px var(--theme-panel-shadow);
  backdrop-filter: blur(18px);
  color: var(--theme-text-primary);
  align-items: start;
}

.home-panel > * {
  /* width: 100%;  ← stop bloating the children */
  min-width: 0; /* let content shrink instead of overflow right */
  box-sizing: border-box; /* safe padding on children */
}

.home-bug {
  grid-area: bug;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 20px;
  padding: 18px 20px;
  background: var(--theme-surface-70);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
  display: grid;
  gap: 16px;
}
.home-bug__header h2 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--theme-text-primary);
}
.home-bug__header p {
  margin: 0;
  font-size: 13px;
  color: var(--theme-text-muted);
}
.home-bug__form {
  display: grid;
  gap: 10px;
}
.home-bug__form label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.78);
  font-weight: 700;
}
.home-bug__form textarea,
.home-bug__form input[type="email"] {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.55);
  color: var(--theme-text-primary);
  font-size: 14px;
  padding: 10px 14px;
  resize: vertical;
}
.home-bug__form textarea:focus,
.home-bug__form input[type="email"]:focus {
  outline: 2px solid rgba(var(--theme-accent-primary-rgb), 0.5);
  outline-offset: 2px;
}
.home-bug__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.home-bug__status {
  font-size: 13px;
  color: var(--theme-text-muted);
  min-height: 1em;
}

@media (max-width: 1024px) {
  .home-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "bug"
      "preview"
      "deck"
      "actions"
      "code";
  }
}

.home-logo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  grid-area: logo;
}
.home-logo-bar__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.home-quick-btn {
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  background: var(--theme-surface-60);
  color: var(--theme-text-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.home-ping-indicator {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 120px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 50;
  pointer-events: none;
}

.home-ping-indicator__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.home-ping-indicator[data-status="slow"] .home-ping-indicator__dot {
  background: #facc15;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.7);
}

.home-ping-indicator[data-status="bad"] .home-ping-indicator__dot {
  background: #f97316;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.7);
}

.home-ping-indicator[data-status="pending"] .home-ping-indicator__dot {
  background: #bae6fd;
  box-shadow: 0 0 12px rgba(186, 230, 253, 0.7);
}

.home-quick-btn:hover,
.home-quick-btn:focus-visible {
  background: var(--theme-surface-75);
  box-shadow: 0 12px 24px var(--theme-toast-shadow);
  transform: translateY(-1px);
  outline: none;
}
.home-quick-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--theme-accent-primary),
    0 12px 24px var(--theme-toast-shadow);
}
.home-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}
.home-logo__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--theme-accent-gradient);
  color: var(--theme-text-dark);
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 12px 24px var(--theme-accent-shadow);
}
.home-logo__text {
  font-weight: 700;
  font-size: 14px;
  color: var(--theme-text-muted);
}
.home-version {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--theme-text-subtle);
  text-transform: uppercase;
}
.home-preview {
  grid-area: preview;
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: clamp(18px, 4vw, 36px);
  align-items: center;
}
.home-preview__card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.55);
  border: 2px solid rgba(148, 163, 184, 0.4);
  background: var(--theme-surface-70);
  min-height: 355px;
}
.home-preview__card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 2.5s ease;
}
.home-preview__card img[data-active="true"] {
  opacity: 1;
}
.home-preview__info h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f8fafc;
}
.home-preview__info p {
  margin: 0 0 18px;
  color: rgba(226, 232, 240, 0.82);
  font-size: 15px;
  line-height: 1.6;
}
.home-actions {
  grid-area: actions;
  display: grid;
  gap: 16px;
  align-content: start;
  padding-top: 0;
  justify-self: stretch;
  width: min(100%, 500px);
}
.home-actions__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.home-code__campaign {
  justify-self: start;
  margin-top: 4px;
}

.campaign-modal[hidden] {
  display: none;
}
.campaign-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: grid;
  place-items: center;
}
.campaign-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}
.campaign-modal__panel {
  position: relative;
  width: min(720px, 92vw);
  max-height: min(640px, 92vh);
  background: linear-gradient(
      160deg,
      rgba(15, 23, 42, 0.95),
      rgba(30, 64, 175, 0.45)
    ),
    var(--theme-surface-85);
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: 0 40px 70px var(--theme-panel-shadow);
  padding: clamp(22px, 4vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  backdrop-filter: blur(18px);
  color: var(--theme-text-primary);
}
.campaign-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.campaign-modal__eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(148, 197, 255, 0.82);
}
.campaign-modal__title {
  margin: 4px 0;
  font-size: 24px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f8fafc;
}
.campaign-modal__subtitle {
  margin: 0;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.78);
  max-width: 420px;
  line-height: 1.6;
}
.campaign-modal__close {
  border: none;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  font-size: 16px;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.campaign-modal__close:hover {
  background: rgba(148, 163, 184, 0.32);
  transform: rotate(90deg);
}
.campaign-modal__map {
  position: relative;
  flex: 1 1 auto;
  min-height: 430px;
  background: radial-gradient(
      140% 120% at 16% 12%,
      rgba(30, 64, 175, 0.58),
      rgba(15, 23, 42, 0.9)
    ),
    linear-gradient(200deg, rgba(56, 189, 248, 0.12), rgba(2, 6, 23, 0.8));
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  overflow: hidden;
}
.campaign-modal__map::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 120%22 opacity=%220.12%22%3E%3Cpath d=%22M0 20C20 10 40 30 60 20 80 10 100 5 120 20%22 stroke=%22%2338BDF8%22 stroke-width=%222%22 fill=%22none%22 stroke-dasharray=%221 6%22/%3E%3C/svg%3E");
  mix-blend-mode: screen;
  pointer-events: none;
}
/* .campaign-modal__map::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  bottom: 16px;
  right: 18px;
  background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 120%22%3E%3Ccircle cx=%2260%22 cy=%2260%22 r=%2248%22 fill=%22rgba(255,255,255,0.85)%22 stroke=%22rgba(90,68,37,0.35)%22 stroke-width=%224%22/%3E%3Cpath d=%22M60 20L69 68L60 76L51 68Z%22 fill=%22rgba(205,108,25,0.85)%22/%3E%3Cpath d=%22M60 100L69 52L60 44L51 52Z%22 fill=%22rgba(88,63,25,0.85)%22 opacity=%220.8%22/%3E%3Cline x1=%2260%22 y1=%2212%22 x2=%2260%22 y2=%22108%22 stroke=%22rgba(90,68,37,0.35)%22 stroke-width=%223%22/%3E%3Cline x1=%2212%22 y1=%2260%22 x2=%22108%22 y2=%2260%22 stroke=%22rgba(90,68,37,0.35)%22 stroke-width=%223%22/%3E%3C/svg%3E');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.55;
  pointer-events: none;
} */

.campaign-modal__nodes {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.campaign-modal__extras {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.campaign-extra__toggle[hidden] {
  display: none;
}
.campaign-extra__toggle {
  align-self: flex-start;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 999px;
  color: #e0f2fe;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 20px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.campaign-extra__toggle:hover {
  background: rgba(56, 189, 248, 0.32);
  transform: translateY(-1px);
}
.campaign-extra__list[hidden] {
  display: none;
}
.campaign-extra__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
}
.campaign-extra-bot {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 14px;
  color: #e2e8f0;
  padding: 12px 16px;
  text-align: left;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.campaign-extra-bot:hover:not([disabled]) {
  border-color: rgba(125, 211, 252, 0.72);
  transform: translateY(-1px);
}
.campaign-extra-bot[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.campaign-extra-bot__name {
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 14px;
}
.campaign-extra-bot__meta {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.75);
  grid-column: 1 / -1;
}
.campaign-extra-bot__status {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  justify-self: flex-end;
  color: rgba(125, 211, 252, 0.85);
}
.campaign-map__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.campaign-map__path {
  fill: none;
  stroke: rgba(56, 189, 248, 0.6);
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 8 10;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35));
}
.campaign-bot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 160px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 18px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.86);
  display: grid;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background 0.2s ease;
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.55);
  color: rgba(226, 232, 240, 0.9);
}
.campaign-bot::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.45);
  background: rgba(30, 64, 175, 0.42);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.5);
}
.campaign-bot:hover {
  transform: translate(-50%, -52%);
  box-shadow: 0 22px 44px rgba(8, 47, 73, 0.45);
  border-color: rgba(56, 189, 248, 0.55);
}
.campaign-bot[disabled],
.campaign-bot[data-status="locked"] {
  cursor: not-allowed;
  opacity: 0.4;
  transform: translate(-50%, -50%);
  box-shadow: none;
  border-style: dashed;
  background: rgba(15, 23, 42, 0.6);
}
.campaign-bot[data-status="defeated"] {
  border-color: rgba(34, 197, 94, 0.55);
  background: linear-gradient(
    160deg,
    rgba(34, 197, 94, 0.35),
    rgba(6, 78, 59, 0.75)
  );
}
.campaign-bot[data-status="defeated"]::before {
  border-color: rgba(34, 197, 94, 0.65);
  background: rgba(34, 197, 94, 0.4);
}
.campaign-bot[data-status="active"] {
  border-color: rgba(56, 189, 248, 0.75);
  background: linear-gradient(
    160deg,
    rgba(56, 189, 248, 0.28),
    rgba(2, 6, 23, 0.92)
  );
  box-shadow: 0 24px 48px rgba(56, 189, 248, 0.25);
}
.campaign-bot[data-status="active"]::before {
  border-color: rgba(56, 189, 248, 0.8);
  background: rgba(56, 189, 248, 0.32);
}
.campaign-bot__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f8fafc;
}
.campaign-bot__title small {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(148, 197, 255, 0.72);
}
.campaign-bot__summary {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.7);
  line-height: 1.5;
}
.campaign-bot__meta {
  font-size: 11px;
  color: rgba(226, 232, 240, 0.65);
  line-height: 1.4;
  display: grid;
  gap: 2px;
}
.campaign-bot__meta span {
  display: block;
}
.campaign-bot__status {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(148, 197, 255, 0.6);
}

body.campaign-open {
  overflow: hidden;
}

.home-code {
  grid-area: code;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background: var(--theme-surface-50);
  border: 1px solid rgba(148, 163, 184, 0.3);
  align-self: start;
  justify-self: stretch;
  width: min(100%, 500px);
}
.home-code label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.85);
}
.home-code__row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(2, minmax(100px, 1fr));
  gap: 10px;
}
.home-code__row input {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 10px 14px;
  font-size: 16px;
  text-transform: uppercase;
  background: var(--theme-surface-60);
  color: #f8fafc;
  letter-spacing: 0.24em;
}
.home-code__row input::placeholder {
  color: rgba(148, 163, 184, 0.4);
}
.home-code__btn {
  padding: 10px 16px;
  font-size: 13px;
}
.home-code__hint {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.62);
}
.home-btn--pack {
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #1e1b4b;
  box-shadow: 0 18px 34px rgba(250, 204, 21, 0.35);
}
.home-btn--pack:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 42px rgba(234, 179, 8, 0.45);
}
.home-deck {
  margin-top: 32px;
  grid-area: deck;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 20px;
  padding: 18px;
  background: var(--theme-surface-60);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
  display: grid;
  gap: 16px;
  align-content: start;
  justify-self: stretch;
  width: min(100%, 500px);
}
.home-deck[hidden] {
  display: none;
}
.home-deck__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.home-username {
  display: grid;
  gap: 8px;
  max-width: 360px;
}
.home-username--inline {
  width: 100%;
  max-width: none;
  align-self: start;
}
.home-deck .home-username {
  margin: 0 0 16px;
}
.home-username label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.78);
}
.home-username input {
  border-radius: 14px;
  padding: 10px 14px;
  background: var(--theme-surface-50);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #f8fafc;
  font-size: 14px;
}
.home-username input::placeholder {
  color: rgba(148, 163, 184, 0.7);
}
.home-username__hint {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.72);
}
.home-deck__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f8fafc;
}
.home-deck__carousel {
  display: flex;
  align-items: center;
  gap: 16px;
  width: max-content;
  max-width: 100%;
  height: 103.33px;
}
.home-deck__viewport {
  flex: 0 0 calc(4 * 76px + 3.5 * 16px);
  max-width: calc(4 * 76px + 3.5 * 16px);
  overflow: hidden;
}
.home-deck__preview {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: nowrap;
  justify-content: flex-start;
  min-height: calc(76px * 4 / 3);
}
.home-deck__preview img {
  width: 76px;
  height: calc(76px * 4 / 3);
  flex: 0 0 76px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 18px 30px rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.home-deck__preview-add {
  width: 76px;
  height: calc(76px * 4 / 3);
  flex: 0 0 76px;
  border-radius: 12px;
  border: 2px dashed rgba(148, 163, 184, 0.35);
  background: var(--theme-surface-45);
  color: #f8fafc;
  font-size: 28px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.home-deck__preview-add:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--theme-accent-primary-rgb), 0.55);
}
.home-deck__nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: var(--theme-surface-65);
  color: #f8fafc;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.home-deck__nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.home-deck__nav:not(:disabled):hover {
  transform: translateY(-1px);
  background: var(--theme-surface-85);
}
.home-deck__edit {
  align-self: flex-end;
  max-width: 220px;
}
.home-btn {
  border: none;
  border-radius: 16px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease,
    color 0.22s ease;
  font-family: inherit;
}
.home-btn:focus-visible {
  outline: 2px solid var(--theme-accent-primary);
  outline-offset: 2px;
}
.home-btn--primary {
  background: var(--theme-accent-gradient);
  color: var(--theme-text-dark);
  box-shadow: 0 20px 36px var(--theme-accent-shadow);
}
.home-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 26px 48px var(--theme-accent-shadow-strong);
}
.home-btn--accent {
  background: var(--theme-surface-85);
  color: var(--theme-text-primary);
  border: 1px solid var(--theme-border-strong);
  box-shadow: 0 16px 26px var(--theme-panel-shadow);
}
.home-btn--accent:hover {
  transform: translateY(-1px);
  background: var(--theme-surface-95);
}
.home-btn--ghost {
  background: var(--theme-surface-60);
  color: var(--theme-text-muted);
  border: 1px solid var(--theme-border);
  box-shadow: inset 0 0 0 1px var(--theme-border-soft);
}
.home-btn--ghost:hover {
  background: var(--theme-surface-75);
  transform: translateY(-1px);
}
.waiting-strip {
  margin-top: 8px;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-inline: 28px;
  padding: 24px 28px;
  border-radius: 18px;
  background: var(--theme-surface-82);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
  display: grid;
  gap: 16px;
  overflow: hidden;
}
.waiting-strip[hidden] {
  display: none;
}
.waiting-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}
.waiting-back-btn {
  min-width: 180px;
  position: relative;
}
.waiting-back-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.waiting-code {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 16px;
  background: var(--theme-surface-70);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #f8fafc;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 12px;
}
.waiting-code[hidden] {
  display: none;
}
.waiting-code__value {
  font-weight: 800;
  font-size: 18px;
}
@media (max-width: 640px) {
  .home-code__row {
    grid-template-columns: 1fr;
  }
  .home-code__btn {
    width: 100%;
  }
}
.waiting-strip__label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.75);
}
.waiting-strip__scroller {
  overflow: hidden;
  position: relative;
}
.waiting-strip__track {
  display: flex;
  gap: 14px;
  animation: waiting-strip-scroll var(--waiting-strip-duration, 14s) linear
    infinite;
}
.waiting-strip__scroller[data-marquee="false"] .waiting-strip__track {
  animation: none;
}
.waiting-strip__track:hover {
  animation-play-state: paused;
}
.waiting-strip__track:focus-within {
  animation-play-state: paused;
}
.waiting-strip__scroller::before,
.waiting-strip__scroller::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 140px;
  pointer-events: none;
  z-index: 1;
}
.waiting-strip__scroller::before {
  left: 0;
  background: linear-gradient(
    to right,
    var(--theme-surface-90) 0%,
    var(--theme-surface-30) 40%,
    rgba(var(--theme-base-rgb), 0) 100%
  );
}
.waiting-strip__scroller::after {
  right: 0;
  background: linear-gradient(
    to left,
    var(--theme-surface-90) 0%,
    var(--theme-surface-30) 40%,
    rgba(var(--theme-base-rgb), 0) 100%
  );
}
.waiting-strip__card {
  position: relative;
  flex: 0 0 96px;
  height: 134px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(148, 163, 184, 0.4);
}
.waiting-strip__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    var(--theme-surface-10),
    var(--theme-surface-45)
  );
  pointer-events: none;
}
.waiting-strip__track .waiting-strip__card {
  flex-shrink: 0;
}
@keyframes waiting-strip-scroll {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-2242px);
  }
}
@keyframes packCardLift {
  0% {
    transform: translate(
      calc(var(--offset, 0) * -6px),
      calc(var(--offset, 0) * -4px)
    );
  }
  35% {
    transform: translate(
        calc(var(--offset, 0) * -6px),
        calc(var(--offset, 0) * -4px - 12px)
      )
      scale(1.02);
  }
  100% {
    transform: translate(
      calc(var(--offset, 0) * -6px),
      calc(var(--offset, 0) * -4px)
    );
  }
}
.pack-overlay {
  align-items: center;
}
.pack-card {
  width: min(620px, 92vw);
  border-radius: 24px;
  background: var(--theme-surface-92);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.55);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pack-card--enter {
  transform: translateX(120%);
  animation: packSlideIn 0.65s cubic-bezier(0.25, 0.9, 0.3, 1) forwards;
}
.pack-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(226, 232, 240, 0.85);
}
.pack-card__header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.pack-card__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}
.pack-card__stack-wrapper {
  width: 150px;
  display: flex;
  justify-content: center;
}
.pack-card__stack {
  position: relative;
  width: 150px;
  height: 210px;
}
.pack-card__stack-card {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(
    135deg,
    var(--theme-surface-90),
    rgba(30, 41, 59, 0.7)
  );
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.5);
  cursor: default;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  outline: none;
  pointer-events: none;
  perspective: 1000px;
  opacity: 1;
}
.pack-card__stack-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 12px;
  border: 2px dashed rgba(148, 163, 184, 0.35);
}
.pack-card__stack-card.is-active::before {
  border-style: solid;
  border-color: rgba(250, 204, 21, 0.65);
}
.pack-card__stack-card[data-offset] {
  transform: translate(
    calc(var(--offset, 0) * -6px),
    calc(var(--offset, 0) * -4px)
  );
}
.pack-card__stack-card.is-active {
  pointer-events: auto;
  cursor: pointer;
}
.pack-card__stack-card.is-active:hover {
  transform: translate(
      calc(var(--offset, 0) * -6px),
      calc(var(--offset, 0) * -4px)
    )
    translateY(-4px);
  box-shadow: 0 26px 50px rgba(2, 6, 23, 0.6);
}
.pack-card__stack-card.is-revealed {
  pointer-events: none;
}
.pack-card__stack-card-inner {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform-style: preserve-3d;
  transform-origin: center;
  transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.4, 1.02);
  transform: rotateY(0deg);
}
.pack-card__stack-card.is-revealed .pack-card__stack-card-inner {
  transform: rotateY(180deg);
}
.pack-card__stack-card.is-revealed-final {
  pointer-events: none;
  opacity: 0;
}
.pack-card__stack-card.is-flipping {
  animation: packCardLift 0.7s ease both;
  box-shadow: 0 26px 52px rgba(2, 6, 23, 0.65);
}
.pack-card__stack-card.is-flipping .pack-card__stack-card-inner {
  transition-duration: 0.7s;
}
.pack-card__face {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  backface-visibility: hidden;
  display: grid;
  place-items: center;
}
.pack-card__face--front {
  transform: rotateY(180deg);
  background: linear-gradient(
    135deg,
    var(--theme-surface-92),
    rgba(30, 41, 59, 0.8)
  );
  box-shadow: inset 0 0 0 1px rgba(248, 250, 252, 0.18);
  padding: 12px;
}
.pack-card__face--back {
  display: grid;
  place-items: center;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(var(--theme-accent-primary-rgb), 0.35),
    var(--theme-surface-85)
  );
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: rgba(226, 232, 240, 0.85);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 12px;
}
.pack-card__pattern {
  font-size: inherit;
}
.pack-card__face-img {
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(248, 250, 252, 0.4),
    0 16px 28px rgba(2, 6, 23, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.pack-card__face-img.is-visible {
  opacity: 1;
}
.stats-board {
  display: grid;
  gap: 16px;
  color: #e2e8f0;
}
.stats-section {
  background: var(--theme-surface-60);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 8px;
}
.stats-section h4 {
  margin: 0 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #f8fafc;
}
.stat-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.stat-label {
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.75);
  margin-right: 12px;
}
.stat-value {
  font-weight: 700;
  color: #f8fafc;
  text-align: right;
}
.stats-note {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.6);
  line-height: 1.5;
  margin-top: 4px;
}
.ability-popup {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translate(-50%, -100%);
  background: var(--theme-surface-92);
  border: 1px solid rgba(192, 132, 252, 0.45);
  color: #ede9fe;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(76, 29, 149, 0.45);
  opacity: 0;
  pointer-events: none;
  animation: abilityPopupFade 1.4s ease forwards;
}
.ability-popup[data-tone="heal"] {
  border-color: rgba(134, 239, 172, 0.5);
  color: #bbf7d0;
  box-shadow: 0 10px 30px rgba(22, 101, 52, 0.4);
}
.ability-popup[data-tone="statup"] {
  border-color: rgba(96, 165, 250, 0.5);
  color: #bae6fd;
  box-shadow: 0 10px 30px rgba(30, 64, 175, 0.45);
}
.ability-sparkle-cloud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.ability-sparkle-cloud span {
  position: absolute;
  font-size: 16px;
  color: rgba(244, 244, 255, 0.95);
  text-shadow: 0 0 10px rgba(167, 139, 250, 0.8);
  opacity: 0;
}
@keyframes abilityPopupFade {
  0% {
    opacity: 0;
    transform: translate(-50%, -110%) scale(0.92);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -100%) scale(1);
  }
  80% {
    opacity: 0.95;
    transform: translate(-50%, -104%) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -130%) scale(0.94);
  }
}
.pack-card__details {
  width: 100%;
  max-width: 420px;
  background: var(--theme-surface-65);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 18px;
  padding: 18px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.1);
  color: #e2e8f0;
}
.pack-card__placeholder {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.6);
}
.pack-details {
  display: grid;
  gap: 12px;
}
.pack-details__title {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}
.pack-details__title h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f8fafc;
}
.pack-details__rarity {
  font-size: 11px;
  letter-spacing: 0.16em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(var(--theme-accent-primary-rgb), 0.2);
  color: rgba(226, 232, 240, 0.85);
  text-transform: uppercase;
}
.pack-details__rarity.common {
  background: rgba(37, 99, 235, 0.2);
}
.pack-details__rarity.rare {
  background: rgba(var(--theme-accent-primary-rgb), 0.3);
}
.pack-details__rarity.epic {
  background: rgba(147, 51, 234, 0.25);
}
.pack-details__rarity.legendary {
  background: rgba(234, 179, 8, 0.2);
  color: rgba(250, 204, 21, 0.95);
}
.pack-details__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.05em;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.12);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pack-details__stats strong {
  color: #f8fafc;
}
.pack-details__desc {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.75);
}
.pack-card__art {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.pack-card__art img {
  width: 100%;
  display: block;
}
.ability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.82);
}
.ability-list li {
  padding-left: 0;
}
.pack-details__effect {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.78);
}
.pack-details__effect strong {
  color: #f8fafc;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pack-card__done {
  align-self: flex-end;
  max-width: 160px;
}
.pack-card__done.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.rarity-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rarity-tag--common {
  background: rgba(37, 99, 235, 0.6);
  color: rgba(248, 250, 252, 0.9);
}
.rarity-tag--rare {
  background: rgba(var(--theme-accent-primary-rgb), 0.75);
  color: rgba(248, 250, 252, 0.9);
}
.rarity-tag--epic {
  background: rgba(147, 51, 234, 0.75);
  color: rgba(250, 245, 255, 0.9);
}
.rarity-tag--legendary {
  background: rgba(234, 179, 8, 0.85);
  color: #031b4d;
}

@media (min-width: 720px) {
  .pack-card__body {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
  }
  .pack-card__details {
    width: 320px;
  }
  .pack-card__stack-wrapper {
    width: 180px;
  }
  .pack-card__stack {
    width: 160px;
    height: 220px;
  }
}
.home-btn:disabled,
.home-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.home-link {
  border: none;
  background: none;
  color: rgba(226, 232, 240, 0.8);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.home-link--inline {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: var(--theme-surface-45);
}
.home-link:hover {
  color: #f8fafc;
}

/* --- Deck Builder Wrapper --- */
.deckBuilder {
  width: min(1475px, calc(100% - clamp(36px, 6vw, 140px)));
  margin: clamp(36px, 6vw, 80px) auto;
  background: rgba(248, 250, 252, 0.92);
  border-radius: 28px;
  box-shadow: 0 24px 60px var(--theme-win-shadow);
  padding: clamp(24px, 3vw, 48px);
  backdrop-filter: blur(14px);
  color: var(--theme-text-dark);
  text-align: left;
  will-change: transform;
}
@media (min-width: 1200px) {
  .deckBuilder {
    transform: scale(0.67);
    transform-origin: top center;
  }
}
.deckBuilder h1,
.deckBuilder h2,
.deckBuilder h3 {
  color: inherit;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.deckBuilder .db-header-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.deckBuilder .db-rules,
.deckBuilder .db-stats,
.deckBuilder .db-section,
.deckBuilder .db-footer {
  text-align: left;
}
.db-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
}
.db-rules--footer {
  margin-bottom: 20px;
}
.rule-card {
  flex: 1 1 200px;
  min-width: 180px;
  background: var(--theme-surface-06);
  border: 1px solid var(--theme-surface-08);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.rule-card[data-complete="true"] {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.15);
}
.rule-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--theme-surface-85);
  color: #f8fafc;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.rule-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rule-card__value {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--theme-text-dark);
}
.rule-card[data-complete="true"] .rule-card__value {
  color: #0f766e;
}
.rule-card__hint {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--theme-surface-60);
}
.deckBuilder .db-section {
  background: rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  padding: 18px;
  margin-top: 24px;
  box-shadow: inset 0 0 0 1px var(--theme-surface-05);
}
.deckBuilder .db-footer {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.db-username {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: var(--theme-surface-04);
  border: 1px solid var(--theme-surface-08);
}
.db-username label {
  font-size: 13px;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--theme-surface-75);
}
.db-username__hint {
  font-size: 12px;
  color: var(--theme-surface-60);
  letter-spacing: 0.04em;
}
.deckBuilder .db-footer #startBattle {
  align-self: flex-end;
}
.deckBuilder .db-section.trio {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.deckBuilder .db-section.trio > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.deckBuilder .db-section.trio .card-container {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.card-owned-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--theme-surface-85);
  color: #f8fafc;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.4);
}
.card--locked {
  filter: grayscale(0.7) brightness(0.7);
  position: relative;
}
.card--locked::after {
  content: "LOCKED";
  position: absolute;
  inset: auto 8px 8px;
  background: var(--theme-surface-75);
  color: rgba(248, 250, 252, 0.85);
  padding: 2px 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  border-radius: 8px;
}
.card--locked .count-ctrl {
  display: none !important;
}
.count-badge {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 16px;
  padding: 1px 4px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(248, 250, 252, 0.92);
  color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  pointer-events: none;
  opacity: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 6;
}
.count-badge[data-active="true"] {
  opacity: 1;
  transform: translate(-50%, 0);
}
.deckBuilder .card.has-deck-count:not(.selected) {
  outline: 2px solid rgba(56, 189, 248, 0.25);
  outline-offset: -4px;
}
.deckBuilder .deck-grid .card {
  padding: 6px;
  width: 110px;
  height: 150px;
}
.deckBuilder .deck-grid .card .card-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  width: 100%;
  min-height: 48px;
}
.deckBuilder .deck-grid .card .card-name {
  margin: 0;
}
.deckBuilder button:not(.count-ctrl) {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 10px;
  border: none;
  padding: 10px 16px;
  background: var(--theme-base);
  color: var(--theme-text-primary);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.deckBuilder button:not(.count-ctrl):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px var(--theme-win-shadow);
}
.deckBuilder .count-ctrl {
  padding: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: none;
}
.deckBuilder .count-ctrl:hover {
  transform: none;
  box-shadow: none;
  background: rgba(0, 0, 0, 0.7);
}
.deckBuilder .card .count-ctrl {
  position: absolute;
  bottom: 6px;
}
.deckBuilder .card .count-ctrl--minus {
  left: 6px;
}
.deckBuilder .card .count-ctrl--plus {
  right: 6px;
}
.deck-card-count {
  margin: 0;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.66);
}
.deckBuilder input {
  border-radius: 10px;
  border: 1px solid var(--theme-surface-18);
  padding: 10px 14px;
  font-size: 14px;
}
.deckBuilder #startBattle[disabled] {
  background: var(--theme-win-shadow);
  color: var(--theme-surface-55);
  cursor: not-allowed;
  box-shadow: none;
}
.deckBuilder #startBattle:not([disabled]) {
  background: var(--theme-accent-gradient);
  color: var(--theme-text-dark);
}
.deckBuilder #startBattle:not([disabled]):hover {
  box-shadow: 0 16px 36px var(--theme-accent-shadow-strong);
}

@media (max-width: 900px) {
  .home-panel {
    gap: 24px;
  }
  .home-preview {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .home-preview__card {
    max-width: 240px;
    margin: 0 auto;
  }
  .home-preview__info h1 {
    font-size: clamp(26px, 8vw, 32px);
  }
}

@media (max-width: 640px) {
  .home-screen {
    padding: clamp(24px, 8vw, 48px);
  }
  .home-logo-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .home-logo {
    letter-spacing: 0.16em;
  }
  .home-actions__row {
    grid-template-columns: 1fr;
  }
  .home-btn {
    letter-spacing: 0.1em;
  }
}

/* --- Modal refinements --- */
.modal-overlay[hidden] {
  display: none;
}
.modal-card {
  position: relative;
  padding-top: 36px;
  background: linear-gradient(
    145deg,
    var(--theme-surface-92),
    rgba(2, 6, 23, 0.95)
  );
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 26px 60px var(--theme-surface-50);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--theme-surface-65);
  color: rgba(226, 232, 240, 0.8);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.modal-close:hover {
  background: var(--theme-surface-85);
  transform: rotate(90deg);
}
.modal-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: rgba(226, 232, 240, 0.85);
}
.modal-list strong {
  color: #f8fafc;
}
.modal-callout {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(var(--theme-accent-primary-rgb), 0.12);
  border: 1px solid rgba(var(--theme-accent-primary-rgb), 0.28);
  color: rgba(226, 232, 240, 0.9);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* --- Waiting Screen --- */
/* Drop-in replacement */
#waitingForOpponent {
  /* fix the width math */
  box-sizing: border-box;
  width: 100%;
  max-width: 100dvw;

  /* fill the screen without side-scroll */
  min-height: 100svh;
  overflow-x: clip; /* no horizontal creep */
  overflow-y: auto;

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;

  padding: clamp(48px, 8vw, 80px) 24px;
  margin: 0 auto;

  color: #e2e8f0;
  background: var(--theme-surface-35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}
#waitingForOpponent h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 40px);
  text-shadow: 0 12px 28px var(--theme-surface-65);
}
#waitingForOpponent > * {
  position: relative;
  z-index: 1;
}
#waitingForOpponent .loader {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.9;
}
#waitingForOpponent .ball {
  mix-blend-mode: screen;
}

@keyframes packSlideIn {
  0% {
    transform: translateX(140%);
  }
  60% {
    transform: translateX(-4%);
  }
  100% {
    transform: translateX(0);
  }
}
.surrender-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.9),
    rgba(190, 24, 45, 0.9)
  );
  color: #fff5f5;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  font-size: 12px;
}
.surrender-button span:first-child {
  font-size: 16px;
}
.surrender-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(248, 113, 113, 0.35);
}
.surrender-button:focus-visible {
  outline: 2px solid rgba(248, 113, 113, 0.6);
  outline-offset: 3px;
}
#surrenderBtn {
  position: static;
  margin-top: 16px;
  display: flex;
  justify-content: center;
}
.home-preview__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(var(--theme-base-rgb), 0) 40%,
    var(--theme-surface-40) 100%
  );
  pointer-events: none;
}
