:root {
  --launcher-ui-scale: 1;
  --bg-primary: #0f172a;
  --bg-secondary: #111827;
  --grid-tile-bg: #1f2933;
  --hover-bg: #273244;
  --arena-field-gap: clamp(10px, 1vw, 16px);

  --accent-cyan: #22d3ee;
  --accent-blue: #3b82f6;
  --accent-highlight: #67e8f9;

  --unit-tank: #3b82f6;
  --unit-archer: #22c55e;
  --unit-mage: #a855f7;
  --unit-healer: #eab308;
  --unit-assassin: #ef4444;
  --unit-paladin: #93c5fd;
  --unit-necromancer: #6b21a8;
  --unit-summon: #9ca3af;
  --unit-enemy: #f97316;

  --combat-hp: #ef4444;
  --combat-heal: #22c55e;

  --economy-gold: #facc15;
  --economy-meta: #fbbf24;

  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --border-default: #374151;
  --border-hover: #22d3ee;

  --panel-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  --panel-glow: 0 0 0 1px rgba(34, 211, 238, 0.15), 0 0 28px rgba(34, 211, 238, 0.08);
  --danger-glow: 0 0 0 1px rgba(239, 68, 68, 0.24), 0 0 30px rgba(239, 68, 68, 0.12);
  --panel-inner-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), inset 0 -18px 40px rgba(0, 0, 0, 0.22);
}

.menu-primary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.menu-feature-card {
  display: grid;
  gap: 0.55rem;
  padding: 1.15rem 1.2rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(103, 232, 249, 0.22);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(12, 18, 30, 0.96));
  color: #e2e8f0;
  text-align: left;
  box-shadow: 0 18px 42px rgba(2, 8, 23, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.menu-feature-card strong {
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.menu-feature-card span:last-child {
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.45;
}

.menu-feature-card .tiny-chip {
  justify-self: start;
}

.menu-feature-card.primary {
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 20px 46px rgba(6, 182, 212, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.menu-feature-card.boss-rush {
  border-color: rgba(251, 191, 36, 0.34);
  box-shadow: 0 20px 46px rgba(251, 146, 60, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.menu-feature-card.utility {
  border-color: rgba(148, 163, 184, 0.24);
}

.menu-feature-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(103, 232, 249, 0.42);
  box-shadow: 0 24px 54px rgba(8, 145, 178, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.menu-hero-actions.utility-row {
  margin-top: 1rem;
}

.boss-rush-setup-grid,
.bestiary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 1rem;
}

.boss-rush-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.boss-rush-slot-card,
.boss-rush-setup-card {
  display: grid;
  gap: 0.75rem;
}

.boss-rush-preview-list {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.bestiary-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 1.25rem;
}

.bestiary-screen {
  padding: 22px;
  background:
    radial-gradient(circle at 18% 22%, rgba(34, 211, 238, 0.14), transparent 24%),
    radial-gradient(circle at 84% 16%, rgba(168, 85, 247, 0.14), transparent 20%),
    linear-gradient(180deg, #040914 0%, #08111d 54%, #091522 100%);
}

.bestiary-grid-field,
.bestiary-particle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bestiary-grid-field {
  background:
    linear-gradient(rgba(103, 232, 249, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.04) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 92%);
  opacity: 0.42;
}

.bestiary-particle-layer {
  background:
    radial-gradient(circle at 14% 30%, rgba(255, 255, 255, 0.14) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 18%, rgba(103, 232, 249, 0.12) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 72%, rgba(192, 132, 252, 0.12) 0 2px, transparent 3px),
    radial-gradient(circle at 28% 80%, rgba(255, 255, 255, 0.1) 0 1.5px, transparent 2.5px);
  opacity: 0.8;
}

.bestiary-panel {
  width: min(1680px, calc(100vw - 54px));
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.bestiary-topline,
.bestiary-hero-copy,
.bestiary-collection-head,
.bestiary-sidebar-copy,
.bestiary-sidebar-meta,
.bestiary-detail-head,
.bestiary-detail-section,
.bestiary-detail-list,
.bestiary-sidebar-lore,
.bestiary-lore-card-stack {
  display: grid;
  gap: 0.75rem;
}

.bestiary-hero-copy {
  max-width: 760px;
}

.bestiary-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.33fr) minmax(0, 1fr) minmax(360px, 0.5fr);
  gap: 1rem;
  align-items: start;
}

.bestiary-layout.archive-layout {
  grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr);
}

.bestiary-sidebar,
.bestiary-collection,
.bestiary-detail-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10, 18, 31, 0.92), rgba(8, 14, 24, 0.98));
  border: 1px solid rgba(103, 232, 249, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 60px rgba(2, 8, 23, 0.4),
    0 0 0 1px rgba(34, 211, 238, 0.06);
}

.bestiary-collection.archive-collection {
  min-height: 72vh;
}

.bestiary-grid.archive-grid,
.bestiary-grid {
  align-content: start;
}

.bestiary-sidebar::before,
.bestiary-collection::before,
.bestiary-detail-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top, rgba(103, 232, 249, 0.08), transparent 44%);
}

.bestiary-sidebar {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
}

.archive-sidebar {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.bestiary-tab-stack {
  display: grid;
  gap: 0.7rem;
}

.lore-archive-sidebar-block {
  padding-top: 0.2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.lore-archive-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.lore-archive-card {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(12, 18, 30, 0.88), rgba(9, 14, 24, 0.94));
}

.lore-archive-card.world {
  border-color: rgba(96, 165, 250, 0.24);
}

.lore-archive-card.faction {
  border-color: rgba(245, 214, 110, 0.24);
}

.lore-archive-card.dialogue {
  border-color: rgba(34, 211, 238, 0.22);
}

.lore-archive-card.mystery {
  border-color: rgba(192, 132, 252, 0.28);
  background:
    linear-gradient(180deg, rgba(17, 11, 28, 0.92), rgba(10, 8, 18, 0.96));
}

.lore-archive-card.bestiary-note {
  border-color: rgba(74, 222, 128, 0.18);
}

.lore-archive-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.bestiary-card-lore-stage {
  display: grid;
  place-items: center;
  min-height: 146px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(12, 18, 30, 0.92), rgba(8, 12, 22, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: rgba(241, 245, 249, 0.92);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.bestiary-card-lore-stage.world {
  border-color: rgba(96, 165, 250, 0.24);
}

.bestiary-card-lore-stage.faction {
  border-color: rgba(245, 214, 110, 0.24);
}

.bestiary-card-lore-stage.dialogue {
  border-color: rgba(34, 211, 238, 0.24);
}

.bestiary-card-lore-stage.mystery {
  border-color: rgba(192, 132, 252, 0.28);
  background:
    linear-gradient(180deg, rgba(17, 11, 28, 0.92), rgba(10, 8, 18, 0.98));
}

.lore-archive-detail-head {
  margin-bottom: 0.5rem;
}

.lore-archive-dialogue-card {
  margin-bottom: 1rem;
}

.lore-archive-dialogue-actions {
  justify-content: flex-start;
}

.lore-archive-transcript {
  display: grid;
  gap: 0.75rem;
}

.lore-archive-transcript-line {
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(10, 16, 26, 0.72);
}

.lore-archive-transcript-line.active {
  border-color: rgba(34, 211, 238, 0.22);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.08);
}

.lore-archive-transcript-line p {
  margin: 0.45rem 0 0;
}

.bestiary-related-lore-list {
  display: grid;
  gap: 0.75rem;
}

.bestiary-related-lore-card {
  display: grid;
  gap: 0.28rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(10, 16, 26, 0.74);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.bestiary-related-lore-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.26);
  box-shadow: 0 10px 24px rgba(2, 8, 22, 0.28), 0 0 20px rgba(34, 211, 238, 0.08);
}

.codex-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 34;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at center, rgba(8, 14, 24, 0.16), rgba(3, 6, 12, 0.76)),
    rgba(2, 6, 12, 0.58);
  backdrop-filter: blur(10px);
}

.codex-modal-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(1100px, calc(100vw - 42px));
}

.codex-nav-arrow {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  background: rgba(8, 14, 24, 0.84);
  color: rgba(239, 246, 255, 0.94);
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(2, 8, 20, 0.34), 0 0 18px rgba(34, 211, 238, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.codex-nav-arrow::before {
  font-size: 2rem;
}

.codex-nav-arrow.left::before {
  content: "\2039";
}

.codex-nav-arrow.right::before {
  content: "\203A";
}

.codex-nav-arrow:hover:not(:disabled) {
  transform: scale(1.05);
  border-color: rgba(103, 232, 249, 0.42);
  box-shadow: 0 18px 40px rgba(2, 8, 20, 0.4), 0 0 24px rgba(34, 211, 238, 0.14);
}

.codex-nav-arrow:disabled,
.codex-nav-arrow.disabled {
  opacity: 0.32;
  cursor: default;
}

.codex-modal {
  display: grid;
  gap: 18px;
  min-height: min(78vh, 860px);
  padding: 22px;
  border-radius: 30px;
  border: 1px solid rgba(103, 232, 249, 0.2);
  background:
    linear-gradient(180deg, rgba(12, 18, 28, 0.96), rgba(8, 12, 20, 0.98)),
    radial-gradient(circle at top left, rgba(103, 232, 249, 0.08), transparent 32%),
    radial-gradient(circle at top right, rgba(245, 214, 110, 0.08), transparent 28%);
  box-shadow:
    0 34px 84px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(34, 211, 238, 0.06),
    0 0 34px rgba(103, 232, 249, 0.08);
  overflow: hidden;
}

.codex-modal.turn-next .codex-modal-pages,
.codex-modal.turn-prev .codex-modal-pages {
  animation-duration: 320ms;
  animation-timing-function: ease;
  animation-fill-mode: both;
}

.codex-modal.turn-next .codex-modal-pages {
  animation-name: codex-slide-next;
}

.codex-modal.turn-prev .codex-modal-pages {
  animation-name: codex-slide-prev;
}

.codex-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.codex-modal-title-block {
  display: grid;
  gap: 0.35rem;
}

.codex-modal-title-block h2,
.codex-modal-title-block p {
  margin: 0;
}

.codex-modal-title-block p {
  color: rgba(191, 219, 254, 0.76);
}

.codex-modal-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.codex-modal-pages.spread {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.25fr);
  gap: 0;
  min-height: 0;
  flex: 1;
}

.codex-modal-pages.single {
  display: block;
  min-height: 0;
  flex: 1;
}

.codex-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.codex-modal-index {
  color: rgba(191, 219, 254, 0.82);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.codex-page {
  min-height: 0;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background:
    linear-gradient(180deg, rgba(19, 26, 38, 0.92), rgba(14, 19, 30, 0.96)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: auto, 24px 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.codex-page-left {
  padding: 24px;
  border-radius: 24px 0 0 24px;
  border-right: none;
  display: grid;
  align-content: start;
  gap: 18px;
}

.codex-page-right {
  padding: 24px 22px 24px 26px;
  border-radius: 0 24px 24px 0;
  position: relative;
}

.codex-page-single {
  padding: 24px;
  border-radius: 24px;
  display: grid;
  gap: 20px;
}

.codex-single-hero .codex-page-left {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.codex-page-hero {
  display: grid;
  place-items: center;
}

.codex-page-copy {
  display: grid;
  gap: 0.6rem;
  text-align: center;
}

.codex-page-copy h2,
.codex-page-copy p {
  margin: 0;
}

.codex-page-copy p {
  color: rgba(203, 213, 225, 0.78);
}

.codex-page-scroll {
  display: grid;
  align-content: start;
  gap: 1rem;
  min-height: 0;
  max-height: min(62vh, 640px);
  overflow-y: auto;
  padding-right: 8px;
}

.codex-modal.lore-entry-open .codex-page-scroll {
  max-height: none;
  overflow: hidden;
  padding-right: 0;
}

.codex-section {
  display: grid;
  gap: 0.7rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.codex-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.codex-section h3,
.codex-section p {
  margin: 0;
}

.codex-section h3 {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.88);
}

.codex-section-body {
  color: rgba(236, 244, 255, 0.94);
  line-height: 1.75;
}

.codex-section-body p + p {
  margin-top: 0.75rem;
}

.codex-mechanics-list,
.codex-tag-row {
  display: grid;
  gap: 0.75rem;
}

.codex-mechanic-row {
  display: grid;
  gap: 0.3rem;
}

.codex-muted {
  color: rgba(148, 163, 184, 0.84);
}

.codex-lore-emblem {
  width: min(100%, 260px);
  min-height: 260px;
}

.codex-transcript {
  gap: 0.9rem;
  max-height: min(56vh, 560px);
  overflow-y: auto;
  padding-right: 8px;
}

.codex-transcript::-webkit-scrollbar {
  width: 10px;
}

.codex-transcript::-webkit-scrollbar-track {
  background: rgba(8, 14, 24, 0.42);
  border-radius: 999px;
}

.codex-transcript::-webkit-scrollbar-thumb {
  background: rgba(103, 232, 249, 0.32);
  border-radius: 999px;
}

.codex-transcript::-webkit-scrollbar-thumb:hover {
  background: rgba(103, 232, 249, 0.48);
}

@keyframes codex-slide-next {
  from {
    opacity: 0;
    transform: translateX(26px) rotateY(-8deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
  }
}

@keyframes codex-slide-prev {
  from {
    opacity: 0;
    transform: translateX(-26px) rotateY(8deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
  }
}

@media (max-width: 1100px) {
  .codex-modal-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .codex-nav-arrow {
    display: none;
  }

  .codex-modal-pages.spread {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .codex-page-left,
  .codex-page-right {
    border-radius: 22px;
    border-right: 1px solid rgba(148, 163, 184, 0.12);
  }
}

@media (max-width: 720px) {
  .codex-modal-backdrop {
    padding: 16px;
  }

  .codex-modal {
    min-height: auto;
    padding: 18px;
    border-radius: 24px;
  }

  .codex-modal-header,
  .codex-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .codex-modal-controls {
    justify-content: stretch;
  }

  .codex-modal-controls .action-button,
  .codex-modal-footer .action-button {
    width: 100%;
  }

  .codex-modal-index {
    text-align: center;
  }

  .codex-page-left,
  .codex-page-right,
  .codex-page-single {
    padding: 18px;
  }

  .codex-page-scroll {
    max-height: min(52vh, 500px);
  }

  .codex-modal.lore-entry-open .codex-page-scroll {
    max-height: none;
  }

  .codex-transcript {
    max-height: min(48vh, 420px);
  }
}

.bestiary-tab-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(71, 85, 105, 0.52);
  background: rgba(15, 23, 42, 0.72);
  color: #dbe8f7;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.bestiary-tab-button span {
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.bestiary-tab-button strong {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.95rem;
}

.bestiary-tab-button:hover,
.bestiary-tab-button.active {
  transform: translateX(4px);
  border-color: rgba(103, 232, 249, 0.44);
  background: linear-gradient(180deg, rgba(14, 28, 44, 0.92), rgba(9, 18, 30, 0.96));
  box-shadow: 0 16px 36px rgba(8, 145, 178, 0.16);
}

.bestiary-sidebar-meta {
  padding: 0.9rem 0 0;
  border-top: 1px solid rgba(71, 85, 105, 0.34);
}

.bestiary-sidebar-lore {
  padding-top: 0.9rem;
  border-top: 1px solid rgba(71, 85, 105, 0.22);
}

.bestiary-sidebar-stat {
  display: grid;
  gap: 0.2rem;
}

.bestiary-collection,
.bestiary-detail-panel {
  padding: 1.15rem;
}

.bestiary-collection-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.archive-collection-head {
  gap: 1rem;
}

.bestiary-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(180px, 0.6fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.bestiary-filter-card {
  display: grid;
  gap: 0.4rem;
}

.bestiary-filter-card.wide {
  min-width: 0;
}

.bestiary-tag-filter-row {
  margin-bottom: 1rem;
}

.bestiary-tag-filter {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.bestiary-tag-filter.active,
.bestiary-tag-filter:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.38);
  background: rgba(12, 37, 50, 0.72);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.1);
}

.bestiary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 1rem;
}

.bestiary-card {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: 1.3rem;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--rarity-accent, #67e8f9) 12%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(8, 14, 24, 0.98));
  color: #e2e8f0;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
  overflow: hidden;
  isolation: isolate;
}

.bestiary-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 26%);
  opacity: 0.8;
}

.bestiary-card:hover,
.bestiary-card.active {
  transform: translateY(-5px) scale(1.05);
  border-color: color-mix(in srgb, var(--rarity-accent, #67e8f9) 52%, rgba(255, 255, 255, 0.12));
  box-shadow:
    0 24px 54px rgba(8, 145, 178, 0.16),
    0 0 28px color-mix(in srgb, var(--rarity-accent, #67e8f9) 16%, transparent);
  filter: brightness(1.02);
}

.bestiary-card.locked {
  border-color: rgba(71, 85, 105, 0.24);
  color: rgba(203, 213, 225, 0.74);
}

.bestiary-card.locked .unit-glyph,
.bestiary-card.locked .unit-asset {
  filter: grayscale(1);
  opacity: 0.45;
}

.bestiary-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at top, rgba(103, 232, 249, 0.12), transparent 48%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(7, 10, 18, 0.96));
}

.bestiary-card-media .tile-stage {
  height: 100%;
  min-height: 0;
}

.bestiary-card-media .tile-stage,
.bestiary-detail-art-frame .tile-stage {
  border-radius: inherit;
}

.bestiary-trait-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at top, rgba(103, 232, 249, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(12, 18, 30, 0.88), rgba(7, 11, 18, 0.96));
}

.bestiary-trait-stage.locked {
  filter: grayscale(1) brightness(0.68);
}

.bestiary-trait-stage-inner {
  display: grid;
  place-items: center;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background: rgba(8, 14, 24, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bestiary-trait-stage .synergy-icon-wrap {
  width: 100%;
  height: 100%;
}

.bestiary-trait-stage .synergy-icon {
  width: 58%;
  height: 58%;
}

.bestiary-detail-art-frame .bestiary-trait-stage {
  min-height: 260px;
}

.bestiary-card-media .tile-portrait,
.bestiary-detail-art-frame .tile-portrait {
  object-fit: cover;
}

.bestiary-detail-art-frame .tile-portrait {
  object-fit: contain;
  object-position: center bottom;
  padding: 16px;
}

.bestiary-card-aura {
  position: absolute;
  inset: auto 14% 12% 14%;
  height: 34%;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--rarity-accent, #67e8f9) 34%, transparent), transparent 74%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
}

.bestiary-card-type {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 2;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background: rgba(7, 12, 22, 0.72);
  color: rgba(226, 232, 240, 0.84);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bestiary-card-silhouette,
.bestiary-detail-silhouette {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at top, rgba(148, 163, 184, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(10, 15, 24, 0.84), rgba(6, 10, 18, 0.98));
}

.bestiary-card-silhouette::after,
.bestiary-detail-silhouette::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.62));
}

.bestiary-card-silhouette .unit-glyph,
.bestiary-detail-silhouette .unit-glyph {
  position: relative;
  z-index: 1;
  transform: scale(1.2);
  filter: grayscale(1) brightness(0.48);
}

.bestiary-card-silhouette .unit-asset,
.bestiary-detail-silhouette .unit-asset {
  position: relative;
  z-index: 1;
  filter: brightness(0) saturate(0);
  opacity: 0.92;
}

.bestiary-card-lock {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 0.8rem 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
  color: rgba(226, 232, 240, 0.92);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
}

.bestiary-card-copy {
  display: grid;
  gap: 0.3rem;
}

.bestiary-card-copy strong {
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.bestiary-card-copy span {
  color: rgba(203, 213, 225, 0.72);
  line-height: 1.4;
}

.bestiary-detail-panel {
  display: grid;
  gap: 1rem;
  align-content: start;
  min-height: 100%;
  transform: translateX(10px);
  opacity: 0.94;
  transition: transform 220ms ease, opacity 220ms ease, box-shadow 220ms ease;
}

.bestiary-detail-panel.active {
  transform: translateX(0);
  opacity: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 28px 60px rgba(2, 8, 23, 0.46),
    0 0 34px rgba(34, 211, 238, 0.08);
}

.bestiary-detail-art {
  position: relative;
  min-height: 260px;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rarity-accent, #67e8f9) 28%, rgba(255, 255, 255, 0.08));
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--rarity-accent, #67e8f9) 16%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(7, 11, 18, 0.96));
}

.bestiary-detail-art-frame {
  position: relative;
  height: 100%;
}

.bestiary-detail-art-frame .tile-stage,
.bestiary-detail-art-frame .bestiary-detail-silhouette {
  height: 100%;
  min-height: 260px;
}

.codex-page-hero .bestiary-detail-art {
  width: min(100%, 260px);
  min-height: 220px;
}

.codex-page-hero .bestiary-detail-art-frame .tile-stage,
.codex-page-hero .bestiary-detail-art-frame .bestiary-detail-silhouette {
  min-height: 220px;
}

.bestiary-detail-row {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.95rem;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.bestiary-detail-description {
  margin: -0.1rem 0 0.2rem;
}

.bestiary-entry-tag-row {
  gap: 0.55rem;
}

.bestiary-collapsible {
  display: grid;
  gap: 0.7rem;
}

.bestiary-collapsible-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(71, 85, 105, 0.42);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

.bestiary-collapsible-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.34);
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.12);
}

.bestiary-collapsible-chevron {
  color: rgba(191, 219, 254, 0.82);
  font-size: 1rem;
}

.bestiary-collapsible-body {
  display: grid;
  gap: 0.75rem;
  overflow: hidden;
  max-height: 900px;
  opacity: 1;
  transition: max-height 220ms ease, opacity 180ms ease;
}

.bestiary-collapsible.collapsed .bestiary-collapsible-body {
  max-height: 0;
  opacity: 0;
}

.bestiary-scaling-copy {
  color: rgba(191, 219, 254, 0.82);
  line-height: 1.5;
  white-space: normal;
}

.bestiary-world-copy,
.bestiary-lore-copy {
  margin: 0;
  text-align: left;
  white-space: pre-line;
}

.bestiary-lore-card {
  display: grid;
  gap: 0.28rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.54);
}

.bestiary-lore-card strong {
  color: #f8fafc;
}

.bestiary-lore-card span {
  color: rgba(203, 213, 225, 0.78);
  line-height: 1.45;
}

.bestiary-lore-scroll {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.15rem 0.2rem 0.15rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(103, 232, 249, 0.3) rgba(15, 23, 42, 0.4);
}

.bestiary-lore-scroll::-webkit-scrollbar {
  width: 8px;
}

.bestiary-lore-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 999px;
}

.bestiary-lore-scroll::-webkit-scrollbar-thumb {
  background: rgba(103, 232, 249, 0.28);
  border-radius: 999px;
}

.bestiary-empty-results {
  grid-column: 1 / -1;
}

.menu-feature-card.has-new,
.bestiary-card.new-entry,
.bestiary-tab-button.active {
  box-shadow:
    0 20px 46px rgba(8, 145, 178, 0.18),
    0 0 28px rgba(250, 204, 21, 0.12);
}

.tiny-chip.attention {
  border-color: rgba(250, 204, 21, 0.44);
  background: rgba(120, 53, 15, 0.28);
  color: #fde68a;
}

.bestiary-card-new {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  padding: 0.3rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.42);
  background: rgba(113, 63, 18, 0.64);
  color: #fde68a;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bestiary-progress-copy {
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.82rem;
  line-height: 1.35;
}

.bestiary-progress-list {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  margin-top: 0.75rem;
}

.bestiary-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.72rem 0.8rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(71, 85, 105, 0.36);
  background: rgba(15, 23, 42, 0.7);
  color: #dbe8f7;
}

.bestiary-unlock-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid rgba(250, 204, 21, 0.34);
  background:
    radial-gradient(circle at left, rgba(250, 204, 21, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(20, 16, 7, 0.92), rgba(15, 23, 42, 0.96));
  box-shadow: 0 20px 42px rgba(120, 53, 15, 0.16);
}

.bestiary-unlock-toast-copy {
  display: grid;
  gap: 0.22rem;
}

.bestiary-unlock-toast-copy strong {
  font-size: 1.02rem;
  color: #fef3c7;
}

.bestiary-unlock-toast-copy span:last-child {
  color: rgba(226, 232, 240, 0.8);
}

.boss-encounter-banner {
  margin-bottom: 0.85rem;
}

.boss-banner-metrics {
  display: grid;
  gap: 0.7rem;
  min-width: 280px;
}

.boss-banner-hp {
  display: grid;
  gap: 0.35rem;
}

.boss-hp-bar {
  min-width: 240px;
}

@media (max-width: 980px) {
  .menu-primary-grid,
  .boss-rush-setup-grid,
  .bestiary-layout {
    grid-template-columns: 1fr;
  }

  .bestiary-filter-toolbar {
    grid-template-columns: 1fr;
  }

  .bestiary-panel {
    width: min(1120px, calc(100vw - 28px));
  }

  .bestiary-sidebar {
    order: 1;
  }

  .bestiary-collection {
    order: 2;
  }

  .bestiary-detail-panel {
    order: 3;
  }

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

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

@media (max-width: 720px) {
  .boss-rush-slot-grid,
  .bestiary-grid {
    grid-template-columns: 1fr;
  }

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

  .bestiary-panel {
    width: min(1120px, calc(100vw - 16px));
  }

  .bestiary-screen {
    padding: 12px 8px 20px;
  }

  .bestiary-tab-stack,
  .bestiary-collection-head {
    grid-template-columns: 1fr;
  }

  .bestiary-unlock-toast {
    flex-direction: column;
    align-items: stretch;
  }
}

.chaos-modifier-row {
  border-color: rgba(103, 232, 249, 0.22);
}

.chaos-modifier-row.positive {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.18);
}

.chaos-modifier-row.negative {
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.18);
}

.chaos-modifier-row.mixed {
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.18);
}

.lore-quest-list,
.lore-fragment-list {
  display: grid;
  gap: 12px;
}

.lore-quest-list.compact {
  gap: 10px;
}

.lore-quest-card,
.lore-fragment-card {
  background: rgba(12, 18, 28, 0.72);
  border: 1px solid rgba(103, 232, 249, 0.16);
}

.lore-quest-card.completed {
  border-color: rgba(34, 197, 94, 0.22);
}

.lore-quest-card.claimable {
  border-color: rgba(250, 204, 21, 0.34);
  box-shadow: 0 18px 42px rgba(250, 204, 21, 0.12);
}

.lore-quest-card.claimable .action-button {
  animation: dailyClaimPulse 2.2s ease-in-out infinite;
}

.lore-quest-card.claimed {
  border-color: rgba(148, 163, 184, 0.18);
  opacity: 0.88;
}

.lore-quest-card.secret {
  border-color: rgba(192, 132, 252, 0.26);
  background:
    radial-gradient(circle at top right, rgba(192, 132, 252, 0.1), transparent 34%),
    rgba(14, 11, 24, 0.84);
}

.lore-quest-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.lore-quest-head-main,
.skill-tree-category-head,
.skill-tree-tooltip-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.skill-tree-category-head .section-title {
  margin: 0;
}

.lore-quest-head h3,
.lore-fragment-card strong {
  margin: 6px 0 0;
  font-size: 1rem;
}

.lore-quest-objectives {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.lore-quest-objective {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 36, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.lore-quest-objective-copy,
.meta-card-progress {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.lore-quest-objective.complete {
  border-color: rgba(34, 197, 94, 0.24);
  color: #dcfce7;
}

.lore-quest-objective span,
.lore-fragment-card p {
  color: rgba(226, 232, 240, 0.82);
}

.lore-quest-progress-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 36, 0.92);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.lore-quest-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.88), rgba(250, 204, 21, 0.9));
}

.lore-quest-objective strong,
.lore-quest-reward strong {
  color: #f8fafc;
}

.lore-quest-reward {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.lore-quest-actions,
.lore-quest-preview-head,
.lore-quest-summary-bar,
.lore-quest-tab-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lore-quest-actions {
  margin-top: 14px;
}

.lore-quest-preview-head {
  justify-content: space-between;
  margin: 12px 0;
}

.lore-quest-summary-bar {
  margin: 16px 0 10px;
}

.lore-quest-tab-row {
  margin: 10px 0 18px;
}

.lore-quest-tab-button {
  min-width: 118px;
}

.lore-quest-panel-shell {
  max-width: 1180px;
}

.meta-card-effect {
  color: rgba(191, 219, 254, 0.9);
  font-size: 0.9rem;
}

.lore-quest-toast {
  border-color: rgba(250, 204, 21, 0.3);
  box-shadow: 0 18px 45px rgba(250, 204, 21, 0.14);
}

.daily-quest-panel {
  gap: 14px;
}

.daily-quest-list {
  gap: 10px;
}

.daily-quest-card {
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.08), transparent 32%),
    rgba(12, 18, 28, 0.82);
}

.daily-quest-card.rare {
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 16px 38px rgba(59, 130, 246, 0.1);
}

.daily-quest-card.epic {
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 16px 38px rgba(168, 85, 247, 0.12);
}

.daily-quest-card.legendary {
  border-color: rgba(250, 204, 21, 0.34);
  box-shadow: 0 18px 42px rgba(250, 204, 21, 0.14);
}

.library-quest-panel,
.library-quest-top-row,
.library-quest-summary-chips,
.library-quest-tab-row,
.library-quest-streak-row,
.library-quest-badge-row,
.library-quest-reward-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.library-quest-top-row {
  justify-content: space-between;
}

.library-quest-tab-row .action-button.active {
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.12);
}

.library-quest-badge-row {
  margin-bottom: 4px;
}

.library-quest-reward-row {
  color: #f8fafc;
}

.daily-quest-footnote {
  display: grid;
  gap: 4px;
  padding: 10px 2px 0;
}

.daily-quest-footnote strong {
  color: #f8fafc;
  font-size: 0.9rem;
}

.daily-quest-footnote span {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

@keyframes dailyClaimPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(250, 204, 21, 0);
  }
  50% {
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.16);
  }
}

.ui-symbol {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.16), transparent 56%),
    rgba(11, 16, 25, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 22px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.ui-symbol::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.ui-symbol-glyph {
  position: relative;
  z-index: 1;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.08));
}

.ui-symbol-tiny {
  width: 20px;
  height: 20px;
  border-radius: 8px;
  vertical-align: middle;
}

.ui-symbol-tiny .ui-symbol-glyph {
  font-size: 0.72rem;
}

.ui-symbol-small {
  width: 32px;
  height: 32px;
  border-radius: 11px;
}

.ui-symbol-small .ui-symbol-glyph {
  font-size: 1rem;
}

.ui-symbol-medium {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.ui-symbol-medium .ui-symbol-glyph {
  font-size: 1.16rem;
}

.ui-symbol-large {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.ui-symbol-large .ui-symbol-glyph {
  font-size: 1.36rem;
}

.ui-symbol.tone-gold {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 20px rgba(250, 204, 21, 0.12);
}

.ui-symbol.tone-gold-cyan,
.ui-symbol.tone-daily {
  color: #67e8f9;
  border-color: rgba(103, 232, 249, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 20px rgba(103, 232, 249, 0.12);
}

.ui-symbol.tone-blue,
.ui-symbol.tone-control {
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.32);
}

.ui-symbol.tone-cyan,
.ui-symbol.tone-merge {
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.28);
}

.ui-symbol.tone-red,
.ui-symbol.tone-danger {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.28);
}

.ui-symbol.tone-green {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.28);
}

.ui-symbol.tone-yellow,
.ui-symbol.tone-orange {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

.ui-symbol.tone-purple,
.ui-symbol.tone-secret,
.ui-symbol.tone-magic,
.ui-symbol.tone-trait,
.ui-symbol.tone-purple-gold,
.ui-symbol.tone-merge-secret,
.ui-symbol.tone-crit,
.ui-symbol.tone-tactics,
.ui-symbol.tone-blue-gold,
.ui-symbol.tone-lore {
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text-primary);
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.14), transparent 34%),
    linear-gradient(180deg, #08111f 0%, var(--bg-primary) 55%, #09111d 100%);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

button {
  font: inherit;
}

button,
.shop-card,
.arena-tile {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.ambient {
  position: absolute;
  pointer-events: none;
  filter: blur(30px);
  opacity: 0.34;
}

.ambient-one {
  top: 8%;
  left: -6%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 68%);
}

.ambient-two {
  right: -8%;
  bottom: 6%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.28), transparent 72%);
}

#app {
  position: relative;
  z-index: 1;
  width: min(1760px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 24px;
  font-size: calc(16px * var(--launcher-ui-scale));
}

#app:has(> .arena-screen),
#app:has(> .merge-tactics-screen),
#app:has(> .soul-survivors-screen) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.menu-screen,
.arena-screen {
  animation: rise 220ms ease-out;
}

.private-login-screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.12), transparent 26%),
    radial-gradient(circle at 82% 14%, rgba(168, 85, 247, 0.14), transparent 24%),
    linear-gradient(180deg, #040814 0%, #070d19 54%, #04070f 100%);
}

.private-login-ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(34px);
  opacity: 0.72;
  pointer-events: none;
}

.private-login-ambient.ambient-a {
  top: 10%;
  left: 8%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.24), transparent 70%);
}

.private-login-ambient.ambient-b {
  right: 8%;
  bottom: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.22), transparent 70%);
}

.private-login-panel {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 18px;
  width: min(100%, 520px);
  min-width: min(100%, 320px);
  padding: 32px 28px;
  border-radius: 30px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(10, 16, 28, 0.96), rgba(6, 10, 18, 0.98));
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.34),
    0 0 42px rgba(34, 211, 238, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  visibility: visible;
  opacity: 1;
  transform: none;
}

.private-login-lock-wrap {
  display: grid;
  place-items: center;
}

.private-login-lock-core {
  display: grid;
  place-items: center;
  width: 110px;
  aspect-ratio: 1;
  border-radius: 28px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.14), transparent 44%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(8, 12, 21, 0.98));
  color: rgba(186, 230, 253, 0.92);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.1);
}

.private-login-copy {
  display: grid;
  gap: 10px;
  text-align: center;
}

.private-login-copy .menu-title,
.private-login-copy .menu-copy,
.private-login-field,
.private-login-actions,
.private-login-error {
  position: relative;
  z-index: 1;
}

.private-login-field {
  display: grid;
  gap: 8px;
}

.private-login-input {
  width: 100%;
  min-height: 56px;
  font-size: 1rem;
}

.private-login-actions .action-button {
  width: 100%;
  min-height: 52px;
}

@media (max-width: 640px) {
  .private-login-screen {
    padding: 14px;
  }

  .private-login-panel {
    width: 100%;
    min-width: 0;
    padding: 24px 18px;
    border-radius: 24px;
  }
}

.private-login-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  background: rgba(69, 10, 10, 0.26);
  color: #fecaca;
  text-align: center;
}

.menu-screen {
  min-height: calc(100vh - 44px);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.menu-orbit {
  position: absolute;
  width: min(62vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.18);
  box-shadow:
    0 0 24px rgba(34, 211, 238, 0.16),
    inset 0 0 20px rgba(34, 211, 238, 0.08);
}

.menu-orbit::before,
.menu-orbit::after {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(103, 232, 249, 0.12);
  border-radius: 50%;
}

.menu-orbit::after {
  inset: 20%;
}

.menu-home {
  min-height: calc(100vh - 36px);
  padding: 20px;
  background:
    radial-gradient(circle at 50% 38%, rgba(34, 211, 238, 0.14), transparent 22%),
    radial-gradient(circle at top, rgba(59, 130, 246, 0.18), transparent 34%),
    linear-gradient(180deg, #050b16 0%, #081120 52%, #091522 100%);
}

.menu-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(34, 211, 238, 0.12), transparent 18%),
    radial-gradient(circle at 22% 18%, rgba(59, 130, 246, 0.1), transparent 20%),
    radial-gradient(circle at 78% 74%, rgba(34, 211, 238, 0.08), transparent 18%);
  pointer-events: none;
}

.menu-grid-field,
.menu-particle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.menu-grid-field {
  background-image:
    linear-gradient(rgba(103, 232, 249, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 54%, rgba(0, 0, 0, 0.9), transparent 88%);
  opacity: 0.45;
}

.menu-particle-layer {
  background:
    radial-gradient(circle at 18% 26%, rgba(255, 255, 255, 0.24) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 22%, rgba(103, 232, 249, 0.32) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 76%, rgba(255, 255, 255, 0.2) 0 1px, transparent 2px),
    radial-gradient(circle at 36% 72%, rgba(103, 232, 249, 0.22) 0 1px, transparent 2px);
  animation: driftGlow 15s linear infinite;
  opacity: 0.55;
}

.menu-subscreen {
  padding: 28px 18px;
}

.library-screen {
  align-items: stretch;
  padding: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(4, 8, 15, 1), rgba(8, 12, 20, 1));
}

.library-orbit {
  width: min(74vw, 760px);
  opacity: 0.72;
}

.library-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: 0;
  gap: 24px;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.library-hero {
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.library-hero-copy {
  max-width: 72ch;
}

.library-hero-rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.library-toolbar,
.library-filter-row,
.library-card-topline,
.library-card-badges,
.library-meta-grid,
.library-card-actions,
.library-detail-grid,
.library-recent-meta,
.library-changelog-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.library-toolbar {
  flex-direction: column;
  align-items: stretch;
}

.library-filter-row {
  justify-content: center;
}

.library-search-card {
  width: 100%;
}

.library-card {
  min-height: 100%;
  padding: 22px;
  gap: 18px;
  align-content: start;
  overflow: hidden;
  cursor: pointer;
}

.library-card.available:hover {
  transform: translateY(-3px);
}

.library-card.selected {
  border-color: rgba(103, 232, 249, 0.48);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(103, 232, 249, 0.16),
    0 0 40px rgba(34, 211, 238, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -18px 40px rgba(0, 0, 0, 0.2);
}

.library-card.locked {
  border-color: rgba(148, 163, 184, 0.22);
}

.library-card.cyan {
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(11, 20, 35, 0.94), rgba(8, 14, 26, 0.96));
}

.library-card.amber {
  background:
    radial-gradient(circle at top, rgba(251, 191, 36, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(28, 18, 8, 0.94), rgba(20, 13, 8, 0.96));
}

.library-card.violet {
  background:
    radial-gradient(circle at top, rgba(192, 132, 252, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(20, 12, 30, 0.94), rgba(15, 10, 24, 0.96));
}

.library-card.emerald {
  background:
    radial-gradient(circle at top, rgba(52, 211, 153, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(10, 28, 24, 0.94), rgba(8, 18, 18, 0.96));
}

.library-card-head,
.library-card-copy {
  display: grid;
  gap: 14px;
}

.library-card-topline {
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.library-card-badges {
  flex: 1 1 auto;
}

.library-card-body {
  display: grid;
  gap: 8px;
}

.library-card-subtitle {
  margin: 0;
}

.library-card-copy-text {
  text-align: left;
  max-width: none;
}

.library-meta-grid {
  justify-content: flex-start;
  align-items: stretch;
}

.library-meta-card {
  min-width: 126px;
  flex: 1 1 0;
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background: rgba(7, 14, 24, 0.68);
}

.library-meta-card strong {
  color: #f8fdff;
  font-size: 1rem;
}

.library-card-stats {
  min-height: 30px;
}

.library-card-stats:empty,
.library-card-tags:empty {
  display: none;
}

.library-card-tags .tiny-chip.subtle {
  border-color: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

.library-card-actions {
  justify-content: flex-start;
}

.library-favorite-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background: rgba(7, 14, 24, 0.82);
  color: #94a3b8;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease,
    background 140ms ease;
}

.library-favorite-button:hover {
  transform: translateY(-1px);
  border-color: rgba(250, 204, 21, 0.42);
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.12);
  color: #fde68a;
}

.library-favorite-button.active {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(49, 35, 6, 0.72);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.1), 0 0 28px rgba(250, 204, 21, 0.14);
}

.library-favorite-button.compact {
  width: 40px;
  height: 40px;
}

.library-filter-button {
  gap: 8px;
}

.library-filter-button.active {
  border-color: rgba(103, 232, 249, 0.56);
  background: rgba(18, 42, 56, 0.84);
  box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.14), 0 0 26px rgba(34, 211, 238, 0.12);
}

.library-recent-panel,
.library-changelog-panel,
.library-side-panel {
  display: grid;
  gap: 14px;
}

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

.library-recent-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.library-recent-copy {
  display: grid;
  gap: 4px;
}

.library-recent-copy strong {
  color: #f8fdff;
}

.library-recent-copy span {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.library-recent-meta {
  justify-content: flex-end;
  margin-left: auto;
}

.library-poster {
  position: relative;
  min-height: 210px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(8, 15, 27, 0.76), rgba(6, 11, 20, 0.9));
}

.library-poster.cyan {
  background:
    radial-gradient(circle at 50% 24%, rgba(34, 211, 238, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(8, 20, 34, 0.88), rgba(5, 12, 20, 0.96));
}

.library-poster.amber {
  background:
    radial-gradient(circle at 50% 24%, rgba(251, 191, 36, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(35, 23, 10, 0.88), rgba(20, 13, 8, 0.96));
}

.library-poster.violet {
  background:
    radial-gradient(circle at 50% 24%, rgba(192, 132, 252, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(24, 15, 36, 0.88), rgba(14, 10, 22, 0.96));
}

.library-poster.emerald {
  background:
    radial-gradient(circle at 50% 24%, rgba(52, 211, 153, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(12, 28, 24, 0.88), rgba(8, 18, 18, 0.96));
}

.library-poster-glow {
  position: absolute;
  inset: auto 14% 8%;
  height: 80px;
  border-radius: 50%;
  filter: blur(18px);
  background: rgba(103, 232, 249, 0.14);
}

.library-poster.amber .library-poster-glow {
  background: rgba(251, 191, 36, 0.16);
}

.library-poster.violet .library-poster-glow {
  background: rgba(192, 132, 252, 0.18);
}

.library-poster.emerald .library-poster-glow {
  background: rgba(52, 211, 153, 0.18);
}

.library-poster-units {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 24px;
}

.library-poster .unit-glyph.large {
  width: 72px;
  height: 72px;
}

.library-poster-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.library-detail-screen {
  align-items: stretch;
}

.library-detail-shell {
  gap: 20px;
}

.library-detail-grid {
  align-items: start;
  gap: 18px;
}

.library-detail-banner,
.library-detail-side {
  display: grid;
  gap: 18px;
}

.library-detail-banner {
  flex: 1 1 62%;
  min-width: 0;
  padding: 22px;
  border-radius: 28px;
}

.library-detail-banner.cyan {
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(11, 20, 35, 0.94), rgba(8, 14, 26, 0.98));
}

.library-detail-banner.amber {
  background:
    radial-gradient(circle at top, rgba(251, 191, 36, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(31, 20, 8, 0.94), rgba(20, 13, 8, 0.98));
}

.library-detail-banner.violet {
  background:
    radial-gradient(circle at top, rgba(192, 132, 252, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(20, 12, 30, 0.94), rgba(15, 10, 24, 0.98));
}

.library-detail-banner.emerald {
  background:
    radial-gradient(circle at top, rgba(52, 211, 153, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(12, 30, 26, 0.94), rgba(8, 19, 19, 0.98));
}

.library-detail-banner-art .library-poster {
  min-height: 320px;
}

.library-detail-copy {
  display: grid;
  gap: 16px;
}

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

.library-detail-side {
  flex: 1 1 32%;
  min-width: 300px;
}

.library-changelog-stack,
.library-changelog-list {
  display: grid;
  gap: 10px;
}

.library-changelog-card {
  align-content: start;
}

.library-changelog-head {
  justify-content: space-between;
}

.library-changelog-head strong {
  color: #f8fdff;
  font-size: 0.96rem;
}

.library-note-line {
  margin: 0;
  text-align: left;
}

.library-topbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.library-brand {
  display: grid;
  gap: 8px;
}

.library-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.library-topbar-side {
  display: flex;
  justify-content: flex-end;
}

.topbar-search-card {
  min-width: 0;
}

.library-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.62fr);
  gap: 18px;
  align-items: start;
}

.library-home-main,
.library-home-side {
  display: grid;
  gap: 18px;
}

.library-featured {
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: stretch;
  border-radius: 30px;
  overflow: hidden;
}

.library-featured.empty {
  grid-template-columns: 1fr;
}

.library-featured.favorite {
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(250, 204, 21, 0.14),
    0 0 40px rgba(250, 204, 21, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -18px 40px rgba(0, 0, 0, 0.22);
}

.library-featured-art,
.library-featured-copy {
  min-width: 0;
}

.library-featured-art .library-poster {
  min-height: 100%;
  height: 100%;
  min-height: 360px;
}

.library-filter-select-card {
  display: none;
}

.library-filter-select-card.visible {
  display: grid;
}

.library-filter-select {
  appearance: none;
}

.library-card {
  transform-origin: center;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.library-card-cover-glow {
  position: absolute;
  inset: auto 10% -30px;
  height: 80px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-highlight) 20%, transparent);
  filter: blur(24px);
  opacity: 0.2;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.library-card.favorite {
  border-color: rgba(250, 204, 21, 0.28);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(250, 204, 21, 0.08),
    0 0 32px rgba(250, 204, 21, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 -18px 40px rgba(0, 0, 0, 0.18);
}

.library-card:hover,
.library-card:focus-within {
  transform: translateY(-4px) scale(1.05);
  border-color: rgba(103, 232, 249, 0.42);
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(103, 232, 249, 0.12),
    0 0 38px rgba(34, 211, 238, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -18px 40px rgba(0, 0, 0, 0.18);
}

.library-card.favorite:hover,
.library-card.favorite:focus-within {
  border-color: rgba(250, 204, 21, 0.42);
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(250, 204, 21, 0.14),
    0 0 42px rgba(250, 204, 21, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -18px 40px rgba(0, 0, 0, 0.18);
}

.library-card:hover .library-card-cover-glow,
.library-card:focus-within .library-card-cover-glow {
  opacity: 0.44;
  transform: scale(1.06);
}

.library-card:hover .library-poster,
.library-card:focus-within .library-poster {
  filter: brightness(1.08) saturate(1.06);
}

.library-play-button {
  opacity: 0.46;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.library-card:hover .library-play-button,
.library-card:focus-within .library-play-button,
.library-featured .library-play-button {
  opacity: 1;
  transform: translateY(0);
}

.library-detail-button {
  opacity: 0.88;
}

.status-tag {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(8, 14, 24, 0.76);
}

.status-tag.in-progress {
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(8, 45, 58, 0.4);
  color: #b6f5ff;
}

.status-tag.prototype {
  border-color: rgba(192, 132, 252, 0.38);
  background: rgba(61, 27, 89, 0.42);
  color: #ead7ff;
}

.status-tag.finished {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(13, 55, 35, 0.42);
  color: #d1fae5;
}

.status-tag.paused {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.62);
  color: #e2e8f0;
}

.status-tag.experimental {
  border-color: rgba(251, 146, 60, 0.4);
  background: rgba(88, 40, 14, 0.44);
  color: #ffddb7;
}

.status-tag.compact {
  min-height: 28px;
  font-size: 0.66rem;
}

.library-side-stats,
.library-ideas-panel,
.library-empty-state {
  display: grid;
  gap: 14px;
}

.compact-filter-panel {
  gap: 14px;
}

.side-search-card {
  min-width: 0;
}

.library-filter-select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.library-stat-list {
  display: grid;
  gap: 10px;
}

.library-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(7, 14, 24, 0.58);
  border: 1px solid rgba(103, 232, 249, 0.08);
}

.library-stat-row span {
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.library-stat-row strong {
  color: #f8fdff;
  text-align: right;
}

.library-poster {
  position: relative;
  overflow: hidden;
}

.library-poster-image,
.library-poster-gradient,
.library-card-sheen,
.library-featured-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.library-poster-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.library-poster-gradient {
  background:
    linear-gradient(180deg, rgba(8, 12, 20, 0.02) 0%, rgba(8, 12, 20, 0.14) 58%, rgba(5, 8, 14, 0.42) 100%),
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent-highlight) 28%, transparent), transparent 48%);
  z-index: 1;
}

.library-poster-units,
.library-poster-mark {
  position: relative;
  z-index: 2;
}

.library-card {
  overflow: hidden;
}

.library-card-sheen {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 28%, transparent 72%, rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, transparent 56%, rgba(4, 8, 15, 0.34) 100%);
  opacity: 0.42;
  transition: opacity 180ms ease;
}

.launcher-grid-card-overlay.premium {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.library-card-overlay-top,
.library-card-overlay-bottom,
.library-card-hover-tools,
.library-featured-tools,
.library-edit-tag-row,
.library-edit-modal-head,
.library-edit-modal-grid,
.library-edit-form-row,
.library-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.library-card-overlay-top {
  justify-content: space-between;
  align-items: flex-start;
}

.library-card-hover-tools {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.library-card:hover .library-card-hover-tools,
.library-card:focus-within .library-card-hover-tools,
.launcher-featured-card:hover .library-featured-tools,
.launcher-featured-card:focus-within .library-featured-tools {
  opacity: 1;
  transform: translateY(0);
}

.library-card:hover .library-card-sheen,
.library-card:focus-within .library-card-sheen {
  opacity: 1;
}

.library-card-copy {
  position: relative;
  z-index: 3;
}

.library-card-subtitle.single-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.launcher-grid-card .library-card-body {
  gap: 8px;
}

.launcher-grid-card .library-card-copy {
  gap: 16px;
  padding-top: 14px;
}

.launcher-grid-card .library-card-actions.minimal-actions {
  margin-top: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.launcher-grid-card .library-detail-button,
.launcher-grid-card .library-play-button {
  flex: 1 1 0;
}

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

.launcher-featured-card {
  overflow: hidden;
}

.library-featured-overlay {
  background:
    linear-gradient(90deg, rgba(5, 9, 16, 0.16), transparent 42%, rgba(5, 9, 16, 0.82) 100%),
    linear-gradient(180deg, transparent 36%, rgba(5, 9, 16, 0.82) 100%);
}

.library-featured-tools {
  justify-content: flex-end;
}

.library-hub-nav {
  position: fixed;
  top: 0;
  left: 0;
  display: grid;
  gap: 14px;
  align-self: start;
  width: 220px;
  height: 100vh;
  padding: 22px 16px;
  border-radius: 0;
  border: 0;
  border-right: 1px solid rgba(103, 232, 249, 0.08);
  background:
    linear-gradient(180deg, rgba(6, 10, 18, 0.995), rgba(9, 13, 22, 0.995)),
    radial-gradient(circle at top, rgba(103, 232, 249, 0.06), transparent 34%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
  z-index: 30;
}

.library-hub-nav-list {
  display: grid;
  gap: 10px;
}

.library-hub-nav .panel-summary {
  padding: 0;
}

.library-shell {
  --library-nav-width: 220px;
  --library-right-rail-width: min(360px, calc(100vw - 268px));
  --library-right-rail-gap: 16px;
  padding-right: calc(var(--library-right-rail-width) + var(--library-right-rail-gap) + 16px);
}

.library-home-main,
.launcher-library-side {
  margin-left: var(--library-nav-width);
  width: calc(100% - var(--library-nav-width));
}

.launcher-main-column,
.library-home-main {
  min-height: 100vh;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(13, 19, 31, 0.98), rgba(10, 15, 26, 0.99));
}

.library-main-fullscreen {
  width: calc(100% - var(--library-nav-width));
}

.launcher-library-side {
  position: fixed;
  top: 16px;
  right: 16px;
  width: var(--library-right-rail-width);
  margin-left: 0;
  z-index: 25;
}

.library-profile-rail {
  display: grid;
  align-self: start;
}

.library-profile-rail-stack,
.library-filter-drawer {
  display: grid;
  gap: 18px;
}

.library-workspace-hero,
.library-settings-hero {
  display: grid;
  gap: 18px;
}

.library-workspace-hero-actions,
.library-settings-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.library-workspace-grid,
.library-settings-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.library-workspace-card,
.library-settings-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(9, 15, 28, 0.96));
}

.library-settings-select {
  min-width: 180px;
}

.mobile-compact-mode .library-shell,
.mobile-compact-mode .soul-survivors-menu-shell {
  padding: 14px;
}

.mobile-compact-mode .library-grid {
  gap: 14px;
}

.mobile-compact-mode .library-card {
  padding: 14px;
}

.library-workspace-card-art {
  position: relative;
  min-height: 180px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.library-workspace-card-art .library-poster {
  min-height: 180px;
}

.library-workspace-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 15, 28, 0.12), rgba(8, 15, 28, 0.78));
  pointer-events: none;
}

.library-workspace-card-copy {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.library-workspace-card-copy h3 {
  margin: 10px 0 8px;
  font-size: 1.05rem;
}

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

.library-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 22px;
}

.library-settings-row strong {
  display: block;
  margin-bottom: 6px;
}

.library-settings-subsection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 22px 22px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(248, 113, 113, 0.12);
  background: linear-gradient(180deg, rgba(42, 16, 24, 0.38), rgba(24, 10, 18, 0.58));
}

.library-settings-subsection-copy {
  display: grid;
  gap: 6px;
}

.library-settings-subsection-copy strong {
  display: block;
}

@media (max-width: 900px) {
  .library-settings-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-settings-subsection {
    align-items: flex-start;
    flex-direction: column;
  }
}

.library-hub-nav-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(8, 13, 24, 0.82);
  color: #e7f7fb;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.library-hub-nav-button:hover,
.library-hub-nav-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.26);
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.08);
}

.library-hub-nav-button.active {
  border-color: rgba(103, 232, 249, 0.34);
  background:
    linear-gradient(180deg, rgba(15, 28, 40, 0.94), rgba(8, 14, 25, 0.96)),
    radial-gradient(circle at left, rgba(103, 232, 249, 0.08), transparent 34%);
  box-shadow:
    0 14px 26px rgba(6, 182, 212, 0.09),
    inset 0 0 0 1px rgba(103, 232, 249, 0.08);
}

.collapsible-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.library-collapsible-body {
  display: grid;
  gap: 14px;
  overflow: hidden;
  max-height: 1200px;
  opacity: 1;
  transition: max-height 220ms ease, opacity 180ms ease, padding-top 180ms ease;
  padding-top: 8px;
}

.collapsible.collapsed .library-collapsible-body {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
}

.library-edit-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(4, 7, 12, 0.76);
  backdrop-filter: blur(12px);
}

.library-edit-modal {
  width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  display: grid;
  gap: 22px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(16, 22, 34, 0.98), rgba(10, 14, 24, 0.98)),
    radial-gradient(circle at top, rgba(103, 232, 249, 0.08), transparent 42%);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 48px rgba(103, 232, 249, 0.08);
}

.library-edit-modal-head {
  justify-content: space-between;
  align-items: flex-start;
}

.library-edit-modal-grid {
  align-items: flex-start;
  gap: 24px;
}

.library-edit-cover-column {
  display: grid;
  gap: 14px;
  width: 280px;
  flex: 0 0 280px;
}

.library-edit-cover-preview {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 13, 22, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.library-edit-cover-preview > img,
.library-edit-cover-preview .library-poster {
  width: 100%;
  height: 100%;
}

.library-edit-cover-preview > img {
  object-fit: cover;
  display: block;
}

.library-edit-form-column {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 14px;
}

.field-textarea {
  resize: vertical;
  min-height: 92px;
}

.library-edit-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.library-edit-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background: rgba(11, 18, 31, 0.8);
  color: #dffbff;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.library-edit-tag-row {
  align-items: stretch;
}

.library-edit-tag-row .field-input {
  flex: 1 1 auto;
}

.library-toggle-row {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(9, 14, 22, 0.7);
}

.library-toggle-row input {
  accent-color: #67e8f9;
}

@media (max-width: 900px) {
  .library-edit-modal-grid,
  .library-edit-form-row,
  .library-featured-tools,
  .library-card-overlay-top {
    flex-direction: column;
    align-items: stretch;
  }

  .library-edit-cover-column {
    width: 100%;
    flex-basis: auto;
  }

  .library-card-hover-tools {
    opacity: 1;
    transform: none;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .launcher-grid-card .library-card-actions.minimal-actions {
    opacity: 1;
    transform: none;
  }
}

.library-ideas-grid {
  display: grid;
  gap: 12px;
}

.library-idea-card,
.library-idea-copy,
.library-detail-gallery {
  display: grid;
  gap: 10px;
}

.library-idea-copy strong,
.library-gallery-note {
  color: #f8fdff;
}

.library-gallery-tile .library-poster {
  min-height: 200px;
}

.library-gallery-note {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(103, 232, 249, 0.08);
  background: rgba(7, 14, 24, 0.56);
  font-size: 0.84rem;
}

.library-empty-state {
  justify-items: center;
  text-align: center;
}

.library-empty-state .menu-copy {
  max-width: 48ch;
}

.library-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.library-launcher-layout {
  display: block;
}

.launcher-filter-panel,
.launcher-side-stats,
.launcher-ideas-panel,
.launcher-recent-panel {
  border-color: rgba(148, 163, 184, 0.12);
  background:
    linear-gradient(180deg, rgba(14, 18, 27, 0.96), rgba(11, 15, 22, 0.98));
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.library-home-main,
.launcher-main-column,
.launcher-library-side,
.library-home-side {
  min-width: 0;
}

.launcher-main-column,
.launcher-library-side {
  display: grid;
  gap: 18px;
}

.minimal-tags {
  flex-wrap: wrap;
}

.library-daily-quests-screen {
  display: grid;
  gap: 16px;
}

.library-topbar {
  grid-template-columns: minmax(180px, auto) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 24px 24px 0;
}

.library-topbar-subtitle {
  margin: 0;
}

.library-topbar-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.library-profile-card,
.library-profile-editor {
  width: 100%;
  justify-self: stretch;
}

.library-profile-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-color: rgba(103, 232, 249, 0.14);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(12, 18, 29, 0.94), rgba(9, 14, 24, 0.98));
  text-align: left;
  cursor: pointer;
}

.library-profile-card.empty {
  align-items: start;
}

.library-profile-card-head,
.library-profile-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.library-profile-preview {
  grid-template-columns: auto minmax(0, 1fr);
}

.library-profile-head-copy,
.library-profile-preview-copy,
.library-profile-empty-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.library-profile-head-copy strong,
.library-profile-preview-copy strong,
.library-profile-empty-copy strong {
  color: #f8fdff;
}

.library-profile-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.14), transparent 58%),
    rgba(9, 14, 24, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 32px rgba(0, 0, 0, 0.28);
}

.library-profile-avatar.small {
  width: 52px;
  height: 52px;
}

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

.library-profile-avatar-fallback {
  position: relative;
  z-index: 1;
  font-size: 1.15rem;
  color: #f8fdff;
}

.library-profile-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.library-profile-xp-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(7, 14, 24, 0.7);
  border: 1px solid rgba(103, 232, 249, 0.08);
}

.library-profile-xp-bar.large {
  height: 12px;
}

.library-profile-xp-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.92), rgba(125, 211, 252, 0.98));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.16);
}

.library-profile-xp-copy {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.library-profile-metrics span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(103, 232, 249, 0.08);
  background: rgba(7, 14, 24, 0.58);
  color: #f8fdff;
  font-size: 0.88rem;
}

.library-profile-editor {
  display: grid;
  gap: 14px;
  border-color: rgba(103, 232, 249, 0.12);
  background:
    linear-gradient(180deg, rgba(12, 18, 29, 0.98), rgba(9, 14, 24, 1));
}

.library-profile-editor-field {
  display: grid;
  gap: 8px;
}

.library-avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.library-avatar-option {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(8, 14, 24, 0.72);
  color: #dbeafe;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.library-avatar-option:hover,
.library-avatar-option:focus-visible,
.library-avatar-option.active {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.34);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(34, 211, 238, 0.08);
  background: rgba(11, 21, 35, 0.92);
}

.library-avatar-option.locked {
  opacity: 0.5;
  filter: grayscale(1);
  box-shadow: none;
}

.library-avatar-option.locked:hover,
.library-avatar-option.locked:focus-visible {
  transform: none;
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(8, 14, 24, 0.72);
}

.library-avatar-option span:last-child {
  font-size: 0.78rem;
}

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

.profile-modal {
  max-width: 980px;
}

.profile-modal-tabs,
.profile-reward-row-actions,
.profile-overview-head,
.profile-overview-grid,
.profile-stats-grid {
  display: flex;
  gap: 12px;
}

.profile-modal-tabs {
  flex-wrap: wrap;
}

.profile-overview-grid {
  align-items: start;
}

.profile-overview-grid > * {
  flex: 1 1 0;
}

.profile-overview-card,
.profile-reward-row,
.profile-stat-card {
  display: grid;
  gap: 12px;
}

.profile-overview-head {
  align-items: center;
}

.library-profile-avatar.large {
  width: 72px;
  height: 72px;
  border-radius: 22px;
}

.profile-reward-row {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(9, 14, 22, 0.66);
}

.profile-reward-row.available {
  border-color: rgba(103, 232, 249, 0.28);
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.08);
}

.profile-reward-row.claimed {
  opacity: 0.78;
}

.profile-reward-row.locked {
  opacity: 0.6;
}

.profile-reward-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.profile-reward-row-actions {
  align-items: center;
  justify-content: space-between;
}

.profile-avatar-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.profile-avatar-option {
  min-height: 136px;
}

.profile-stats-grid {
  flex-wrap: wrap;
}

.profile-stat-card {
  min-width: 170px;
  flex: 1 1 180px;
}

@media (max-width: 900px) {
  .profile-overview-grid {
    flex-direction: column;
  }
}

.skill-tree-screen {
  align-items: stretch;
}

.skill-tree-shell {
  width: 100%;
  gap: 20px;
  border-color: rgba(250, 204, 21, 0.12);
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(8, 13, 22, 0.97), rgba(6, 10, 18, 0.99));
}

.skill-tree-topbar {
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) minmax(300px, auto);
}

.skill-tree-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.skill-tree-summary-strip.compact .skill-tree-summary-card {
  min-height: 108px;
}

.skill-tree-summary-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 132px;
  border-color: rgba(148, 163, 184, 0.12);
  background:
    linear-gradient(180deg, rgba(14, 18, 29, 0.96), rgba(9, 13, 21, 0.98));
}

.skill-tree-summary-card strong {
  color: #f8fdff;
  font-size: 1.18rem;
}

.skill-tree-summary-card span:last-child {
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.skill-tree-category-stack {
  display: grid;
  gap: 18px;
}

.skill-tree-category-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.skill-tree-category-tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(14, 18, 29, 0.96), rgba(9, 13, 21, 0.98));
  color: #e2edf8;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.skill-tree-category-tab strong {
  display: block;
  color: #f8fdff;
  margin-bottom: 6px;
}

.skill-tree-category-tab span:not(.tiny-chip) {
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.skill-tree-category-tab:hover,
.skill-tree-category-tab:focus-visible,
.skill-tree-category-tab.active {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.3);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28), 0 0 28px rgba(34, 211, 238, 0.08);
}

.skill-tree-category-tab.active {
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(16, 22, 34, 0.98), rgba(10, 14, 24, 1));
}

.skill-tree-category {
  display: grid;
  gap: 18px;
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.05), transparent 36%),
    linear-gradient(180deg, rgba(13, 18, 28, 0.98), rgba(8, 12, 21, 0.99));
}

.skill-tree-category-fullscreen {
  min-height: calc(100vh - 292px);
}

.skill-tree-stage {
  position: relative;
  min-height: 0;
  height: calc(100vh - 396px);
}

.skill-tree-canvas {
  position: relative;
  min-height: 320px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  background:
    linear-gradient(180deg, rgba(7, 12, 20, 0.9), rgba(5, 9, 16, 0.94));
  overflow: hidden;
}

.skill-tree-canvas.fullscreen {
  min-height: 100%;
  height: 100%;
}

.skill-tree-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.32;
  pointer-events: none;
}

.skill-tree-link {
  position: absolute;
  z-index: 1;
  display: block;
  height: 3px;
  transform-origin: left center;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(71, 85, 105, 0.3), rgba(71, 85, 105, 0.08));
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.22);
  opacity: 0.38;
}

.skill-tree-link.locked {
  filter: grayscale(0.9);
}

.skill-tree-link.available {
  opacity: 0.68;
  animation: skillTreeBranchPulse 2.8s ease-in-out infinite;
}

.skill-tree-link.active {
  opacity: 1;
  background-size: 180% 100%;
  animation:
    skillTreeBranchFlow 2.8s linear infinite,
    skillTreeBranchPulse 2.6s ease-in-out infinite;
}

.skill-tree-link.globalProgression.available,
.skill-tree-link.globalProgression.active {
  background-image: linear-gradient(90deg, rgba(250, 204, 21, 0.76), rgba(253, 224, 71, 0.28));
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.16);
}

.skill-tree-link.soulTactics.available,
.skill-tree-link.soulTactics.active {
  background-image: linear-gradient(90deg, rgba(34, 211, 238, 0.74), rgba(251, 113, 133, 0.28));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.14);
}

.skill-tree-link.soulPaths.available,
.skill-tree-link.soulPaths.active {
  background-image: linear-gradient(90deg, rgba(192, 132, 252, 0.76), rgba(251, 191, 36, 0.24));
  box-shadow: 0 0 18px rgba(192, 132, 252, 0.16);
}

.skill-tree-link.mergeTactics.available,
.skill-tree-link.mergeTactics.active {
  background-image: linear-gradient(90deg, rgba(52, 211, 153, 0.72), rgba(34, 211, 238, 0.26));
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.14);
}

.skill-tree-node {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 140px;
  padding: 0;
  border: none;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  text-align: left;
}

.skill-tree-node-core {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  padding: 14px 12px 12px;
  border-radius: 20px;
  border: 1px solid rgba(71, 85, 105, 0.28);
  background:
    linear-gradient(180deg, rgba(10, 16, 26, 0.96), rgba(7, 11, 18, 0.98));
  color: #d8e6f6;
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    opacity 180ms ease,
    filter 180ms ease;
}

.skill-tree-node strong {
  color: #f8fdff;
  font-size: 0.82rem;
}

.skill-tree-node-level {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.skill-tree-node:hover .skill-tree-node-core,
.skill-tree-node:focus-visible .skill-tree-node-core {
  transform: translateY(-3px) scale(1.01);
}

.skill-tree-node.locked .skill-tree-node-core {
  border-color: rgba(96, 165, 250, 0.28);
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(12, 18, 30, 0.97), rgba(8, 13, 21, 0.99));
  opacity: 0.42;
  filter: grayscale(0.78);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.skill-tree-node.affordable .skill-tree-node-core {
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.32),
    0 0 26px rgba(34, 211, 238, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: skillTreeNodePulse 2.4s ease-in-out infinite;
}

.skill-tree-node.affordable .tiny-chip {
  border-color: rgba(34, 211, 238, 0.34);
  color: #baf6ff;
}

.skill-tree-node.unlocked .skill-tree-node-core,
.skill-tree-node.maxed .skill-tree-node-core {
  border-color: rgba(250, 204, 21, 0.28);
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.09), transparent 54%),
    linear-gradient(180deg, rgba(17, 19, 24, 0.97), rgba(10, 12, 17, 0.99));
  box-shadow:
    0 20px 36px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(250, 204, 21, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: skillTreeUnlockedBreath 3.4s ease-in-out infinite;
}

.skill-tree-node.maxed .skill-tree-node-core {
  border-color: rgba(250, 204, 21, 0.52);
  box-shadow:
    0 20px 36px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(250, 204, 21, 0.14),
    0 0 0 1px rgba(250, 204, 21, 0.12);
}

.skill-tree-node.just-unlocked .skill-tree-node-core {
  animation: skillTreeUnlockBurst 700ms ease-out;
}

.skill-tree-node.sealed .skill-tree-node-core {
  opacity: 0.35;
  border-color: rgba(71, 85, 105, 0.24);
  filter: grayscale(0.92) saturate(0.45);
}

.skill-tree-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  display: grid;
  gap: 6px;
  width: min(280px, 88vw);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(11, 16, 25, 0.98), rgba(7, 11, 18, 0.99));
  color: #dbeafe;
  font-size: 0.78rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.skill-tree-detail-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  width: min(340px, calc(100% - 36px));
  display: grid;
  gap: 14px;
  border-color: rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(12, 18, 29, 0.96), rgba(9, 14, 24, 1));
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
}

.skill-tree-detail-card.empty {
  opacity: 0.9;
}

.skill-tree-detail-head,
.skill-tree-detail-meta,
.profile-screen-header-main,
.profile-screen-header-stats,
.profile-screen-tabs {
  display: flex;
  gap: 12px;
  align-items: center;
}

.skill-tree-detail-meta {
  flex-wrap: wrap;
}

.profile-main-fullscreen {
  gap: 18px;
}

.profile-screen-header {
  display: grid;
  gap: 16px;
  border-color: rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.08), transparent 36%),
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(9, 14, 24, 0.98));
}

.profile-screen-header-main {
  align-items: center;
}

.profile-screen-header-stats,
.profile-screen-meta-strip {
  flex-wrap: wrap;
}

.profile-screen-tab {
  min-height: 68px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(9, 14, 24, 0.72);
  color: #dbeafe;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.profile-screen-tab.active,
.profile-screen-tab:hover,
.profile-screen-tab:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.32);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24), 0 0 24px rgba(34, 211, 238, 0.08);
  background: rgba(12, 20, 34, 0.94);
}

.profile-screen-body,
.profile-section-stack {
  display: grid;
  gap: 16px;
}

.profile-overview-grid-screen {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.profile-screen-avatar-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

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

.profile-identity-stage {
  overflow: hidden;
  position: relative;
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(103, 232, 249, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.profile-identity-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top center, rgba(34, 211, 238, 0.12), transparent 36%),
    radial-gradient(circle at bottom right, rgba(250, 204, 21, 0.1), transparent 30%);
  pointer-events: none;
}

.profile-identity-header-main {
  position: relative;
  z-index: 1;
}

.profile-identity-avatar-stage {
  position: relative;
  display: grid;
  place-items: center;
}

.profile-identity-avatar-halo {
  position: absolute;
  inset: -16px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.26) 0%, rgba(34, 211, 238, 0.08) 38%, transparent 72%);
  filter: blur(10px);
  animation: profileAvatarHaloPulse 4.4s ease-in-out infinite;
}

.profile-identity-metrics,
.profile-identity-support-metrics,
.profile-identity-badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-identity-badges {
  margin-top: -2px;
}

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

.profile-overview-card-premium {
  gap: 16px;
}

.profile-reward-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.profile-reward-track.compact {
  grid-auto-columns: minmax(200px, 1fr);
}

.profile-track-card {
  display: grid;
  gap: 12px;
  min-height: 220px;
  border-color: rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(14, 22, 36, 0.98), rgba(9, 14, 24, 0.96)),
    radial-gradient(circle at top right, rgba(103, 232, 249, 0.12), transparent 34%);
}

.profile-track-card.available {
  border-color: rgba(103, 232, 249, 0.28);
  box-shadow: 0 14px 34px rgba(8, 145, 178, 0.14);
}

.profile-track-card.claimed {
  opacity: 0.88;
}

.profile-track-card.cosmetic {
  background:
    linear-gradient(180deg, rgba(20, 22, 39, 0.98), rgba(11, 14, 28, 0.96)),
    radial-gradient(circle at top right, rgba(192, 132, 252, 0.16), transparent 34%);
}

.profile-track-card.skill {
  background:
    linear-gradient(180deg, rgba(14, 24, 32, 0.98), rgba(8, 14, 24, 0.96)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 34%);
}

.profile-track-card.legendary {
  background:
    linear-gradient(180deg, rgba(31, 20, 10, 0.98), rgba(17, 12, 6, 0.96)),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.22), transparent 34%);
}

.profile-track-topline,
.profile-collection-head,
.profile-achievement-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.profile-track-icon,
.profile-achievement-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(8, 12, 21, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-track-copy,
.profile-collection-copy,
.profile-achievement-copy {
  display: grid;
  gap: 6px;
}

.profile-track-copy strong,
.profile-collection-copy strong,
.profile-achievement-copy strong {
  color: #f8fdff;
  font-size: 0.98rem;
}

.profile-track-copy span,
.profile-collection-copy span,
.profile-achievement-copy span {
  color: rgba(219, 234, 254, 0.78);
  font-size: 0.84rem;
  line-height: 1.45;
}

.profile-track-actions {
  margin-top: auto;
}

.profile-stat-showcase,
.profile-collection-grid,
.profile-achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.profile-identity-stat-card,
.profile-collection-card,
.profile-achievement-card {
  display: grid;
  gap: 12px;
  min-height: 176px;
  align-content: start;
  padding: 18px 18px 20px;
}

.profile-identity-stat-card strong {
  color: #f8fdff;
  font-size: clamp(1.35rem, 1.6vw, 1.7rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile-identity-stat-card.cyan {
  background: linear-gradient(180deg, rgba(10, 28, 39, 0.96), rgba(8, 14, 24, 0.98));
}

.profile-identity-stat-card.emerald {
  background: linear-gradient(180deg, rgba(12, 38, 28, 0.96), rgba(8, 14, 24, 0.98));
}

.profile-identity-stat-card.amber {
  background: linear-gradient(180deg, rgba(40, 26, 8, 0.96), rgba(16, 12, 8, 0.98));
}

.profile-identity-stat-card.violet {
  background: linear-gradient(180deg, rgba(31, 18, 49, 0.96), rgba(10, 12, 24, 0.98));
}

.profile-identity-stat-card.royal {
  background: linear-gradient(180deg, rgba(18, 26, 52, 0.96), rgba(10, 12, 24, 0.98));
}

.profile-collection-icon {
  display: grid;
  place-items: center;
}

.profile-collection-progress {
  position: relative;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(8, 12, 21, 0.7);
}

.profile-collection-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.95), rgba(96, 165, 250, 0.95));
}

.profile-achievement-card {
  border-color: rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(15, 20, 34, 0.98), rgba(9, 14, 24, 0.98)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 30%);
}

.profile-achievement-card.unlocked {
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.12);
}

.profile-achievement-card.locked {
  opacity: 0.8;
}

.profile-achievement-card.rarity-rare {
  border-color: rgba(96, 165, 250, 0.24);
}

.profile-achievement-card.rarity-epic {
  border-color: rgba(192, 132, 252, 0.28);
  background:
    linear-gradient(180deg, rgba(23, 18, 41, 0.98), rgba(10, 12, 24, 0.98)),
    radial-gradient(circle at top right, rgba(192, 132, 252, 0.14), transparent 34%);
}

.profile-achievement-card.rarity-legendary {
  border-color: rgba(250, 204, 21, 0.28);
  background:
    linear-gradient(180deg, rgba(36, 25, 10, 0.98), rgba(14, 12, 8, 0.98)),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.16), transparent 34%);
}

@keyframes profileAvatarHaloPulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

.skill-tree-tooltip strong {
  font-size: 0.86rem;
}

.skill-tree-tooltip-head strong {
  margin: 0;
}

.skill-tree-unlock-float {
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  background: rgba(24, 18, 6, 0.94);
  color: #fde68a;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
  animation: skillTreeUnlockFloat 900ms ease-out forwards;
}

.skill-tree-node:hover .skill-tree-tooltip,
.skill-tree-node:focus-visible .skill-tree-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes skillTreeNodePulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 18px 34px rgba(0, 0, 0, 0.32),
      0 0 24px rgba(34, 211, 238, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  50% {
    transform: scale(1.05);
    box-shadow:
      0 18px 34px rgba(0, 0, 0, 0.32),
      0 0 30px rgba(34, 211, 238, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}

@keyframes skillTreeUnlockedBreath {
  0%,
  100% {
    box-shadow:
      0 20px 36px rgba(0, 0, 0, 0.34),
      0 0 24px rgba(250, 204, 21, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
  50% {
    box-shadow:
      0 20px 36px rgba(0, 0, 0, 0.34),
      0 0 34px rgba(250, 204, 21, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
}

@keyframes skillTreeUnlockBurst {
  0% {
    transform: scale(1);
    box-shadow:
      0 20px 36px rgba(0, 0, 0, 0.34),
      0 0 18px rgba(250, 204, 21, 0.12);
  }
  35% {
    transform: scale(1.2);
    box-shadow:
      0 22px 40px rgba(0, 0, 0, 0.36),
      0 0 42px rgba(250, 204, 21, 0.24);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 20px 36px rgba(0, 0, 0, 0.34),
      0 0 28px rgba(250, 204, 21, 0.16);
  }
}

@keyframes skillTreeUnlockFloat {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px) scale(0.9);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px) scale(1);
  }
}

@keyframes skillTreeBranchPulse {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

@keyframes skillTreeBranchFlow {
  0% {
    background-position: 0 50%;
  }
  100% {
    background-position: 180% 50%;
  }
}

@media (max-width: 1180px) {
  .skill-tree-topbar {
    grid-template-columns: 1fr;
  }

  .skill-tree-summary-strip {
    grid-template-columns: 1fr;
  }

  .skill-tree-canvas {
    min-height: 520px;
  }

  .skill-tree-node {
    width: min(220px, calc(100% - 20px));
  }
}

@media (max-width: 760px) {
  .skill-tree-canvas {
    min-height: 760px;
  }

  .skill-tree-node {
    width: min(88vw, 230px);
  }

  .skill-tree-node-core {
    padding: 14px;
  }
}

.launcher-featured-card {
  border-color: rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(17, 22, 33, 0.96), rgba(10, 14, 22, 0.98));
  overflow: hidden;
}

.launcher-featured-card .library-featured-art .library-poster {
  min-height: 320px;
}

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

.library-shelf-summary {
  display: grid;
  gap: 8px;
}

.library-year-heading.compact {
  padding-bottom: 0;
  border-bottom: none;
}

.launcher-game-grid {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.launcher-grid-card.landscape-card {
  position: relative;
  min-height: 248px;
  padding: 0;
  border-radius: 28px;
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--accent-highlight) 16%, transparent), transparent 38%),
    linear-gradient(180deg, rgba(16, 20, 30, 0.96), rgba(10, 15, 22, 0.98));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    transform 220ms ease-out,
    border-color 220ms ease-out,
    box-shadow 220ms ease-out,
    background 220ms ease-out;
}

.launcher-grid-card-visual.landscape-card-visual {
  position: relative;
  min-height: 248px;
  height: 100%;
}

.landscape-card .library-poster {
  min-height: 248px;
  height: 100%;
  border-radius: 28px;
}

.landscape-card .library-poster-image {
  transition: transform 220ms ease-out, filter 220ms ease-out;
}

.landscape-card-overlay {
  position: absolute;
  inset: 0;
  padding: 18px;
  pointer-events: none;
}

.landscape-card-toolbar,
.landscape-card-copy,
.landscape-card-copy-main,
.landscape-card-actions,
.library-card-context-panel {
  display: flex;
  gap: 10px;
}

.landscape-card-toolbar {
  justify-content: space-between;
  align-items: flex-start;
}

.landscape-card-copy {
  position: absolute;
  inset: auto 18px 18px 18px;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  pointer-events: none;
}

.landscape-card-copy-main {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: min(100%, 34rem);
}

.landscape-card-copy .menu-title {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: rgba(244, 248, 255, 0.92);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  transition:
    font-size 200ms ease-out,
    color 200ms ease-out,
    text-shadow 200ms ease-out,
    transform 200ms ease-out;
}

.landscape-card-meta {
  pointer-events: auto;
}

.landscape-card-meta .tiny-chip {
  background: rgba(10, 16, 28, 0.64);
  border-color: rgba(226, 232, 240, 0.12);
  color: rgba(236, 248, 255, 0.9);
}

.landscape-card-actions {
  flex-wrap: wrap;
  pointer-events: auto;
}

.landscape-card .library-play-button,
.landscape-card .library-detail-button {
  min-width: 124px;
  opacity: 1;
  transform: none;
}

.hover-reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}

.library-card-context-menu {
  position: relative;
  pointer-events: auto;
}

.library-card-context-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(8, 13, 24, 0.76);
  color: #e2e8f0;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.library-card-context-trigger::-webkit-details-marker {
  display: none;
}

.library-card-context-trigger span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

.library-card-context-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 164px;
  flex-direction: column;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(7, 12, 21, 0.96);
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.34);
  z-index: 12;
}

.library-card-context-item {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #e7f7fb;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease-out, color 180ms ease-out;
}

.library-card-context-item:hover,
.library-card-context-item:focus-visible {
  background: rgba(19, 31, 48, 0.92);
}

.library-card-context-item.danger {
  color: rgba(248, 113, 113, 0.7);
  cursor: not-allowed;
}

.launcher-grid-card.landscape-card:hover,
.launcher-grid-card.landscape-card:focus-within {
  transform: translateY(-4px) scale(1.025);
  border-color: color-mix(in srgb, var(--accent-highlight) 42%, rgba(148, 163, 184, 0.18));
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.34),
    0 0 0 1px color-mix(in srgb, var(--accent-highlight) 18%, transparent),
    0 0 32px color-mix(in srgb, var(--accent-highlight) 16%, transparent);
}

.launcher-grid-card.landscape-card:hover .library-poster-image,
.launcher-grid-card.landscape-card:focus-within .library-poster-image {
  transform: scale(1.04);
  filter: brightness(1.08) saturate(1.08);
}

.launcher-grid-card.landscape-card:hover .library-poster-gradient,
.launcher-grid-card.landscape-card:focus-within .library-poster-gradient {
  opacity: 1;
  background: linear-gradient(180deg, rgba(4, 8, 14, 0.04), rgba(4, 8, 14, 0.16) 46%, rgba(4, 8, 14, 0.86));
}

.launcher-grid-card.landscape-card:hover .library-card-sheen,
.launcher-grid-card.landscape-card:focus-within .library-card-sheen {
  opacity: 1;
}

.launcher-grid-card.landscape-card:hover .hover-reveal,
.launcher-grid-card.landscape-card:focus-within .hover-reveal {
  opacity: 1;
  transform: translateY(0);
}

.launcher-grid-card.landscape-card:hover .landscape-card-copy .menu-title,
.launcher-grid-card.landscape-card:focus-within .landscape-card-copy .menu-title {
  font-size: 1.32rem;
  color: #ffffff;
  text-shadow:
    0 0 18px color-mix(in srgb, var(--accent-highlight) 32%, transparent),
    0 8px 28px rgba(0, 0, 0, 0.36);
  transform: translateY(-1px);
}

.launcher-grid-card.favorite {
  border-color: rgba(234, 179, 8, 0.28);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(234, 179, 8, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.library-new-game-card {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(148, 163, 184, 0.32);
  background:
    linear-gradient(180deg, rgba(10, 16, 28, 0.88), rgba(8, 13, 24, 0.94));
}

.library-new-game-card-inner {
  display: grid;
  gap: 12px;
  justify-items: center;
  width: min(100%, 22rem);
  padding: 28px;
  text-align: center;
}

.library-new-game-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  border: 1px dashed rgba(103, 232, 249, 0.32);
  color: #b6f5ff;
  font-size: 2rem;
  line-height: 1;
  box-shadow: inset 0 0 24px rgba(34, 211, 238, 0.08);
}

.library-new-game-card:hover,
.library-new-game-card:focus-visible {
  border-color: rgba(103, 232, 249, 0.42);
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.32),
    0 0 26px rgba(34, 211, 238, 0.1);
}

.library-compact-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.library-new-game-modal {
  max-width: 620px;
}

.library-new-game-modal-body {
  display: grid;
  gap: 20px;
}

.library-new-game-empty-cover {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  color: #c4f5ff;
  text-align: center;
}

.library-new-game-empty-cover span {
  font-size: 2.4rem;
  line-height: 1;
}

.library-reset-modal {
  max-width: 640px;
}

.danger-zone-card {
  border-color: rgba(248, 113, 113, 0.18);
  background:
    linear-gradient(180deg, rgba(34, 12, 16, 0.92), rgba(16, 10, 14, 0.96));
}

.danger-button {
  border-color: rgba(248, 113, 113, 0.26);
  color: #fecaca;
  background: rgba(69, 10, 10, 0.56);
}

.danger-button:hover,
.danger-button:focus-visible {
  border-color: rgba(248, 113, 113, 0.42);
  box-shadow: 0 0 24px rgba(248, 113, 113, 0.12);
}

.fade-in {
  animation: fadeIn 220ms ease-out;
}

.card-hover {
  transition: transform 220ms ease-out, box-shadow 220ms ease-out, border-color 220ms ease-out;
}

.button-pulse {
  animation: buttonPulse 180ms ease-out;
}

.modal-open {
  animation: fadeIn 180ms ease-out;
}

.slide-panel {
  animation: slidePanel 180ms ease-out;
}

.glow-pulse {
  animation: glowPulse 220ms ease-out;
}

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

@keyframes buttonPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes slidePanel {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  0% {
    box-shadow:
      0 18px 44px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(255, 255, 255, 0.02),
      inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }
  50% {
    box-shadow:
      0 26px 54px rgba(0, 0, 0, 0.34),
      0 0 0 1px color-mix(in srgb, var(--accent-highlight) 22%, transparent),
      0 0 34px color-mix(in srgb, var(--accent-highlight) 18%, transparent);
  }
  100% {
    box-shadow:
      0 18px 44px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(255, 255, 255, 0.02),
      inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }
}

.library-filter-group,
.launcher-filter-panel .library-journal-sidebar {
  display: grid;
  gap: 14px;
}

.launcher-grid-card .library-card-copy-text,
.launcher-featured-card .library-card-copy-text,
.launcher-ideas-panel .section-copy {
  text-align: left;
}

.launcher-filter-panel {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 20px;
}

.compact-filter-panel .panel-summary {
  padding-bottom: 0;
}

.journal-filter-row,
.journal-year-stack {
  justify-content: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.launcher-filter-panel .library-filter-button,
.journal-year-button {
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(13, 18, 28, 0.72);
}

.launcher-filter-panel .library-filter-button.active,
.journal-year-button.active {
  border-color: rgba(125, 211, 252, 0.42);
  background:
    linear-gradient(180deg, rgba(17, 43, 56, 0.92), rgba(11, 17, 28, 0.96));
}

.launcher-filter-panel .library-journal-sidebar {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  position: static;
}

.merge-tactics-screen {
  align-items: stretch;
  min-height: 100vh;
  display: block;
  padding: 0;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 30%),
    radial-gradient(circle at 80% 18%, rgba(168, 85, 247, 0.12), transparent 28%),
    linear-gradient(180deg, #040812 0%, #060b15 48%, #04070f 100%);
}

.merge-tactics-shell {
  width: 100%;
  min-height: 100vh;
  gap: 22px;
  padding: 24px 28px 28px;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.08), transparent 20%),
    radial-gradient(circle at 88% 12%, rgba(192, 132, 252, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(5, 9, 18, 0.98), rgba(3, 7, 14, 1));
}

.merge-tactics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.34fr);
  gap: 22px;
  align-items: stretch;
  min-height: calc(100vh - 96px);
}

.merge-tactics-main,
.merge-tactics-side,
.merge-tactics-panel,
.merge-tactics-score-table,
.merge-tactics-cell-copy,
.merge-tactics-preview-copy,
.merge-tactics-empty-copy {
  display: grid;
  gap: 10px;
}

.merge-tactics-main,
.merge-tactics-side {
  min-width: 0;
}

.merge-tactics-main {
  position: relative;
  overflow: hidden;
  gap: 18px;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(10, 15, 27, 0.98), rgba(6, 10, 18, 0.98));
}

.merge-tactics-side {
  align-content: start;
  padding: 10px 0 0;
}

.merge-tactics-panel {
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(12, 19, 31, 0.96), rgba(8, 12, 21, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 20px 44px rgba(0, 0, 0, 0.22);
}

.merge-tactics-info-details {
  overflow: hidden;
}

.merge-tactics-info-stack,
.merge-tactics-info-section {
  display: grid;
  gap: 14px;
}

.merge-tactics-info-stack {
  padding-top: 14px;
}

.merge-tactics-preview .menu-actions.compact {
  justify-content: flex-start;
}

.merge-tactics-hero,
.merge-tactics-footer,
.merge-tactics-mode-row,
.merge-tactics-preview-row,
.merge-tactics-score-row,
.merge-tactics-cell-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.merge-tactics-hero {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px;
}

.merge-tactics-mode-row {
  flex-wrap: wrap;
  align-items: center;
}

.merge-tactics-mode-row .menu-copy {
  margin: 0;
  color: rgba(191, 219, 254, 0.78);
}

.merge-tactics-board-shell {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.1), transparent 40%),
    linear-gradient(180deg, rgba(8, 15, 28, 0.98), rgba(6, 10, 18, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 28px 60px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(34, 211, 238, 0.08);
}

.merge-tactics-board-shell.merge-burst {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 28px 60px rgba(0, 0, 0, 0.34),
    0 0 54px rgba(250, 204, 21, 0.12);
}

.merge-tactics-board-shell.combo-live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(120deg, transparent 24%, rgba(250, 204, 21, 0.12) 50%, transparent 76%);
  opacity: 0.55;
  animation: mergeTacticsShimmer 2.4s linear infinite;
  pointer-events: none;
}

.merge-tactics-board-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.merge-tactics-board-particle,
.merge-tactics-board-rune {
  position: absolute;
  border-radius: 999px;
  opacity: 0.7;
}

.merge-tactics-board-particle {
  width: 180px;
  height: 180px;
  filter: blur(28px);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 70%);
  animation: mergeTacticsDrift 10s ease-in-out infinite;
}

.merge-tactics-board-particle.particle-a {
  top: -40px;
  left: -12px;
}

.merge-tactics-board-particle.particle-b {
  right: 12%;
  top: 18%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.2), transparent 70%);
  animation-delay: -3s;
}

.merge-tactics-board-particle.particle-c {
  bottom: -40px;
  left: 22%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.15), transparent 72%);
  animation-delay: -6s;
}

.merge-tactics-board-rune {
  width: 220px;
  height: 220px;
  border: 1px solid rgba(103, 232, 249, 0.08);
  background:
    radial-gradient(circle at center, transparent 56%, rgba(103, 232, 249, 0.07) 57%, transparent 60%),
    radial-gradient(circle at center, transparent 68%, rgba(192, 132, 252, 0.05) 69%, transparent 72%);
  filter: blur(0.2px);
  animation: mergeTacticsRuneSpin 18s linear infinite;
}

.merge-tactics-board-rune.rune-a {
  top: -80px;
  right: -50px;
}

.merge-tactics-board-rune.rune-b {
  bottom: -96px;
  left: -44px;
  animation-direction: reverse;
}

.merge-tactics-board-rune.rune-c {
  width: 140px;
  height: 140px;
  top: 32%;
  right: 18%;
  opacity: 0.34;
  animation-duration: 12s;
}

.merge-tactics-board-status,
.merge-tactics-board-status-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.merge-tactics-board-status {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.merge-tactics-board-status-copy strong {
  font-size: clamp(1.05rem, 1vw + 0.9rem, 1.45rem);
  letter-spacing: 0.02em;
}

.merge-tactics-board-status-copy span:last-child {
  color: rgba(191, 219, 254, 0.76);
}

.merge-tactics-combo-banner {
  display: grid;
  gap: 4px;
  min-width: 240px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  background:
    linear-gradient(180deg, rgba(11, 18, 31, 0.84), rgba(6, 10, 18, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  justify-items: end;
  text-align: right;
}

.merge-tactics-combo-banner strong {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.merge-tactics-combo-banner span {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.82rem;
}

.merge-tactics-combo-banner.active {
  border-color: rgba(250, 204, 21, 0.34);
  background:
    radial-gradient(circle at top, rgba(250, 204, 21, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(32, 23, 7, 0.9), rgba(14, 11, 8, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 26px rgba(250, 204, 21, 0.14);
  animation: mergeTacticsPulse 1.85s ease-in-out infinite;
}

.merge-tactics-grid-stage {
  position: relative;
  z-index: 1;
  padding: 12px;
  border-radius: 28px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background:
    linear-gradient(180deg, rgba(9, 14, 24, 0.9), rgba(5, 9, 15, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

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

.merge-tactics-cell {
  position: relative;
  min-height: clamp(172px, 17vw, 224px);
  padding: 18px 18px 16px;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at top, rgba(103, 232, 249, 0.08), transparent 46%),
    linear-gradient(180deg, rgba(18, 24, 37, 0.96), rgba(9, 13, 22, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -18px 32px rgba(0, 0, 0, 0.22),
    0 20px 42px rgba(0, 0, 0, 0.26);
  color: #f8fafc;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 220ms ease-out,
    border-color 220ms ease-out,
    box-shadow 220ms ease-out,
    background 220ms ease-out,
    filter 220ms ease-out;
}

.merge-tactics-cell::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
  opacity: 0.95;
  pointer-events: none;
}

.merge-tactics-cell::after {
  content: "";
  position: absolute;
  inset: auto 16% 8px 16%;
  height: 28%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.12), transparent 72%);
  filter: blur(18px);
  opacity: 0;
  transition: opacity 220ms ease-out;
  pointer-events: none;
}

.merge-tactics-cell:hover,
.merge-tactics-cell:focus-visible {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(125, 211, 252, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -20px 34px rgba(0, 0, 0, 0.24),
    0 26px 48px rgba(0, 0, 0, 0.3),
    0 0 28px rgba(34, 211, 238, 0.12);
}

.merge-tactics-cell:hover::after,
.merge-tactics-cell:focus-visible::after {
  opacity: 1;
}

.merge-tactics-cell.selected {
  transform: translateY(-8px) scale(1.025);
  border-color: rgba(250, 204, 21, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -22px 34px rgba(0, 0, 0, 0.26),
    0 26px 54px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(250, 204, 21, 0.16);
}

.merge-tactics-cell.selected .merge-tactics-unit-stage {
  animation: mergeTacticsLift 2.2s ease-in-out infinite;
}

.merge-tactics-cell.reachable {
  border-color: rgba(103, 232, 249, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -18px 32px rgba(0, 0, 0, 0.22),
    0 0 24px rgba(34, 211, 238, 0.12);
}

.merge-tactics-cell.merge-candidate {
  border-color: rgba(250, 204, 21, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -18px 32px rgba(0, 0, 0, 0.18),
    0 0 30px rgba(250, 204, 21, 0.18);
  animation: mergeTacticsPulse 1.55s ease-in-out infinite;
}

.merge-tactics-cell.special-tile {
  border-color: rgba(103, 232, 249, 0.32);
}

.merge-tactics-cell.merge-boost-tile {
  border-color: rgba(250, 204, 21, 0.36);
}

.merge-tactics-cell.empty {
  justify-items: center;
  align-content: center;
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.05), transparent 46%),
    linear-gradient(180deg, rgba(9, 14, 24, 0.92), rgba(5, 9, 15, 0.98));
}

.merge-tactics-cell.occupied.cyan {
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(10, 19, 31, 0.96), rgba(8, 13, 22, 0.99));
}

.merge-tactics-cell.occupied.violet {
  background:
    radial-gradient(circle at top, rgba(192, 132, 252, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(18, 14, 32, 0.96), rgba(12, 10, 22, 0.99));
}

.merge-tactics-cell.occupied.emerald,
.merge-tactics-cell.occupied.green {
  background:
    radial-gradient(circle at top, rgba(52, 211, 153, 0.17), transparent 42%),
    linear-gradient(180deg, rgba(11, 26, 23, 0.96), rgba(8, 16, 17, 0.99));
}

.merge-tactics-cell-core {
  display: grid;
  gap: 14px;
  justify-items: center;
  align-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
  min-height: 100%;
}

.merge-tactics-cell-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.merge-tactics-cell-copy {
  align-items: center;
  text-align: center;
  gap: 8px;
}

.merge-tactics-cell-copy strong {
  font-size: clamp(1rem, 0.7vw + 0.92rem, 1.18rem);
  letter-spacing: 0.03em;
}

.merge-tactics-cell-index {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.72rem;
  color: rgba(191, 219, 254, 0.42);
  z-index: 2;
}

.merge-tactics-special-badge,
.merge-tactics-path-hint,
.merge-tactics-merge-preview,
.merge-tactics-trait-chip,
.merge-tactics-rarity-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.merge-tactics-special-badge,
.merge-tactics-path-hint,
.merge-tactics-merge-preview {
  position: absolute;
  left: 14px;
  z-index: 2;
  padding: 0.32rem 0.72rem;
  font-size: 0.66rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 12, 22, 0.7);
  color: rgba(226, 232, 240, 0.88);
}

.merge-tactics-special-badge {
  top: 12px;
}

.merge-tactics-path-hint {
  bottom: 14px;
  background: rgba(8, 22, 28, 0.76);
  border-color: rgba(103, 232, 249, 0.18);
  color: rgba(165, 243, 252, 0.92);
}

.merge-tactics-merge-preview {
  top: 12px;
  background: rgba(36, 26, 8, 0.82);
  border-color: rgba(250, 204, 21, 0.22);
  color: rgba(254, 240, 138, 0.96);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.14);
}

.merge-tactics-trait-chip,
.merge-tactics-rarity-chip {
  min-height: 30px;
  padding: 0.28rem 0.62rem;
  font-size: 0.66rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(7, 12, 22, 0.64);
  color: rgba(226, 232, 240, 0.74);
}

.merge-tactics-rarity-chip.rarity-rare,
.merge-tactics-rarity-chip.rarity-epic,
.merge-tactics-rarity-chip.rarity-legendary {
  border-color: color-mix(in srgb, var(--rarity-accent, #67e8f9) 30%, transparent);
  color: color-mix(in srgb, var(--rarity-accent, #67e8f9) 80%, #ffffff);
}

.merge-tactics-empty-copy {
  position: relative;
  z-index: 1;
  place-items: center;
  text-align: center;
  gap: 8px;
}

.merge-tactics-empty-copy strong {
  font-size: 1.04rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.merge-tactics-cell-corners {
  position: absolute;
  inset: 10px;
  pointer-events: none;
}

.merge-tactics-cell-corners span {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(103, 232, 249, 0.18);
  border-style: solid;
  opacity: 0.8;
}

.merge-tactics-cell-corners span:nth-child(1) {
  top: 0;
  left: 0;
  border-width: 1px 0 0 1px;
  border-top-left-radius: 12px;
}

.merge-tactics-cell-corners span:nth-child(2) {
  top: 0;
  right: 0;
  border-width: 1px 1px 0 0;
  border-top-right-radius: 12px;
}

.merge-tactics-cell-corners span:nth-child(3) {
  bottom: 0;
  left: 0;
  border-width: 0 0 1px 1px;
  border-bottom-left-radius: 12px;
}

.merge-tactics-cell-corners span:nth-child(4) {
  right: 0;
  bottom: 0;
  border-width: 0 1px 1px 0;
  border-bottom-right-radius: 12px;
}

.merge-tactics-unit-stage {
  --merge-trait-accent: rgba(103, 232, 249, 0.7);
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 112px);
  aspect-ratio: 1;
  border-radius: 28px;
  border: 1px solid color-mix(in srgb, var(--merge-trait-accent) 40%, transparent);
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--merge-trait-accent) 18%, transparent), transparent 56%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.82), rgba(7, 11, 19, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 28px color-mix(in srgb, var(--merge-trait-accent) 12%, transparent);
  overflow: hidden;
}

.merge-tactics-unit-stage.ember {
  --merge-trait-accent: rgba(251, 146, 60, 0.82);
}

.merge-tactics-unit-stage.shadow {
  --merge-trait-accent: rgba(168, 85, 247, 0.84);
}

.merge-tactics-unit-stage.verdant {
  --merge-trait-accent: rgba(74, 222, 128, 0.84);
}

.merge-tactics-unit-stage.royal {
  --merge-trait-accent: rgba(96, 165, 250, 0.84);
}

.merge-tactics-unit-stage.pirate {
  --merge-trait-accent: rgba(250, 204, 21, 0.84);
}

.merge-tactics-unit-stage.arcane {
  --merge-trait-accent: rgba(103, 232, 249, 0.78);
}

.merge-tactics-unit-stage-shadow,
.merge-tactics-unit-stage-ring {
  position: absolute;
  pointer-events: none;
}

.merge-tactics-unit-stage-shadow {
  inset: auto 14% 8% 14%;
  height: 24%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.76), transparent 74%);
  filter: blur(14px);
}

.merge-tactics-unit-stage-ring {
  inset: 8px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--merge-trait-accent) 18%, transparent);
  opacity: 0.85;
}

.merge-tactics-unit-art {
  position: relative;
  z-index: 1;
  width: 88%;
  height: 88%;
  object-fit: contain;
  object-position: center bottom;
  filter:
    drop-shadow(0 10px 16px rgba(2, 6, 23, 0.38))
    drop-shadow(0 0 20px color-mix(in srgb, var(--merge-trait-accent) 18%, transparent));
}

.merge-tactics-unit-stage .unit-glyph.large {
  width: 84px;
  height: 84px;
  font-size: 2rem;
}

.merge-tactics-cell-copy span,
.merge-tactics-preview-copy span,
.merge-tactics-empty-copy span,
.merge-tactics-message span {
  color: rgba(203, 213, 225, 0.76);
  font-size: 0.82rem;
}

.merge-tactics-preview,
.merge-tactics-message {
  flex: 1 1 0;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(12, 18, 30, 0.96), rgba(8, 12, 20, 0.98));
}

.merge-tactics-footer {
  align-items: stretch;
  gap: 18px;
}

.merge-tactics-preview-stack {
  display: grid;
  gap: 12px;
}

.merge-tactics-preview-row {
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(7, 12, 22, 0.58);
}

.merge-tactics-score-row {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(10, 15, 24, 0.62);
}

.merge-tactics-message strong {
  font-size: 1.04rem;
  letter-spacing: 0.02em;
}

.merge-tactics-mode-row .action-button.small.active {
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.16);
}

@keyframes mergeTacticsPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
  50% {
    transform: translateY(-2px) scale(1.015);
    filter: saturate(1.08);
  }
}

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

@keyframes mergeTacticsRuneSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes mergeTacticsDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(20px, -18px, 0);
  }
}

@keyframes mergeTacticsShimmer {
  from {
    transform: translateX(-35%);
  }
  to {
    transform: translateX(35%);
  }
}

@media (max-width: 1280px) {
  .merge-tactics-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .merge-tactics-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    display: grid;
    gap: 16px;
    padding: 0;
  }
}

@media (max-width: 980px) {
  .merge-tactics-shell {
    padding-inline: 18px;
  }

  .merge-tactics-main {
    padding: 18px;
  }

  .merge-tactics-board-status,
  .merge-tactics-footer {
    grid-template-columns: minmax(0, 1fr);
    display: grid;
  }

  .merge-tactics-combo-banner {
    justify-items: start;
    text-align: left;
    min-width: 0;
  }

  .merge-tactics-grid {
    gap: 14px;
  }

  .merge-tactics-cell {
    min-height: 158px;
    padding: 16px 14px 14px;
  }
}

@media (max-width: 760px) {
  .merge-tactics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .merge-tactics-side {
    grid-template-columns: minmax(0, 1fr);
  }
}

.launcher-ideas-panel {
  background:
    linear-gradient(180deg, rgba(18, 16, 24, 0.96), rgba(13, 13, 18, 0.98));
}

.menu-panel,
.sidebar-panel,
.arena-panel,
.shop-dock,
.spotlight-card,
.meta-card,
.upgrade-choice-card {
  position: relative;
  border: 1px solid var(--border-default);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(11, 17, 30, 0.96));
  box-shadow: var(--panel-shadow), var(--panel-glow), var(--panel-inner-shadow);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.menu-panel {
  width: min(1080px, 100%);
  padding: 32px;
  border-radius: 28px;
  position: relative;
  display: grid;
  gap: 18px;
}

.menu-hero {
  width: min(900px, 100%);
  padding: 48px;
  gap: 28px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(11, 20, 35, 0.9), rgba(7, 14, 26, 0.94));
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(103, 232, 249, 0.14),
    0 0 48px rgba(34, 211, 238, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -24px 64px rgba(0, 0, 0, 0.28);
}

.menu-hero-copy {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.menu-hero-copy .spotlight-tag {
  min-height: 34px;
  padding-inline: 14px;
}

.menu-panel.meta-shop {
  place-items: start;
  width: min(1180px, 100%);
}

.summary-panel {
  width: min(920px, 100%);
}

.menu-topline,
.menu-stats,
.menu-actions,
.tiny-chip-row,
.summary-strip,
.dock-actions,
.spotlight-actions,
.result-metrics,
.section-label-row,
.shop-card-top,
.meta-card-head,
.meta-card-foot,
.team-row-title {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.sidebar-collapsible {
  padding: 14px 15px;
}

.panel-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.panel-summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--accent-highlight);
  font-size: 1rem;
  line-height: 1;
}

.sidebar-collapsible[open] .panel-summary::after {
  content: "-";
}

.panel-summary-copy,
.sidebar-panel-content {
  display: grid;
  gap: 6px;
}

.sidebar-collapsible[open] .sidebar-panel-content {
  margin-top: 12px;
}

.build-sidebar-shell {
  padding: 10px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(10, 17, 28, 0.92), rgba(7, 12, 22, 0.94));
}

.build-sidebar-head {
  display: grid;
  gap: 8px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.build-sidebar-head .spotlight-tag {
  justify-self: start;
}

.build-sidebar-head .section-title {
  font-size: 1rem;
}

.build-sidebar-head .section-copy {
  margin: 4px 0 0;
  font-size: 0.78rem;
}

.build-sidebar-body {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.build-sidebar-section {
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  background: rgba(12, 18, 30, 0.7);
}

.build-sidebar-section-body {
  display: grid;
  gap: 8px;
}

.build-sidebar-section.sidebar-collapsible {
  padding: 0;
  overflow: hidden;
}

.build-sidebar-section.sidebar-collapsible .panel-summary {
  padding: 10px 12px;
  min-height: 0;
}

.build-sidebar-section.sidebar-collapsible .panel-summary-copy {
  gap: 4px;
}

.build-sidebar-section.sidebar-collapsible .section-copy {
  margin: 0;
  font-size: 0.72rem;
}

.build-sidebar-section.sidebar-collapsible .sidebar-panel-content {
  margin: 0;
  padding: 0 12px 12px;
}

.build-sidebar-section.sidebar-collapsible[open] .sidebar-panel-content {
  margin-top: 0;
}

.compact-info-list,
.build-sidebar-section .team-list.compact {
  gap: 8px;
}

.compact-empty {
  padding: 10px;
  font-size: 0.78rem;
}

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

.equipped-effect-row {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  background: rgba(15, 23, 42, 0.58);
}

.equipped-effect-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.equipped-effect-head strong {
  display: block;
  font-size: 0.82rem;
}

.equipped-effect-head span,
.equipped-effect-row p {
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.35;
  margin: 0;
}

.menu-topline,
.meta-card-foot,
.shop-card-top,
.section-label-row {
  justify-content: space-between;
}

.menu-title {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(34, 211, 238, 0.28);
}

.menu-hero .menu-title {
  font-size: clamp(4rem, 10vw, 6.4rem);
  letter-spacing: 0.14em;
  background: linear-gradient(180deg, #f8fdff 0%, #c7f7ff 48%, #7ee7fb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 36px rgba(34, 211, 238, 0.24);
}

.menu-title.small {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.menu-subtitle {
  margin: 0;
  max-width: 28ch;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.45;
  color: #d8f5ff;
}

.menu-copy,
.section-copy,
.team-row-line,
.shop-card-copy,
.meta-card p,
.log-row,
.list-row span,
.tile-detail,
.tile-role {
  color: var(--text-secondary);
}

.menu-copy,
.section-copy {
  margin: 0;
  max-width: 70ch;
}

.menu-hero .menu-copy {
  max-width: 58ch;
  text-align: center;
}

.menu-roster,
.meta-section {
  display: grid;
  gap: 12px;
}

.action-button {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.48);
  background: rgba(17, 24, 39, 0.86);
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.08);
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

.action-button:hover:not(:disabled),
.upgrade-choice-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-hover);
  background: rgba(39, 50, 68, 0.94);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.18);
}

.action-button:active:not(:disabled) {
  transform: scale(0.97);
}

.action-button.secondary {
  background: rgba(15, 23, 42, 0.86);
}

.action-button.secondary.active {
  border-color: rgba(103, 232, 249, 0.66);
  background: rgba(14, 44, 60, 0.94);
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.12),
    0 0 24px rgba(34, 211, 238, 0.18);
}

.action-button.danger {
  border-color: rgba(239, 68, 68, 0.58);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

.action-button.small {
  min-height: 40px;
  padding: 9px 14px;
}

.action-button.primary {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.22), rgba(8, 58, 78, 0.32));
  border-color: rgba(103, 232, 249, 0.72);
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.12),
    0 0 26px rgba(34, 211, 238, 0.2);
}

.action-button.primary:hover:not(:disabled) {
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.2),
    0 0 36px rgba(34, 211, 238, 0.28);
}

.action-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.tiny-chip,
.spotlight-tag,
.price-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  color: var(--text-secondary);
  background: rgba(17, 24, 39, 0.72);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.currency-stack {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}

.action-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.ui-inline-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  object-position: center;
  flex: 0 0 auto;
  filter:
    drop-shadow(0 0 8px rgba(34, 211, 238, 0.18))
    drop-shadow(0 0 14px rgba(15, 23, 42, 0.18));
}

.button-icon {
  width: 32px;
  height: 32px;
}

.menu-hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.stat-chip {
  min-height: 36px;
  padding: 6px 14px;
  border-color: rgba(103, 232, 249, 0.18);
  background: rgba(8, 16, 30, 0.72);
}

.menu-hero-actions {
  justify-content: center;
  gap: 14px;
}

.menu-reset-backdrop {
  z-index: 26;
}

.menu-reset-panel {
  width: min(560px, calc(100vw - 32px));
  gap: 16px;
  border-color: rgba(248, 113, 113, 0.32);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(248, 113, 113, 0.12),
    0 0 34px rgba(248, 113, 113, 0.14);
}

.menu-reset-head {
  justify-items: start;
  text-align: left;
}

.menu-reset-head p {
  max-width: 48ch;
}

.menu-reset-actions {
  justify-content: flex-end;
}

.hero-button {
  min-width: 184px;
  min-height: 52px;
  padding-inline: 24px;
}

.play-button {
  min-width: 236px;
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-unit-showcase {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background:
    linear-gradient(180deg, rgba(10, 18, 32, 0.78), rgba(7, 13, 24, 0.84));
}

.menu-unit-collapsible .sidebar-panel-content {
  margin-top: 14px;
}

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

.menu-unit-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background: rgba(10, 18, 32, 0.75);
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.menu-unit-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.26);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.12);
  background: rgba(13, 23, 40, 0.86);
}

.menu-unit-chip > div {
  display: grid;
  gap: 2px;
}

.menu-unit-chip span {
  font-size: 0.88rem;
  color: #dcecf7;
}

.menu-unit-chip small {
  color: var(--text-secondary);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.spotlight-tag {
  color: var(--accent-highlight);
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.08);
}

.coop-setup-panel,
.coop-lobby-panel {
  width: min(980px, 100%);
}

.coop-setup-copy {
  justify-items: start;
  text-align: left;
}

.coop-form-grid,
.coop-lobby-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background: rgba(10, 18, 32, 0.76);
}

.menu-profile-strip,
.menu-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.menu-profile-card strong {
  font-size: 1.05rem;
  color: #f8fdff;
}

.menu-profile-card.compact,
.menu-setting-card {
  align-content: start;
}

.menu-settings-panel {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    max-height 220ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.menu-settings-panel.open {
  max-height: 260px;
  opacity: 1;
  transform: translateY(0);
}

.compact-actions {
  justify-content: flex-start;
}

.field-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.field-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background: rgba(6, 11, 18, 0.92);
  color: var(--text-primary);
  font: inherit;
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.field-input:focus {
  border-color: rgba(103, 232, 249, 0.56);
  box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.18), 0 0 24px rgba(34, 211, 238, 0.12);
  background: rgba(8, 14, 24, 0.96);
}

.hint-card {
  align-content: start;
}

.inline-notice {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background: rgba(8, 14, 24, 0.72);
  color: #d8f5ff;
}

.inline-notice.danger {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(69, 10, 10, 0.28);
  color: #fecaca;
}

.join-url-card {
  gap: 12px;
}

.join-url-copy {
  display: block;
  word-break: break-word;
  font-size: 1rem;
  color: #f8fdff;
}

.price-pill {
  color: var(--economy-gold);
  border-color: rgba(250, 204, 21, 0.36);
}

.arena-screen {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 100vh;
  padding: 20px 24px 24px;
  align-content: start;
}

.coop-screen {
  gap: 14px;
}

.coop-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-height: calc(100vh - 132px);
}

.coop-player-column,
.coop-enemy-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

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

.coop-player-header.center {
  justify-content: center;
  text-align: center;
}

.coop-player-column .arena-grid-wrap {
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(7, 14, 24, 0.86), rgba(7, 14, 24, 0.68));
  backdrop-filter: blur(10px);
}

.coop-player-column.player-one .arena-grid-wrap {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.08);
}

.coop-player-column.player-two .arena-grid-wrap {
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.08);
}

.coop-player-column.player-one .spotlight-tag {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.08);
}

.coop-player-column.player-two .spotlight-tag {
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(109, 40, 217, 0.16);
  color: #d8b4fe;
}

.coop-player-panels {
  display: grid;
  gap: 10px;
}

.coop-shop-dock {
  padding: 14px;
  border-radius: 20px;
}

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

.coop-shop-controls {
  gap: 10px;
}

.coop-enemy-panel {
  width: 100%;
}

.coop-enemy-battlefield {
  min-height: clamp(420px, 42vw, 620px);
}

.coop-enemy-grid {
  min-height: clamp(360px, 34vw, 520px);
  padding: 20px;
  align-content: center;
}

.coop-enemy-column .arena-board-block {
  width: 100%;
}

.coop-enemy-column .arena-grid-wrap {
  padding: 0;
  border: none;
  background: none;
  backdrop-filter: none;
}

.coop-augment-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.coop-augment-strip .upgrade-choice-card {
  min-height: 100%;
}

#run-topbar {
  position: relative;
  z-index: 3;
}

.coop-topbar .topbar-stat.mode strong {
  font-size: 0.88rem;
}

.arena-screen::before {
  content: "";
  position: absolute;
  inset: 86px 8% 112px;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.86), transparent 82%);
}

.arena-screen.hardcore::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.04), transparent 26%, transparent 74%, rgba(239, 68, 68, 0.05));
}

.arena-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 2px 0 0;
}

.arena-topbar.coop-topbar {
  width: min(100%, 980px);
}

.arena-topbar.soul-paths-topbar {
  width: min(100%, 980px);
}

.topbar-badge-rail,
.topbar-resource-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.topbar-resource-rail {
  justify-content: flex-end;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(8, 14, 24, 0.84);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 22px rgba(2, 6, 23, 0.14);
}

.topbar-badge.prep {
  border-color: rgba(103, 232, 249, 0.24);
  color: #d8f5ff;
}

.topbar-badge.combat {
  border-color: rgba(251, 146, 60, 0.28);
  color: #fde68a;
}

.topbar-badge.event {
  border-color: rgba(192, 132, 252, 0.26);
  color: #f3e8ff;
}

.topbar-badge.boss {
  border-color: rgba(248, 113, 113, 0.28);
  color: #fee2e2;
}

.topbar-badge.next {
  color: rgba(191, 219, 254, 0.88);
}

.topbar-stat {
  position: relative;
  overflow: hidden;
  min-width: 112px;
  padding: 9px 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(10, 17, 28, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 24px rgba(2, 6, 23, 0.14);
  text-align: left;
}

.topbar-stat::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 12px;
  width: calc(100% - 24px);
  height: 2px;
  border-radius: 999px;
  opacity: 0.8;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.48), transparent);
}

.topbar-stat.round::before {
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.9), transparent);
}

.topbar-stat.lives::before {
  background: linear-gradient(90deg, transparent, rgba(251, 113, 133, 0.9), transparent);
}

.topbar-stat.gold::before {
  background: linear-gradient(90deg, transparent, rgba(250, 204, 21, 0.92), transparent);
}

.topbar-stat.interest::before {
  background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.88), transparent);
}

.topbar-stat.quests::before {
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.9), transparent);
}

.topbar-label {
  display: block;
  font-size: 0.6rem;
  color: rgba(191, 219, 254, 0.66);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.topbar-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 0.98rem;
  color: #f8fafc;
}

.topbar-stat.gold strong {
  color: var(--economy-gold);
}

.topbar-stat.interest strong {
  color: #86efac;
}

.topbar-stat.quests strong {
  color: #fef3c7;
}

.topbar-stat strong .currency-stack {
  justify-content: flex-start;
}

.topbar-toggle {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background: rgba(8, 14, 26, 0.72);
  color: #e0f2fe;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.topbar-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.42);
  background: rgba(14, 27, 40, 0.92);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.14);
}

.arena-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 19vw);
  gap: clamp(28px, 3vw, 52px);
  align-items: stretch;
  min-height: calc(100vh - 132px);
}

.arena-screen.soul-paths {
  min-height: calc(100vh - 44px);
  padding-bottom: 180px;
}

.arena-screen.soul-paths::before {
  inset: 78px 10% 144px;
  opacity: 0.42;
}

.arena-screen.soul-paths .arena-main {
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
  margin: 0;
}

.arena-screen.soul-paths .sidebar-rail {
  display: none;
}

.arena-screen.soul-paths .arena-stage-column {
  gap: 18px;
}

.arena-screen.soul-paths .arena-battlefield {
  min-height: 280px;
  border-color: rgba(103, 232, 249, 0.16);
  background:
    radial-gradient(circle at top, rgba(103, 232, 249, 0.08), transparent 52%),
    linear-gradient(180deg, rgba(9, 16, 28, 0.92), rgba(6, 10, 19, 0.98));
}

.arena-screen.soul-paths .arena-panel.bench-dock-panel {
  display: none;
}

.arena-screen.soul-paths #run-shop {
  width: 100%;
}

.arena-screen.soul-paths.decision-focus .arena-battlefield {
  min-height: 220px;
  opacity: 0.34;
  filter: saturate(0.72) blur(0.4px);
  transform: scale(0.985);
}

.arena-screen.soul-paths.decision-focus .arena-board-block,
.arena-screen.soul-paths.decision-focus .arena-board-grid,
.arena-screen.soul-paths.decision-focus .board-zone-head {
  pointer-events: none;
}

.arena-screen.soul-paths.decision-focus #run-shop {
  display: none;
}

.arena-stage-column,
.sidebar-rail {
  display: grid;
  gap: 10px;
  align-content: start;
}

.arena-stage-column {
  min-width: 0;
}

.sidebar-rail {
  min-width: 0;
  width: 100%;
  max-width: 320px;
  justify-self: end;
  padding-right: 0;
  transform: none;
}

.arena-bottom-rail {
  display: grid;
  gap: 10px;
}

.arena-stage-column > .arena-panel {
  width: 100%;
}

.arena-bottom-rail > #run-shop {
  width: 100%;
  justify-self: center;
}

.bench-dock-panel {
  padding: 14px;
}

.sidebar-panel,
.arena-panel,
.shop-dock,
.spotlight-card {
  padding: 16px;
  border-radius: 24px;
}

.arena-screen .arena-panel,
.arena-screen .shop-dock,
.arena-screen .spotlight-card {
  width: 100%;
  max-width: none;
}

.right-rail .sidebar-panel {
  opacity: 0.72;
  background:
    linear-gradient(180deg, rgba(13, 20, 33, 0.84), rgba(9, 15, 26, 0.84));
}

.spotlight-card.compact-status {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
}

.soul-paths-event-card {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  min-height: 260px;
  overflow: hidden;
  border-color: rgba(103, 232, 249, 0.22);
  background:
    linear-gradient(180deg, rgba(10, 16, 30, 0.9), rgba(7, 12, 23, 0.96)),
    radial-gradient(circle at 20% 18%, rgba(99, 102, 241, 0.14), transparent 30%),
    radial-gradient(circle at 82% 20%, rgba(34, 211, 238, 0.12), transparent 34%);
  box-shadow:
    0 24px 64px rgba(2, 6, 12, 0.44),
    0 0 36px rgba(34, 211, 238, 0.08);
  animation: rise 220ms ease-out;
}

.soul-paths-event-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.02), transparent 36%),
    radial-gradient(circle at 68% 34%, rgba(103, 232, 249, 0.08), transparent 24%);
}

.soul-paths-event-card .compact-status-copy {
  gap: 16px;
  align-content: center;
}

.soul-paths-event-card .compact-status-copy h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: 0.02em;
}

.soul-paths-event-card .compact-status-copy p {
  max-width: 56ch;
  font-size: 1rem;
  line-height: 1.72;
  color: color-mix(in srgb, var(--text-primary) 82%, #dbeafe 18%);
}

.soul-paths-event-card .compact-status-meta {
  align-self: end;
  justify-content: flex-end;
}

.secret-event-card {
  border-color: rgba(192, 132, 252, 0.28);
  background:
    linear-gradient(180deg, rgba(16, 12, 28, 0.92), rgba(8, 7, 18, 0.98)),
    radial-gradient(circle at 18% 18%, rgba(168, 85, 247, 0.16), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(250, 204, 21, 0.1), transparent 34%);
  box-shadow:
    0 24px 64px rgba(8, 6, 18, 0.48),
    0 0 40px rgba(168, 85, 247, 0.12);
}

.soul-paths-event-badges {
  margin-top: 8px;
}

.compact-status-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.compact-status-copy > div {
  min-width: 0;
}

.compact-status-copy h2 {
  margin: 0;
  font-size: 1rem;
}

.compact-status-copy p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.compact-status-meta {
  justify-content: flex-end;
}

.compact-status .spotlight-actions {
  justify-content: flex-end;
}

.phase-state-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background:
    linear-gradient(180deg, rgba(8, 14, 24, 0.84), rgba(6, 11, 18, 0.92));
}

.phase-state-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.phase-state-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.4;
}

.phase-state-meta,
.phase-state-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.phase-state-strip.prep {
  border-color: rgba(103, 232, 249, 0.14);
}

.phase-state-strip.combat {
  border-color: rgba(251, 146, 60, 0.18);
}

.phase-state-strip.event {
  border-color: rgba(192, 132, 252, 0.18);
}

.phase-state-strip.boss {
  border-color: rgba(248, 113, 113, 0.2);
}

.sidebar-panel h2,
.spotlight-card h2,
.shop-card h3,
.meta-card h3,
.upgrade-choice-card h3,
.section-title {
  margin: 0;
}

.team-list,
.info-list {
  display: grid;
  gap: 10px;
}

.info-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-row,
.list-row,
.log-row,
.shop-card,
.meta-card,
.upgrade-choice-card {
  border: 1px solid rgba(55, 65, 81, 0.92);
  border-radius: 18px;
  background: rgba(31, 41, 51, 0.68);
}

.team-row,
.list-row,
.log-row {
  padding: 10px 11px;
}

.team-list {
  gap: 10px;
}

.team-row-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.team-list.compact {
  gap: 8px;
}

.team-row.compact {
  padding: 9px 10px;
  cursor: context-menu;
}

.team-row-main.compact {
  align-items: center;
}

.team-row-stack {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.team-row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.team-row-meta.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-row-meta.compact .tiny-chip {
  font-size: 0.68rem;
}

.team-row-meta.compact .tiny-chip.subtle {
  color: var(--text-secondary);
}

.team-row-detail-panel {
  display: none;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.team-row.info-open .team-row-detail-panel {
  display: grid;
}

.team-row {
  border-left: 4px solid color-mix(in srgb, var(--unit-accent) 80%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--unit-accent) 9%, rgba(31, 41, 51, 0.78)), rgba(14, 22, 34, 0.88));
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.team-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px color-mix(in srgb, var(--unit-accent) 18%, transparent);
}

.team-row-line {
  margin: 4px 0 0;
  font-size: 0.84rem;
}

.team-row-line span {
  color: var(--text-primary);
}

.synergy-icon-wrap {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: rgba(10, 18, 32, 0.72);
  border: 1px solid rgba(103, 232, 249, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  flex: 0 0 auto;
}

.synergy-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  object-position: center;
  display: block;
  filter: drop-shadow(0 0 8px rgba(8, 17, 31, 0.28));
}

.active-tier {
  border-color: rgba(103, 232, 249, 0.36);
  background: rgba(34, 211, 238, 0.12);
  color: #d8f5ff;
}

.synergy-sidebar-row {
  position: relative;
  display: grid;
  gap: 9px;
  padding: 10px 11px 11px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.synergy-sidebar-row.inactive {
  opacity: 0.74;
  border-color: rgba(71, 85, 105, 0.7);
  background: rgba(18, 25, 37, 0.72);
}

.synergy-sidebar-row.active {
  border-color: rgba(103, 232, 249, 0.26);
  background:
    linear-gradient(180deg, rgba(20, 34, 50, 0.92), rgba(12, 19, 31, 0.9));
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.05),
    0 0 20px rgba(34, 211, 238, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.synergy-sidebar-row:hover,
.synergy-sidebar-row.info-open {
  opacity: 1;
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.34);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.08),
    0 0 20px rgba(34, 211, 238, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.synergy-sidebar-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.synergy-sidebar-icon .synergy-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.synergy-sidebar-row.active .synergy-icon-wrap {
  border-color: rgba(103, 232, 249, 0.34);
  background: rgba(12, 24, 39, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 16px rgba(34, 211, 238, 0.14);
}

.synergy-sidebar-row.inactive .synergy-icon-wrap {
  filter: saturate(0.72);
}

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

.synergy-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.synergy-sidebar-head strong {
  min-width: 0;
  font-size: 0.92rem;
  color: #e5eefb;
}

.synergy-sidebar-row.active .synergy-sidebar-head strong {
  color: #f4fbff;
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.12);
}

.synergy-count-pill {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background: rgba(8, 15, 26, 0.78);
  color: #d8f5ff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.synergy-sidebar-row.inactive .synergy-count-pill {
  border-color: rgba(100, 116, 139, 0.18);
  color: rgba(203, 213, 225, 0.82);
}

.synergy-sidebar-status {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.35;
}

.synergy-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.62);
}

.synergy-progress-value {
  color: rgba(224, 242, 254, 0.88);
  font-weight: 700;
}

.synergy-progress-track {
  position: relative;
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.synergy-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.56), rgba(96, 165, 250, 0.92));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.18);
}

.synergy-sidebar-row.inactive .synergy-progress-fill {
  background: linear-gradient(90deg, rgba(71, 85, 105, 0.84), rgba(100, 116, 139, 0.88));
  box-shadow: none;
}

.synergy-row-tooltip {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}

.synergy-sidebar-row:hover .synergy-row-tooltip,
.synergy-sidebar-row.info-open .synergy-row-tooltip {
  display: flex;
}

.empty-panel {
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(55, 65, 81, 0.92);
  color: var(--text-muted);
  background: rgba(17, 24, 39, 0.55);
}

.sidebar-tabs-shell {
  padding: 8px;
  display: grid;
  gap: 8px;
}

.sidebar-tab-switch {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.sidebar-tab-button {
  border: 1px solid rgba(55, 65, 81, 0.92);
  border-radius: 14px;
  background: rgba(13, 20, 33, 0.78);
  color: var(--text-primary);
  padding: 8px 10px;
  min-height: 46px;
  aspect-ratio: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  justify-items: start;
  gap: 10px;
  position: relative;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.sidebar-tab-button:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.42);
  background: rgba(16, 25, 39, 0.92);
}

.sidebar-tab-button.active {
  border-color: rgba(103, 232, 249, 0.65);
  background: rgba(15, 35, 46, 0.92);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.12);
}

.sidebar-tab-icon {
  font-size: 1rem;
  line-height: 1;
  color: #eef8ff;
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.18);
}

.sidebar-tab-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #dbeafe;
}

.sidebar-tab-count {
  position: static;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(8, 14, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(229, 231, 235, 0.7);
  font-size: 0.58rem;
  line-height: 1;
}

.sidebar-tab-stage {
  min-width: 0;
}

.sidebar-tab-count:not(.has-value) {
  opacity: 0.35;
}

.item-glyph {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  position: relative;
  display: inline-grid;
  place-items: center;
  background: rgba(14, 24, 38, 0.92);
  border: 1px solid rgba(103, 232, 249, 0.22);
  color: #f8fdff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  overflow: hidden;
}

.item-glyph.inline {
  width: 24px;
  height: 24px;
  border-radius: 9px;
  margin-right: 6px;
  vertical-align: middle;
  font-size: 0.6rem;
}

.item-glyph.inventory {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  box-shadow:
    0 0 20px color-mix(in srgb, var(--rarity-accent, #67e8f9) 20%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.item-asset {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: contain;
  object-position: center;
  z-index: 2;
}

.item-glyph-fallback {
  position: relative;
  z-index: 1;
}

.item-glyph .item-asset + .item-glyph-fallback {
  opacity: 0;
}

.item-card-list {
  display: grid;
  gap: 10px;
}

.item-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.item-card {
  position: relative;
  border: 1px solid rgba(55, 65, 81, 0.92);
  border-radius: 16px;
  background: rgba(14, 22, 34, 0.8);
  padding: 10px;
  display: grid;
  gap: 10px;
  overflow: visible;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

.item-card-hit {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  width: 100%;
}

.item-card:not(.equipped) .item-card-hit {
  cursor: grab;
}

.item-card.selected {
  border-color: rgba(103, 232, 249, 0.58);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.12);
}

.item-card.drag-source {
  opacity: 0.72;
  transform: scale(0.98);
  border-color: rgba(103, 232, 249, 0.9);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.2);
}

.item-card.equipped {
  background: rgba(16, 28, 40, 0.94);
}

.item-card.inventory-slot {
  min-height: 132px;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.05), transparent 42%),
    linear-gradient(180deg, rgba(14, 22, 34, 0.92), rgba(9, 15, 25, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -14px 24px rgba(0, 0, 0, 0.22);
}

.item-card.inventory-slot:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.38);
  box-shadow:
    0 0 22px rgba(34, 211, 238, 0.12),
    0 10px 24px rgba(4, 9, 18, 0.22);
}

.empty-item-slot {
  min-height: 132px;
  place-items: center;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.24);
  background:
    linear-gradient(180deg, rgba(10, 15, 24, 0.88), rgba(7, 12, 20, 0.96));
}

.item-card-hit {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  margin: 0;
  text-align: left;
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.item-slot-shell {
  display: grid;
  gap: 10px;
  height: 100%;
  align-content: start;
}

.item-slot-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.item-slot-copy {
  display: grid;
  gap: 4px;
}

.item-slot-copy strong {
  font-size: 0.84rem;
  line-height: 1.05;
  color: #f8fdff;
}

.item-slot-copy span {
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--text-secondary) 88%, #eef8ff);
  line-height: 1.3;
}

.item-slot-icon.empty {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.62);
  border: 1px dashed rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.48);
}

.item-card-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: min(220px, calc(100vw - 48px));
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background: rgba(6, 11, 18, 0.96);
  box-shadow:
    0 14px 32px rgba(4, 9, 18, 0.34),
    0 0 20px rgba(34, 211, 238, 0.08);
  opacity: 0;
  transform: translate(-50%, 6px);
  pointer-events: none;
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  z-index: 20;
}

.item-card-tooltip strong {
  font-size: 0.8rem;
  color: #f8fdff;
}

.item-card-tooltip span {
  font-size: 0.72rem;
  line-height: 1.35;
  color: color-mix(in srgb, var(--text-secondary) 88%, #eef8ff);
}

.item-card:hover .item-card-tooltip,
.item-card.selected .item-card-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.item-card-action {
  justify-self: stretch;
}

.item-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.item-card-copy {
  display: grid;
  gap: 3px;
}

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

.item-card-copy span,
.item-card-status {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.item-card .rarity-chip {
  justify-self: start;
  color: var(--rarity-accent);
}

.item-choice-card {
  text-align: center;
}

.item-choice-icon {
  display: grid;
  place-items: center;
}

.item-choice-icon .item-glyph {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 0.92rem;
}

.sidebar-tab-stage {
  min-width: 0;
}

.sidebar-tab-panel {
  display: grid;
  gap: 12px;
}

.panel-summary.static {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.team-row .unit-glyph.large {
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
}

.arena-board-block {
  display: grid;
  gap: var(--arena-field-gap);
}

.arena-duel-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  min-height: clamp(470px, 43vw, 680px);
  padding: clamp(22px, 3vw, 42px) clamp(26px, 4vw, 54px);
  gap: clamp(34px, 4vw, 64px);
  align-content: start;
  align-items: start;
  justify-content: stretch;
  justify-items: stretch;
}

.board-zone {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: flex-start;
  padding-inline: clamp(10px, 1.6vw, 22px);
}

.enemy-board-zone {
  justify-content: flex-end;
}

.hero-board-zone {
  justify-content: flex-start;
}

.arena-duel-grid::before {
  content: "";
  position: absolute;
  inset: 8% 50% 8%;
  width: 1px;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.28), transparent);
  box-shadow:
    0 0 18px rgba(103, 232, 249, 0.08),
    0 0 22px rgba(244, 114, 182, 0.06);
  pointer-events: none;
}

.arena-panel {
  position: relative;
  width: min(100%, 1280px);
  padding: 0;
  overflow: visible;
  justify-self: center;
  border: none;
  background: none;
  box-shadow: none;
}

.arena-battlefield {
  position: relative;
  min-height: clamp(560px, 62vh, 860px);
  border-radius: 30px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.18), transparent 68%),
    linear-gradient(180deg, rgba(5, 10, 18, 0.2), rgba(5, 10, 18, 0.46));
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.arena-battlefield::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(192, 38, 211, 0.08) 0 50%, rgba(34, 211, 238, 0.08) 50% 100%),
    repeating-linear-gradient(
      0deg,
      transparent 0 54px,
      rgba(255, 255, 255, 0.03) 54px 55px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 54px,
      rgba(255, 255, 255, 0.025) 54px 55px
    );
  mix-blend-mode: screen;
  opacity: 0.5;
  animation: arenaGridDrift 16s linear infinite;
}

.arena-backdrop-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
  filter:
    saturate(0.92)
    brightness(0.78)
    contrast(1.02);
}

.arena-battlefield::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 26% 76%, rgba(244, 114, 182, 0.12), transparent 30%),
    radial-gradient(circle at 74% 24%, rgba(34, 211, 238, 0.1), transparent 28%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 -90px 140px rgba(4, 9, 18, 0.28);
}

.arena-board-block {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
}

.arena-board-block.side-player {
  --board-zone-glow: 103, 232, 249;
}

.arena-board-block.side-enemy {
  --board-zone-glow: 244, 114, 182;
}

.arena-battlefield .arena-board-block.side-enemy,
.arena-battlefield .arena-board-block.side-player,
.arena-battlefield .arena-board-block.side-bench {
  align-self: start;
}

.arena-battlefield .arena-board-block.side-enemy {
  justify-self: stretch;
}

.arena-battlefield .arena-board-block.side-player {
  justify-self: stretch;
}

.arena-battlefield .section-label-row {
  min-height: 42px;
  margin-bottom: 10px;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  align-items: flex-start;
}

.arena-battlefield .arena-board-block.side-enemy .section-label-row,
.arena-battlefield .arena-board-block.side-player .section-label-row {
  justify-content: space-between;
}

.arena-battlefield .arena-board-block.side-enemy .section-copy,
.arena-battlefield .arena-board-block.side-enemy .section-title {
  text-align: left;
}

.arena-battlefield .arena-board-block.side-player .section-copy,
.arena-battlefield .arena-board-block.side-player .section-title {
  text-align: right;
}

.arena-battlefield .section-title,
.arena-battlefield .section-copy,
.arena-battlefield .tiny-chip {
  text-shadow: 0 2px 12px rgba(4, 9, 18, 0.95);
}

.arena-battlefield .section-title {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.arena-battlefield .section-copy {
  display: none;
}

.arena-battlefield .tiny-chip {
  padding: 5px 10px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(6, 11, 18, 0.38);
  backdrop-filter: blur(10px);
}

.arena-board-block.side-bench {
  width: 100%;
  max-width: none;
}

.arena-board-block.side-bench .section-label-row {
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.arena-board-block.side-bench .section-copy,
.arena-board-block.side-bench .section-title {
  text-align: left;
}

.arena-grid-wrap {
  position: relative;
  padding: 0;
  border-radius: 0;
  border: none;
  background: none;
  backdrop-filter: none;
}

.arena-battlefield .arena-board-block:not(.side-bench) .arena-grid-wrap {
  overflow: visible;
  padding: 18px;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.04);
  backdrop-filter: none;
  box-shadow: none;
}

.arena-battlefield .arena-board-block:not(.side-bench) .arena-grid-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.arena-battlefield .arena-board-block.side-player .arena-grid-wrap {
  background:
    radial-gradient(circle at 28% 46%, rgba(34, 211, 238, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(8, 20, 34, 0.16), rgba(8, 14, 24, 0.04));
  border-color: rgba(103, 232, 249, 0.09);
  box-shadow:
    inset 0 0 0 1px rgba(103, 232, 249, 0.024),
    0 0 28px rgba(34, 211, 238, 0.04);
}

.arena-battlefield .arena-board-block.side-player .arena-grid-wrap::before {
  background:
    radial-gradient(circle at 22% 78%, rgba(56, 189, 248, 0.04), transparent 38%);
}

.arena-battlefield .arena-board-block.side-enemy .arena-grid-wrap {
  background:
    radial-gradient(circle at 78% 42%, rgba(244, 114, 182, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(22, 10, 20, 0.18), rgba(10, 8, 18, 0.05));
  border-color: rgba(244, 114, 182, 0.09);
  box-shadow:
    inset 0 0 0 1px rgba(244, 114, 182, 0.024),
    0 0 28px rgba(244, 114, 182, 0.04);
}

.arena-battlefield .arena-board-block.side-enemy .arena-grid-wrap::before {
  background:
    radial-gradient(circle at 78% 76%, rgba(192, 38, 211, 0.04), transparent 38%);
}

.arena-battlefield .arena-board-block.side-bench .arena-grid-wrap,
.bench-rail .arena-board-block.side-bench .arena-grid-wrap {
  padding: 12px 14px;
  border-radius: 24px;
  border: 1px solid rgba(103, 232, 249, 0.1);
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.05), transparent 52%),
    linear-gradient(180deg, rgba(5, 10, 18, 0.94), rgba(8, 13, 22, 0.9));
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 14px 30px rgba(2, 6, 23, 0.24);
}

.arena-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 18px);
}

.arena-battlefield .arena-board-block.side-player .arena-tile:not(.compact),
.arena-battlefield .arena-board-block.side-enemy .arena-tile:not(.compact) {
  background: rgba(255, 255, 255, 0.01);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.012),
    0 0 12px rgba(255, 255, 255, 0.012);
}

.arena-battlefield .arena-board-block.side-enemy .arena-tile:not(.compact) {
  border-color: rgba(244, 114, 182, 0.08);
}

.arena-battlefield .arena-board-block.side-player .arena-tile:not(.compact) {
  border-color: rgba(103, 232, 249, 0.08);
}

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

.arena-tile {
  position: relative;
  min-height: clamp(122px, 11vw, 156px);
  aspect-ratio: 1 / 1;
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.01);
  cursor: default;
  overflow: visible;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.015),
    0 0 12px rgba(255, 255, 255, 0.015);
  backdrop-filter: none;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    opacity 140ms ease;
}

.arena-tile.combat-phase {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.arena-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
  opacity: 0;
  transition:
    opacity 180ms ease,
    background 180ms ease;
  pointer-events: none;
}

.arena-tile.combat-phase::before,
.arena-tile.combat-phase::after {
  opacity: 0;
  display: none;
}

.arena-tile::after {
  content: "";
  position: absolute;
  inset: auto 20% 4px;
  height: 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tile-accent, var(--unit-accent, #67e8f9)) 26%, transparent);
  filter: blur(16px);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.arena-tile.compact {
  min-height: 110px;
  aspect-ratio: auto;
  padding: 10px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 72%, rgba(255, 255, 255, 0.04), transparent 30%),
    linear-gradient(180deg, rgba(22, 33, 45, 0.92), rgba(14, 24, 35, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 -16px 26px rgba(0, 0, 0, 0.26);
  backdrop-filter: none;
}

.arena-board-block.side-bench .arena-tile.compact {
  min-height: 104px;
  padding: 10px 11px;
  border-color: rgba(103, 232, 249, 0.08);
  background:
    radial-gradient(circle at 50% 100%, rgba(56, 189, 248, 0.06), transparent 42%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(8, 13, 23, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -18px 28px rgba(0, 0, 0, 0.3),
    0 10px 20px rgba(2, 6, 23, 0.18);
}

.arena-tile.compact::before {
  display: none;
}

.arena-tile.clickable {
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.arena-tile.clickable:hover {
  border-color: rgba(var(--board-zone-glow, 103, 232, 249), 0.26);
  box-shadow:
    inset 0 0 0 1px rgba(var(--board-zone-glow, 103, 232, 249), 0.14),
    0 0 18px rgba(var(--board-zone-glow, 103, 232, 249), 0.08);
  background: rgba(var(--board-zone-glow, 103, 232, 249), 0.03);
  transform: translateY(-1px) scale(1.01);
}

.arena-board-block.side-bench .arena-tile.clickable:hover {
  border-color: rgba(103, 232, 249, 0.42);
  background:
    radial-gradient(circle at 50% 100%, rgba(56, 189, 248, 0.09), transparent 42%),
    linear-gradient(180deg, rgba(20, 31, 47, 0.98), rgba(9, 15, 26, 0.98));
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.16),
    0 14px 28px rgba(2, 6, 23, 0.24),
    inset 0 0 20px rgba(34, 211, 238, 0.05);
}

.arena-tile.clickable:hover::before {
  opacity: 0.22;
  background:
    radial-gradient(circle at 20% 20%, rgba(var(--board-zone-glow, 103, 232, 249), 0.18), transparent 24%),
    radial-gradient(circle at 80% 80%, rgba(var(--board-zone-glow, 103, 232, 249), 0.12), transparent 22%);
}

.arena-tile.move-preview {
  border-color: rgba(var(--board-zone-glow, 103, 232, 249), 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(var(--board-zone-glow, 103, 232, 249), 0.06);
}

.arena-tile.move-preview::before {
  opacity: 0.12;
  background:
    radial-gradient(circle at 20% 20%, rgba(var(--board-zone-glow, 103, 232, 249), 0.18), transparent 24%),
    radial-gradient(circle at 80% 80%, rgba(var(--board-zone-glow, 103, 232, 249), 0.14), transparent 20%);
}

.arena-tile.selected {
  border-color: rgba(103, 232, 249, 0.82);
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.32),
    0 0 30px rgba(34, 211, 238, 0.18),
    inset 0 0 22px rgba(34, 211, 238, 0.06);
}

.arena-board-block.side-bench .arena-tile.selected {
  border-color: rgba(125, 211, 252, 0.9);
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.32),
    0 0 24px rgba(34, 211, 238, 0.18),
    inset 0 0 24px rgba(14, 165, 233, 0.08);
}

.arena-tile.selected::before {
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.12), rgba(37, 99, 235, 0.2));
}

.arena-tile.drag-source {
  opacity: 0.72;
  transform: scale(0.98);
  border-color: rgba(103, 232, 249, 0.85);
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.2),
    0 0 24px rgba(34, 211, 238, 0.16);
}

.arena-tile.drag-target {
  border-color: rgba(103, 232, 249, 0.95);
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.35),
    0 0 24px rgba(34, 211, 238, 0.2);
  background: transparent;
}

.arena-tile.drag-valid {
  border-color: rgba(74, 222, 128, 0.78);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.3),
    0 0 26px rgba(34, 197, 94, 0.18),
    inset 0 0 22px rgba(74, 222, 128, 0.08);
}

.arena-tile.drag-valid::before {
  opacity: 0.95;
  background:
    linear-gradient(180deg, rgba(74, 222, 128, 0.14), rgba(16, 185, 129, 0.12));
}

.arena-tile.drag-invalid {
  border-color: rgba(248, 113, 113, 0.82);
  box-shadow:
    0 0 0 1px rgba(248, 113, 113, 0.28),
    0 0 22px rgba(239, 68, 68, 0.16),
    inset 0 0 20px rgba(248, 113, 113, 0.08);
  animation: invalidPlacementPulse 0.36s ease-out;
}

.arena-tile.drag-invalid::before {
  opacity: 0.96;
  background:
    linear-gradient(180deg, rgba(248, 113, 113, 0.18), rgba(185, 28, 28, 0.14));
}

.arena-board-block.side-bench .arena-tile.drag-target {
  background:
    radial-gradient(circle at 50% 100%, rgba(34, 211, 238, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(20, 31, 47, 0.98), rgba(9, 15, 26, 0.98));
}

.arena-tile.drag-target::before {
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.12), rgba(37, 99, 235, 0.2));
}

.arena-tile.locked-slot {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(180deg, rgba(9, 14, 24, 0.88), rgba(6, 10, 18, 0.96));
  opacity: 0.82;
}

.arena-tile.locked-slot::before {
  opacity: 0.68;
  background:
    linear-gradient(180deg, rgba(148, 163, 184, 0.08), rgba(15, 23, 42, 0.18));
}

.arena-tile.occupied {
  border-color: color-mix(in srgb, var(--tile-accent, var(--unit-accent, #67e8f9)) 42%, rgba(255, 255, 255, 0.1));
  background:
    radial-gradient(circle at 50% 58%, color-mix(in srgb, var(--tile-accent, var(--unit-accent, #67e8f9)) 12%, transparent), transparent 68%),
    rgba(8, 14, 26, 0.08);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--tile-accent, var(--unit-accent, #67e8f9)) 34%, transparent),
    0 0 20px color-mix(in srgb, var(--tile-accent, var(--unit-accent, #67e8f9)) 12%, transparent),
    0 0 36px color-mix(in srgb, var(--tile-accent, var(--unit-accent, #67e8f9)) 7%, transparent);
  animation: occupiedPulse 3.2s ease-in-out infinite;
}

.arena-tile.occupied::before {
  opacity: 0.38;
  background:
    radial-gradient(circle at 16% 18%, color-mix(in srgb, var(--tile-accent, var(--unit-accent, #67e8f9)) 18%, transparent), transparent 22%),
    radial-gradient(circle at 82% 82%, color-mix(in srgb, var(--tile-accent, var(--unit-accent, #67e8f9)) 10%, transparent), transparent 26%);
}

.arena-tile.occupied::after {
  opacity: 0.82;
}

.arena-tile.defeated {
  opacity: 0.45;
  transform: scale(0.95);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.tile-index {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.64rem;
  color: rgba(226, 232, 240, 0.42);
  letter-spacing: 0.08em;
  z-index: 3;
}

.tile-core {
  height: 100%;
  display: grid;
  gap: 7px;
  align-content: start;
}

.tile-top,
.tile-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tile-top.compact,
.tile-bottom.compact {
  gap: 10px;
}

.tile-meta {
  flex: 1;
  min-width: 0;
  display: grid;
}

.tile-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.tile-title-row .tile-name {
  flex: 1 1 auto;
  min-width: 0;
}

.tile-core.compact {
  gap: 10px;
  align-content: stretch;
  position: relative;
}

.bench-slot-accent {
  position: absolute;
  inset: auto 10% -10px;
  height: 24px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--unit-accent) 24%, transparent);
  filter: blur(16px);
  opacity: 0.38;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.tile-meta.compact {
  gap: 3px;
}

.tile-title-row.compact {
  align-items: flex-start;
}

.tile-core.compact .tile-name {
  font-size: 0.86rem;
  line-height: 1.14;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.tile-core.compact .tile-level,
.tile-core.compact .tile-role,
.tile-core.compact .tile-tag {
  font-size: 0.72rem;
}

.tile-core.compact .tile-bottom {
  margin-top: auto;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.arena-board-block.side-bench .arena-tile:hover .bench-slot-accent,
.arena-board-block.side-bench .arena-tile.selected .bench-slot-accent,
.arena-board-block.side-bench .arena-tile.drag-target .bench-slot-accent {
  opacity: 0.62;
  transform: scale(1.04);
}

.tile-name {
  font-size: 1.02rem;
}

.battlefield-unit {
  position: relative;
  gap: 0;
  align-content: stretch;
  justify-items: center;
  height: 100%;
  overflow: visible;
}

.battlefield-unit-info {
  position: absolute;
  left: 50%;
  top: -28px;
  width: max-content;
  min-width: 184px;
  max-width: min(272px, calc(100vw - 32px));
  display: grid;
  gap: 5px;
  padding: 6px 10px 8px;
  border-radius: 12px;
  background: rgba(6, 11, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(4, 9, 18, 0.14);
  opacity: 0.92;
  transform: translateX(-50%);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    background 160ms ease;
  z-index: 4;
}

.battlefield-stat-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
  overflow: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity 160ms ease,
    max-height 160ms ease,
    transform 160ms ease;
}

.battlefield-name {
  display: block;
  max-width: 100%;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 0.04em;
  color: #f8fdff;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  text-shadow:
    0 0 10px rgba(8, 14, 26, 0.94),
    0 0 18px rgba(248, 253, 255, 0.1);
}

.battlefield-title-row {
  justify-content: center;
}

.battlefield-level {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background: rgba(8, 15, 26, 0.76);
  color: #d8f5ff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.battlefield-role {
  max-width: 30%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.7;
  font-size: 0.48rem;
  text-align: center;
}

.affinity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background: rgba(8, 14, 26, 0.72);
  color: #dbeafe;
  font-size: 0.58rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.affinity-badge .synergy-icon-wrap {
  width: 16px;
  height: 16px;
  margin-right: 0;
}

.affinity-badge .synergy-icon {
  width: 16px;
  height: 16px;
}

.battlefield-unit-info .battlefield-stat-row {
  justify-content: center;
  gap: 6px;
}

.battlefield-unit-info .battlefield-tag {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.battlefield-unit-info .affinity-badge {
  min-height: 28px;
  padding: 4px 8px;
  gap: 5px;
  border-radius: 14px;
}

.battlefield-unit-info .affinity-badge span:last-child {
  display: inline;
  white-space: nowrap;
}

.battlefield-unit-info .affinity-badge .synergy-icon-wrap {
  width: 16px;
  height: 16px;
}

.battlefield-unit-info .affinity-badge .synergy-icon {
  width: 16px;
  height: 16px;
}

.battlefield-tag {
  font-size: 0.46rem;
  letter-spacing: 0.12em;
}

.battlefield-hp-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.battlefield-hp-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 6px rgba(248, 113, 113, 0.35));
}

.battlefield-hp {
  width: 100%;
  flex: 1 1 auto;
  height: 3px;
  background: rgba(8, 14, 26, 0.84);
}

.battlefield-sprite-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  animation: unitIdle 3.6s ease-in-out infinite;
  overflow: visible;
}

.battlefield-sprite-wrap::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 8px;
  height: 18px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(2, 6, 23, 0.5), transparent 72%);
  filter: blur(10px);
  opacity: 0.76;
  pointer-events: none;
}

.tile-stage {
  position: relative;
  min-height: clamp(84px, 6vw, 118px);
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 25%, color-mix(in srgb, var(--unit-accent) 24%, transparent), transparent 62%),
    linear-gradient(180deg, rgba(8, 14, 26, 0.5), rgba(8, 14, 26, 0.12));
  border: 1px solid color-mix(in srgb, var(--unit-accent) 24%, rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -16px 20px rgba(0, 0, 0, 0.2);
}

.tile-stage.no-asset {
  display: grid;
  place-items: center;
}

.tile-stage.variant-boss {
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow:
    0 0 22px rgba(248, 113, 113, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -16px 20px rgba(0, 0, 0, 0.24);
}

.tile-stage-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
}

.tile-stage-fallback .unit-glyph.large {
  width: 58px;
  height: 58px;
}

.tile-portrait {
  position: absolute;
  inset: 4px 4px 0;
  width: calc(100% - 8px);
  height: calc(100% - 4px);
  object-fit: contain;
  object-position: center bottom;
  z-index: 2;
  filter:
    drop-shadow(0 8px 10px rgba(0, 0, 0, 0.25))
    drop-shadow(0 0 12px color-mix(in srgb, var(--unit-accent) 18%, transparent));
}

.tile-stage-glow {
  position: absolute;
  inset: auto 10% 6px;
  height: 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--unit-accent) 18%, transparent);
  filter: blur(10px);
  z-index: 0;
}

.battlefield-unit .tile-stage,
.battlefield-unit .tile-stage.no-asset {
  width: 100%;
  min-height: clamp(138px, 11vw, 192px);
  display: grid;
  place-items: end center;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  transform: translateY(-60px) scale(1.06);
}

.battlefield-unit .tile-stage.variant-boss {
  width: 138%;
  min-height: clamp(228px, 18vw, 320px);
  box-shadow: none;
  border: none;
  transform: translateY(-62px) scale(1.72);
  z-index: 3;
}

.battlefield-unit .tile-stage-fallback {
  opacity: 0;
}

.battlefield-unit .tile-stage-fallback .unit-glyph.large {
  width: 84px;
  height: 84px;
}

.battlefield-unit .tile-portrait {
  inset: 0;
  width: 100%;
  height: calc(100% + 14px);
  object-fit: contain;
  object-position: center bottom;
  filter:
    drop-shadow(0 14px 16px rgba(0, 0, 0, 0.28))
    drop-shadow(0 0 16px color-mix(in srgb, var(--unit-accent) 18%, transparent));
}

.battlefield-unit .tile-stage.variant-boss .tile-portrait {
  height: calc(100% + 24px);
  filter:
    drop-shadow(0 22px 22px rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 28px rgba(248, 113, 113, 0.26))
    drop-shadow(0 0 20px color-mix(in srgb, var(--unit-accent) 24%, transparent));
}

.battlefield-unit .tile-stage-glow {
  inset: auto 18% 8px;
  height: 22px;
  background: color-mix(in srgb, var(--unit-accent) 22%, transparent);
  filter: blur(14px);
}

.battlefield-unit .tile-stage.variant-boss .tile-stage-glow {
  inset: auto 12% 6px;
  height: 34px;
  background: rgba(248, 113, 113, 0.3);
  filter: blur(18px);
}

.arena-tile.selected .battlefield-sprite-wrap,
.arena-tile.drag-target .battlefield-sprite-wrap {
  transform: scale(1.04);
}

.arena-tile:hover .battlefield-unit-info,
.arena-tile.clickable:hover .battlefield-unit-info,
.arena-tile.selected .battlefield-unit-info,
.arena-tile.drag-target .battlefield-unit-info {
  opacity: 1;
  transform: translateX(-50%) translateY(-3px);
  background: rgba(6, 11, 18, 0.72);
}

.arena-tile:hover .battlefield-stat-row,
.arena-tile.clickable:hover .battlefield-stat-row,
.arena-tile.selected .battlefield-stat-row,
.arena-tile.drag-target .battlefield-stat-row {
  max-height: 40px;
  opacity: 1;
  transform: translateY(0);
}

.bench-side-shell {
  display: grid;
  gap: var(--arena-field-gap);
}

.bench-dock-panel .arena-board-block.side-bench .arena-grid-wrap {
  padding: 12px 14px;
}

.bench-sell-zone {
  margin-top: 2px;
  width: 100%;
  align-content: start;
}

.bench-rail .section-label-row {
  justify-content: space-between;
  text-align: left;
}

.bench-rail .section-copy,
.bench-rail .section-title {
  text-align: left;
}

.bench-rail .arena-tile.compact {
  min-height: 102px;
}

.bench-unit-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bench-level-badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background: rgba(8, 15, 26, 0.76);
  color: #d8f5ff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bench-item-badge {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(8, 15, 26, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.bench-item-badge .item-glyph.inline {
  width: 16px;
  height: 16px;
  font-size: 0.52rem;
  border-radius: 5px;
}

.arena-tile.selected .battlefield-unit .tile-stage,
.arena-tile.drag-target .battlefield-unit .tile-stage {
  filter: drop-shadow(0 0 20px color-mix(in srgb, var(--unit-accent) 20%, transparent));
}

.tile-level,
.tile-role,
.tile-tag,
.tile-detail {
  font-size: 0.78rem;
}

.tile-level,
.tile-detail {
  color: var(--text-secondary);
}

.tile-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tile-stars {
  color: var(--accent-highlight);
  letter-spacing: 0.08em;
}

.tile-tag {
  color: var(--accent-highlight);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tile-hp {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.tile-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--combat-hp), #fb7185);
  transition: width 280ms ease;
}

.tile-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

.battlefield-empty {
  color: transparent;
}

.locked-empty {
  gap: 8px;
}

.tile-empty-marker {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  background: rgba(226, 232, 240, 0.06);
  opacity: 0;
  transition:
    opacity 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.arena-tile.selected .tile-empty-marker,
.arena-tile.drag-target .tile-empty-marker,
.arena-tile.drag-valid .tile-empty-marker,
.arena-tile.drag-invalid .tile-empty-marker {
  opacity: 1;
  border-color: rgba(103, 232, 249, 0.42);
  background: rgba(103, 232, 249, 0.16);
  transform: scale(1.06);
}

.arena-tile.drag-invalid .tile-empty-marker {
  border-color: rgba(248, 113, 113, 0.54);
  background: rgba(248, 113, 113, 0.16);
}

.tile-lock-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: rgba(226, 232, 240, 0.5);
}

.tile-float {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  pointer-events: none;
}

.tile-float.heal {
  color: var(--combat-heal);
}

.tile-float.damage {
  color: var(--combat-hp);
}

.tile-float.summon {
  color: var(--accent-highlight);
}

.unit-glyph {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  position: relative;
  display: inline-grid;
  place-items: center;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--unit-accent) 22%, rgba(255, 255, 255, 0.04)), rgba(8, 14, 24, 0.94));
  border: 1px solid color-mix(in srgb, var(--unit-accent) 60%, transparent);
  color: var(--unit-accent);
  box-shadow:
    0 0 20px color-mix(in srgb, var(--unit-accent) 22%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 1.08rem;
  font-weight: 700;
  overflow: hidden;
}

.unit-glyph.large {
  width: 50px;
  height: 50px;
  font-size: 1.32rem;
}

.unit-asset {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  object-position: center bottom;
  z-index: 2;
  filter:
    drop-shadow(0 0 8px color-mix(in srgb, var(--unit-accent) 24%, transparent))
    drop-shadow(0 0 14px rgba(15, 23, 42, 0.28));
}

.unit-glyph-fallback {
  position: relative;
  z-index: 1;
  line-height: 1;
}

.unit-glyph.has-asset-slot .unit-glyph-fallback {
  display: none;
}

.shop-dock {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 0;
  border-radius: 0;
  overflow: visible;
  background: none;
  border: none;
  box-shadow: none;
}

.shop-dock::before {
  display: none;
}

.shop-dock-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 0;
}

.sell-zone {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(239, 68, 68, 0.36);
  background: rgba(31, 41, 51, 0.55);
  color: var(--text-secondary);
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease,
    opacity 140ms ease;
}

.sell-zone strong {
  color: #fca5a5;
}

.sell-zone.available {
  opacity: 1;
}

.sell-zone.active {
  border-color: rgba(248, 113, 113, 0.85);
  background: rgba(69, 10, 10, 0.34);
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.18);
  transform: translateY(-1px);
}

.shop-dock-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.shop-quick-stats {
  justify-content: flex-end;
  align-items: center;
}

.shop-stat-field {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(103, 232, 249, 0.14);
  background:
    linear-gradient(180deg, rgba(12, 19, 31, 0.92), rgba(8, 13, 22, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 18px rgba(2, 6, 23, 0.12);
}

.shop-dock-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  justify-content: stretch;
}

.shop-control-stack {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: start;
  justify-content: end;
  justify-items: end;
  align-items: start;
}

.shop-card-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(188px, 1fr));
  gap: 14px;
  justify-content: stretch;
  align-content: start;
}

.meta-grid,
.upgrade-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 230px));
  gap: 12px;
  justify-content: start;
  align-content: start;
}

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

.upgrade-choice-grid.mini {
  gap: 16px;
}

.shop-card,
.meta-card,
.upgrade-choice-card {
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(14, 24, 38, 0.9), rgba(10, 18, 31, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -20px 40px rgba(0, 0, 0, 0.16);
}

.shop-card > *,
.meta-card > *,
.upgrade-choice-card > *,
.shop-dock > * {
  position: relative;
  z-index: 1;
}

.shop-card {
  position: relative;
  isolation: isolate;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  min-height: 0;
  aspect-ratio: 0.74 / 1;
  padding: 16px 12px 14px;
  align-content: start;
  overflow: hidden;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

.shop-card:not(.locked) {
  cursor: grab;
}

.shop-card:not(.locked):hover {
  transform: translateY(-2px) scale(1.01);
  border-color: var(--border-hover);
  background: rgba(39, 50, 68, 0.92);
  box-shadow:
    0 0 24px color-mix(in srgb, var(--rarity-accent, #67e8f9) 18%, transparent),
    0 10px 28px rgba(15, 23, 42, 0.28);
}

.shop-card.drag-source {
  opacity: 0.72;
  transform: scale(0.98);
  border-color: rgba(103, 232, 249, 0.9);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.24);
}

.shop-card:active:not(.locked) {
  transform: scale(0.98);
}

.shop-card.empty-slot {
  background:
    linear-gradient(180deg, rgba(10, 15, 24, 0.94), rgba(8, 12, 20, 0.98));
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow:
    inset 0 0 0 1px rgba(148, 163, 184, 0.08),
    inset 0 -16px 28px rgba(0, 0, 0, 0.2);
}

.shop-card.empty-slot::after {
  display: none;
}

.shop-card.empty-slot .shop-card-frame {
  opacity: 0.22;
  filter: none;
}

.shop-empty-body {
  display: grid;
  gap: 14px;
  height: 100%;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.shop-empty-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.78);
  border: 1px dashed rgba(148, 163, 184, 0.42);
  background:
    radial-gradient(circle at 50% 30%, rgba(148, 163, 184, 0.18), transparent 58%),
    rgba(15, 23, 42, 0.62);
}

.shop-empty-copy {
  display: grid;
  gap: 6px;
}

.shop-empty-copy strong {
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shop-empty-copy span {
  color: color-mix(in srgb, var(--text-secondary) 88%, #f8fafc);
  font-size: 0.78rem;
  line-height: 1.45;
}

.shop-empty-foot {
  margin-top: auto;
}

.shop-card-copy-block {
  display: grid;
  gap: 6px;
}

.shop-card-copy-block h3 {
  font-size: 0.98rem;
  text-align: center;
}

.shop-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.shop-card-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0.74;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  filter:
    drop-shadow(0 0 12px color-mix(in srgb, var(--rarity-accent, #67e8f9) 14%, transparent))
    drop-shadow(0 0 20px rgba(15, 23, 42, 0.22));
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
}

.shop-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      115deg,
      transparent 0%,
      transparent 32%,
      color-mix(in srgb, var(--rarity-accent, #67e8f9) 46%, transparent) 42%,
      color-mix(in srgb, #ffffff 28%, var(--rarity-accent, #67e8f9) 72%) 47%,
      rgba(255, 255, 255, 0.78) 50%,
      color-mix(in srgb, #ffffff 22%, var(--rarity-accent, #67e8f9) 78%) 53%,
      color-mix(in srgb, var(--rarity-accent, #67e8f9) 42%, transparent) 58%,
      transparent 70%,
      transparent 100%
    );
  opacity: 0;
  transform: translateX(-42%) skewX(-14deg);
  pointer-events: none;
  mix-blend-mode: screen;
  transition:
    opacity 180ms ease,
    transform 220ms ease;
}

.shop-card-stage {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 7px;
  height: 100%;
}

.shop-card-price-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.shop-card-portrait-shell {
  display: grid;
  justify-items: center;
}

.shop-card-portrait {
  position: relative;
  width: min(100%, 142px);
  aspect-ratio: 0.82 / 1;
  display: grid;
  place-items: end center;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--rarity-accent, #67e8f9) 24%, transparent), transparent 44%),
    linear-gradient(180deg, rgba(12, 21, 35, 0.18), rgba(4, 10, 18, 0.9));
  border: 1px solid color-mix(in srgb, var(--rarity-accent, #67e8f9) 28%, rgba(255, 255, 255, 0.08));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 14px 28px rgba(0, 0, 0, 0.26);
}

.shop-card-unit-asset {
  position: absolute;
  inset: 8px 4px 0;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  object-position: center bottom;
  z-index: 2;
  filter:
    drop-shadow(0 0 14px rgba(8, 17, 31, 0.34))
    drop-shadow(0 0 22px color-mix(in srgb, var(--rarity-accent, #67e8f9) 14%, transparent));
}

.shop-card-portrait-fallback {
  position: relative;
  z-index: 1;
  padding-bottom: 18px;
}

.shop-card-portrait .shop-card-unit-asset + .shop-card-portrait-fallback {
  opacity: 0;
}

.shop-card:not(.locked):hover .shop-card-frame {
  opacity: 0.9;
  transform: scale(1.012);
  filter:
    drop-shadow(0 0 18px color-mix(in srgb, var(--rarity-accent, #67e8f9) 34%, transparent))
    drop-shadow(0 0 28px rgba(15, 23, 42, 0.28));
}

.shop-card:not(.locked):hover::after {
  opacity: 0.58;
  transform: translateX(24%) skewX(-14deg);
}

.shop-card-meta.portrait {
  justify-content: center;
  gap: 6px;
}

.shop-card-meta.icon-meta {
  flex-wrap: wrap;
}

.shop-card-copy-block.portrait {
  gap: 6px;
}

.shop-card-ability-line {
  margin: 0;
  font-size: 0.72rem;
  text-align: center;
  color: color-mix(in srgb, var(--text-secondary) 82%, #eef8ff);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rarity-chip {
  font-weight: 700;
}

.rarity-common {
  --rarity-accent: #9ca3af;
}

.rarity-uncommon {
  --rarity-accent: #4ade80;
}

.rarity-rare {
  --rarity-accent: #60a5fa;
}

.rarity-epic {
  --rarity-accent: #c084fc;
}

.rarity-legendary {
  --rarity-accent: #facc15;
}

.unit-glyph.rarity-common,
.unit-glyph.rarity-uncommon,
.unit-glyph.rarity-rare,
.unit-glyph.rarity-epic,
.unit-glyph.rarity-legendary,
.item-glyph.rarity-common,
.item-glyph.rarity-uncommon,
.item-glyph.rarity-rare,
.item-glyph.rarity-epic,
.item-glyph.rarity-legendary {
  border-color: color-mix(in srgb, var(--rarity-accent) 62%, rgba(255, 255, 255, 0.08));
  box-shadow:
    0 0 18px color-mix(in srgb, var(--rarity-accent) 18%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--rarity-accent) 14%, transparent);
}

.item-glyph.rarity-common,
.item-glyph.rarity-uncommon,
.item-glyph.rarity-rare,
.item-glyph.rarity-epic,
.item-glyph.rarity-legendary {
  color: color-mix(in srgb, var(--rarity-accent) 72%, #ffffff);
}

.team-row.rarity-common,
.team-row.rarity-uncommon,
.team-row.rarity-rare,
.team-row.rarity-epic,
.team-row.rarity-legendary,
.item-card.rarity-common,
.item-card.rarity-uncommon,
.item-card.rarity-rare,
.item-card.rarity-epic,
.item-card.rarity-legendary,
.item-choice-card.rarity-common,
.item-choice-card.rarity-uncommon,
.item-choice-card.rarity-rare,
.item-choice-card.rarity-epic,
.item-choice-card.rarity-legendary {
  border-color: color-mix(in srgb, var(--rarity-accent) 42%, rgba(55, 65, 81, 0.92));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--rarity-accent) 14%, transparent),
    0 0 26px color-mix(in srgb, var(--rarity-accent) 10%, transparent);
}

.team-row.rarity-common,
.team-row.rarity-uncommon,
.team-row.rarity-rare,
.team-row.rarity-epic,
.team-row.rarity-legendary {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--rarity-accent) 10%, rgba(31, 41, 51, 0.78)), rgba(14, 22, 34, 0.9));
}

.shop-card.rarity-common,
.shop-card.rarity-uncommon,
.shop-card.rarity-rare,
.shop-card.rarity-epic,
.shop-card.rarity-legendary {
  border-color: color-mix(in srgb, var(--rarity-accent) 42%, rgba(55, 65, 81, 0.92));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--rarity-accent) 18%, transparent),
    inset 0 -20px 40px rgba(0, 0, 0, 0.16);
}

.shop-card .rarity-chip {
  color: var(--rarity-accent);
  border-color: color-mix(in srgb, var(--rarity-accent) 44%, transparent);
  background: color-mix(in srgb, var(--rarity-accent) 10%, rgba(17, 24, 39, 0.72));
}

.shop-card-type {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.shop-card-copy {
  line-height: 1.35;
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.shop-card-foot {
  display: flex;
  justify-content: center;
  margin-top: auto;
}

.shop-card .unit-glyph.large {
  width: 48px;
  height: 48px;
  font-size: 1.14rem;
}

.dock-actions {
  display: grid;
  grid-template-columns: auto;
  gap: 10px;
}

.compact-reroll-button {
  min-height: 42px;
  padding: 8px 12px;
}

.compact-reroll-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.shop-card.locked,
.meta-card.locked {
  opacity: 0.58;
}

.shop-dock {
  width: min(100vw - 32px, 1560px);
  margin: 0 auto;
}

.shop-dock-inner {
  gap: 18px;
  padding: 18px 20px 20px;
  border-radius: 30px 30px 24px 24px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background:
    radial-gradient(circle at 50% 0%, rgba(96, 165, 250, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(8, 14, 24, 0.96), rgba(5, 10, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -24px 40px rgba(0, 0, 0, 0.22),
    0 26px 50px rgba(2, 6, 23, 0.28);
}

.shop-market-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: stretch;
}

.shop-card-row {
  grid-template-columns: repeat(4, minmax(228px, 1fr));
  gap: 20px;
  width: 100%;
  justify-self: center;
}

.shop-control-stack.premium-shop-controls {
  justify-items: stretch;
  align-content: stretch;
  min-width: 144px;
}

.premium-dock-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: start;
}

.premium-reroll-button,
.premium-side-button {
  min-width: 128px;
  min-height: 118px;
  padding: 12px;
  border-radius: 28px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  background:
    radial-gradient(circle at 50% 22%, rgba(103, 232, 249, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(10, 19, 33, 0.98), rgba(8, 14, 24, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 24px rgba(2, 6, 23, 0.2);
  clip-path: polygon(18% 0, 82% 0, 100% 18%, 100% 82%, 82% 100%, 18% 100%, 0 82%, 0 18%);
  transition:
    transform 160ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.premium-reroll-button:hover,
.premium-side-button:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(103, 232, 249, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 24px rgba(34, 211, 238, 0.12),
    0 16px 28px rgba(2, 6, 23, 0.24);
}

.premium-reroll-button .compact-reroll-inner,
.premium-side-button .compact-reroll-inner {
  width: 100%;
  height: 100%;
  justify-content: center;
  gap: 10px;
  flex-direction: column;
  text-align: center;
}

.shop-control-copy {
  display: grid;
  gap: 4px;
}

.shop-control-copy strong {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shop-control-copy span {
  color: #dbeafe;
  font-size: 0.78rem;
}

.premium-shop-chip {
  justify-content: center;
  min-height: 42px;
  border-color: rgba(103, 232, 249, 0.16);
  background: rgba(8, 15, 26, 0.82);
}

.shop-card {
  min-height: 0;
  aspect-ratio: 0.82 / 1;
  min-height: 388px;
  padding: 18px 16px 18px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--rarity-accent, #67e8f9) 26%, rgba(71, 85, 105, 0.72));
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--rarity-accent, #67e8f9) 12%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(14, 24, 38, 0.84), rgba(8, 14, 24, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -24px 44px rgba(0, 0, 0, 0.2),
    0 16px 32px rgba(2, 6, 23, 0.2);
}

.shop-card-stage {
  animation: shopCardFloat 6.8s ease-in-out infinite;
}

.shop-card:nth-child(2) .shop-card-stage {
  animation-delay: 0.8s;
}

.shop-card:nth-child(3) .shop-card-stage {
  animation-delay: 1.6s;
}

.shop-card:nth-child(4) .shop-card-stage {
  animation-delay: 2.4s;
}

.shop-card-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.shop-card-title-stack {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.shop-card-title-stack h3 {
  font-size: 1.14rem;
  line-height: 1.02;
  text-align: left;
  letter-spacing: 0.03em;
}

.shop-card-title-stack .shop-card-ability-line {
  text-align: left;
  max-width: 14ch;
}

.shop-card-rarity-aura {
  position: absolute;
  inset: -18% -12% auto;
  height: 42%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--rarity-accent, #67e8f9) 18%, transparent), transparent 68%);
  opacity: 0.72;
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

.shop-card-rarity-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
}

.shop-card-stage {
  gap: 10px;
}

.shop-card-portrait-shell {
  align-self: stretch;
}

.shop-card-portrait {
  width: min(100%, 186px);
  aspect-ratio: 0.84 / 1;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 14%, color-mix(in srgb, var(--rarity-accent, #67e8f9) 28%, transparent), transparent 40%),
    linear-gradient(180deg, rgba(19, 28, 42, 0.28), rgba(5, 10, 18, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 16px 32px rgba(0, 0, 0, 0.28);
}

.shop-card-portrait-backlight {
  position: absolute;
  inset: auto 16% 8px;
  height: 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rarity-accent, #67e8f9) 28%, transparent);
  filter: blur(12px);
  opacity: 0.7;
}

.shop-card-unit-asset {
  inset: 8px 2px 0;
  width: calc(100% - 4px);
  height: calc(100% - 8px);
}

.shop-card-bottom {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.shop-card-meta.portrait {
  justify-content: flex-start;
  gap: 6px;
}

.shop-card-purchase-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price-pill.premium {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 14px;
  border-color: color-mix(in srgb, var(--rarity-accent, #67e8f9) 42%, rgba(250, 204, 21, 0.3));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--rarity-accent, #67e8f9) 10%, rgba(10, 18, 31, 0.92)), rgba(8, 14, 24, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 18px rgba(2, 6, 23, 0.14);
}

.shop-card-buy-button {
  min-height: 40px;
  padding-inline: 14px;
  border-radius: 14px;
  border-color: rgba(103, 232, 249, 0.18);
  background:
    linear-gradient(180deg, rgba(20, 30, 45, 0.96), rgba(8, 14, 24, 0.98));
}

.shop-card-buy-button:hover:not(:disabled) {
  border-color: rgba(103, 232, 249, 0.42);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
}

.shop-card:not(.locked):hover {
  transform: translateY(-4px) scale(1.05);
  border-color: color-mix(in srgb, var(--rarity-accent, #67e8f9) 56%, rgba(255, 255, 255, 0.12));
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--rarity-accent, #67e8f9) 18%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(22, 34, 50, 0.92), rgba(10, 17, 29, 0.96));
  box-shadow:
    0 0 30px color-mix(in srgb, var(--rarity-accent, #67e8f9) 22%, transparent),
    0 18px 36px rgba(15, 23, 42, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.shop-card:not(.locked):hover .shop-card-frame {
  opacity: 0.96;
  transform: scale(1.018);
}

.shop-card:not(.locked):hover::after {
  opacity: 0.72;
  transform: translateX(28%) skewX(-14deg);
}

.shop-card.empty-slot {
  border-style: solid;
  border-color: rgba(71, 85, 105, 0.34);
  background:
    radial-gradient(circle at 50% 0%, rgba(148, 163, 184, 0.05), transparent 40%),
    linear-gradient(180deg, rgba(8, 13, 21, 0.98), rgba(5, 9, 16, 1));
}

.shop-card.empty-slot .shop-card-stage,
.shop-card.empty-slot .shop-empty-body {
  animation: none;
}

.shop-card.empty-slot .shop-card-rarity-aura {
  opacity: 0.24;
}

.shop-empty-body {
  gap: 12px;
}

.shop-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  font-size: 1.5rem;
  color: rgba(226, 232, 240, 0.68);
}

.shop-empty-copy strong {
  letter-spacing: 0.08em;
}

.shop-card.rarity-common {
  border-color: rgba(107, 114, 128, 0.42);
}

.shop-card.rarity-uncommon {
  box-shadow:
    inset 0 0 0 1px rgba(74, 222, 128, 0.14),
    0 0 20px rgba(74, 222, 128, 0.08),
    0 16px 32px rgba(2, 6, 23, 0.2);
}

.shop-card.rarity-rare .shop-card-frame {
  animation: rareEdgePulse 3.8s ease-in-out infinite;
}

.shop-card.rarity-epic .shop-card-rarity-aura {
  animation: epicAuraDrift 4.8s ease-in-out infinite;
}

.shop-card.rarity-epic::before,
.shop-card.rarity-legendary::before {
  background-size: 180% 180%;
}

.shop-card.rarity-legendary {
  box-shadow:
    inset 0 0 0 1px rgba(250, 204, 21, 0.18),
    0 0 26px rgba(250, 204, 21, 0.14),
    0 16px 32px rgba(2, 6, 23, 0.22);
}

.shop-card.rarity-legendary .shop-card-rarity-particles {
  opacity: 0.9;
  background:
    radial-gradient(circle at 16% 18%, rgba(250, 204, 21, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 20%, rgba(253, 224, 71, 0.75) 0 1px, transparent 2px),
    radial-gradient(circle at 14% 80%, rgba(250, 204, 21, 0.65) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 82%, rgba(253, 224, 71, 0.7) 0 1px, transparent 2px);
  animation: legendaryParticles 3.4s linear infinite;
}

.shop-card.locked {
  opacity: 0.64;
  filter: saturate(0.8);
}

@media (max-width: 1220px) {
  .shop-market-shell {
    grid-template-columns: 1fr;
  }

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

  .premium-reroll-button,
  .premium-side-button {
    min-height: 84px;
  }
}

@media (max-width: 920px) {
  .premium-dock-actions {
    grid-template-columns: 1fr;
  }

  .shop-card-row {
    width: 100%;
  }
}

@keyframes shopCardFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes rareEdgePulse {
  0%,
  100% {
    filter:
      drop-shadow(0 0 12px color-mix(in srgb, var(--rarity-accent, #60a5fa) 16%, transparent))
      drop-shadow(0 0 20px rgba(15, 23, 42, 0.22));
  }

  50% {
    filter:
      drop-shadow(0 0 18px color-mix(in srgb, var(--rarity-accent, #60a5fa) 30%, transparent))
      drop-shadow(0 0 28px rgba(15, 23, 42, 0.26));
  }
}

@keyframes epicAuraDrift {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.62;
  }

  50% {
    transform: translateY(6px) scale(1.04);
    opacity: 0.86;
  }
}

@keyframes legendaryParticles {
  0% {
    transform: translateY(0);
    opacity: 0.65;
  }

  50% {
    transform: translateY(-4px);
    opacity: 1;
  }

  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
}

.meta-card.owned {
  border-color: rgba(103, 232, 249, 0.42);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.12);
}

.meta-card-head {
  align-items: flex-start;
}

.meta-symbol {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--accent-highlight);
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
}

.spotlight-card {
  display: grid;
  gap: 14px;
}

.upgrade-choice-grid {
  margin-top: 8px;
  align-items: stretch;
}

.upgrade-choice-card {
  min-height: 210px;
  padding: 20px;
  justify-content: space-between;
}

.upgrade-choice-card.mini {
  min-height: 180px;
  padding: 18px;
}

.upgrade-choice-card:active {
  transform: scale(0.98);
}

.upgrade-choice-card.choice-picked {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 0 28px rgba(34, 211, 238, 0.18),
    0 16px 36px rgba(8, 15, 28, 0.36);
}

.upgrade-choice-card.choice-faded {
  opacity: 0.36;
  transform: scale(0.98);
  filter: saturate(0.7);
}

.upgrade-overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(8, 17, 31, 0.18), rgba(3, 7, 15, 0.72)),
    rgba(2, 6, 12, 0.44);
  animation: rise 180ms ease-out;
}

.soul-paths-choice-backdrop {
  place-items: end center;
  padding: 24px clamp(16px, 4vw, 34px) 30px;
  background:
    linear-gradient(180deg, rgba(4, 8, 16, 0.04), rgba(4, 8, 16, 0.22) 34%, rgba(3, 7, 15, 0.62));
}

.upgrade-overlay-panel {
  width: min(920px, calc(100vw - 32px));
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(34, 211, 238, 0.36);
  background:
    linear-gradient(180deg, rgba(12, 20, 34, 0.96), rgba(8, 14, 26, 0.98));
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(103, 232, 249, 0.12),
    0 0 34px rgba(34, 211, 238, 0.14);
}

.soul-paths-choice-panel {
  width: min(980px, calc(100vw - 28px));
  gap: 16px;
  padding: 18px 18px 16px;
  border-radius: 26px;
  border-color: rgba(103, 232, 249, 0.22);
  background:
    linear-gradient(180deg, rgba(8, 13, 24, 0.84), rgba(6, 10, 18, 0.92));
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.42),
    0 0 24px rgba(34, 211, 238, 0.08);
  backdrop-filter: blur(14px);
}

.secret-event-panel {
  border-color: rgba(192, 132, 252, 0.26);
  background:
    linear-gradient(180deg, rgba(14, 10, 26, 0.94), rgba(8, 6, 16, 0.98)),
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.14), transparent 42%),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.08), transparent 38%);
  box-shadow:
    0 18px 52px rgba(6, 4, 16, 0.5),
    0 0 26px rgba(168, 85, 247, 0.12);
}

.soul-paths-lore-prompt-panel,
.soul-paths-dialogue-panel {
  width: min(820px, calc(100vw - 28px));
}

.soul-paths-lore-prompt-head {
  gap: 10px;
}

.soul-paths-lore-prompt-actions,
.soul-paths-dialogue-actions {
  display: flex;
  justify-content: center;
}

.soul-paths-lore-read-button {
  min-width: 220px;
}

.soul-paths-dialogue-panel {
  gap: 18px;
}

.soul-paths-dialogue-card {
  display: grid;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 24px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background:
    linear-gradient(180deg, rgba(10, 16, 28, 0.92), rgba(7, 11, 20, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 40px rgba(2, 8, 22, 0.34);
}

.soul-paths-dialogue-card.mysterious {
  border-color: rgba(192, 132, 252, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 40px rgba(12, 7, 24, 0.38),
    0 0 24px rgba(168, 85, 247, 0.12);
}

.soul-paths-dialogue-card.angry {
  border-color: rgba(248, 113, 113, 0.26);
}

.soul-paths-dialogue-card.sad {
  border-color: rgba(96, 165, 250, 0.24);
}

.soul-paths-dialogue-card.calm {
  border-color: rgba(74, 222, 128, 0.22);
}

.soul-paths-dialogue-card.mocking {
  border-color: rgba(249, 115, 22, 0.24);
}

.soul-paths-dialogue-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.soul-paths-dialogue-copy p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(233, 242, 255, 0.96);
}

.soul-paths-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.upgrade-overlay-head {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.upgrade-overlay-head h2,
.upgrade-overlay-head p {
  margin: 0;
}

.upgrade-overlay-head p {
  max-width: 62ch;
  color: var(--text-secondary);
}

.spotlight-card.victory {
  border-color: rgba(34, 197, 94, 0.36);
  box-shadow: var(--panel-shadow), 0 0 30px rgba(34, 197, 94, 0.12);
}

.spotlight-card.warning {
  border-color: rgba(250, 204, 21, 0.36);
}

.spotlight-card.danger {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: var(--panel-shadow), var(--danger-glow);
}

.upgrade-choice-card {
  cursor: pointer;
  border-color: rgba(34, 211, 238, 0.42);
}

.soul-paths-choice {
  position: relative;
  min-height: 170px;
  padding: 20px 18px 18px;
  border-width: 1px;
  backdrop-filter: blur(10px);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    opacity 160ms ease;
}

.soul-paths-choice:hover {
  transform: translateY(-5px) scale(1.02);
}

.soul-paths-choice.positive {
  border-color: rgba(74, 222, 128, 0.34);
  background:
    linear-gradient(180deg, rgba(8, 20, 17, 0.88), rgba(6, 15, 13, 0.94)),
    radial-gradient(circle at top, rgba(74, 222, 128, 0.08), transparent 54%);
  box-shadow: 0 12px 34px rgba(5, 18, 12, 0.26), 0 0 22px rgba(74, 222, 128, 0.08);
}

.soul-paths-choice.positive:hover {
  box-shadow: 0 18px 42px rgba(5, 18, 12, 0.36), 0 0 28px rgba(74, 222, 128, 0.14);
}

.soul-paths-choice.negative {
  border-color: rgba(248, 113, 113, 0.34);
  background:
    linear-gradient(180deg, rgba(24, 11, 13, 0.88), rgba(17, 8, 10, 0.94)),
    radial-gradient(circle at top, rgba(248, 113, 113, 0.08), transparent 54%);
  box-shadow: 0 12px 34px rgba(20, 8, 10, 0.28), 0 0 22px rgba(248, 113, 113, 0.08);
}

.soul-paths-choice.negative:hover {
  box-shadow: 0 18px 42px rgba(20, 8, 10, 0.38), 0 0 28px rgba(248, 113, 113, 0.16);
}

.soul-paths-choice.mixed {
  border-color: rgba(168, 85, 247, 0.34);
  background:
    linear-gradient(180deg, rgba(17, 11, 26, 0.9), rgba(10, 7, 18, 0.94)),
    radial-gradient(circle at top, rgba(168, 85, 247, 0.1), transparent 56%);
  box-shadow: 0 12px 34px rgba(15, 10, 24, 0.28), 0 0 22px rgba(168, 85, 247, 0.08);
}

.soul-paths-choice.mixed:hover {
  box-shadow: 0 18px 42px rgba(15, 10, 24, 0.38), 0 0 28px rgba(168, 85, 247, 0.16);
}

.soul-paths-choice.neutral {
  border-color: rgba(148, 163, 184, 0.32);
  background:
    linear-gradient(180deg, rgba(12, 18, 28, 0.9), rgba(8, 12, 20, 0.95)),
    radial-gradient(circle at top, rgba(96, 165, 250, 0.08), transparent 56%);
  box-shadow: 0 12px 34px rgba(8, 12, 20, 0.28), 0 0 22px rgba(96, 165, 250, 0.08);
}

.soul-paths-choice.neutral:hover {
  box-shadow: 0 18px 42px rgba(8, 12, 20, 0.36), 0 0 28px rgba(96, 165, 250, 0.14);
}

.soul-paths-choice.danger {
  border-color: rgba(249, 115, 22, 0.34);
  background:
    linear-gradient(180deg, rgba(28, 14, 10, 0.9), rgba(18, 9, 7, 0.96)),
    radial-gradient(circle at top, rgba(249, 115, 22, 0.1), transparent 56%);
  box-shadow: 0 12px 34px rgba(24, 10, 8, 0.3), 0 0 22px rgba(249, 115, 22, 0.08);
}

.soul-paths-choice.danger:hover {
  box-shadow: 0 18px 42px rgba(24, 10, 8, 0.4), 0 0 28px rgba(249, 115, 22, 0.16);
}

.choice-preview-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.choice-preview-pill.neutral {
  border-color: rgba(96, 165, 250, 0.24);
  color: #dbeafe;
}

.choice-preview-pill.danger {
  border-color: rgba(249, 115, 22, 0.24);
  color: #fdba74;
}

.soul-paths-debug-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.choice-preview-pill.positive {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(74, 222, 128, 0.3);
}

.choice-preview-pill.negative {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(248, 113, 113, 0.3);
}

.choice-preview-pill.mixed {
  color: #e9d5ff;
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(192, 132, 252, 0.3);
}

.choice-value {
  color: var(--accent-highlight);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.synergy-block + .synergy-block {
  margin-top: 1rem;
}

.small-title {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.65rem;
}

.log-feed {
  max-height: 320px;
  overflow: auto;
}

.log-row {
  color: color-mix(in srgb, var(--text-primary) 78%, transparent);
  background: rgba(10, 16, 28, 0.54);
  border-color: rgba(55, 65, 81, 0.56);
  font-size: 0.84rem;
}

.summary-strip {
  gap: 10px;
}

.result-metrics .currency-stack,
.tiny-chip .currency-stack,
.price-pill .currency-stack,
.action-button .currency-stack {
  justify-content: center;
}

.tank {
  --unit-accent: var(--unit-tank);
}

.archer {
  --unit-accent: var(--unit-archer);
}

.mage {
  --unit-accent: var(--unit-mage);
}

.healer {
  --unit-accent: var(--unit-healer);
}

.assassin {
  --unit-accent: var(--unit-assassin);
}

.paladin {
  --unit-accent: var(--unit-paladin);
}

.necromancer {
  --unit-accent: var(--unit-necromancer);
}

.summon {
  --unit-accent: var(--unit-summon);
}

.enemy {
  --unit-accent: var(--unit-enemy);
}

.arena-tile.occupied {
  background:
    rgba(8, 14, 26, 0.1);
}

.team-row.tank,
.shop-card.tank,
.meta-card.owned.tank {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.team-row.archer,
.shop-card.archer {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.18);
}

.team-row.mage,
.shop-card.mage {
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.18);
}

.team-row.healer,
.shop-card.healer {
  box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.18);
}

.team-row.assassin,
.shop-card.assassin {
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.18);
}

.team-row.paladin,
.shop-card.paladin {
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.18);
}

.team-row.necromancer,
.shop-card.necromancer {
  box-shadow: inset 0 0 0 1px rgba(107, 33, 168, 0.2);
}

.arena-tile.fx-attack {
  animation: attackPulse 0.28s ease-out;
}

.arena-tile.fx-damage {
  animation: damageFlash 0.3s ease-out;
}

.arena-tile.fx-heal,
.arena-tile.fx-heal-cast {
  animation: healPulse 0.34s ease-out;
}

.arena-tile.fx-summon {
  animation: summonPulse 0.36s ease-out;
}

#arena-effects,
#ui-effects {
  position: absolute;
  pointer-events: none;
}

#arena-effects {
  position: absolute;
  inset: 18px;
  z-index: 2;
}

#ui-effects {
  inset: 0;
  z-index: 12;
}

.arena-effects-layer {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.combat-effect {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
}

.combat-effect.beam {
  height: 3px;
  transform-origin: left center;
  border-radius: 999px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--effect-color) 10%, transparent), var(--effect-color));
  box-shadow: 0 0 10px color-mix(in srgb, var(--effect-color) 46%, transparent);
}

.combat-effect.beam.assassin {
  height: 4px;
  background:
    linear-gradient(90deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.95));
}

.combat-effect.beam.tank,
.combat-effect.beam.paladin {
  height: 4px;
}

.combat-effect.beam.heal-link,
.combat-effect.beam.healer,
.combat-effect.beam.paladin-heal {
  height: 4px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--effect-color) 18%, transparent), var(--effect-color), #eab308);
}

.combat-effect.beam.sprite-trail {
  height: 3px;
  opacity: 0.9;
  box-shadow:
    0 0 14px color-mix(in srgb, var(--effect-color) 48%, transparent),
    0 0 28px color-mix(in srgb, var(--effect-color) 28%, transparent);
}

.combat-effect.orb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--effect-color);
  box-shadow: 0 0 14px color-mix(in srgb, var(--effect-color) 60%, transparent);
}

.combat-effect.orb.mage,
.combat-effect.orb.necromancer {
  width: 12px;
  height: 12px;
}

.combat-effect.orb.heal-link,
.combat-effect.orb.healer,
.combat-effect.orb.paladin-heal {
  width: 14px;
  height: 14px;
  box-shadow:
    0 0 14px color-mix(in srgb, var(--effect-color) 60%, transparent),
    0 0 28px rgba(234, 179, 8, 0.25);
}

.combat-effect.projectile-sprite {
  width: 92px;
  height: 92px;
  object-fit: contain;
  transform: translate(-50%, -50%) rotate(var(--flight-angle, 0deg));
  transform-origin: center center;
  filter:
    drop-shadow(0 0 18px color-mix(in srgb, var(--effect-color) 56%, transparent))
    drop-shadow(0 0 30px rgba(8, 17, 31, 0.4));
  mix-blend-mode: screen;
}

.combat-effect.projectile-sprite.archer {
  width: 84px;
  height: 84px;
}

.combat-effect.projectile-sprite.mage,
.combat-effect.projectile-sprite.enemy {
  width: 102px;
  height: 102px;
}

.combat-effect.projectile-sprite.fire-mage {
  width: 120px;
  height: 120px;
}

.combat-effect.projectile-sprite.assassin,
.combat-effect.projectile-sprite.shade {
  width: 88px;
  height: 88px;
}

.combat-effect.projectile-sprite.support,
.combat-effect.projectile-sprite.healer,
.combat-effect.projectile-sprite.paladin-heal,
.combat-effect.projectile-sprite.heal-link {
  width: 96px;
  height: 96px;
}

.combat-effect.impact-sprite {
  width: 108px;
  height: 108px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 18px color-mix(in srgb, var(--effect-color) 52%, transparent))
    drop-shadow(0 0 32px rgba(8, 17, 31, 0.42));
  mix-blend-mode: screen;
}

.combat-effect.impact-sprite.fire-mage,
.combat-effect.impact-sprite.mage,
.combat-effect.impact-sprite.mage-splash,
.combat-effect.impact-sprite.enemy {
  width: 124px;
  height: 124px;
}

.combat-effect.impact-sprite.support,
.combat-effect.impact-sprite.support-hit,
.combat-effect.impact-sprite.healer,
.combat-effect.impact-sprite.paladin,
.combat-effect.impact-sprite.paladin-hit,
.combat-effect.impact-sprite.paladin-heal {
  width: 116px;
  height: 116px;
}

.combat-effect.impact-sprite.assassin,
.combat-effect.impact-sprite.assassin-hit,
.combat-effect.impact-sprite.shade,
.combat-effect.impact-sprite.tank,
.combat-effect.impact-sprite.tank-hit,
.combat-effect.impact-sprite.archer,
.combat-effect.impact-sprite.spark {
  width: 104px;
  height: 104px;
}

.combat-effect.slash-trail {
  width: 84px;
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      color-mix(in srgb, var(--effect-color) 30%, transparent) 12%,
      rgba(255, 255, 255, 0.96) 48%,
      color-mix(in srgb, var(--effect-color) 92%, rgba(255, 255, 255, 0.22)) 72%,
      transparent 100%
    );
  box-shadow:
    0 0 18px color-mix(in srgb, var(--effect-color) 58%, transparent),
    0 0 34px color-mix(in srgb, var(--effect-color) 24%, transparent);
  mix-blend-mode: screen;
}

.combat-effect.slash-trail::after {
  content: "";
  position: absolute;
  inset: -6px -2px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.3) 26%,
      color-mix(in srgb, var(--effect-color) 62%, transparent) 58%,
      transparent 100%
    );
  filter: blur(5px);
  opacity: 0.72;
}

.combat-effect.slash-trail.slash-heavy {
  width: 96px;
  height: 12px;
}

.combat-effect.slash-trail.slash-support {
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      color-mix(in srgb, #93c5fd 28%, transparent) 12%,
      rgba(255, 255, 255, 0.96) 50%,
      color-mix(in srgb, #93c5fd 94%, rgba(255, 255, 255, 0.18)) 76%,
      transparent 100%
    );
}

.combat-effect.ring {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--effect-color);
  box-shadow:
    0 0 18px color-mix(in srgb, var(--effect-color) 45%, transparent),
    inset 0 0 12px color-mix(in srgb, var(--effect-color) 22%, transparent);
}

.combat-effect.ring.mage-splash,
.combat-effect.ring.necromancer-hit,
.combat-effect.ring.summon-circle,
.combat-effect.ring.sell-burst {
  width: 34px;
  height: 34px;
}

.combat-effect.ring.death {
  width: 28px;
  height: 28px;
  border-color: rgba(248, 113, 113, 0.86);
  box-shadow: 0 0 22px rgba(248, 113, 113, 0.28);
}

.combat-effect.ring.mergeBurst {
  width: 42px;
  height: 42px;
  border-width: 3px;
}

.combat-effect.ring.levelUpRing {
  width: 52px;
  height: 52px;
  border-width: 3px;
}

.combat-effect.ring.itemEquipSpark,
.combat-effect.ring.burst {
  width: 32px;
  height: 32px;
}

.combat-effect.float-text,
.combat-effect.merge-text {
  transform: translate(-50%, -50%);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(15, 23, 42, 0.95);
  white-space: nowrap;
}

.combat-effect.float-text {
  font-size: 0.92rem;
  color: var(--effect-color);
}

.combat-effect.float-text.damage {
  color: #fca5a5;
}

.combat-effect.float-text.healing {
  color: #4ade80;
}

.combat-effect.merge-text {
  font-size: 0.82rem;
  color: var(--effect-color);
  text-transform: uppercase;
}

.combat-effect.selector-effect {
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--effect-color) 54%, transparent);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--effect-color) 14%, transparent),
      color-mix(in srgb, var(--effect-color) 5%, transparent)
    );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--effect-color) 12%, transparent),
    0 0 20px color-mix(in srgb, var(--effect-color) 18%, transparent),
    inset 0 0 18px color-mix(in srgb, var(--effect-color) 10%, transparent);
  transform-origin: center center;
}

.combat-effect.selector-effect.pop {
  animation: uiEffectPop 0.22s ease-out;
}

.combat-effect.selector-effect.shake {
  animation: uiEffectShake 0.24s ease-out;
}

.combat-effect.screen-pulse {
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--effect-color) 16%, transparent), transparent 68%);
  mix-blend-mode: screen;
}

.combat-effect.ring.summon-circle::after,
.combat-effect.ring.death::after,
.combat-effect.ring.mergeBurst::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--effect-color) 18%, transparent);
}

.combat-effect.ring.death::after {
  background: rgba(248, 113, 113, 0.16);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes unitIdle {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes attackPulse {
  0% {
    box-shadow: 0 0 0 rgba(34, 211, 238, 0);
    transform: scale(1);
  }

  35% {
    box-shadow: 0 0 28px rgba(103, 232, 249, 0.35);
    transform: translateY(-6px) scale(1.04);
  }

  100% {
    box-shadow: none;
    transform: scale(1);
  }
}

@keyframes damageFlash {
  0% {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.45), rgba(31, 41, 51, 0.9));
    transform: translateX(0);
  }

  30% {
    transform: translateX(-4px);
  }

  60% {
    transform: translateX(4px);
  }

  100% {
    background: linear-gradient(180deg, rgba(31, 41, 51, 0.95), rgba(19, 30, 42, 0.95));
    transform: translateX(0);
  }
}

@keyframes healPulse {
  0% {
    box-shadow: 0 0 0 rgba(34, 197, 94, 0);
  }

  50% {
    box-shadow: 0 0 26px rgba(34, 197, 94, 0.28);
  }

  100% {
    box-shadow: none;
  }
}

@keyframes summonPulse {
  0% {
    box-shadow: 0 0 0 rgba(34, 211, 238, 0);
  }

  45% {
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.26);
  }

  100% {
    box-shadow: none;
  }
}

@keyframes uiEffectPop {
  0% {
    transform: scale(0.94);
  }

  55% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes uiEffectShake {
  0% {
    transform: translateX(0);
  }

  30% {
    transform: translateX(-4px);
  }

  65% {
    transform: translateX(4px);
  }

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

@keyframes invalidPlacementPulse {
  0% {
    box-shadow:
      0 0 0 1px rgba(248, 113, 113, 0.12),
      0 0 0 rgba(239, 68, 68, 0);
  }

  45% {
    box-shadow:
      0 0 0 1px rgba(248, 113, 113, 0.3),
      0 0 24px rgba(239, 68, 68, 0.18);
  }

  100% {
    box-shadow:
      0 0 0 1px rgba(248, 113, 113, 0.28),
      0 0 22px rgba(239, 68, 68, 0.16),
      inset 0 0 20px rgba(248, 113, 113, 0.08);
  }
}

@keyframes occupiedPulse {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1px color-mix(in srgb, var(--unit-accent) 48%, transparent),
      0 0 20px color-mix(in srgb, var(--unit-accent) 12%, transparent);
  }

  50% {
    box-shadow:
      inset 0 0 0 1px color-mix(in srgb, var(--unit-accent) 58%, transparent),
      0 0 28px color-mix(in srgb, var(--unit-accent) 18%, transparent);
  }
}

@keyframes driftGlow {
  0% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -8px, 0);
  }

  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes arenaGridDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -10px, 0);
  }

  100% {
    transform: translate3d(0, 0, 0);
  }
}

.build-tester-screen {
  align-items: stretch;
}

.build-tester-shell {
  width: min(100%, 1560px);
  display: grid;
  gap: 20px;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(10, 16, 32, 0.96), rgba(6, 10, 24, 0.92)),
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 42%),
    radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.12), transparent 36%);
  border: 1px solid rgba(103, 232, 249, 0.18);
  box-shadow:
    0 30px 80px rgba(2, 6, 23, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.build-tester-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background:
    linear-gradient(135deg, rgba(11, 18, 35, 0.92), rgba(8, 13, 28, 0.86)),
    radial-gradient(circle at right top, rgba(56, 189, 248, 0.16), transparent 34%);
}

.build-tester-hero-copy,
.build-tester-hero-actions,
.build-tester-panel,
.build-tester-slot-card,
.build-tester-subpanel,
.build-tester-result-panel {
  min-width: 0;
}

.build-tester-hero-actions,
.build-tester-inline-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.build-tester-summary-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.build-tester-summary-card,
.build-tester-metric {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(9, 14, 29, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 16px 36px rgba(2, 6, 23, 0.22);
}

.build-tester-summary-card strong,
.build-tester-metric strong {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.build-tester-summary-card span,
.build-tester-metric span {
  color: rgba(226, 232, 240, 0.76);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.build-tester-summary-card.victory,
.build-tester-result-panel.victory {
  border-color: rgba(74, 222, 128, 0.3);
  box-shadow:
    0 0 30px rgba(74, 222, 128, 0.12),
    inset 0 0 0 1px rgba(74, 222, 128, 0.08);
}

.build-tester-summary-card.warning,
.build-tester-result-panel.warning {
  border-color: rgba(250, 204, 21, 0.3);
  box-shadow:
    0 0 30px rgba(250, 204, 21, 0.12),
    inset 0 0 0 1px rgba(250, 204, 21, 0.08);
}

.build-tester-summary-card.danger,
.build-tester-summary-card.loss,
.build-tester-result-panel.danger,
.build-tester-result-panel.loss {
  border-color: rgba(248, 113, 113, 0.3);
  box-shadow:
    0 0 30px rgba(248, 113, 113, 0.12),
    inset 0 0 0 1px rgba(248, 113, 113, 0.08);
}

.build-tester-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1.18fr) minmax(320px, 0.92fr) minmax(340px, 1fr);
  gap: 18px;
  align-items: start;
}

.build-tester-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(103, 232, 249, 0.14);
  background:
    linear-gradient(180deg, rgba(10, 16, 31, 0.86), rgba(5, 10, 22, 0.9));
  box-shadow:
    0 22px 44px rgba(2, 6, 23, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.build-tester-panel-center {
  gap: 18px;
}

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

.build-tester-draft-grid.enemy {
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
}

.build-tester-control-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-color: rgba(96, 165, 250, 0.12);
  background: rgba(12, 18, 36, 0.74);
}

.build-tester-control-card.wide {
  grid-column: span 2;
}

.build-tester-slot-list,
.build-tester-enemy-list,
.build-tester-feedback-grid,
.build-tester-demo-grid {
  display: grid;
  gap: 12px;
}

.build-tester-slot-list {
  max-height: 1120px;
  overflow: auto;
  padding-right: 4px;
}

.build-tester-slot-card,
.build-tester-enemy-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background:
    linear-gradient(180deg, rgba(12, 17, 33, 0.9), rgba(8, 13, 27, 0.88));
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.build-tester-slot-card:hover,
.build-tester-enemy-card:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.22);
  box-shadow:
    0 16px 30px rgba(6, 182, 212, 0.08),
    inset 0 0 0 1px rgba(103, 232, 249, 0.08);
}

.build-tester-slot-card.reserve,
.build-tester-board-tile.reserve {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.18);
  opacity: 0.82;
}

.build-tester-slot-head,
.build-tester-slot-identity,
.build-tester-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.build-tester-slot-title,
.build-tester-slot-power {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.build-tester-slot-power strong {
  color: #e2e8f0;
}

.build-tester-slot-body,
.build-tester-board-unit,
.build-tester-board-empty {
  display: grid;
  gap: 12px;
}

.build-tester-slot-identity > div,
.build-tester-board-unit {
  min-width: 0;
}

.build-tester-slot-identity span,
.build-tester-board-unit span,
.build-tester-board-empty small {
  color: rgba(226, 232, 240, 0.72);
}

.build-tester-empty-glyph {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px dashed rgba(103, 232, 249, 0.22);
  background: rgba(10, 16, 31, 0.66);
  color: rgba(103, 232, 249, 0.8);
  font-size: 1.4rem;
  font-weight: 700;
}

.build-tester-slot-controls,
.build-tester-slot-stats,
.build-tester-metric-grid {
  display: grid;
  gap: 10px;
}

.build-tester-level-buttons,
.build-tester-mode-row,
.replay-bar-actions,
.replay-bar-copy,
.replay-bar-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.build-tester-slot-controls {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.build-tester-slot-stats,
.build-tester-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.build-tester-slot-stats.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.build-tester-metric-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.build-tester-metric.cyan {
  border-color: rgba(34, 211, 238, 0.18);
}

.build-tester-metric.blue {
  border-color: rgba(96, 165, 250, 0.18);
}

.build-tester-metric.violet {
  border-color: rgba(168, 85, 247, 0.18);
}

.build-tester-metric.gold {
  border-color: rgba(250, 204, 21, 0.18);
}

.build-tester-metric.green {
  border-color: rgba(74, 222, 128, 0.18);
}

.build-tester-metric.orange {
  border-color: rgba(251, 146, 60, 0.18);
}

.build-tester-metric.danger {
  border-color: rgba(248, 113, 113, 0.18);
}

.build-tester-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.build-tester-board-grid.enemy-preview .build-tester-board-tile {
  min-height: 154px;
}

.build-tester-board-tile.enemy-preview {
  background:
    radial-gradient(circle at top, rgba(248, 113, 113, 0.08), transparent 48%),
    linear-gradient(180deg, rgba(18, 16, 28, 0.92), rgba(12, 10, 20, 0.92));
  border-color: rgba(248, 113, 113, 0.16);
}

.build-tester-board-tile {
  min-height: 196px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(103, 232, 249, 0.14);
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.08), transparent 48%),
    linear-gradient(180deg, rgba(13, 19, 37, 0.92), rgba(7, 12, 24, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 16px 34px rgba(2, 6, 23, 0.2);
}

.build-tester-board-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.build-tester-board-unit {
  justify-items: center;
  text-align: center;
}

.build-tester-board-empty {
  align-content: center;
  justify-items: center;
  text-align: center;
}

.build-tester-subgrid {
  display: grid;
  gap: 14px;
}

.build-tester-subpanel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(11, 16, 30, 0.76);
}

.build-tester-chip-wrap {
  align-items: flex-start;
}

.build-tester-result-panel {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background:
    linear-gradient(180deg, rgba(11, 18, 34, 0.9), rgba(8, 13, 27, 0.92));
}

.build-tester-result-panel .menu-copy.strong {
  color: #f8fafc;
  font-weight: 600;
}

.replay-bar {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 22px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background:
    linear-gradient(180deg, rgba(7, 14, 28, 0.92), rgba(6, 12, 24, 0.94));
  box-shadow:
    0 20px 44px rgba(2, 6, 23, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.replay-bar-main {
  justify-content: space-between;
}

.replay-bar-copy strong {
  color: #f8fafc;
}

.replay-progress {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.14);
  background: rgba(8, 15, 28, 0.84);
}

.replay-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.72), rgba(103, 232, 249, 0.92));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.18);
}

.build-tester-demo-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(10, 15, 29, 0.82);
}

.build-tester-demo-card strong {
  color: #f8fafc;
}

@media (max-width: 1220px) {
  .library-shell {
    padding: 28px;
  }

  .library-launcher-layout,
  .library-home-grid,
  .library-detail-grid {
    grid-template-columns: 1fr;
  }

  .library-hub-nav {
    position: static;
    width: auto;
    height: auto;
    border-right: 0;
  }

  .launcher-filter-panel {
    position: static;
  }

  .library-home-main,
  .launcher-library-side {
    margin-left: 0;
    width: 100%;
  }

  .launcher-library-side {
    position: static;
  }

  .library-profile-rail {
    width: 100%;
  }

  .library-detail-side {
    min-width: 0;
  }

  .library-topbar {
    grid-template-columns: 1fr;
  }

  .library-topbar-badges,
  .library-topbar-actions,
  .library-topbar-side {
    justify-content: flex-start;
    justify-items: stretch;
  }

  .library-profile-card,
  .library-profile-editor {
    width: 100%;
  }

  .skill-tree-category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .soul-survivors-menu-layout,
  .soul-survivors-play-grid {
    grid-template-columns: 1fr;
  }

  .soul-survivors-menu-sidebar {
    position: static;
  }

  .soul-survivors-start-summary,
  .soul-survivors-start-summary.stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-tree-stage {
    height: auto;
  }

  .skill-tree-detail-card {
    position: static;
    width: 100%;
    margin-top: 16px;
  }

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

  .library-filter-select-grid {
    grid-template-columns: 1fr 1fr;
  }

  .menu-hero {
    padding: 40px;
  }

  .menu-profile-strip,
  .menu-settings-grid {
    grid-template-columns: 1fr;
  }

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

  .arena-main {
    grid-template-columns: 1fr;
  }

  .arena-stage-column,
  .sidebar-rail {
    max-width: none;
    justify-self: stretch;
  }

  .arena-panel {
    width: min(88vw, 1320px);
  }

  .arena-board-block.side-player .section-copy,
  .arena-board-block.side-player .section-title {
    text-align: left;
  }

  .coop-main {
    grid-template-columns: 1fr;
  }

  .coop-enemy-column {
    order: -1;
  }

  .build-tester-summary-strip,
  .build-tester-layout {
    grid-template-columns: 1fr;
  }

  .build-tester-slot-list {
    max-height: none;
  }
}

@media (max-width: 920px) {
  #app {
    width: min(100% - 16px, 1600px);
  }

  .library-shell,
  .menu-home {
    padding: 16px;
  }

  .soul-survivors-menu-shell {
    padding: 16px;
  }

  .soul-survivors-start-summary,
  .soul-survivors-start-summary.stats,
  .soul-survivors-menu-card-grid {
    grid-template-columns: 1fr;
  }

  .launcher-featured-meta,
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-filter-row,
  .library-card-actions,
  .library-recent-meta {
    justify-content: flex-start;
  }

  .library-featured {
    grid-template-columns: 1fr;
  }

  .library-featured-art .library-poster {
    min-height: 240px;
  }

  .library-play-button,
  .library-detail-button {
    opacity: 1;
    transform: none;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .library-card-copy-text {
    text-align: center;
  }

  .menu-hero {
    padding: 32px 24px;
  }

  .menu-hero-stats,
  .menu-hero-actions {
    justify-content: center;
  }

  .hero-button {
    width: 100%;
  }

  .build-tester-shell {
    padding: 18px;
  }

  .build-tester-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .build-tester-draft-grid,
  .build-tester-draft-grid.enemy,
  .build-tester-slot-controls,
  .build-tester-slot-stats,
  .build-tester-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .build-tester-control-card.wide {
    grid-column: auto;
  }

  .shop-card-row,
  .upgrade-choice-grid,
  .meta-grid,
  .menu-profile-strip,
  .menu-settings-grid,
  .item-card-grid,
  .coop-form-grid,
  .coop-lobby-grid,
  .coop-shop-row,
  .coop-augment-strip {
    grid-template-columns: 1fr;
  }

  .arena-stage-column,
  .sidebar-rail,
  .shop-dock-body,
  .spotlight-card.compact-status {
    grid-template-columns: 1fr;
  }

  .arena-stage-column,
  .sidebar-rail {
    display: grid;
  }

  .arena-screen.soul-paths {
    padding-bottom: 150px;
  }

  .arena-screen.soul-paths .arena-main {
    max-width: 100%;
  }

  .soul-paths-event-card {
    min-height: 220px;
  }

  .soul-paths-event-card .compact-status-copy h2 {
    font-size: 1.6rem;
  }

  .soul-paths-choice-backdrop {
    padding: 18px 12px 20px;
  }

  .soul-paths-choice-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-tab-switch {
    grid-template-columns: 1fr;
  }

  .menu-panel,
  .sidebar-panel,
  .arena-panel,
  .shop-dock,
  .spotlight-card {
    padding: 16px;
  }

  .arena-panel {
    width: 100%;
    padding: 0;
  }

  .arena-battlefield {
    min-height: 0;
    border-radius: 24px;
  }

  .arena-board-block.side-bench {
    width: 100%;
  }

  .arena-duel-grid {
    min-height: 0;
    padding: 18px 14px 22px;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr);
  }

  .board-zone,
  .enemy-board-zone,
  .hero-board-zone {
    padding: 0;
    justify-content: stretch;
  }

  .arena-duel-grid::before {
    display: none;
  }

  .compact-status-meta,
  .compact-status .spotlight-actions,
  .dock-actions {
    justify-content: flex-start;
  }

  .shop-control-stack {
    min-width: 0;
  }

  .arena-screen::before {
    inset: 112px 4% 130px;
  }

  .coop-enemy-column .arena-board-block,
  .coop-player-column {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .library-shell {
    padding: 14px;
  }

  .library-launcher-layout,
  .library-topbar-actions,
  .library-topbar-badges,
  .library-topbar-side,
  .library-home-grid,
  .library-home-main,
  .library-home-side {
    gap: 12px;
  }

  .library-avatar-grid,
  .library-profile-metrics {
    grid-template-columns: 1fr;
  }

  .library-filter-button {
    width: 100%;
    justify-content: space-between;
  }

  .library-filter-select-grid {
    grid-template-columns: 1fr;
  }

  .skill-tree-category-tabs,
  .profile-screen-tabs {
    grid-template-columns: 1fr;
    display: grid;
  }

  .profile-screen-header-main,
  .skill-tree-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .launcher-featured-meta,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .library-card {
    padding: 16px;
  }

  .journal-entry-art .library-poster,
  .library-poster {
    min-height: 180px;
  }

  .library-detail-banner-art .library-poster {
    min-height: 220px;
  }

  .library-recent-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-topbar-actions .action-button,
  .library-card-actions .action-button {
    width: 100%;
  }

  .build-tester-summary-strip,
  .build-tester-draft-grid,
  .build-tester-draft-grid.enemy,
  .build-tester-slot-controls,
  .build-tester-slot-stats,
  .build-tester-metric-grid,
  .build-tester-board-grid {
    grid-template-columns: 1fr;
  }

  .replay-bar-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .build-tester-panel,
  .build-tester-shell {
    padding: 14px;
  }

  .menu-title {
    font-size: 2.4rem;
  }

  .menu-hero .menu-title {
    font-size: 3rem;
    letter-spacing: 0.1em;
  }

  .menu-subtitle {
    font-size: 1rem;
  }

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

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

  .arena-grid {
    gap: 8px;
  }

  .arena-tile {
    min-height: 98px;
  }

  .arena-tile.compact {
    min-height: 94px;
  }

  .arena-battlefield {
    border-radius: 20px;
  }

  .arena-board-block {
    width: 100%;
    max-width: none;
  }

  .battlefield-unit .tile-stage,
  .battlefield-unit .tile-stage.no-asset {
    min-height: 122px;
    transform: translateY(-44px) scale(1.03);
  }

  .battlefield-unit .tile-stage.variant-boss {
    min-height: 182px;
    width: 128%;
    transform: translateY(-46px) scale(1.46);
  }

  .battlefield-unit-info {
    top: -18px;
    width: max-content;
    min-width: 168px;
    max-width: min(220px, calc(100vw - 24px));
    padding: 5px 8px 7px;
  }

  .battlefield-name {
    font-size: 0.66rem;
  }

  .battlefield-level {
    font-size: 0.56rem;
    padding: 2px 6px;
  }

  .battlefield-role,
  .battlefield-tag {
    font-size: 0.5rem;
  }

  .tile-name {
    font-size: 0.9rem;
  }

  .arena-topbar,
  .arena-topbar.coop-topbar {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .topbar-resource-rail {
    justify-content: flex-start;
  }

  .phase-state-strip {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

.soul-survivors-screen {
  min-height: 100vh;
  display: block;
  padding: 0;
}

.soul-survivors-menu-screen {
  align-items: stretch;
  padding: 0;
}

.soul-survivors-menu-shell {
  width: 100%;
  min-height: 100vh;
  padding: 28px;
  background:
    radial-gradient(circle at top, rgba(76, 29, 149, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(5, 8, 16, 1), rgba(8, 12, 20, 1));
}

.soul-survivors-menu-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  min-height: calc(100vh - 130px);
}

.soul-survivors-menu-sidebar,
.soul-survivors-menu-content,
.soul-survivors-menu-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.soul-survivors-menu-sidebar {
  align-content: start;
  padding: 16px;
}

.soul-survivors-menu-sidebar-tabs {
  display: grid;
  gap: 10px;
}

.soul-survivors-menu-tab {
  justify-content: flex-start;
}

.soul-survivors-menu-content {
  align-content: start;
}

.soul-survivors-play-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.soul-survivors-menu-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.soul-survivors-menu-card {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(12, 18, 31, 0.96), rgba(8, 12, 22, 0.96)),
    radial-gradient(circle at top, rgba(103, 232, 249, 0.08), transparent 36%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 18px 38px rgba(2, 6, 23, 0.24);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

button.soul-survivors-menu-card:hover:not(:disabled),
button.soul-survivors-menu-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 24px 44px rgba(2, 6, 23, 0.28),
    0 0 22px rgba(34, 211, 238, 0.1);
}

.soul-survivors-menu-card.selected {
  border-color: rgba(103, 232, 249, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(103, 232, 249, 0.08),
    0 24px 44px rgba(2, 6, 23, 0.28),
    0 0 24px rgba(34, 211, 238, 0.14);
  transform: translateY(-3px) scale(1.01);
}

.soul-survivors-menu-card.selected::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  box-shadow:
    inset 0 0 0 1px rgba(125, 211, 252, 0.2),
    0 0 0 2px rgba(34, 211, 238, 0.08);
  pointer-events: none;
}

.soul-survivors-selected-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  background: rgba(8, 18, 30, 0.86);
  color: #a5f3fc;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.2);
}

.soul-survivors-menu-card.locked {
  opacity: 0.82;
  filter: grayscale(1) saturate(0.55);
}

.soul-survivors-card-lock {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 8, 16, 0.78);
  color: rgba(241, 232, 194, 0.96);
  font-size: 1rem;
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.24);
}

.soul-survivors-menu-card.rarity-common {
  border-color: rgba(148, 163, 184, 0.18);
}

.soul-survivors-menu-card.rarity-uncommon {
  border-color: rgba(74, 222, 128, 0.22);
}

.soul-survivors-menu-card.rarity-rare {
  border-color: rgba(96, 165, 250, 0.22);
}

.soul-survivors-menu-card.rarity-epic {
  border-color: rgba(192, 132, 252, 0.24);
}

.soul-survivors-menu-card.rarity-legendary {
  border-color: rgba(251, 191, 36, 0.26);
}

.soul-survivors-menu-card-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: left;
}

.soul-survivors-menu-card-copy strong {
  color: #f8fafc;
  font-size: 1rem;
}

.soul-survivors-menu-card-copy span,
.soul-survivors-menu-card-copy small,
.soul-survivors-menu-card-copy p {
  margin: 0;
  color: #cbd5e1;
}

.soul-survivors-menu-portrait,
.soul-survivors-item-icon {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(16, 25, 39, 0.96), rgba(8, 12, 22, 0.96));
}

.soul-survivors-menu-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.soul-survivors-menu-portrait.locked img,
.soul-survivors-menu-card.locked .soul-survivors-menu-card-cover img {
  filter: grayscale(1) brightness(0.42) contrast(1.05);
}

.soul-survivors-menu-card-cover {
  position: relative;
  min-height: 120px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at top, rgba(103, 232, 249, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(16, 25, 39, 0.96), rgba(8, 12, 22, 0.96));
}

.soul-survivors-menu-card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) brightness(0.82);
  transform: scale(1.03);
}

.soul-survivors-menu-card-cover > *:not(img) {
  position: relative;
  z-index: 1;
}

.soul-survivors-menu-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 8, 16, 0.08), rgba(7, 8, 16, 0.68)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 34%);
  pointer-events: none;
}

.soul-survivors-menu-card-cover.shadow-ruins {
  background:
    radial-gradient(circle at top, rgba(168, 85, 247, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(18, 12, 34, 0.96), rgba(8, 10, 20, 0.96));
}

.soul-survivors-menu-card-cover.verdant-arena {
  background:
    radial-gradient(circle at top, rgba(74, 222, 128, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(10, 28, 24, 0.96), rgba(7, 14, 18, 0.96));
}

.soul-survivors-menu-card-cover.ember-arena {
  background:
    radial-gradient(circle at top, rgba(249, 115, 22, 0.2), transparent 40%),
    linear-gradient(180deg, rgba(33, 16, 10, 0.96), rgba(15, 10, 10, 0.96));
}

.soul-survivors-menu-card-cover.verdant-hollow {
  background:
    radial-gradient(circle at top, rgba(74, 222, 128, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(10, 28, 24, 0.96), rgba(7, 14, 18, 0.96));
}

.soul-survivors-menu-card-cover.ashen-basin {
  background:
    radial-gradient(circle at top, rgba(249, 115, 22, 0.2), transparent 40%),
    linear-gradient(180deg, rgba(33, 16, 10, 0.96), rgba(15, 10, 10, 0.96));
}

.soul-survivors-menu-card-cover.forgotten-observatory {
  background:
    radial-gradient(circle at top, rgba(251, 191, 36, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(26, 18, 38, 0.96), rgba(9, 10, 18, 0.96));
}

.soul-survivors-start-panel,
.soul-survivors-start-summary {
  display: grid;
  gap: 16px;
}

.soul-survivors-start-stat.active {
  border-color: rgba(103, 232, 249, 0.22);
  background:
    radial-gradient(circle at top right, rgba(103, 232, 249, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(10, 20, 34, 0.94), rgba(7, 12, 22, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 30px rgba(2, 6, 23, 0.18);
}

.soul-survivors-start-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.soul-survivors-start-summary.stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.soul-survivors-start-stat {
  display: grid;
  gap: 6px;
}

.soul-survivors-start-stat span {
  color: #94a3b8;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.soul-survivors-start-stat strong {
  color: #f8fafc;
  font-size: 1rem;
}

.soul-survivors-shell {
  width: 100%;
  min-height: 100vh;
  border-radius: 0;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(76, 29, 149, 0.26), transparent 38%),
    linear-gradient(180deg, rgba(10, 14, 26, 0.96), rgba(7, 10, 20, 0.98));
}

.soul-survivors-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 24px;
  align-items: stretch;
  min-height: calc(100vh - 96px);
}

.soul-survivors-main {
  padding: 22px;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(14, 23, 40, 0.95), rgba(8, 14, 28, 0.95)),
    radial-gradient(circle at top, rgba(103, 232, 249, 0.08), transparent 34%);
}

.soul-survivors-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.soul-survivors-hero-copy {
  max-width: 560px;
}

.soul-survivors-hud {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.soul-survivors-hud-block {
  display: grid;
  gap: 8px;
}

.library-progress-fill.hp {
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.92), rgba(34, 197, 94, 0.98));
}

.soul-survivors-arena {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: none;
  aspect-ratio: var(--soul-survivors-arena-ratio, 1180 / 680);
  min-height: min(72vh, 820px);
  border-radius: 28px;
  border: 1px solid rgba(103, 232, 249, 0.2);
  background:
    radial-gradient(circle at center, rgba(15, 23, 42, 0.16), rgba(2, 6, 23, 0.92)),
    linear-gradient(180deg, rgba(11, 18, 32, 0.96), rgba(4, 8, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 28px 54px rgba(2, 6, 23, 0.5);
}

.soul-survivors-arena-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 68px 68px;
  background-position: var(--ss-grid-offset-x, 0px) var(--ss-grid-offset-y, 0px);
  mask-image: radial-gradient(circle at center, black 55%, transparent 100%);
  pointer-events: none;
}

.soul-survivors-arena-runes,
.soul-survivors-arena-particles,
.soul-survivors-arena-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.soul-survivors-arena-runes {
  z-index: 1;
  background:
    radial-gradient(circle at 18% 24%, rgba(103, 232, 249, 0.12) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 70%, rgba(192, 132, 252, 0.14) 0 2px, transparent 3px),
    radial-gradient(circle at 42% 56%, rgba(74, 222, 128, 0.08) 0 1.5px, transparent 3px),
    radial-gradient(circle at 50% 50%, rgba(103, 232, 249, 0.08), transparent 58%);
  background-position: var(--ss-runes-offset-x, 0px) var(--ss-runes-offset-y, 0px);
  mix-blend-mode: screen;
  opacity: 0.45;
}

.soul-survivors-arena-particles {
  z-index: 1;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 22%, rgba(103, 232, 249, 0.2) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 78%, rgba(255, 255, 255, 0.16) 0 1px, transparent 2px),
    radial-gradient(circle at 28% 72%, rgba(192, 132, 252, 0.18) 0 1px, transparent 2px);
  animation: driftGlow 18s linear infinite;
  opacity: 0.46;
}

.soul-survivors-map-image {
  position: absolute;
  object-fit: fill;
  opacity: 0.52;
  pointer-events: none;
  z-index: 0;
  filter:
    saturate(0.96)
    brightness(0.58)
    contrast(1.06);
}

.soul-survivors-pickup-ring,
.soul-survivors-projectile,
.soul-survivors-xp-orb,
.soul-survivors-chest,
.soul-survivors-telegraph,
.soul-survivors-aoe,
.soul-survivors-hazard-zone,
.soul-survivors-orbital,
.soul-survivors-floating-text {
  position: absolute;
  transform: translate(-50%, -50%);
}

.soul-survivors-arena.boss-shake {
  animation: soulSurvivorsBossShake 520ms ease-out;
}

.soul-survivors-pickup-ring {
  border-radius: 999px;
  border: 1px dashed rgba(103, 232, 249, 0.12);
  background: radial-gradient(circle, rgba(103, 232, 249, 0.04), transparent 70%);
  pointer-events: none;
}

.soul-survivors-entity {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

.soul-survivors-entity-shadow {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 72%;
  height: 22%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.6), transparent 72%);
  transform: translateX(-50%);
  filter: blur(4px);
  opacity: 0.8;
}

.soul-survivors-entity-frame {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-origin: center bottom;
}

.soul-survivors-entity.moving .soul-survivors-entity-frame {
  animation: soulSurvivorsBob 1s ease-in-out infinite;
}

.soul-survivors-player .soul-survivors-entity-frame {
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.26));
}

.soul-survivors-player.active .soul-survivors-entity-frame {
  animation: soulSurvivorsPulse 1.8s ease-in-out infinite;
}

.soul-survivors-enemy .soul-survivors-entity-frame {
  filter: drop-shadow(0 0 12px rgba(248, 113, 113, 0.14));
}

.soul-survivors-enemy.boss .soul-survivors-entity-frame {
  filter: drop-shadow(0 0 22px rgba(251, 191, 36, 0.26));
}

.soul-survivors-enemy.frozen .soul-survivors-entity-frame {
  filter:
    drop-shadow(0 0 16px rgba(96, 165, 250, 0.22))
    saturate(1.06)
    brightness(1.05);
}

.soul-survivors-entity.damaged .soul-survivors-entity-frame {
  animation: soulSurvivorsHitFlash 140ms ease-out;
}

.soul-survivors-entity.facing-left .soul-survivors-entity-frame img {
  transform: scaleX(-1);
}

.soul-survivors-player img,
.soul-survivors-enemy img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.soul-survivors-fallback-sprite {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f8fafc;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
}

.soul-survivors-entity-hp {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  width: 82%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateX(-50%);
}

.soul-survivors-entity-hp-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.94), rgba(250, 204, 21, 0.96));
}

.soul-survivors-hitbox {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px dashed rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.04);
}

.soul-survivors-arena-hud {
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
}

.soul-survivors-arena-hud-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.soul-survivors-player span,
.soul-survivors-enemy span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.soul-survivors-xp-orb {
  border-radius: 999px;
  background: radial-gradient(circle, rgba(103, 232, 249, 1), rgba(34, 211, 238, 0.18));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.34);
}

.soul-survivors-reward-drop {
  display: grid;
  place-items: center;
  border-radius: 999px;
  transform: translate(-50%, calc(-50% + var(--drop-bob, 0px)));
  animation: glowPulse 1.9s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 28px rgba(34, 211, 238, 0.18);
}

.soul-survivors-reward-drop span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f8fafc;
  text-shadow: 0 2px 12px rgba(2, 6, 23, 0.84);
}

.soul-survivors-reward-drop.xp_orb {
  background:
    radial-gradient(circle, rgba(165, 243, 252, 0.96), rgba(34, 211, 238, 0.26) 58%, rgba(8, 18, 32, 0.08));
}

.soul-survivors-reward-drop.xp_core {
  background:
    radial-gradient(circle, rgba(165, 243, 252, 0.98), rgba(34, 211, 238, 0.38) 58%, rgba(8, 18, 32, 0.08));
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.18),
    0 0 30px rgba(34, 211, 238, 0.34),
    0 0 52px rgba(34, 211, 238, 0.12);
}

.soul-survivors-reward-drop.upgrade_orb {
  background:
    radial-gradient(circle, rgba(224, 242, 254, 0.94), rgba(96, 165, 250, 0.28) 56%, rgba(10, 18, 32, 0.12)),
    linear-gradient(180deg, rgba(59, 130, 246, 0.24), rgba(15, 23, 42, 0.84));
}

.soul-survivors-reward-drop.upgrade_orb::before,
.soul-survivors-reward-drop.relic_orb::before {
  content: "";
  position: absolute;
  inset: -16%;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  animation: spin 3.8s linear infinite;
}

.soul-survivors-reward-drop.soul_fragment {
  background:
    radial-gradient(circle, rgba(250, 232, 255, 0.96), rgba(168, 85, 247, 0.34) 58%, rgba(17, 10, 28, 0.12)),
    linear-gradient(180deg, rgba(192, 132, 252, 0.22), rgba(15, 23, 42, 0.84));
  clip-path: polygon(50% 0%, 82% 22%, 100% 56%, 68% 100%, 22% 88%, 0% 44%);
}

.soul-survivors-reward-drop.soul_chest {
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.36), rgba(15, 23, 42, 0.94)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 52%);
}

.soul-survivors-reward-drop.healing_orb {
  background:
    radial-gradient(circle, rgba(187, 247, 208, 0.98), rgba(34, 197, 94, 0.3) 58%, rgba(8, 18, 32, 0.08));
}

.soul-survivors-reward-drop.magnet_orb {
  background:
    radial-gradient(circle, rgba(191, 219, 254, 0.98), rgba(56, 189, 248, 0.3) 58%, rgba(8, 18, 32, 0.08));
}

.soul-survivors-reward-drop.coin_orb {
  background:
    radial-gradient(circle, rgba(254, 240, 138, 0.98), rgba(245, 158, 11, 0.34) 58%, rgba(30, 20, 5, 0.1));
}

.soul-survivors-reward-drop.relic_orb {
  background:
    radial-gradient(circle, rgba(253, 230, 138, 0.96), rgba(192, 132, 252, 0.28) 54%, rgba(17, 10, 28, 0.12)),
    linear-gradient(180deg, rgba(251, 191, 36, 0.18), rgba(15, 23, 42, 0.84));
}

.soul-survivors-reward-drop.rarity-common {
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.18),
    0 0 28px rgba(34, 211, 238, 0.24);
}

.soul-survivors-reward-drop.rarity-rare {
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.22),
    0 0 32px rgba(59, 130, 246, 0.28);
}

.soul-survivors-reward-drop.rarity-epic {
  box-shadow:
    0 0 0 1px rgba(192, 132, 252, 0.24),
    0 0 36px rgba(168, 85, 247, 0.32);
}

.soul-survivors-reward-drop.rarity-legendary {
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.28),
    0 0 40px rgba(245, 158, 11, 0.36);
}

.soul-survivors-chest {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  transform: translate(-50%, calc(-50% + var(--drop-bob, 0px)));
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.36), rgba(15, 23, 42, 0.94)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 52%);
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.14),
    0 0 24px rgba(59, 130, 246, 0.18);
  animation: glowPulse 2s ease-in-out infinite;
}

.soul-survivors-chest.common {
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.38), rgba(15, 23, 42, 0.94)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.16), transparent 52%);
}

.soul-survivors-chest.rare {
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.44), rgba(15, 23, 42, 0.94)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 52%);
}

.soul-survivors-touch-controls {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  pointer-events: none;
}

.soul-survivors-touch-pad {
  position: relative;
  width: 152px;
  height: 152px;
  pointer-events: auto;
}

.soul-survivors-touch-pad-ring,
.soul-survivors-touch-knob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.soul-survivors-touch-pad-ring {
  inset: 8px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background:
    radial-gradient(circle, rgba(8, 14, 24, 0.72), rgba(5, 9, 16, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 38px rgba(0, 0, 0, 0.26);
}

.soul-survivors-touch-knob {
  inset: 44px;
  background:
    radial-gradient(circle at top, rgba(103, 232, 249, 0.22), rgba(8, 14, 24, 0.9));
  border: 1px solid rgba(125, 211, 252, 0.18);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
}

.soul-survivors-touch-button {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background:
    linear-gradient(180deg, rgba(18, 28, 44, 0.92), rgba(8, 12, 21, 0.96));
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0.92;
  touch-action: none;
}

.soul-survivors-touch-button::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-style: solid;
}

.soul-survivors-touch-button.up {
  top: 0;
  left: 49px;
}

.soul-survivors-touch-button.up::after {
  border-width: 0 10px 14px 10px;
  border-color: transparent transparent rgba(165, 243, 252, 0.92) transparent;
}

.soul-survivors-touch-button.down {
  bottom: 0;
  left: 49px;
}

.soul-survivors-touch-button.down::after {
  border-width: 14px 10px 0 10px;
  border-color: rgba(165, 243, 252, 0.92) transparent transparent transparent;
}

.soul-survivors-touch-button.left {
  left: 0;
  top: 49px;
}

.soul-survivors-touch-button.left::after {
  border-width: 10px 14px 10px 0;
  border-color: transparent rgba(165, 243, 252, 0.92) transparent transparent;
}

.soul-survivors-touch-button.right {
  right: 0;
  top: 49px;
}

.soul-survivors-touch-button.right::after {
  border-width: 10px 0 10px 14px;
  border-color: transparent transparent transparent rgba(165, 243, 252, 0.92);
}

.soul-survivors-touch-button:active {
  transform: scale(0.96);
  border-color: rgba(125, 211, 252, 0.32);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.14);
}

.soul-survivors-chest.boss {
  background:
    linear-gradient(180deg, rgba(251, 191, 36, 0.52), rgba(15, 23, 42, 0.94)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.22), transparent 52%);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.24),
    0 0 30px rgba(251, 191, 36, 0.26);
}

.soul-survivors-chest span {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f8fafc;
}

.soul-survivors-telegraph {
  border-radius: 999px;
  border: 2px dashed color-mix(in srgb, var(--telegraph-color, #ef4444) 76%, white 24%);
  background: radial-gradient(circle, color-mix(in srgb, var(--telegraph-color, #ef4444) 20%, transparent), transparent 70%);
  box-shadow: 0 0 24px color-mix(in srgb, var(--telegraph-color, #ef4444) 20%, transparent);
  pointer-events: none;
}

.soul-survivors-telegraph.line {
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--telegraph-color, #8b5cf6) 30%, transparent), transparent);
}

.soul-survivors-projectile {
  border-radius: 999px;
  background: radial-gradient(circle, var(--projectile-color, #67e8f9), rgba(255, 255, 255, 0.08));
  box-shadow:
    0 0 16px var(--projectile-color, #67e8f9),
    0 0 28px color-mix(in srgb, var(--projectile-trail, #67e8f9) 46%, transparent);
  transform: translate(-50%, -50%) rotate(var(--ss-projectile-angle, 0deg));
}

.soul-survivors-projectile.autoArrow,
.soul-survivors-projectile.shadowDagger {
  border-radius: 4px;
  box-shadow:
    0 0 12px var(--projectile-color, #67e8f9),
    0 0 24px color-mix(in srgb, var(--projectile-trail, #67e8f9) 46%, transparent);
}

.soul-survivors-projectile.autoArrow {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), var(--projectile-color, #60a5fa));
}

.soul-survivors-projectile.shadowDagger {
  background: linear-gradient(90deg, rgba(216, 180, 254, 0.96), var(--projectile-color, #8b5cf6));
}

.soul-survivors-projectile.arcaneOrb {
  border-radius: 999px;
  background: radial-gradient(circle, rgba(233, 213, 255, 0.96), var(--projectile-color, #c084fc));
}

.soul-survivors-aoe {
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--aoe-color, #67e8f9) 72%, white 28%);
  background: radial-gradient(circle, color-mix(in srgb, var(--aoe-color, #67e8f9) 22%, transparent), transparent 72%);
  pointer-events: none;
}

.soul-survivors-hazard-zone {
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--hazard-color, #f97316) 78%, white 22%);
  background:
    radial-gradient(circle, color-mix(in srgb, var(--hazard-color, #f97316) 26%, transparent), transparent 68%),
    radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent 74%);
  box-shadow:
    0 0 20px color-mix(in srgb, var(--hazard-color, #f97316) 28%, transparent),
    inset 0 0 24px color-mix(in srgb, var(--hazard-color, #f97316) 16%, transparent);
  pointer-events: none;
}

.soul-survivors-orbital {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--orbital-color, rgba(216, 180, 254, 1)), rgba(124, 58, 237, 0.22));
  box-shadow: 0 0 16px color-mix(in srgb, var(--orbital-color, #c084fc) 48%, transparent);
}

.soul-survivors-floating-text {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(2, 6, 23, 0.8);
  pointer-events: none;
}

.soul-survivors-boss-banner {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  display: grid;
  gap: 6px;
  min-width: 260px;
  padding: 14px 22px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.38);
  background:
    linear-gradient(180deg, rgba(69, 10, 10, 0.92), rgba(17, 24, 39, 0.96)),
    radial-gradient(circle at top, rgba(251, 191, 36, 0.18), transparent 46%);
  box-shadow:
    0 18px 40px rgba(2, 6, 23, 0.46),
    0 0 26px rgba(251, 191, 36, 0.22);
  animation: soulSurvivorsBossBanner 2.6s ease-out;
  pointer-events: none;
}

.soul-survivors-boss-banner strong {
  font-size: 1.06rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.soul-survivors-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(18px) saturate(1.06);
}

.soul-survivors-overlay-card {
  width: min(920px, 100%);
  border-radius: 28px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.97), rgba(9, 14, 28, 0.98)),
    radial-gradient(circle at top, rgba(192, 132, 252, 0.1), transparent 40%);
  box-shadow: 0 28px 64px rgba(2, 6, 23, 0.56);
  padding: 26px;
}

.soul-survivors-levelup-card {
  width: min(1080px, 100%);
  background:
    linear-gradient(180deg, rgba(13, 20, 36, 0.98), rgba(8, 13, 24, 0.99)),
    radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(192, 132, 252, 0.12), transparent 28%);
  box-shadow:
    0 34px 80px rgba(2, 6, 23, 0.62),
    0 0 0 1px rgba(125, 211, 252, 0.08);
}

.soul-survivors-levelup-head,
.soul-survivors-levelup-runread,
.soul-survivors-upgrade-card-head,
.soul-survivors-upgrade-card-foot {
  display: grid;
  gap: 10px;
}

.soul-survivors-levelup-head {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 18px;
}

.soul-survivors-levelup-runread {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(10, 16, 28, 0.9), rgba(7, 12, 21, 0.96));
}

.soul-survivors-upgrade-grid-premium {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.soul-survivors-character-grid,
.soul-survivors-upgrade-grid,
.soul-survivors-summary-grid {
  display: grid;
  gap: 16px;
}

.soul-survivors-character-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 22px 0;
}

.soul-survivors-character-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
  text-align: left;
  transition: transform 180ms ease-out, border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.soul-survivors-character-card:hover,
.soul-survivors-character-card.selected {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(103, 232, 249, 0.34);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.42);
}

.soul-survivors-character-portrait {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: transparent;
}

.soul-survivors-character-portrait.small {
  width: 60px;
  height: 60px;
  border-radius: 16px;
}

.soul-survivors-character-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(2, 6, 23, 0.32));
}

.soul-survivors-character-copy {
  display: grid;
  gap: 6px;
}

.soul-survivors-character-copy span,
.soul-survivors-character-copy p {
  color: rgba(226, 232, 240, 0.76);
}

.soul-survivors-upgrade-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 18px;
}

.soul-survivors-upgrade-card {
  min-height: 170px;
  gap: 12px;
}

.soul-survivors-upgrade-card-head {
  grid-template-columns: auto auto;
  align-items: center;
}

.soul-survivors-upgrade-card-foot {
  margin-top: auto;
}

.soul-survivors-upgrade-card.recommended {
  border-color: rgba(125, 211, 252, 0.28);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(17, 26, 42, 0.96), rgba(9, 14, 28, 0.98));
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, 0.08),
    0 20px 44px rgba(2, 6, 23, 0.3),
    0 0 34px rgba(34, 211, 238, 0.14);
}

.soul-survivors-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 18px 0;
}

.soul-survivors-summary-stat {
  display: grid;
  gap: 6px;
  text-align: center;
}

.soul-survivors-summary-stat.reward {
  padding: 18px 16px;
}

.soul-survivors-summary-stat span {
  color: rgba(226, 232, 240, 0.72);
}

.soul-survivors-summary-abilities {
  margin-bottom: 18px;
}

.soul-survivors-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.soul-survivors-panel {
  padding: 18px;
}

.soul-survivors-ability-list {
  display: grid;
  gap: 12px;
}

.soul-survivors-ability-list.compact {
  gap: 14px;
}

.soul-survivors-ability-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.soul-survivors-ability-row.passive {
  background: rgba(18, 31, 46, 0.58);
}

.soul-survivors-ability-copy {
  display: grid;
  gap: 4px;
}

.soul-survivors-ability-copy span {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.9rem;
}

.soul-survivors-hero-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.library-progress-fill.shield {
  background: linear-gradient(90deg, rgba(147, 197, 253, 0.95), rgba(96, 165, 250, 0.9));
}

@keyframes soulSurvivorsPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(103, 232, 249, 0.18),
      0 0 28px rgba(34, 211, 238, 0.26);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(103, 232, 249, 0.28),
      0 0 36px rgba(34, 211, 238, 0.38);
  }
}

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

@keyframes soulSurvivorsHitFlash {
  0% {
    filter: brightness(1.4) saturate(1.2);
  }
  100% {
    filter: brightness(1) saturate(1);
  }
}

@keyframes soulSurvivorsBossShake {
  0% { transform: translate3d(0, 0, 0); }
  18% { transform: translate3d(-6px, 2px, 0); }
  36% { transform: translate3d(5px, -3px, 0); }
  54% { transform: translate3d(-4px, 2px, 0); }
  72% { transform: translate3d(3px, -2px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes soulSurvivorsBossBanner {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px) scale(0.96);
  }
  14%,
  84% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px) scale(0.98);
  }
}

@media (max-width: 1280px) {
  .soul-survivors-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .soul-survivors-shell {
    padding: 16px;
  }

  .soul-survivors-arena {
    min-height: min(62vh, 520px);
  }

  .soul-survivors-hud,
  .soul-survivors-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .library-shell {
    padding-bottom: 108px;
  }

  .library-hub-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
    height: auto;
    padding: 12px;
    border-radius: 24px;
    border: 1px solid rgba(103, 232, 249, 0.12);
    border-right: 1px solid rgba(103, 232, 249, 0.12);
    background:
      linear-gradient(180deg, rgba(7, 12, 22, 0.96), rgba(6, 10, 18, 0.98));
    box-shadow:
      0 20px 44px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
    z-index: 40;
  }

  .library-hub-nav .panel-summary {
    display: none;
  }

  .library-hub-nav-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(112px, 1fr);
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .library-hub-nav-button {
    min-height: 60px;
    padding: 10px 12px;
  }

  .soul-survivors-touch-controls {
    left: 10px;
    bottom: 10px;
  }

  .soul-survivors-touch-pad {
    width: 134px;
    height: 134px;
  }

  .soul-survivors-touch-button {
    width: 48px;
    height: 48px;
  }

  .soul-survivors-touch-button.up,
  .soul-survivors-touch-button.down {
    left: 43px;
  }

  .soul-survivors-touch-button.left,
  .soul-survivors-touch-button.right {
    top: 43px;
  }

  .soul-survivors-touch-knob {
    inset: 38px;
  }
}

.soul-survivors-screen {
  min-height: 100svh;
}

.soul-survivors-shell {
  min-height: 100svh;
  padding:
    max(10px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.12), transparent 26%),
    radial-gradient(circle at 15% 20%, rgba(249, 115, 22, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(5, 8, 16, 1), rgba(8, 12, 20, 1));
}

.soul-survivors-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-height: calc(100svh - 24px);
}

.soul-survivors-main {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.soul-survivors-side {
  display: none;
}

.soul-survivors-hero {
  display: none;
}

.soul-survivors-hud {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.soul-survivors-arena {
  min-height: clamp(520px, calc(100svh - 220px), 900px);
  aspect-ratio: auto;
  height: clamp(520px, calc(100svh - 220px), 900px);
  border-radius: 32px;
}

.soul-survivors-overlay-card {
  max-height: min(92svh, 920px);
  overflow: auto;
}

.soul-survivors-pause-card {
  max-width: 720px;
}

.soul-survivors-boss-warning {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(251, 113, 133, 0.34);
  background:
    linear-gradient(180deg, rgba(69, 10, 10, 0.88), rgba(17, 24, 39, 0.94)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.14), transparent 44%);
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.42);
  pointer-events: none;
}

.soul-survivors-boss-warning strong {
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.soul-survivors-pause-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background:
    linear-gradient(180deg, rgba(16, 25, 39, 0.96), rgba(8, 12, 22, 0.96));
  color: #f8fafc;
  font-weight: 700;
}

.soul-survivors-touch-pad {
  width: 164px;
  height: 164px;
}

.soul-survivors-touch-pad-ring {
  inset: 0;
}

.soul-survivors-touch-pad-center,
.soul-survivors-touch-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  pointer-events: none;
}

.soul-survivors-touch-pad-center {
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(226, 232, 240, 0.12);
}

.soul-survivors-touch-knob {
  inset: auto;
  width: 68px;
  height: 68px;
  background:
    radial-gradient(circle at top, rgba(103, 232, 249, 0.3), rgba(8, 14, 24, 0.94));
  border: 1px solid rgba(125, 211, 252, 0.2);
  box-shadow:
    0 0 22px rgba(34, 211, 238, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.soul-survivors-ability-dock {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.soul-survivors-skill-button {
  position: relative;
  min-width: 120px;
  min-height: 72px;
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: start;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--skill-accent, #67e8f9) 34%, rgba(255, 255, 255, 0.08));
  background:
    linear-gradient(180deg, rgba(12, 18, 31, 0.94), rgba(8, 12, 22, 0.98)),
    radial-gradient(circle at top, color-mix(in srgb, var(--skill-accent, #67e8f9) 18%, transparent), transparent 46%);
  color: #f8fafc;
  overflow: hidden;
  text-align: left;
  touch-action: manipulation;
}

.soul-survivors-skill-button::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: calc(var(--skill-cooldown, 0) * 100%);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.82));
  pointer-events: none;
}

.soul-survivors-skill-button strong,
.soul-survivors-skill-button small,
.soul-survivors-skill-index {
  position: relative;
  z-index: 1;
}

.soul-survivors-skill-button.ready {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--skill-accent, #67e8f9) 18%, transparent),
    0 0 24px color-mix(in srgb, var(--skill-accent, #67e8f9) 18%, transparent);
}

.soul-survivors-skill-button.cooling {
  opacity: 0.86;
}

.soul-survivors-skill-index {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--skill-accent, #67e8f9) 72%, white 28%);
}

@media (max-width: 900px) {
  .soul-survivors-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .soul-survivors-hud {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .soul-survivors-shell {
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  .soul-survivors-hero-copy p {
    font-size: 0.92rem;
  }

  .soul-survivors-arena {
    min-height: calc(100svh - 240px);
    height: calc(100svh - 240px);
    border-radius: 26px;
  }

  .soul-survivors-touch-pad {
    width: 144px;
    height: 144px;
  }

  .soul-survivors-touch-knob {
    width: 60px;
    height: 60px;
  }

  .soul-survivors-ability-dock {
    right: 10px;
    bottom: 10px;
  }

  .soul-survivors-skill-button {
    min-width: 106px;
    min-height: 66px;
    padding: 12px 14px;
    border-radius: 18px;
  }
}

.mobile-shell-header,
.mobile-shell-copy,
.mobile-home-stack,
.mobile-home-profile-head,
.mobile-home-summary-grid,
.mobile-home-games,
.mobile-section-head,
.mobile-shell-body,
.mobile-settings-grid {
  display: grid;
  gap: 14px;
}

.mobile-shell-layout {
  padding-top: calc(14px + env(safe-area-inset-top));
  gap: 12px;
}

.mobile-shell-header {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 10px 16px 10px;
  margin: -2px 0 0;
  background:
    linear-gradient(180deg, rgba(5, 10, 18, 0.96), rgba(5, 10, 18, 0.82)),
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.08), transparent 42%);
  border-bottom: 1px solid rgba(103, 232, 249, 0.12);
  backdrop-filter: blur(8px);
}

.mobile-shell-header-main,
.mobile-shell-meta-row,
.mobile-home-mini-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-shell-header-side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-shell-header-main {
  justify-content: space-between;
}

.mobile-shell-copy {
  min-width: 0;
  gap: 4px;
}

.mobile-shell-title {
  margin: 0;
  color: #f8fdff;
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  line-height: 1.02;
}

.mobile-shell-subtitle {
  margin: 0;
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.86rem;
  line-height: 1.35;
}

.mobile-shell-profile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.mobile-shell-settings-button {
  min-height: 38px;
  padding-inline: 12px;
}

.mobile-shell-meta-row {
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-shell-body {
  padding: 4px 0 calc(82px + env(safe-area-inset-bottom));
  gap: 12px;
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(8, 16, 28, 0.96), rgba(6, 10, 18, 0.98)),
    radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 52%);
  border-top: 1px solid rgba(103, 232, 249, 0.12);
  box-shadow: 0 -12px 32px rgba(2, 8, 18, 0.28);
  backdrop-filter: blur(12px);
}

.mobile-bottom-nav-button {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  min-height: 54px;
  padding: 6px 4px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.68rem;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.mobile-bottom-nav-button:active {
  transform: scale(0.98);
}

.mobile-bottom-nav-button.active {
  color: #ecfeff;
  border-color: rgba(103, 232, 249, 0.24);
  background: rgba(10, 28, 38, 0.86);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
}

.mobile-bottom-nav-icon .ui-symbol {
  width: 26px;
  height: 26px;
}

.mobile-bottom-nav-badge {
  position: absolute;
  top: 3px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.94);
  color: #1f2937;
  font-size: 0.64rem;
  font-weight: 700;
}

.mobile-home-profile-card {
  align-items: start;
  text-align: left;
}

.mobile-home-player-strip,
.mobile-home-player-main,
.mobile-home-player-metrics,
.mobile-home-continue-card,
.mobile-home-continue-copy,
.mobile-home-continue-head,
.mobile-home-continue-progress,
.mobile-home-continue-meta,
.mobile-home-carousel,
.mobile-home-game-card,
.mobile-home-game-card-copy,
.mobile-home-game-card-head,
.mobile-home-game-progress,
.mobile-home-quick-actions,
.mobile-home-action-row,
.mobile-home-action-button,
.mobile-home-highlights,
.mobile-home-highlight-grid,
.mobile-home-highlight-card {
  display: grid;
  gap: 12px;
}

.launcher-home-hub {
  gap: 14px;
}

.mobile-home-player-strip {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 14px 16px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(10, 18, 31, 0.92), rgba(7, 12, 21, 0.98)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 40%);
}

.mobile-home-player-main {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.mobile-home-player-copy strong {
  display: block;
  color: #f8fdff;
  font-size: 1rem;
}

.mobile-home-player-copy span,
.mobile-home-continue-copy p,
.mobile-home-highlight-card span:last-child,
.mobile-home-game-card-copy span {
  color: rgba(191, 219, 254, 0.78);
}

.mobile-home-player-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mobile-home-player-metrics .tiny-chip {
  min-height: 34px;
  justify-content: flex-start;
  padding-inline: 10px;
}

.mobile-home-continue-card {
  grid-template-columns: minmax(108px, 0.92fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 12px;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 18, 31, 0.96), rgba(7, 12, 21, 0.98));
  box-shadow:
    0 18px 34px rgba(2, 8, 18, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.02);
}

.mobile-home-continue-card.cyan {
  box-shadow:
    0 18px 34px rgba(2, 8, 18, 0.24),
    0 0 0 1px rgba(34, 211, 238, 0.12),
    0 0 24px rgba(34, 211, 238, 0.12);
}

.mobile-home-continue-art,
.mobile-home-game-card-art {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  min-height: 140px;
}

.mobile-home-continue-art .library-poster,
.mobile-home-game-card-art .library-poster {
  min-height: 100%;
  height: 100%;
  border-radius: inherit;
}

.mobile-home-continue-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  color: #f8fdff;
  letter-spacing: 0.14em;
  background: linear-gradient(180deg, rgba(15, 32, 46, 0.96), rgba(7, 12, 21, 0.98));
}

.mobile-home-continue-copy {
  align-content: start;
  gap: 10px;
}

.mobile-home-continue-head {
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.mobile-home-continue-copy h2 {
  margin: 0;
  color: #f8fdff;
  font-size: 1.2rem;
  line-height: 1.05;
}

.mobile-home-continue-copy p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

.mobile-home-game-progress-track {
  position: relative;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
}

.mobile-home-game-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.92), rgba(96, 165, 250, 0.94));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.24);
}

.mobile-home-continue-progress,
.mobile-home-game-progress {
  gap: 8px;
}

.mobile-home-continue-progress span,
.mobile-home-game-progress small,
.mobile-home-continue-meta span {
  font-size: 0.78rem;
  color: rgba(191, 219, 254, 0.72);
}

.mobile-home-continue-meta {
  gap: 6px;
}

.mobile-home-carousel {
  grid-auto-flow: column;
  grid-auto-columns: minmax(228px, 76vw);
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scroll-snap-type: x proximity;
}

.mobile-home-game-card {
  position: relative;
  overflow: hidden;
  min-height: 174px;
  padding: 10px;
  border-radius: 22px;
  scroll-snap-align: start;
  background:
    linear-gradient(180deg, rgba(10, 18, 31, 0.96), rgba(7, 12, 21, 0.98));
  box-shadow:
    0 16px 30px rgba(2, 8, 18, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.02);
}

.mobile-home-game-card.favorite {
  box-shadow:
    0 16px 30px rgba(2, 8, 18, 0.24),
    0 0 0 1px rgba(250, 204, 21, 0.16),
    0 0 22px rgba(250, 204, 21, 0.12);
}

.mobile-home-game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 18, 0.04), rgba(2, 6, 18, 0.55));
  pointer-events: none;
}

.mobile-home-game-card-copy {
  gap: 8px;
}

.mobile-home-game-card-copy strong {
  color: #f8fdff;
  font-size: 1rem;
  line-height: 1.08;
}

.mobile-home-game-card-copy span {
  font-size: 0.82rem;
  line-height: 1.35;
}

.mobile-home-game-card-head {
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.mobile-home-action-row {
  grid-template-columns: repeat(5, minmax(94px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.mobile-home-action-button {
  min-height: 92px;
  align-content: start;
  justify-items: start;
  padding: 12px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(10, 18, 31, 0.94), rgba(7, 12, 21, 0.98));
}

.mobile-home-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-home-action-button strong {
  color: #f8fdff;
  font-size: 0.88rem;
  line-height: 1.15;
}

.mobile-home-highlight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-home-highlight-card {
  align-content: start;
  min-height: 108px;
  padding: 12px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(10, 18, 31, 0.94), rgba(7, 12, 21, 0.98));
}

.mobile-home-highlight-card strong {
  color: #f8fdff;
  font-size: 1.1rem;
}

.mobile-home-highlight-card.cyan {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.12);
}

.mobile-home-highlight-card.violet {
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.14);
}

.mobile-home-highlight-card.gold {
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.14);
}

.mobile-home-highlight-card.green {
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.14);
}

.mobile-quest-overview-panel,
.mobile-quest-overview-card,
.mobile-quest-bonus-strip,
.mobile-quest-tab-row,
.mobile-quest-card-stack,
.mobile-quest-card,
.mobile-quest-card-head,
.mobile-quest-card-title,
.mobile-quest-badges,
.mobile-quest-progress-list,
.mobile-quest-progress-row,
.mobile-quest-progress-copy,
.mobile-quest-actions,
.mobile-quest-reward-row,
.mobile-quest-claim-popup,
.mobile-quest-claim-popup-copy {
  display: grid;
  gap: 10px;
}

.mobile-quest-hub {
  display: grid;
  gap: 12px;
}

.mobile-quest-overview-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-quest-overview-card {
  align-content: start;
  min-height: 102px;
  padding: 12px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(16, 13, 31, 0.94), rgba(8, 10, 21, 0.98));
}

.mobile-quest-overview-card strong,
.mobile-quest-card h3,
.mobile-quest-card-head strong,
.mobile-quest-tab strong {
  color: #f8fdff;
}

.mobile-quest-overview-card strong {
  font-size: 1.15rem;
}

.mobile-quest-overview-card span:last-child,
.mobile-quest-copy,
.mobile-quest-progress-copy span,
.mobile-quest-claim-popup-copy span {
  color: rgba(191, 219, 254, 0.76);
}

.mobile-quest-bonus-strip {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.mobile-quest-tab-row {
  grid-auto-flow: column;
  grid-auto-columns: minmax(88px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.mobile-quest-tab {
  display: grid;
  gap: 4px;
  justify-items: start;
  min-height: 70px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(10, 18, 31, 0.84);
  color: rgba(226, 232, 240, 0.86);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.mobile-quest-tab.active {
  border-color: rgba(192, 132, 252, 0.28);
  background:
    linear-gradient(180deg, rgba(42, 19, 70, 0.92), rgba(13, 16, 30, 0.98));
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.14);
}

.mobile-quest-card-stack {
  gap: 10px;
}

.mobile-quest-card {
  position: relative;
  overflow: hidden;
  padding: 12px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(12, 18, 31, 0.96), rgba(7, 12, 21, 0.98));
  box-shadow:
    0 16px 30px rgba(2, 8, 18, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.mobile-quest-card.claimable {
  animation: glowPulse 2.8s ease-in-out infinite;
}

.mobile-quest-card.claimed {
  opacity: 0.76;
}

.mobile-quest-card.rarity-common {
  box-shadow:
    0 16px 30px rgba(2, 8, 18, 0.2),
    inset 0 0 0 1px rgba(103, 232, 249, 0.12);
}

.mobile-quest-card.rarity-rare {
  box-shadow:
    0 16px 30px rgba(2, 8, 18, 0.22),
    inset 0 0 0 1px rgba(96, 165, 250, 0.16);
}

.mobile-quest-card.rarity-epic {
  box-shadow:
    0 16px 30px rgba(2, 8, 18, 0.24),
    inset 0 0 0 1px rgba(168, 85, 247, 0.18);
}

.mobile-quest-card.rarity-legendary {
  box-shadow:
    0 16px 30px rgba(2, 8, 18, 0.24),
    inset 0 0 0 1px rgba(250, 204, 21, 0.2);
}

.mobile-quest-card.secret::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(168, 85, 247, 0.08) 48%, transparent 76%);
  pointer-events: none;
}

.mobile-quest-card-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.mobile-quest-card-title {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.mobile-quest-faction-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-quest-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mobile-quest-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.12;
}

.mobile-quest-copy {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.38;
}

.mobile-quest-progress-list {
  gap: 8px;
}

.mobile-quest-progress-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.mobile-quest-progress-copy {
  gap: 6px;
}

.mobile-quest-progress-track {
  position: relative;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
}

.mobile-quest-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.92), rgba(96, 165, 250, 0.94));
  animation: fadeIn 260ms ease-out;
}

.mobile-quest-progress-row.complete .mobile-quest-progress-fill {
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.92), rgba(34, 197, 94, 0.94));
}

.mobile-quest-reward-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.mobile-quest-reward-row strong {
  color: #f8fdff;
  font-size: 0.9rem;
}

.mobile-quest-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.mobile-quest-claim-popup {
  position: sticky;
  bottom: calc(74px + env(safe-area-inset-bottom));
  z-index: 4;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(250, 204, 21, 0.16);
  background:
    linear-gradient(180deg, rgba(32, 24, 10, 0.96), rgba(18, 14, 7, 0.98));
  box-shadow:
    0 18px 34px rgba(2, 8, 18, 0.24),
    0 0 24px rgba(250, 204, 21, 0.14);
  animation: modalOpen 220ms ease-out;
}

.mobile-quest-claim-popup-copy strong {
  color: #f8fdff;
}

.mobile-page-hero,
.mobile-page-hero-copy,
.mobile-page-hero-chips,
.mobile-page-hero-actions,
.mobile-settings-stack,
.mobile-settings-sheet,
.mobile-settings-sheet-head {
  display: grid;
  gap: 12px;
}

.mobile-page-hero {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(10, 18, 31, 0.94), rgba(8, 12, 22, 0.98)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 42%);
  box-shadow:
    0 18px 38px rgba(2, 8, 18, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mobile-page-hero.theme-home {
  background:
    radial-gradient(circle at 14% 12%, rgba(59, 130, 246, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(9, 19, 36, 0.96), rgba(6, 10, 20, 0.98));
}

.mobile-page-hero.theme-games {
  background:
    radial-gradient(circle at 84% 18%, rgba(125, 211, 252, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(8, 20, 31, 0.96), rgba(5, 10, 18, 0.98));
}

.mobile-page-hero.theme-quests {
  background:
    radial-gradient(circle at 18% 14%, rgba(192, 132, 252, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(18, 14, 34, 0.96), rgba(8, 10, 20, 0.98));
}

.mobile-page-hero.theme-skill-tree {
  background:
    radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.14), transparent 32%),
    radial-gradient(circle at 16% 86%, rgba(251, 191, 36, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(11, 17, 34, 0.96), rgba(6, 10, 20, 0.98));
}

.mobile-page-hero.theme-profile {
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.14), transparent 38%),
    radial-gradient(circle at 86% 82%, rgba(168, 85, 247, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(10, 16, 28, 0.96), rgba(5, 10, 18, 0.98));
}

.mobile-page-hero-glow {
  position: absolute;
  inset: -18% auto auto 58%;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.24), transparent 68%);
  filter: blur(4px);
  pointer-events: none;
}

.mobile-page-hero-copy {
  position: relative;
  z-index: 1;
}

.mobile-page-hero-title {
  margin: 0;
  color: #f8fdff;
  font-size: clamp(1.55rem, 6vw, 2rem);
  line-height: 1.02;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mobile-page-hero-subtitle {
  margin: 0;
  color: rgba(203, 213, 225, 0.8);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 34ch;
}

.mobile-page-hero-chips {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mobile-page-hero-chips .tiny-chip {
  min-height: 38px;
  justify-content: flex-start;
  padding-inline: 10px;
}

.mobile-page-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-items: end;
  padding: 0;
  background: rgba(2, 6, 18, 0.5);
  backdrop-filter: blur(10px);
  animation: modalOpen 220ms ease-out;
}

.mobile-settings-sheet {
  max-height: min(88vh, 860px);
  overflow: auto;
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(8, 14, 24, 0.98), rgba(5, 9, 18, 0.99));
  box-shadow:
    0 -22px 60px rgba(2, 8, 18, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mobile-sheet-handle {
  width: 56px;
  height: 5px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
}

.mobile-settings-sheet-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.mobile-settings-stack {
  grid-template-columns: 1fr;
}

.mobile-home-profile-head {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.mobile-home-profile-head strong,
.mobile-section-head strong {
  color: #f8fdff;
}

.mobile-home-profile-head span,
.mobile-home-summary-card span:last-child {
  color: rgba(191, 219, 254, 0.78);
}

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

.mobile-home-summary-card {
  display: grid;
  gap: 8px;
  align-content: start;
}

.mobile-home-games-grid,
.mobile-library-grid,
.mobile-workspace-grid {
  display: grid;
  gap: 12px;
}

.mobile-inline-filter-panel {
  padding: 12px;
}

.mobile-game-screen-header,
.mobile-game-screen-copy,
.mobile-game-screen-topbar,
.mobile-game-screen-stats {
  display: grid;
  gap: 10px;
}

.mobile-game-screen-title {
  margin: 0;
  color: #f8fdff;
  font-size: clamp(1.35rem, 5.5vw, 1.8rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-settings-grid {
  grid-template-columns: 1fr;
}

.mobile-shell-active .library-hub-nav,
.mobile-shell-active .library-topbar {
  display: none;
}

.mobile-shell-active .library-card .hover-reveal,
.mobile-shell-active .landscape-card-toolbar,
.mobile-shell-active .library-card-context-menu {
  opacity: 1;
}

.mobile-shell-active .library-card-context-trigger {
  opacity: 1;
  transform: none;
}

.mobile-shell-active .library-card-actions .action-button,
.mobile-shell-active .library-workspace-card-actions .action-button,
.mobile-shell-active .profile-screen-tab,
.mobile-shell-active .bestiary-tab-button,
.mobile-shell-active .soul-paths-choice,
.mobile-shell-active .library-card-context-item {
  min-height: 44px;
}

.mobile-shell-active .profile-screen-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-shell-active .skill-tree-mobile-body .skill-tree-stage {
  overflow: auto;
  height: auto;
}

.mobile-shell-active .skill-tree-mobile-body .skill-tree-canvas {
  transform: scale(var(--mobile-skill-tree-zoom, 1));
  transform-origin: top left;
  width: calc(100% / var(--mobile-skill-tree-zoom, 1));
  min-height: calc(780px / var(--mobile-skill-tree-zoom, 1));
}

.mobile-shell-active .skill-tree-detail-card {
  position: sticky;
  right: auto;
  bottom: 0;
  margin-top: 14px;
  border-radius: 20px;
  box-shadow: 0 -10px 30px rgba(2, 8, 18, 0.36);
}

.mobile-shell-active .library-edit-modal-backdrop,
.mobile-shell-active .codex-modal-backdrop {
  padding: 0;
}

.mobile-shell-active .library-edit-modal,
.mobile-shell-active .library-new-game-modal,
.mobile-shell-active .library-reset-modal,
.mobile-shell-active .profile-modal,
.mobile-shell-active .codex-modal {
  width: 100vw;
  max-width: none;
  max-height: none;
  min-height: 100dvh;
  height: 100dvh;
  border-radius: 0;
  padding:
    calc(18px + env(safe-area-inset-top))
    16px
    calc(22px + env(safe-area-inset-bottom));
}

.mobile-shell-active .codex-modal-shell {
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
}

.mobile-shell-active .codex-nav-arrow,
.mobile-shell-active [data-action="toggle-bestiary-book-mode"] {
  display: none;
}

.mobile-shell-active .bestiary-layout.archive-layout {
  grid-template-columns: 1fr;
}

.mobile-shell-active .bestiary-detail-panel {
  display: none;
}

.mobile-shell-active .bestiary-tab-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-shell-active .merge-tactics-layout {
  grid-template-columns: 1fr;
}

.mobile-shell-active .merge-tactics-side {
  padding-top: 0;
  gap: 10px;
}

.mobile-shell-active .merge-tactics-grid {
  gap: 8px;
}

.mobile-shell-active .merge-tactics-cell {
  min-height: 100px;
  padding: 10px 10px 8px;
}

.mobile-shell-active .soul-paths-choice-grid {
  grid-template-columns: 1fr;
}

.mobile-shell-active .soul-paths-choice {
  min-height: 132px;
}

.mobile-shell-active .soul-paths-dialogue-copy p {
  font-size: 1rem;
  line-height: 1.7;
}

.mobile-shell-active .arena-main {
  grid-template-columns: 1fr;
}

.mobile-shell-active .shop-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 42;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 env(safe-area-inset-bottom);
}

.mobile-shell-active .shop-dock-inner {
  border-radius: 24px 24px 0 0;
  max-height: 44vh;
  overflow: auto;
}

.mobile-shell-active .bench-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 1fr);
  overflow-x: auto;
}

@media (max-width: 767px) {
  :root {
    --mobile-page-padding: 16px;
    --mobile-card-padding: 14px;
    --mobile-gap: 12px;
  }

  .menu-title {
    font-size: clamp(1.85rem, 8vw, 2.25rem);
    line-height: 0.98;
    letter-spacing: 0.05em;
  }

  .menu-title.small,
  .section-title {
    font-size: clamp(1.35rem, 5vw, 1.65rem);
    line-height: 1.05;
  }

  .section-title.small-title,
  .mobile-home-profile-head strong,
  .mobile-section-head strong,
  .library-quest-card h3,
  .profile-screen-header h1 {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .menu-copy,
  .section-copy,
  .menu-subtitle,
  .field-input,
  .lore-quest-objective-copy span,
  .mobile-shell-subtitle {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .action-button,
  .field-label,
  .tiny-chip,
  .spotlight-tag {
    font-size: 0.84rem;
  }

  .library-shell,
  .menu-home,
  .menu-panel.library-shell {
    padding-left: var(--mobile-page-padding);
    padding-right: var(--mobile-page-padding);
  }

  .mobile-home-summary-grid,
  .profile-screen-tabs,
  .bestiary-tab-stack {
    grid-template-columns: 1fr;
  }

  .mobile-shell-layout,
  .mobile-shell-active .library-shell {
    width: 100%;
    gap: var(--mobile-gap);
  }

  .mobile-shell-active .library-shell {
    min-height: 100vh;
    padding-top: calc(8px + env(safe-area-inset-top));
    padding-bottom: 0;
  }

  .mobile-shell-active .field-card,
  .mobile-shell-active .library-side-panel,
  .mobile-shell-active .library-workspace-card,
  .mobile-shell-active .mobile-home-profile-card,
  .mobile-shell-active .mobile-home-summary-card,
  .mobile-shell-active .library-daily-quests-screen {
    padding: var(--mobile-card-padding);
    border-radius: 20px;
  }

  .mobile-shell-active .library-grid,
  .mobile-home-games-grid,
  .mobile-library-grid,
  .mobile-workspace-grid {
    grid-template-columns: 1fr;
  }

  .mobile-shell-active .library-launcher-layout,
  .mobile-shell-active .library-home-main,
  .mobile-shell-active .library-profile-rail {
    width: 100%;
  }

  .mobile-shell-active .mobile-home-stack,
  .mobile-shell-active .mobile-home-games,
  .mobile-shell-active .mobile-section-head,
  .mobile-shell-active .mobile-home-summary-grid,
  .mobile-shell-active .library-quest-top-row,
  .mobile-shell-active .profile-screen-body,
  .mobile-shell-active .profile-screen-header {
    gap: var(--mobile-gap);
  }

  .mobile-shell-active .profile-screen-header {
    padding: 16px;
  }

  .mobile-shell-active .profile-screen-header-main {
    align-items: flex-start;
  }

  .mobile-shell-active .profile-identity-avatar-stage {
    min-width: 78px;
  }

  .mobile-shell-active .profile-reward-track {
    grid-auto-columns: minmax(172px, 1fr);
    gap: 12px;
  }

  .mobile-shell-active .profile-track-card,
  .mobile-shell-active .profile-achievement-card,
  .mobile-shell-active .profile-collection-card,
  .mobile-shell-active .profile-identity-stat-card {
    min-height: 0;
    padding: 14px;
  }

  .mobile-shell-active .profile-stat-showcase,
  .mobile-shell-active .profile-collection-grid,
  .mobile-shell-active .profile-achievement-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .mobile-shell-active .profile-overview-grid-screen {
    grid-template-columns: 1fr;
  }

  .mobile-shell-active .profile-screen-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(122px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .mobile-shell-active .profile-achievement-copy span,
  .mobile-shell-active .profile-collection-copy span,
  .mobile-shell-active .profile-track-copy span {
    font-size: 0.8rem;
  }

  .mobile-shell-active .launcher-game-grid {
    gap: 12px;
  }

  .mobile-shell-active .launcher-grid-card.landscape-card,
  .mobile-shell-active .launcher-grid-card-visual.landscape-card-visual,
  .mobile-shell-active .landscape-card .library-poster {
    min-height: 162px;
    border-radius: 22px;
  }

  .mobile-shell-active .mobile-game-card .landscape-card-overlay {
    padding: 12px;
  }

  .mobile-shell-active .mobile-game-card .landscape-card-copy {
    inset: auto 12px 12px 12px;
    gap: 8px;
  }

  .mobile-shell-active .mobile-game-card .landscape-card-copy-main {
    gap: 6px;
    width: 100%;
  }

  .mobile-shell-active .mobile-game-card .menu-title.small {
    font-size: 1.08rem;
    line-height: 1.05;
  }

  .mobile-shell-active .mobile-game-card .library-card-actions {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .mobile-shell-active .mobile-game-card .library-detail-button,
  .mobile-shell-active .mobile-game-card .library-play-button {
    flex: 1 1 0;
    min-height: 42px;
    padding: 10px 12px;
  }

  .mobile-shell-active .mobile-home-summary-card {
    gap: 6px;
  }

  .mobile-shell-active .mobile-home-profile-card,
  .mobile-shell-active .mobile-home-summary-card,
  .mobile-shell-active .mobile-inline-filter-panel {
    box-shadow: 0 12px 28px rgba(2, 8, 18, 0.2);
  }

  .mobile-home-player-strip,
  .mobile-home-continue-card,
  .mobile-home-highlight-card,
  .mobile-home-action-button {
    padding: 12px;
  }

  .mobile-quest-overview-panel {
    gap: 8px;
  }

  .mobile-quest-overview-card,
  .mobile-quest-card {
    padding: 12px;
  }

  .mobile-quest-tab {
    min-height: 64px;
    padding: 10px;
  }

  .mobile-quest-actions {
    grid-template-columns: 1fr;
  }

  .mobile-home-player-metrics {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .mobile-home-continue-card {
    grid-template-columns: minmax(96px, 0.86fr) minmax(0, 1.24fr);
    gap: 10px;
  }

  .mobile-home-continue-art,
  .mobile-home-game-card-art {
    min-height: 128px;
  }

  .mobile-home-continue-copy h2 {
    font-size: 1.08rem;
  }

  .mobile-home-carousel {
    grid-auto-columns: minmax(216px, 74vw);
  }

  .mobile-home-game-card {
    min-height: 168px;
  }

  .mobile-home-action-row {
    grid-template-columns: repeat(5, minmax(86px, 1fr));
  }

  .mobile-home-highlight-grid {
    gap: 8px;
  }

  .mobile-page-hero {
    padding: 16px;
    border-radius: 22px;
  }

  .mobile-page-hero-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-page-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-settings-sheet {
    padding-inline: 16px;
  }

  .mobile-shell-active .library-edit-modal-grid,
  .mobile-shell-active .library-edit-form-row,
  .mobile-shell-active .library-toggle-row {
    grid-template-columns: 1fr;
  }

  .mobile-shell-active .merge-tactics-board-status,
  .mobile-shell-active .merge-tactics-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .mobile-game-screen-shell {
    padding: 0;
    gap: 12px;
  }

  .mobile-game-screen-header {
    padding: calc(8px + env(safe-area-inset-top)) var(--mobile-page-padding) 0;
  }

  .mobile-game-screen-topbar {
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-game-screen-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-game-screen-stats .tiny-chip {
    min-height: 34px;
    justify-content: flex-start;
    padding-inline: 10px;
  }

  .mobile-shell-active .merge-tactics-screen {
    padding: 0;
  }

  .mobile-shell-active .merge-tactics-shell {
    min-height: 100vh;
    padding: 0 0 calc(20px + env(safe-area-inset-bottom));
    gap: 12px;
  }

  .mobile-shell-active .merge-tactics-layout {
    min-height: 0;
    gap: 12px;
  }

  .mobile-shell-active .merge-tactics-main {
    gap: 12px;
    padding: 0 16px 16px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
  }

  .mobile-shell-active .mobile-merge-mode-row .menu-copy {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
  }

  .mobile-shell-active .mobile-merge-mode-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .mobile-shell-active .merge-tactics-hero {
    gap: 10px;
  }

  .mobile-shell-active .merge-tactics-hero-copy p {
    display: none;
  }

  .mobile-shell-active .merge-tactics-board-shell {
    gap: 12px;
    padding: 14px;
    border-radius: 24px;
    margin-top: 0;
  }

  .mobile-shell-active .merge-tactics-board-status strong {
    font-size: 0.98rem;
  }

  .mobile-shell-active .merge-tactics-preview,
  .mobile-shell-active .merge-tactics-message,
  .mobile-shell-active .merge-tactics-panel {
    padding: 14px;
    border-radius: 18px;
  }

  .mobile-shell-active .merge-tactics-footer,
  .mobile-shell-active .merge-tactics-side {
    gap: 10px;
  }

  .mobile-shell-active .daily-quest-panel,
  .mobile-shell-active .library-quest-panel {
    padding: 14px;
    gap: 12px;
  }

  .mobile-shell-active .mobile-quest-board {
    background:
      radial-gradient(circle at top right, rgba(192, 132, 252, 0.12), transparent 34%),
      linear-gradient(180deg, rgba(18, 14, 34, 0.96), rgba(10, 12, 22, 0.98));
  }

  .mobile-shell-active .library-quest-card {
    padding: 12px;
    gap: 10px;
  }

  .mobile-shell-active .library-quest-badge-row,
  .mobile-shell-active .library-quest-streak-row,
  .mobile-shell-active .library-quest-summary-chips {
    gap: 6px;
  }

  .mobile-shell-active .lore-quest-list.daily-quest-list,
  .mobile-shell-active .lore-quest-list.compact {
    gap: 10px;
  }

  .mobile-shell-active .lore-quest-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mobile-shell-active .profile-screen-header {
    padding: 14px;
  }

  .mobile-shell-active .profile-mobile-shell {
    gap: 12px;
  }

  .mobile-shell-active .profile-reward-row {
    padding: 12px;
  }

  .mobile-shell-active .arena-screen {
    padding: 0 0 calc(18px + env(safe-area-inset-bottom));
  }

  .mobile-shell-active .arena-main {
    gap: 10px;
  }

  .mobile-shell-active .arena-panel {
    width: 100%;
    border-radius: 18px;
  }

  .mobile-shell-active .arena-bottom-rail,
  .mobile-shell-active .sidebar-rail {
    gap: 10px;
  }

  .mobile-shell-active .soul-paths-event-card {
    min-height: 0;
  }

  .mobile-shell-active .soul-paths-choice-backdrop {
    padding: 12px 0 0;
  }

  .mobile-shell-active .skill-tree-mobile-body {
    gap: 12px;
  }

  .mobile-shell-active .soul-paths-choice-panel {
    padding: 14px;
    border-radius: 20px;
  }

  .mobile-shell-active .soul-paths-choice {
    padding: 14px;
  }

  .mobile-shell-active .soul-paths-dialogue-copy p {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .mobile-shell-active .shop-dock-inner {
    border-radius: 20px 20px 0 0;
    max-height: 40vh;
  }

  .mobile-shell-active .bench-grid {
    gap: 8px;
    padding-bottom: 6px;
  }

  .mobile-shell-active .library-card-actions,
  .mobile-shell-active .library-workspace-card-actions,
  .mobile-shell-active .library-settings-link-row,
  .mobile-shell-active .soul-paths-dialogue-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mobile-shell-active .mobile-game-card .library-card-actions {
    display: flex;
    grid-template-columns: initial;
  }
}

.soul-survivors-world-event-banner,
.soul-paths-world-event-banner {
  position: absolute;
  top: 1rem;
  left: 50%;
  z-index: 12;
  transform: translateX(-50%);
  min-width: min(30rem, calc(100% - 2rem));
  padding: 0.95rem 1.15rem;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(10, 14, 28, 0.92), rgba(18, 25, 42, 0.82));
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.35);
  text-align: center;
  animation: modalOpen 220ms ease-out;
}

.soul-survivors-world-event-banner.rarity-common,
.soul-paths-world-event-banner.rarity-common {
  border-color: rgba(103, 232, 249, 0.45);
  box-shadow: 0 18px 34px rgba(34, 211, 238, 0.16);
}

.soul-survivors-world-event-banner.rarity-rare,
.soul-paths-world-event-banner.rarity-rare {
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 18px 34px rgba(59, 130, 246, 0.18);
}

.soul-survivors-world-event-banner.rarity-epic,
.soul-paths-world-event-banner.rarity-epic {
  border-color: rgba(192, 132, 252, 0.48);
  box-shadow: 0 18px 34px rgba(168, 85, 247, 0.2);
}

.soul-survivors-world-event-banner.rarity-legendary,
.soul-paths-world-event-banner.rarity-legendary {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.22);
}

.soul-survivors-world-event-banner p,
.soul-paths-world-event-banner p {
  margin: 0.35rem 0 0;
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.88rem;
}

.soul-survivors-world-event-banner.theme-blood {
  background:
    linear-gradient(180deg, rgba(26, 10, 14, 0.94), rgba(54, 18, 24, 0.84)),
    radial-gradient(circle at top, rgba(239, 68, 68, 0.18), transparent 54%);
}

.soul-survivors-world-event-banner.theme-arcane {
  background:
    linear-gradient(180deg, rgba(10, 16, 30, 0.94), rgba(12, 30, 44, 0.84)),
    radial-gradient(circle at top, rgba(34, 211, 238, 0.16), transparent 52%);
}

.soul-survivors-world-event-banner.theme-ember {
  background:
    linear-gradient(180deg, rgba(32, 14, 10, 0.95), rgba(58, 24, 10, 0.84)),
    radial-gradient(circle at top, rgba(251, 146, 60, 0.2), transparent 54%);
}

.soul-survivors-world-event-banner.theme-verdant {
  background:
    linear-gradient(180deg, rgba(8, 20, 18, 0.94), rgba(16, 36, 24, 0.84)),
    radial-gradient(circle at top, rgba(74, 222, 128, 0.16), transparent 54%);
}

.soul-survivors-world-event-banner.theme-shadow {
  background:
    linear-gradient(180deg, rgba(12, 10, 24, 0.95), rgba(26, 12, 40, 0.84)),
    radial-gradient(circle at top, rgba(168, 85, 247, 0.18), transparent 54%);
}

.soul-survivors-world-event-banner.theme-rift {
  background:
    linear-gradient(180deg, rgba(14, 8, 28, 0.95), rgba(32, 14, 46, 0.84)),
    radial-gradient(circle at top, rgba(192, 132, 252, 0.18), transparent 54%);
}

.soul-survivors-world-event-banner.theme-harvest {
  background:
    linear-gradient(180deg, rgba(24, 14, 12, 0.95), rgba(36, 18, 38, 0.84)),
    radial-gradient(circle at top, rgba(251, 191, 36, 0.18), rgba(192, 132, 252, 0.12) 38%, transparent 60%);
}

.soul-survivors-world-event-banner.theme-frozen {
  background:
    linear-gradient(180deg, rgba(10, 18, 34, 0.95), rgba(14, 34, 58, 0.84)),
    radial-gradient(circle at top, rgba(125, 211, 252, 0.18), transparent 54%);
}

.soul-survivors-world-event-banner.theme-cursed {
  background:
    linear-gradient(180deg, rgba(16, 14, 26, 0.95), rgba(26, 20, 34, 0.84)),
    radial-gradient(circle at top, rgba(148, 163, 184, 0.14), rgba(99, 102, 241, 0.08) 40%, transparent 60%);
}

.soul-survivors-world-event-banner.theme-celestial {
  background:
    linear-gradient(180deg, rgba(14, 16, 30, 0.95), rgba(20, 22, 44, 0.84)),
    radial-gradient(circle at top, rgba(251, 191, 36, 0.18), rgba(147, 197, 253, 0.12) 38%, transparent 60%);
}

.soul-paths-world-event-atmosphere {
  display: block;
  margin-top: 0.55rem;
  color: rgba(191, 219, 254, 0.82);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.soul-paths-world-event-atmosphere.inline {
  color: rgba(224, 231, 255, 0.76);
}

.soul-paths-world-event-banner.theme-whispers,
.soul-paths-event-card.theme-whispers {
  background:
    linear-gradient(180deg, rgba(8, 12, 24, 0.94), rgba(16, 20, 38, 0.84)),
    radial-gradient(circle at top, rgba(148, 163, 184, 0.12), transparent 52%);
}

.soul-paths-world-event-banner.theme-memories,
.soul-paths-event-card.theme-memories {
  background:
    linear-gradient(180deg, rgba(12, 16, 30, 0.94), rgba(24, 25, 44, 0.84)),
    radial-gradient(circle at top, rgba(148, 163, 184, 0.16), transparent 50%);
}

.soul-paths-world-event-banner.theme-shadow-eclipse,
.soul-paths-event-card.theme-shadow-eclipse {
  background:
    linear-gradient(180deg, rgba(14, 10, 28, 0.95), rgba(20, 12, 36, 0.86)),
    radial-gradient(circle at top, rgba(168, 85, 247, 0.18), transparent 48%);
}

.soul-paths-world-event-banner.theme-verdant-dream,
.soul-paths-event-card.theme-verdant-dream {
  background:
    linear-gradient(180deg, rgba(8, 18, 20, 0.95), rgba(12, 28, 22, 0.85)),
    radial-gradient(circle at top, rgba(74, 222, 128, 0.16), transparent 48%);
}

.soul-paths-world-event-banner.theme-traveler,
.soul-paths-event-card.theme-traveler {
  background:
    linear-gradient(180deg, rgba(16, 15, 24, 0.95), rgba(24, 22, 34, 0.85)),
    radial-gradient(circle at top, rgba(251, 191, 36, 0.14), transparent 46%);
}

.soul-paths-world-event-banner.theme-fracture,
.soul-paths-event-card.theme-fracture {
  background:
    linear-gradient(180deg, rgba(14, 12, 32, 0.96), rgba(24, 16, 42, 0.88)),
    radial-gradient(circle at top, rgba(96, 165, 250, 0.12), rgba(192, 132, 252, 0.16) 34%, transparent 56%);
}

.soul-paths-world-event-banner.theme-sanctuary,
.soul-paths-event-card.theme-sanctuary {
  background:
    linear-gradient(180deg, rgba(12, 18, 24, 0.95), rgba(20, 28, 30, 0.85)),
    radial-gradient(circle at top, rgba(134, 239, 172, 0.16), transparent 48%);
}

.soul-paths-world-event-banner.theme-blood-path,
.soul-paths-event-card.theme-blood-path {
  background:
    linear-gradient(180deg, rgba(28, 12, 18, 0.96), rgba(36, 16, 20, 0.86)),
    radial-gradient(circle at top, rgba(248, 113, 113, 0.16), transparent 46%);
}

.arena-screen.soul-paths.decision-focus {
  min-height: 100svh;
  padding: 0;
}

.arena-screen.soul-paths.decision-focus::before {
  inset: 0;
  opacity: 0.6;
  background:
    radial-gradient(circle at 50% 18%, rgba(148, 163, 184, 0.14), transparent 28%),
    radial-gradient(circle at 22% 22%, rgba(99, 102, 241, 0.12), transparent 30%),
    radial-gradient(circle at 80% 24%, rgba(244, 114, 182, 0.08), transparent 26%);
}

.arena-screen.soul-paths.decision-focus .arena-run-shell,
.arena-screen.soul-paths.decision-focus .arena-main,
.arena-screen.soul-paths.decision-focus .arena-stage-column,
.arena-screen.soul-paths.decision-focus .battle-stage-panel {
  min-height: 100svh;
}

.arena-screen.soul-paths.decision-focus .arena-hud-stack,
.arena-screen.soul-paths.decision-focus .arena-spotlight-layer,
.arena-screen.soul-paths.decision-focus .arena-bottom-rail,
.arena-screen.soul-paths.decision-focus .arena-sidebar-overlay {
  display: none;
}

.arena-screen.soul-paths.decision-focus .battle-stage-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.arena-screen.soul-paths.decision-focus .arena-stage-backglow {
  inset: -10%;
  opacity: 0.8;
  filter: blur(48px);
  background:
    radial-gradient(circle at 20% 24%, rgba(99, 102, 241, 0.22), transparent 28%),
    radial-gradient(circle at 78% 16%, rgba(251, 191, 36, 0.12), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(15, 23, 42, 0.56), transparent 50%);
}

.arena-screen.soul-paths.decision-focus .arena-stage-rings,
.arena-screen.soul-paths.decision-focus .arena-stage-gradient {
  opacity: 0.24;
}

.arena-screen.soul-paths.decision-focus .arena-battlefield {
  min-height: 100svh;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(30, 41, 59, 0.32), transparent 34%),
    linear-gradient(180deg, rgba(6, 10, 18, 0.92), rgba(5, 8, 14, 0.98));
  box-shadow: none;
}

.arena-screen.soul-paths.decision-focus .arena-backdrop-image,
.arena-screen.soul-paths.decision-focus .arena-duel-grid {
  opacity: 0.16;
  filter: saturate(0.55) blur(1px);
  transform: scale(1.03);
}

.arena-screen.soul-paths.decision-focus .arena-board-block,
.arena-screen.soul-paths.decision-focus .arena-board-grid,
.arena-screen.soul-paths.decision-focus .board-zone-head {
  pointer-events: none;
}

.soul-paths-choice-backdrop {
  place-items: stretch;
  padding: clamp(16px, 2vw, 26px);
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.05), transparent 18%),
    linear-gradient(180deg, rgba(4, 7, 14, 0.3), rgba(3, 6, 12, 0.72) 34%, rgba(3, 6, 12, 0.94));
}

.soul-paths-choice-panel {
  width: min(1180px, calc(100vw - 32px));
  min-height: calc(100svh - 32px);
  gap: clamp(20px, 2vw, 28px);
  padding: clamp(20px, 2vw, 30px);
  border-radius: 38px;
  border-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(8, 12, 20, 0.9), rgba(5, 9, 16, 0.96)),
    radial-gradient(circle at top, rgba(148, 163, 184, 0.08), transparent 38%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(18px);
}

.soul-paths-lore-prompt-panel,
.soul-paths-dialogue-panel {
  width: min(1100px, calc(100vw - 32px));
}

.soul-paths-story-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(18px, 2vw, 28px);
  align-items: stretch;
  min-height: clamp(300px, 42vh, 430px);
}

.soul-paths-story-art {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(14, 18, 30, 0.94), rgba(10, 12, 22, 0.98)),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.08), transparent 30%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 48px rgba(2, 6, 23, 0.34);
}

.soul-paths-story-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 22%, rgba(0, 0, 0, 0.18) 76%),
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.06), transparent 24%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 14px);
  opacity: 0.86;
  pointer-events: none;
}

.soul-paths-story-art::after {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 22px;
  opacity: 0.85;
  pointer-events: none;
}

.soul-paths-story-art-frame {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 22px;
  text-align: center;
}

.soul-paths-story-sigil {
  position: relative;
  z-index: 1;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(4.5rem, 9vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0.08em;
  color: rgba(248, 250, 252, 0.92);
  text-shadow:
    0 10px 30px rgba(15, 23, 42, 0.54),
    0 0 24px rgba(255, 255, 255, 0.08);
}

.soul-paths-story-atmosphere {
  position: relative;
  z-index: 1;
  max-width: 24ch;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.soul-paths-story-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(18px, 2vw, 30px);
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background:
    linear-gradient(180deg, rgba(9, 12, 20, 0.82), rgba(8, 10, 18, 0.92)),
    radial-gradient(circle at top right, rgba(248, 250, 252, 0.04), transparent 28%);
}

.soul-paths-story-kicker {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.soul-paths-story-text {
  display: grid;
  gap: 14px;
}

.soul-paths-story-text h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.5rem, 4vw, 4.2rem);
  line-height: 0.94;
  letter-spacing: 0.02em;
  color: #f8fafc;
}

.soul-paths-story-text p {
  margin: 0;
  max-width: 40rem;
  font-size: clamp(1rem, 1.25vw, 1.14rem);
  line-height: 1.8;
  color: rgba(226, 232, 240, 0.9);
}

.soul-paths-story-support {
  color: rgba(191, 219, 254, 0.78);
  font-size: 0.94rem;
  letter-spacing: 0.03em;
}

.soul-paths-story-hero.theme-whispers .soul-paths-story-art {
  background:
    linear-gradient(180deg, rgba(10, 14, 24, 0.96), rgba(16, 18, 30, 0.98)),
    radial-gradient(circle at 50% 18%, rgba(148, 163, 184, 0.2), transparent 34%);
}

.soul-paths-story-hero.theme-memories .soul-paths-story-art {
  background:
    linear-gradient(180deg, rgba(14, 18, 30, 0.96), rgba(22, 22, 38, 0.98)),
    radial-gradient(circle at 50% 16%, rgba(191, 219, 254, 0.18), transparent 32%);
}

.soul-paths-story-hero.theme-shadow-eclipse .soul-paths-story-art {
  background:
    linear-gradient(180deg, rgba(14, 10, 28, 0.98), rgba(16, 10, 24, 0.98)),
    radial-gradient(circle at 50% 18%, rgba(192, 132, 252, 0.22), transparent 34%);
}

.soul-paths-story-hero.theme-verdant-dream .soul-paths-story-art {
  background:
    linear-gradient(180deg, rgba(8, 18, 20, 0.98), rgba(10, 22, 18, 0.98)),
    radial-gradient(circle at 50% 18%, rgba(74, 222, 128, 0.18), transparent 34%);
}

.soul-paths-story-hero.theme-traveler .soul-paths-story-art {
  background:
    linear-gradient(180deg, rgba(20, 16, 18, 0.98), rgba(24, 18, 20, 0.98)),
    radial-gradient(circle at 50% 18%, rgba(251, 191, 36, 0.18), transparent 34%);
}

.soul-paths-story-hero.theme-fracture .soul-paths-story-art {
  background:
    linear-gradient(180deg, rgba(12, 12, 30, 0.98), rgba(18, 14, 38, 0.98)),
    radial-gradient(circle at 50% 18%, rgba(96, 165, 250, 0.14), rgba(192, 132, 252, 0.18) 32%, transparent 44%);
}

.soul-paths-story-hero.theme-sanctuary .soul-paths-story-art {
  background:
    linear-gradient(180deg, rgba(12, 20, 22, 0.98), rgba(14, 22, 18, 0.98)),
    radial-gradient(circle at 50% 18%, rgba(134, 239, 172, 0.2), transparent 34%);
}

.soul-paths-story-hero.theme-blood-path .soul-paths-story-art {
  background:
    linear-gradient(180deg, rgba(28, 12, 18, 0.98), rgba(34, 12, 16, 0.98)),
    radial-gradient(circle at 50% 18%, rgba(248, 113, 113, 0.2), transparent 34%);
}

.soul-paths-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.soul-paths-choice {
  min-height: 280px;
  padding: 22px;
  border-radius: 28px;
  border-width: 1px;
  display: grid;
  align-content: start;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(12, 16, 28, 0.88), rgba(8, 11, 18, 0.96)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.05), transparent 32%);
  box-shadow:
    0 18px 42px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.soul-paths-choice h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.9rem;
  line-height: 1;
  color: #f8fafc;
}

.soul-paths-choice p {
  margin: 0;
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.72;
}

.soul-paths-choice-consequences {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.soul-paths-choice-consequence-label {
  color: rgba(191, 219, 254, 0.72);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.soul-paths-choice-consequence-list {
  display: grid;
  gap: 8px;
}

.soul-paths-choice-consequence {
  display: block;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.46);
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.9rem;
  line-height: 1.45;
}

.soul-paths-choice .choice-value {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.soul-paths-lore-prompt-actions,
.soul-paths-dialogue-actions {
  justify-content: flex-start;
}

.soul-paths-lore-read-button {
  min-width: 240px;
}

.soul-paths-dialogue-panel {
  gap: 22px;
}

.soul-paths-dialogue-card {
  padding: clamp(22px, 2vw, 30px);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(12, 16, 28, 0.9), rgba(7, 11, 20, 0.97)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 34%);
}

.soul-paths-dialogue-copy p {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.28rem, 1.9vw, 1.6rem);
  line-height: 1.76;
  letter-spacing: 0.01em;
  color: rgba(248, 250, 252, 0.96);
}

@media (max-width: 920px) {
  .soul-paths-choice-panel {
    width: calc(100vw - 20px);
    min-height: calc(100svh - 20px);
    padding: 18px;
    border-radius: 28px;
  }

  .soul-paths-story-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .soul-paths-story-art {
    min-height: 240px;
  }

  .soul-paths-story-copy {
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .soul-paths-choice-backdrop {
    padding: 10px;
  }

  .soul-paths-choice-panel {
    width: calc(100vw - 20px);
    min-height: calc(100svh - 20px);
    padding: 14px;
    border-radius: 22px;
  }

  .soul-paths-story-art {
    min-height: 210px;
    border-radius: 22px;
  }

  .soul-paths-story-copy {
    padding: 16px;
    border-radius: 22px;
  }

  .soul-paths-choice {
    min-height: 0;
    padding: 18px;
    border-radius: 22px;
  }

  .soul-paths-choice h3 {
    font-size: 1.55rem;
  }
}

.soul-survivors-world-event-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(8, 11, 22, 0.72);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.24);
  color: #e2e8f0;
  font-size: 0.76rem;
}

.soul-survivors-world-event-chip strong {
  color: #f8fafc;
}

.soul-survivors-world-event-chip.rarity-rare {
  border-color: rgba(96, 165, 250, 0.44);
}

.soul-survivors-world-event-chip.rarity-epic {
  border-color: rgba(192, 132, 252, 0.44);
}

.soul-survivors-world-event-chip.rarity-legendary {
  border-color: rgba(251, 191, 36, 0.44);
}

.soul-survivors-world-event-end-notice,
.soul-paths-world-event-notice {
  position: absolute;
  top: 5.9rem;
  left: 50%;
  z-index: 11;
  transform: translateX(-50%);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(8, 11, 22, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.78rem;
}

.soul-paths-world-event-notice {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  margin-bottom: 0.75rem;
}

.soul-survivors-arena::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 12%, rgba(99, 102, 241, 0.14), transparent 46%);
  opacity: calc(1 - var(--ss-visibility-mod, 1));
  pointer-events: none;
  transition: opacity 220ms ease-out;
}

.soul-survivors-arena.world-event-blood::after {
  background: radial-gradient(circle at 50% 10%, rgba(220, 38, 38, 0.24), rgba(124, 24, 24, 0.08) 40%, transparent 72%);
}

.soul-survivors-arena.world-event-arcane::after {
  background: radial-gradient(circle at 50% 10%, rgba(59, 130, 246, 0.18), rgba(34, 211, 238, 0.08) 38%, transparent 70%);
}

.soul-survivors-arena.world-event-shadow::after {
  background: radial-gradient(circle at 50% 10%, rgba(91, 33, 182, 0.24), rgba(15, 23, 42, 0.26) 48%, rgba(2, 6, 23, 0.16) 72%);
}

.soul-survivors-arena.world-event-verdant::after {
  background: radial-gradient(circle at 50% 10%, rgba(74, 222, 128, 0.18), rgba(20, 83, 45, 0.08) 40%, transparent 72%);
}

.soul-survivors-arena.world-event-ember::after {
  background: radial-gradient(circle at 50% 10%, rgba(249, 115, 22, 0.24), rgba(120, 53, 15, 0.08) 40%, transparent 72%);
}

.soul-survivors-arena.world-event-rift::after {
  background: radial-gradient(circle at 50% 10%, rgba(168, 85, 247, 0.24), rgba(49, 46, 129, 0.12) 42%, transparent 72%);
}

.soul-survivors-arena.world-event-harvest::after {
  background: radial-gradient(circle at 50% 10%, rgba(251, 191, 36, 0.22), rgba(168, 85, 247, 0.12) 42%, transparent 74%);
}

.soul-survivors-arena.world-event-frozen::after {
  background: radial-gradient(circle at 50% 10%, rgba(125, 211, 252, 0.22), rgba(56, 189, 248, 0.1) 42%, transparent 74%);
}

.soul-survivors-arena.world-event-cursed::after {
  background: radial-gradient(circle at 50% 10%, rgba(148, 163, 184, 0.18), rgba(51, 65, 85, 0.14) 42%, transparent 74%);
}

.soul-survivors-arena.world-event-celestial::after {
  background: radial-gradient(circle at 50% 10%, rgba(251, 191, 36, 0.2), rgba(147, 197, 253, 0.12) 42%, transparent 74%);
}

.skill-tree-shell {
  gap: 18px;
  background:
    radial-gradient(circle at 12% 12%, rgba(56, 189, 248, 0.12), transparent 24%),
    radial-gradient(circle at 88% 16%, rgba(251, 191, 36, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(6, 11, 22, 0.98), rgba(3, 7, 16, 1));
}

.skill-tree-summary-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-tree-summary-card {
  min-height: 120px;
  border-color: rgba(96, 165, 250, 0.14);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(10, 16, 29, 0.96), rgba(7, 11, 21, 0.99));
}

.skill-tree-category-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(184px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.skill-tree-category-tabs::-webkit-scrollbar {
  display: none;
}

.skill-tree-category-tab {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 88px;
  padding: 14px 16px;
  border-color: rgba(96, 165, 250, 0.16);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(12, 18, 32, 0.96), rgba(8, 12, 22, 0.99));
}

.skill-tree-category-tab.active {
  border-color: rgba(125, 211, 252, 0.36);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.42), 0 0 28px rgba(56, 189, 248, 0.14);
}

.skill-tree-category-tab-copy {
  display: grid;
  gap: 4px;
}

.skill-tree-category-tab-copy span {
  color: rgba(191, 219, 254, 0.72);
  font-size: 0.78rem;
}

.skill-tree-category-fullscreen {
  min-height: calc(100vh - 300px);
  padding: 18px;
  border-color: rgba(96, 165, 250, 0.14);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(8, 12, 23, 0.98), rgba(4, 7, 15, 1));
}

.skill-tree-category-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.skill-tree-category-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.skill-tree-category-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.skill-tree-stage {
  position: relative;
  height: min(72vh, 860px);
}

.skill-tree-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  background:
    radial-gradient(circle at 50% 12%, rgba(56, 189, 248, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(4, 9, 19, 0.96), rgba(3, 7, 15, 1));
  touch-action: none;
}

.skill-tree-viewport-stars,
.skill-tree-world-nebula,
.skill-tree-world-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.skill-tree-viewport-stars {
  background-image:
    radial-gradient(circle at 14% 22%, rgba(255, 255, 255, 0.3) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.28) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 34% 78%, rgba(148, 163, 184, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 68%, rgba(191, 219, 254, 0.24) 0 1px, transparent 2px);
  opacity: 0.95;
}

.skill-tree-world {
  position: absolute;
  inset: 0 auto auto 0;
  transform-origin: 0 0;
  will-change: transform;
}

.skill-tree-world-nebula {
  background:
    radial-gradient(circle at 20% 18%, rgba(96, 165, 250, 0.14), transparent 18%),
    radial-gradient(circle at 80% 28%, rgba(192, 132, 252, 0.14), transparent 18%),
    radial-gradient(circle at 52% 76%, rgba(251, 191, 36, 0.1), transparent 20%);
  filter: blur(6px);
}

.skill-tree-world-grid {
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.06) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.28;
}

.skill-tree-link {
  height: 4px;
  opacity: 0.34;
  background: linear-gradient(90deg, rgba(71, 85, 105, 0.46), rgba(30, 41, 59, 0.12));
}

.skill-tree-link.available {
  opacity: 0.74;
}

.skill-tree-link.active {
  opacity: 1;
}

.skill-tree-link.soulSurvivors.available,
.skill-tree-link.soulSurvivors.active {
  background-image: linear-gradient(90deg, rgba(248, 113, 113, 0.78), rgba(251, 191, 36, 0.32));
  box-shadow: 0 0 18px rgba(248, 113, 113, 0.14);
}

.skill-tree-node {
  width: 176px;
  z-index: 2;
  transform: translate(-50%, -50%);
  touch-action: none;
}

.skill-tree-node.rarity-rare {
  width: 184px;
}

.skill-tree-node.rarity-epic {
  width: 194px;
}

.skill-tree-node.rarity-legendary {
  width: 206px;
}

.skill-tree-node.rarity-mythic {
  width: 220px;
}

.skill-tree-node-halo {
  position: absolute;
  inset: 10px;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.16), transparent 72%);
  filter: blur(12px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.skill-tree-node.selected .skill-tree-node-halo,
.skill-tree-node.affordable .skill-tree-node-halo,
.skill-tree-node.maxed .skill-tree-node-halo {
  opacity: 1;
}

.skill-tree-node-core {
  position: relative;
  gap: 8px;
  justify-items: center;
  min-height: 148px;
  padding: 14px 14px 16px;
  border-radius: 24px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background:
    linear-gradient(180deg, rgba(10, 16, 31, 0.98), rgba(6, 10, 18, 1));
}

.skill-tree-node-rarity-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skill-tree-node-rarity,
.skill-tree-node-state {
  color: rgba(203, 213, 225, 0.78);
}

.skill-tree-node-icon-wrap {
  display: grid;
  place-items: center;
}

.skill-tree-node strong {
  font-size: 0.88rem;
}

.skill-tree-node-effect {
  color: rgba(191, 219, 254, 0.78);
  font-size: 0.74rem;
  line-height: 1.35;
  min-height: 2.1em;
}

.skill-tree-node-level {
  color: #cbd5e1;
}

.skill-tree-node.locked .skill-tree-node-core,
.skill-tree-node.sealed .skill-tree-node-core {
  opacity: 0.56;
}

.skill-tree-node.selected .skill-tree-node-core {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(191, 219, 254, 0.42);
}

.skill-tree-node.rarity-common.unlocked .skill-tree-node-core,
.skill-tree-node.rarity-common.maxed .skill-tree-node-core {
  border-color: rgba(96, 165, 250, 0.34);
}

.skill-tree-node.rarity-rare .skill-tree-node-core {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.1);
}

.skill-tree-node.rarity-epic .skill-tree-node-core {
  border-color: rgba(168, 85, 247, 0.44);
  box-shadow: 0 0 32px rgba(168, 85, 247, 0.12);
}

.skill-tree-node.rarity-legendary .skill-tree-node-core {
  border-color: rgba(251, 191, 36, 0.44);
  box-shadow: 0 0 36px rgba(251, 191, 36, 0.14);
}

.skill-tree-node.rarity-mythic .skill-tree-node-core {
  border-color: rgba(244, 114, 182, 0.48);
  box-shadow: 0 0 40px rgba(244, 114, 182, 0.16);
}

.skill-tree-viewport-hud {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.skill-tree-detail-card {
  width: min(360px, calc(100% - 36px));
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(10, 16, 29, 0.98), rgba(6, 11, 20, 1));
}

.skill-tree-detail-title {
  display: flex;
  gap: 12px;
  align-items: center;
}

.skill-tree-detail-actions {
  display: flex;
  gap: 10px;
}

.skill-tree-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 94;
  display: grid;
  align-items: end;
}

.skill-tree-popup-dismiss {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(10px);
}

.skill-tree-node-sheet {
  position: relative;
  z-index: 1;
}

.skill-tree-node-sheet .skill-tree-detail-card {
  width: 100%;
  position: static;
  margin: 0;
  box-shadow: none;
  background: transparent;
  border: 0;
  padding: 0;
}

.mobile-shell-active .skill-tree-mobile-body .skill-tree-stage {
  overflow: hidden;
  height: min(68vh, 620px);
}

.mobile-shell-active .skill-tree-mobile-body .skill-tree-canvas {
  transform: none;
  width: 100%;
  min-height: 0;
}

.mobile-shell-active .skill-tree-mobile-body .skill-tree-category-tabs {
  grid-auto-columns: minmax(150px, 72%);
}

.mobile-shell-active .skill-tree-summary-strip {
  grid-template-columns: 1fr 1fr;
}

.mobile-shell-active .skill-tree-category-hero {
  gap: 10px;
}

.mobile-shell-active .skill-tree-viewport-hud {
  left: 14px;
  right: auto;
}

@media (min-width: 480px) and (max-width: 767px) {
  .mobile-shell-active .mobile-library-grid,
  .mobile-shell-active .mobile-home-games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.arena-screen.run-shell-battle-first {
  padding: clamp(10px, 2vw, 20px) clamp(10px, 2vw, 22px) 28px;
}

.run-shell-battle-first .arena-run-shell {
  display: grid;
  gap: 14px;
  width: min(100%, 1480px);
  margin: 0 auto;
}

.run-shell-battle-first .arena-hud-stack {
  position: relative;
  z-index: 18;
  display: grid;
  gap: 10px;
}

.run-shell-battle-first .arena-main {
  grid-template-columns: 1fr;
  gap: 14px;
  min-height: 0;
}

.run-shell-battle-first .arena-stage-column {
  gap: 14px;
}

.run-shell-battle-first .battle-stage-panel {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.run-shell-battle-first .arena-stage-backglow,
.run-shell-battle-first .arena-stage-rings,
.run-shell-battle-first .arena-stage-gradient {
  position: absolute;
  inset: 0;
  border-radius: 34px;
  pointer-events: none;
}

.run-shell-battle-first .arena-stage-backglow {
  background:
    radial-gradient(circle at 18% 78%, rgba(34, 211, 238, 0.16), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(244, 114, 182, 0.14), transparent 30%);
  filter: blur(16px);
  opacity: 0.88;
}

.run-shell-battle-first .arena-stage-rings {
  inset: 4%;
  background:
    radial-gradient(circle at center, transparent 0 46%, rgba(34, 211, 238, 0.12) 48%, transparent 52%),
    radial-gradient(circle at center, transparent 0 58%, rgba(244, 114, 182, 0.08) 60%, transparent 64%);
  opacity: 0.5;
  animation: battleStagePulse 10s ease-in-out infinite;
}

.run-shell-battle-first .arena-stage-gradient {
  background:
    linear-gradient(180deg, rgba(8, 14, 24, 0.04), rgba(8, 14, 24, 0.18) 36%, rgba(8, 14, 24, 0.52)),
    linear-gradient(90deg, rgba(56, 189, 248, 0.05), transparent 24%, transparent 76%, rgba(244, 114, 182, 0.05));
}

.run-shell-battle-first .arena-battlefield {
  min-height: clamp(640px, 73vh, 920px);
  border-radius: 34px;
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(34, 211, 238, 0.08);
}

.run-shell-battle-first .arena-duel-grid {
  min-height: clamp(560px, 64vh, 760px);
  padding: 126px clamp(22px, 3vw, 42px) clamp(28px, 3vw, 36px);
  gap: clamp(22px, 3vw, 42px);
  align-items: stretch;
}

.run-shell-battle-first .board-zone {
  min-height: 100%;
  padding-inline: 0;
}

.run-shell-battle-first .arena-battlefield .section-label-row {
  min-height: 34px;
  margin-bottom: 8px;
}

.run-shell-battle-first .arena-battlefield .section-title {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
}

.run-shell-battle-first .arena-battlefield .tiny-chip {
  padding: 4px 10px;
  font-size: 0.68rem;
}

.run-shell-battle-first .arena-grid {
  gap: clamp(10px, 1.2vw, 16px);
}

.run-shell-battle-first .arena-tile {
  min-height: clamp(116px, 10vw, 148px);
}

.run-shell-battle-first .arena-spotlight-layer {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 6;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.run-shell-battle-first .arena-spotlight-layer > * {
  pointer-events: auto;
}

.run-shell-battle-first .phase-state-strip,
.run-shell-battle-first .spotlight-card.compact-status,
.run-shell-battle-first .replay-bar {
  background:
    linear-gradient(180deg, rgba(8, 14, 24, 0.92), rgba(5, 10, 18, 0.96));
  backdrop-filter: blur(16px);
  box-shadow:
    0 16px 34px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: battleWaveRise 260ms ease-out;
}

.run-shell-battle-first .phase-state-strip {
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 68px;
  padding: 12px 14px;
  border-radius: 22px;
}

.run-shell-battle-first .phase-state-copy p {
  color: rgba(226, 232, 240, 0.84);
}

.run-shell-battle-first .arena-sidebar-overlay {
  position: absolute;
  top: 96px;
  right: 16px;
  bottom: 18px;
  z-index: 5;
  width: min(320px, 26vw);
  display: grid;
  align-content: start;
  pointer-events: none;
}

.run-shell-battle-first .arena-sidebar-overlay > * {
  pointer-events: auto;
}

.run-shell-battle-first .arena-sidebar-overlay .sidebar-panel {
  max-height: 100%;
  overflow: auto;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(8, 14, 24, 0.88), rgba(5, 10, 18, 0.92));
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.32);
}

.arena-screen.soul-paths .arena-sidebar-overlay {
  display: none;
}

.run-shell-battle-first .arena-topbar {
  width: 100%;
}

.run-shell-battle-first .arena-topbar-shell {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 26px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(8, 14, 24, 0.95), rgba(5, 10, 18, 0.98));
  box-shadow:
    0 18px 42px rgba(2, 6, 23, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.run-shell-battle-first .arena-topbar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.run-shell-battle-first .topbar-badge-rail,
.run-shell-battle-first .topbar-resource-rail {
  gap: 8px;
}

.run-shell-battle-first .topbar-resource-rail {
  justify-content: flex-end;
}

.run-shell-battle-first .topbar-badge {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
}

.run-shell-battle-first .topbar-stat {
  min-width: 94px;
  padding: 8px 10px 9px;
  border-radius: 14px;
}

.run-shell-battle-first .topbar-label {
  font-size: 0.54rem;
}

.run-shell-battle-first .topbar-stat strong {
  margin-top: 4px;
  font-size: 0.92rem;
}

.arena-hud-synergies {
  display: grid;
  gap: 8px;
}

.hud-rail-label {
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.64);
}

.arena-hud-synergy-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.hud-synergy-pill {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 18px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background:
    linear-gradient(180deg, rgba(10, 18, 31, 0.92), rgba(8, 13, 22, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 22px rgba(2, 6, 23, 0.16);
}

.hud-synergy-pill.role {
  border-color: rgba(192, 132, 252, 0.18);
}

.hud-synergy-pill.empty,
.hud-synergy-pill.overflow {
  justify-content: center;
}

.hud-synergy-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.hud-synergy-copy strong,
.hud-synergy-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-synergy-copy strong {
  font-size: 0.78rem;
}

.hud-synergy-copy span {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.62);
}

.run-shell-battle-first .arena-bottom-rail {
  display: grid;
  gap: 12px;
}

.run-shell-battle-first .bench-dock-panel {
  width: 100%;
}

.run-shell-battle-first .bench-side-shell {
  gap: 10px;
  padding: 0;
}

.run-shell-battle-first .bench-dock-panel .arena-board-block.side-bench .arena-grid-wrap {
  padding: 12px 14px;
  border-radius: 24px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.06), transparent 46%),
    linear-gradient(180deg, rgba(5, 10, 18, 0.92), rgba(8, 13, 22, 0.94));
}

.run-shell-battle-first .battle-shop-dock {
  width: 100%;
  margin: 0;
}

.run-shell-battle-first .battle-shop-dock-inner {
  gap: 12px;
  padding: 14px 16px 16px;
  border-radius: 30px;
}

.shop-drawer-handle {
  width: 64px;
  height: 5px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.46);
}

.battle-shop-head {
  align-items: center;
}

.battle-shop-title {
  display: grid;
  gap: 6px;
}

.battle-shop-market {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: stretch;
}

.battle-shop-row {
  grid-template-columns: repeat(4, minmax(196px, 1fr));
  gap: 16px;
}

.battle-shop-controls {
  min-width: 132px;
}

.run-shell-battle-first .premium-reroll-button,
.run-shell-battle-first .premium-side-button {
  min-height: 96px;
  border-radius: 24px;
}

.run-shell-battle-first .premium-shop-chip {
  min-height: 36px;
}

@media (max-width: 1180px) {
  .run-shell-battle-first .arena-sidebar-overlay {
    display: none;
  }

  .run-shell-battle-first .battle-shop-market {
    grid-template-columns: 1fr;
  }

  .run-shell-battle-first .battle-shop-controls .premium-dock-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .run-shell-battle-first .premium-reroll-button,
  .run-shell-battle-first .premium-side-button {
    min-height: 82px;
  }
}

@media (max-width: 980px) {
  .run-shell-battle-first .arena-topbar-row,
  .run-shell-battle-first .phase-state-strip {
    grid-template-columns: 1fr;
  }

  .run-shell-battle-first .topbar-resource-rail,
  .run-shell-battle-first .phase-state-meta,
  .run-shell-battle-first .phase-state-actions {
    justify-content: flex-start;
  }

  .run-shell-battle-first .arena-hud-synergy-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mobile-shell-active .run-shell-battle-first {
  padding: 0 0 calc(320px + env(safe-area-inset-bottom));
}

.mobile-shell-active .run-shell-battle-first::before {
  inset: 88px 6% 320px;
}

.mobile-shell-active .run-shell-battle-first .arena-run-shell {
  gap: 10px;
}

.mobile-shell-active .run-shell-battle-first .arena-hud-stack {
  position: sticky;
  top: calc(8px + env(safe-area-inset-top));
  padding: 0 12px;
}

.mobile-shell-active .run-shell-battle-first .arena-topbar-shell {
  padding: 12px;
  border-radius: 22px;
}

.mobile-shell-active .run-shell-battle-first .arena-topbar-row {
  grid-template-columns: 1fr;
}

.mobile-shell-active .run-shell-battle-first .topbar-badge-rail,
.mobile-shell-active .run-shell-battle-first .topbar-resource-rail,
.mobile-shell-active .run-shell-battle-first .arena-hud-synergy-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  grid-template-columns: none;
  overflow-x: auto;
  padding-bottom: 2px;
}

.mobile-shell-active .run-shell-battle-first .topbar-resource-rail {
  justify-content: flex-start;
}

.mobile-shell-active .run-shell-battle-first .hud-synergy-pill {
  min-width: 148px;
}

.mobile-shell-active .run-shell-battle-first .arena-main {
  gap: 8px;
}

.mobile-shell-active .run-shell-battle-first .battle-stage-panel {
  padding: 0 12px;
}

.mobile-shell-active .run-shell-battle-first .arena-battlefield {
  min-height: calc(100vh - 396px);
  border-radius: 26px;
}

.mobile-shell-active .run-shell-battle-first .arena-duel-grid {
  grid-template-columns: 1fr;
  min-height: calc(100vh - 432px);
  padding: 112px 12px 18px;
  gap: 12px;
}

.mobile-shell-active .run-shell-battle-first .enemy-board-zone,
.mobile-shell-active .run-shell-battle-first .hero-board-zone {
  justify-content: stretch;
}

.mobile-shell-active .run-shell-battle-first .arena-battlefield .arena-board-block:not(.side-bench) .arena-grid-wrap {
  padding: 10px;
  border-radius: 20px;
}

.mobile-shell-active .run-shell-battle-first .arena-battlefield .section-label-row {
  min-height: 28px;
}

.mobile-shell-active .run-shell-battle-first .arena-battlefield .section-title {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
}

.mobile-shell-active .run-shell-battle-first .arena-grid {
  gap: 8px;
}

.mobile-shell-active .run-shell-battle-first .arena-tile {
  min-height: clamp(88px, 23vw, 114px);
  border-radius: 18px;
}

.mobile-shell-active .run-shell-battle-first .arena-tile.compact {
  min-height: 84px;
  border-radius: 16px;
}

.mobile-shell-active .run-shell-battle-first .arena-spotlight-layer {
  top: 12px;
  left: 12px;
  right: 12px;
}

.mobile-shell-active .run-shell-battle-first .spotlight-card.compact-status,
.mobile-shell-active .run-shell-battle-first .phase-state-strip,
.mobile-shell-active .run-shell-battle-first .replay-bar {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
}

.mobile-shell-active .run-shell-battle-first .compact-status-copy {
  align-items: flex-start;
}

.mobile-shell-active .run-shell-battle-first .arena-bottom-rail {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 42;
  gap: 8px;
  padding: 0 12px calc(10px + env(safe-area-inset-bottom));
}

.mobile-shell-active .run-shell-battle-first .bench-dock-panel,
.mobile-shell-active .run-shell-battle-first .battle-shop-dock {
  width: 100%;
}

.mobile-shell-active .run-shell-battle-first .bench-side-shell {
  gap: 8px;
}

.mobile-shell-active .run-shell-battle-first .bench-dock-panel .arena-board-block.side-bench .arena-grid-wrap {
  padding: 10px;
  border-radius: 20px;
}

.mobile-shell-active .run-shell-battle-first .bench-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(88px, 22vw);
  grid-template-columns: none;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.mobile-shell-active .run-shell-battle-first .bench-sell-zone {
  padding: 10px 12px;
  border-radius: 16px;
}

.mobile-shell-active .run-shell-battle-first .shop-dock {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  padding: 0;
}

.mobile-shell-active .run-shell-battle-first .battle-shop-dock-inner {
  gap: 10px;
  padding: 12px 12px 14px;
  border-radius: 24px 24px 0 0;
  max-height: none;
}

.mobile-shell-active .run-shell-battle-first .battle-shop-head {
  gap: 10px;
}

.mobile-shell-active .run-shell-battle-first .shop-quick-stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  overflow-x: auto;
  justify-content: flex-start;
  padding-bottom: 2px;
}

.mobile-shell-active .run-shell-battle-first .battle-shop-market {
  gap: 10px;
}

.mobile-shell-active .run-shell-battle-first .battle-shop-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 72vw);
  grid-template-columns: none;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.mobile-shell-active .run-shell-battle-first .shop-card {
  min-height: 0;
  min-height: 300px;
  padding: 14px 12px 14px;
}

.mobile-shell-active .run-shell-battle-first .battle-shop-controls .premium-dock-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mobile-shell-active .run-shell-battle-first .premium-reroll-button,
.mobile-shell-active .run-shell-battle-first .premium-side-button {
  min-height: 74px;
  padding: 10px;
  border-radius: 20px;
}

.mobile-shell-active .run-shell-battle-first .shop-control-copy strong {
  font-size: 0.74rem;
}

.mobile-shell-active .run-shell-battle-first .shop-control-copy span {
  font-size: 0.7rem;
}

@keyframes battleStagePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.44;
  }

  50% {
    transform: scale(1.02);
    opacity: 0.64;
  }
}

@keyframes battleWaveRise {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

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

.profile-overview-stack,
.profile-premium-section,
.profile-level-rail,
.profile-level-rail-summary,
.profile-reward-track-shell,
.profile-track-main,
.profile-track-footer,
.profile-identity-hero-grid,
.profile-identity-avatar-column,
.profile-identity-avatar-caption,
.profile-identity-copy,
.profile-identity-title-lockup,
.profile-identity-top-metrics,
.profile-identity-footer,
.profile-premium-section-head,
.profile-collection-meta {
  display: grid;
  gap: 16px;
}

.profile-premium-section {
  position: relative;
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at top right, rgba(248, 250, 252, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(13, 19, 34, 0.98), rgba(8, 12, 22, 0.98));
}

.profile-premium-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 28%),
    radial-gradient(circle at bottom right, rgba(96, 165, 250, 0.08), transparent 28%);
  pointer-events: none;
}

.profile-premium-section > * {
  position: relative;
  z-index: 1;
}

.profile-overview-stack.screen {
  gap: 18px;
}

.profile-premium-section-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.profile-screen-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(130px, 1fr);
  overflow-x: auto;
  padding-bottom: 4px;
}

.profile-screen-tab {
  border-radius: 22px;
}

.profile-screen-tab strong {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-identity-stage {
  padding: 22px;
  isolation: isolate;
}

.profile-identity-backdrop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.profile-identity-backdrop {
  position: absolute;
  border-radius: 999px;
  filter: blur(14px);
  opacity: 0.9;
}

.profile-identity-backdrop-a {
  width: 320px;
  height: 320px;
  top: -120px;
  right: -60px;
  background: rgba(250, 204, 21, 0.16);
}

.profile-identity-backdrop-b {
  width: 260px;
  height: 260px;
  bottom: -120px;
  left: -60px;
  background: rgba(34, 211, 238, 0.14);
}

.profile-identity-stage[data-profile-theme="ember_glow"] {
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(248, 113, 113, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(33, 16, 10, 0.96), rgba(13, 9, 12, 0.98));
}

.profile-identity-stage[data-profile-theme="royal_velvet"] {
  background:
    radial-gradient(circle at top right, rgba(192, 132, 252, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(96, 165, 250, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(24, 13, 39, 0.96), rgba(10, 9, 20, 0.98));
}

.profile-identity-stage[data-profile-theme="eclipse_signal"] {
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.16), transparent 25%),
    radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(10, 15, 28, 0.96), rgba(4, 7, 16, 0.99));
}

.profile-identity-hero-grid {
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  align-items: center;
}

.profile-identity-avatar-stage {
  justify-items: center;
  gap: 14px;
}

.profile-identity-avatar-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(34vw, 220px);
  aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 62%),
    rgba(6, 10, 18, 0.6);
  box-shadow:
    0 24px 44px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.profile-identity-stage[data-profile-border="crownframe"] .profile-identity-avatar-frame {
  box-shadow:
    0 24px 44px rgba(0, 0, 0, 0.38),
    0 0 0 2px rgba(250, 204, 21, 0.35),
    0 0 36px rgba(250, 204, 21, 0.18);
}

.profile-identity-stage[data-profile-border="void_filigree"] .profile-identity-avatar-frame {
  box-shadow:
    0 24px 44px rgba(0, 0, 0, 0.38),
    0 0 0 2px rgba(192, 132, 252, 0.35),
    0 0 36px rgba(168, 85, 247, 0.18);
}

.profile-identity-stage[data-profile-border="mythic_halo"] .profile-identity-avatar-frame {
  box-shadow:
    0 24px 44px rgba(0, 0, 0, 0.38),
    0 0 0 2px rgba(248, 250, 252, 0.34),
    0 0 42px rgba(250, 204, 21, 0.22);
}

.profile-identity-avatar-frame .library-profile-avatar.large,
.profile-identity-avatar-frame .library-profile-avatar {
  transform: scale(1.1);
}

.profile-identity-avatar-orbit {
  position: absolute;
  inset: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-identity-avatar-orbit.orbit-a {
  animation: profileAvatarOrbit 11s linear infinite;
}

.profile-identity-avatar-orbit.orbit-b {
  inset: 4px;
  border-style: dashed;
  opacity: 0.45;
  animation: profileAvatarOrbitReverse 16s linear infinite;
}

.profile-identity-avatar-caption {
  justify-items: center;
  text-align: center;
}

.profile-identity-avatar-caption strong {
  color: #f8fdff;
  font-size: 1rem;
}

.profile-identity-header-main {
  min-width: 0;
  align-items: stretch;
}

.profile-identity-copy {
  gap: 18px;
}

.profile-identity-title-lockup {
  gap: 8px;
}

.profile-identity-title-lockup h1 {
  margin: 0;
}

.profile-identity-honorific {
  margin: 0;
  color: rgba(248, 250, 252, 0.92);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-identity-top-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.profile-identity-metric-card {
  min-height: 136px;
  gap: 12px;
  align-content: start;
  padding: 18px 18px 20px;
  border-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(13, 20, 35, 0.92), rgba(9, 12, 24, 0.88)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 32%);
}

.profile-identity-metric-card strong {
  color: #f8fdff;
  font-size: clamp(1.15rem, 1.4vw, 1.45rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile-identity-metric-card .field-label {
  line-height: 1.35;
}

.profile-identity-footer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.profile-level-rail-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-level-rail-stat {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(4, 8, 18, 0.42);
}

.profile-level-rail-stat strong {
  color: #f8fdff;
  font-size: 1.1rem;
}

.profile-level-rail-stat.wide {
  grid-column: span 1;
}

.profile-reward-track-shell {
  position: relative;
}

.profile-reward-track-line {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 28px;
  height: 2px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.22), rgba(250, 204, 21, 0.3), rgba(168, 85, 247, 0.22));
}

.profile-reward-track {
  position: relative;
  z-index: 1;
  padding-top: 12px;
}

.profile-track-card {
  position: relative;
  min-height: 252px;
  border-radius: 22px;
}

.profile-track-card.title {
  background:
    linear-gradient(180deg, rgba(31, 18, 49, 0.96), rgba(10, 12, 24, 0.98)),
    radial-gradient(circle at top right, rgba(192, 132, 252, 0.18), transparent 34%);
}

.profile-track-card.theme {
  background:
    linear-gradient(180deg, rgba(24, 24, 42, 0.96), rgba(10, 12, 24, 0.98)),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 34%);
}

.profile-track-card.border {
  background:
    linear-gradient(180deg, rgba(40, 26, 8, 0.96), rgba(16, 12, 8, 0.98)),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.18), transparent 34%);
}

.profile-track-card.locked {
  opacity: 0.88;
}

.profile-track-main {
  align-content: start;
}

.profile-track-node {
  position: absolute;
  top: 8px;
  left: 18px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 1);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.24);
}

.profile-track-card.available .profile-track-node {
  background: rgba(34, 211, 238, 0.92);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.34);
}

.profile-track-card.claimed .profile-track-node {
  background: rgba(250, 204, 21, 0.92);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.34);
}

.profile-track-footer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: auto;
}

.profile-stat-showcase,
.profile-collection-grid,
.profile-achievement-grid {
  gap: 16px;
}

.profile-identity-stat-card,
.profile-collection-card,
.profile-achievement-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
}

.profile-stat-orbit {
  position: absolute;
  width: 120px;
  height: 120px;
  right: -36px;
  top: -48px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 62%);
  animation: profileStatPulse 6s ease-in-out infinite;
}

.profile-stat-detail {
  color: rgba(219, 234, 254, 0.76);
  font-size: 0.88rem;
  line-height: 1.5;
}

.profile-identity-stat-card .field-label {
  line-height: 1.35;
}

.profile-collection-card {
  background:
    linear-gradient(180deg, rgba(11, 17, 31, 0.98), rgba(8, 12, 22, 0.98)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 32%);
}

.profile-collection-meta {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.profile-collection-meta strong {
  color: #f8fdff;
}

.profile-achievement-card {
  min-height: 192px;
}

.profile-achievement-rarity {
  color: rgba(248, 250, 252, 0.88);
  letter-spacing: 0.08em;
}

.mobile-shell-active .profile-premium-section {
  padding: 16px;
}

.mobile-shell-active .profile-identity-stage {
  padding: 16px;
}

.mobile-shell-active .profile-identity-hero-grid,
.mobile-shell-active .profile-identity-footer,
.mobile-shell-active .profile-premium-section-head {
  grid-template-columns: 1fr;
}

.mobile-shell-active .profile-identity-avatar-frame {
  width: min(52vw, 190px);
}

.mobile-shell-active .profile-identity-top-metrics {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mobile-shell-active .profile-level-rail-summary {
  grid-template-columns: 1fr;
}

.mobile-shell-active .profile-track-card {
  min-height: 228px;
}

.mobile-shell-active .profile-achievement-grid,
.mobile-shell-active .profile-collection-grid,
.mobile-shell-active .profile-stat-showcase {
  grid-template-columns: 1fr;
}

.mobile-shell-active .profile-identity-metric-card {
  min-height: 122px;
  padding: 16px;
}

.mobile-shell-active .profile-identity-stat-card {
  min-height: 164px;
  padding: 16px;
}

@keyframes profileAvatarOrbit {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes profileAvatarOrbitReverse {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}

@keyframes profileStatPulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.45;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.75;
  }
}

.merge-tactics-mobile-first {
  width: min(100%, 1320px);
  margin: 0 auto;
  gap: 18px;
  padding: clamp(14px, 2vw, 24px);
}

.merge-tactics-mobile-first .merge-tactics-layout {
  grid-template-columns: 1fr;
  gap: 16px;
  min-height: 0;
}

.merge-tactics-mobile-first .merge-tactics-playfield {
  gap: 14px;
  padding: 14px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(10, 15, 27, 0.98), rgba(6, 10, 18, 0.98));
}

.merge-tactics-hud,
.merge-tactics-hud-main,
.merge-tactics-hud-stats,
.merge-tactics-hud-stat,
.merge-tactics-hud-subrail,
.merge-tactics-bottom-tray,
.merge-tactics-bottom-head,
.merge-tactics-fx-layer,
.merge-tactics-score-burst,
.merge-tactics-bottom-meta {
  display: grid;
  gap: 10px;
}

.merge-tactics-hud {
  gap: 12px;
}

.merge-tactics-hud-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.merge-tactics-hud-main {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.merge-tactics-hud-stats {
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 10px;
}

.merge-tactics-hud-stat {
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(10, 16, 28, 0.92), rgba(7, 12, 21, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 24px rgba(2, 6, 23, 0.14);
}

.merge-tactics-hud-stat strong {
  font-size: 1rem;
  color: #f8fafc;
}

.merge-tactics-hud-subrail {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  overflow-x: auto;
  align-items: center;
  padding-bottom: 2px;
}

.merge-tactics-mobile-first .mobile-merge-mode-row {
  align-items: center;
}

.merge-tactics-mobile-first .mobile-merge-mode-buttons {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  overflow-x: auto;
}

.merge-tactics-mobile-first .merge-tactics-board-shell {
  gap: 12px;
  padding: 14px;
  border-radius: 30px;
}

.merge-tactics-board-glow {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at center, rgba(250, 204, 21, 0.22), transparent 42%),
    radial-gradient(circle at 50% 42%, rgba(34, 211, 238, 0.18), transparent 36%);
}

.merge-tactics-board-glow.active {
  opacity: 1;
  animation: mergeTacticsBoardFlash 420ms ease-out;
}

.merge-tactics-board-glow.score-active {
  opacity: 1;
  animation: mergeTacticsBoardScoreFlash 420ms ease-out;
}

.merge-tactics-mobile-first .merge-tactics-board-status {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.merge-tactics-mobile-first .merge-tactics-board-status-copy strong {
  font-size: clamp(0.96rem, 0.8vw + 0.88rem, 1.18rem);
}

.merge-tactics-mobile-first .merge-tactics-grid-stage {
  position: relative;
  padding: 10px;
  border-radius: 24px;
}

.merge-tactics-mobile-first .merge-tactics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.merge-tactics-mobile-first .merge-tactics-cell {
  min-height: 0;
  aspect-ratio: 1 / 1;
  padding: 10px 10px 8px;
  border-radius: 22px;
}

.merge-tactics-mobile-first .merge-tactics-cell-core {
  gap: 8px;
}

.merge-tactics-mobile-first .merge-tactics-cell-footer {
  margin-top: 6px;
  gap: 6px;
}

.merge-tactics-mobile-first .merge-tactics-cell-copy {
  gap: 4px;
}

.merge-tactics-mobile-first .merge-tactics-cell-copy strong {
  font-size: clamp(0.7rem, 0.34vw + 0.64rem, 0.88rem);
  line-height: 1.05;
}

.merge-tactics-mobile-first .merge-tactics-cell-copy span {
  font-size: 0.68rem;
  line-height: 1.2;
}

.merge-tactics-level-pill,
.merge-tactics-mobile-first .merge-tactics-trait-chip,
.merge-tactics-mobile-first .merge-tactics-rarity-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(7, 12, 22, 0.7);
  color: rgba(226, 232, 240, 0.84);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.merge-tactics-mobile-first .merge-tactics-cell-index {
  top: 8px;
  right: 10px;
  font-size: 0.62rem;
}

.merge-tactics-mobile-first .merge-tactics-special-badge,
.merge-tactics-mobile-first .merge-tactics-path-hint,
.merge-tactics-mobile-first .merge-tactics-merge-preview {
  left: 10px;
  padding: 0.24rem 0.5rem;
  font-size: 0.56rem;
}

.merge-tactics-mobile-first .merge-tactics-special-badge,
.merge-tactics-mobile-first .merge-tactics-merge-preview {
  top: 8px;
}

.merge-tactics-mobile-first .merge-tactics-path-hint {
  bottom: 8px;
}

.merge-tactics-mobile-first .merge-tactics-cell-corners {
  inset: 7px;
}

.merge-tactics-mobile-first .merge-tactics-cell-corners span {
  width: 16px;
  height: 16px;
}

.merge-tactics-mobile-first .merge-tactics-unit-stage {
  width: min(100%, 86px);
  border-radius: 22px;
}

.merge-tactics-mobile-first .merge-tactics-unit-stage-shadow {
  inset: auto 10% 4% 10%;
}

.merge-tactics-mobile-first .merge-tactics-unit-stage-ring {
  inset: 6px;
  border-radius: 18px;
}

.merge-tactics-mobile-first .merge-tactics-unit-art {
  width: 96%;
  height: 96%;
  filter:
    drop-shadow(0 8px 14px rgba(2, 6, 23, 0.42))
    drop-shadow(0 0 24px color-mix(in srgb, var(--merge-trait-accent) 24%, transparent));
}

.merge-tactics-mobile-first .merge-tactics-unit-stage .unit-glyph.large {
  width: 72px;
  height: 72px;
  font-size: 1.7rem;
}

.merge-tactics-mobile-first .merge-tactics-cell.resolved {
  animation: mergeTacticsResolvedPop 380ms ease-out;
}

.merge-tactics-mobile-first .merge-tactics-cell.merge-resolved {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -18px 32px rgba(0, 0, 0, 0.18),
    0 0 30px rgba(250, 204, 21, 0.22),
    0 14px 28px rgba(2, 6, 23, 0.22);
}

.merge-tactics-mobile-first .merge-tactics-cell.score-resolved {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -18px 32px rgba(0, 0, 0, 0.18),
    0 0 26px rgba(34, 211, 238, 0.2),
    0 14px 28px rgba(2, 6, 23, 0.22);
}

.merge-shake-live .merge-tactics-board-shell {
  animation: mergeTacticsBoardShake 360ms ease-out;
}

.merge-tactics-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  place-items: center;
}

.merge-tactics-score-burst {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  justify-items: center;
  text-align: center;
  color: #f8fafc;
  text-shadow: 0 10px 20px rgba(2, 6, 23, 0.68);
  animation: mergeTacticsScoreBurst 720ms ease-out forwards;
}

.merge-tactics-score-burst strong {
  font-size: clamp(1.4rem, 1.5vw + 1.1rem, 2.05rem);
  line-height: 1;
}

.merge-tactics-score-burst span {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.merge-tactics-score-burst.merge strong {
  color: #fde68a;
}

.merge-tactics-score-burst.score strong {
  color: #a5f3fc;
}

.merge-tactics-combo-popup {
  position: absolute;
  top: 50%;
  right: 10%;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.26);
  background: rgba(34, 24, 8, 0.88);
  color: #fef08a;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.18);
  animation: mergeTacticsComboPopup 840ms ease-out forwards;
}

.merge-tactics-mobile-first .merge-tactics-bottom-tray {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.merge-tactics-mobile-first .merge-tactics-preview.compact,
.merge-tactics-mobile-first .merge-tactics-message.compact {
  padding: 14px;
  border-radius: 20px;
}

.merge-tactics-mobile-first .merge-tactics-preview-stack.horizontal {
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  overflow-x: auto;
}

.merge-tactics-mobile-first .merge-tactics-preview-row {
  min-width: 0;
  gap: 10px;
  align-items: center;
}

.merge-tactics-mobile-first .merge-tactics-preview-row .unit-glyph.large {
  width: 56px;
  height: 56px;
}

.merge-tactics-mobile-first .merge-tactics-bottom-meta {
  grid-template-columns: 1fr;
  gap: 12px;
}

.merge-tactics-mobile-first .merge-tactics-panel {
  padding: 16px;
  border-radius: 22px;
}

.merge-tactics-mobile-first .merge-tactics-info-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.merge-tactics-mobile-first .merge-tactics-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  justify-content: stretch;
}

.merge-tactics-mobile-first .merge-tactics-actions .action-button {
  min-height: 44px;
}

@media (max-width: 980px) {
  .soul-survivors-upgrade-grid-premium {
    grid-template-columns: 1fr;
  }

  .soul-survivors-levelup-head {
    gap: 14px;
  }

  .merge-tactics-mobile-first .merge-tactics-hud-main,
  .merge-tactics-mobile-first .merge-tactics-board-status,
  .merge-tactics-mobile-first .merge-tactics-bottom-tray,
  .merge-tactics-mobile-first .merge-tactics-bottom-meta {
    grid-template-columns: 1fr;
  }

  .merge-tactics-mobile-first .merge-tactics-hud-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .merge-tactics-mobile-first .merge-tactics-info-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) and (orientation: landscape) {
  .merge-tactics-mobile-first .merge-tactics-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.44fr);
    align-items: start;
  }

  .merge-tactics-mobile-first .merge-tactics-bottom-tray {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

@media (max-width: 980px) and (orientation: portrait) {
  .merge-tactics-mobile-first .merge-tactics-layout {
    grid-template-columns: 1fr;
  }
}

.mobile-shell-active .merge-tactics-mobile-first {
  padding: 0 0 calc(22px + env(safe-area-inset-bottom));
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-playfield {
  padding: 12px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-hud {
  position: sticky;
  top: calc(8px + env(safe-area-inset-top));
  z-index: 8;
  padding: 0 4px;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-hud-main {
  grid-template-columns: 1fr;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-hud-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-hud-stat {
  padding: 9px 8px;
  border-radius: 16px;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-hud-stat strong {
  font-size: 0.86rem;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-board-shell {
  padding: 12px;
  border-radius: 24px;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-board-status {
  gap: 10px;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-combo-banner {
  min-width: 0;
  justify-items: start;
  text-align: left;
  padding: 10px 12px;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-grid-stage {
  padding: 8px;
  border-radius: 20px;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-grid {
  gap: 8px;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-cell {
  padding: 8px 8px 6px;
  border-radius: 18px;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-cell-copy strong {
  font-size: 0.64rem;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-cell-copy span,
.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-trait-chip,
.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-rarity-chip {
  font-size: 0.56rem;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-cell-footer {
  display: none;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-unit-stage {
  width: min(100%, 74px);
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-unit-stage .unit-glyph.large {
  width: 62px;
  height: 62px;
  font-size: 1.45rem;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-preview-stack.horizontal {
  grid-auto-columns: minmax(148px, 66vw);
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-bottom-meta {
  gap: 10px;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-panel {
  padding: 14px;
}

.mobile-shell-active .merge-tactics-mobile-first .merge-tactics-actions {
  grid-template-columns: 1fr 1fr;
}

@keyframes mergeTacticsResolvedPop {
  0% {
    transform: scale(0.92);
  }

  55% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes mergeTacticsBoardShake {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  20% {
    transform: translate3d(-5px, 0, 0);
  }

  40% {
    transform: translate3d(5px, 0, 0);
  }

  60% {
    transform: translate3d(-3px, 0, 0);
  }

  80% {
    transform: translate3d(3px, 0, 0);
  }
}

@keyframes mergeTacticsBoardFlash {
  0% {
    transform: scale(0.96);
    opacity: 0;
  }

  40% {
    transform: scale(1.02);
    opacity: 1;
  }

  100% {
    transform: scale(1.06);
    opacity: 0;
  }
}

@keyframes mergeTacticsBoardScoreFlash {
  0% {
    transform: scale(0.98);
    opacity: 0;
  }

  45% {
    transform: scale(1.01);
    opacity: 0.82;
  }

  100% {
    transform: scale(1.04);
    opacity: 0;
  }
}

@keyframes mergeTacticsScoreBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, 18px) scale(0.72);
  }

  30% {
    opacity: 1;
    transform: translate(-50%, -8px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -56px) scale(1.04);
  }
}

@keyframes mergeTacticsComboPopup {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.82);
  }

  30% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-22px) scale(1.04);
  }
}

.mobile-hud-chip-rail {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mobile-hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 10px;
  border-radius: 16px;
  border: 1px solid rgba(103, 232, 249, 0.14);
  background:
    linear-gradient(180deg, rgba(10, 18, 31, 0.94), rgba(7, 12, 21, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 20px rgba(2, 6, 23, 0.14);
  white-space: nowrap;
}

.mobile-hud-chip-icon {
  flex: 0 0 auto;
}

.mobile-hud-chip-copy {
  display: grid;
  gap: 2px;
  line-height: 1;
}

.mobile-hud-chip-label {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.7);
}

.mobile-hud-chip strong {
  font-size: 0.8rem;
  color: #f8fdff;
  font-weight: 800;
}

.topbar-badge-rail.compact {
  gap: 6px;
}

.topbar-icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(10, 18, 31, 0.96), rgba(8, 13, 22, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 20px rgba(2, 6, 23, 0.18);
  color: #e5faff;
  transition:
    transform 140ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.topbar-icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 18px rgba(34, 211, 238, 0.1),
    0 12px 24px rgba(2, 6, 23, 0.2);
}

.shop-card-main-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.shop-card-price-stack {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.price-pill.top-corner {
  min-height: 34px;
  padding: 6px 10px;
}

.shop-bottom-meta {
  display: grid;
  gap: 10px;
}

.shop-synergy-preview,
.shop-synergy-preview.empty {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.shop-synergy-preview-label {
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.68);
}

.shop-synergy-preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shop-synergy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background: rgba(7, 12, 21, 0.76);
  color: #dff8ff;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.shop-synergy-pill.role {
  border-color: rgba(192, 132, 252, 0.22);
}

.shop-synergy-empty {
  color: rgba(191, 219, 254, 0.68);
  font-size: 0.76rem;
}

.landscape-orientation-guard {
  display: none;
}

.run-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(16px);
}

.run-menu-card {
  width: min(460px, calc(100vw - 32px));
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(8, 14, 24, 0.96), rgba(4, 9, 18, 0.98));
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.run-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.run-menu-head h2 {
  font-size: 1.2rem;
}

.run-menu-head p {
  margin-top: 6px;
  color: rgba(191, 219, 254, 0.74);
}

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

@media (pointer: coarse) and (orientation: landscape) and (max-width: 1280px) {
  .landscape-mobile-run.run-shell-battle-first {
    height: 100vh;
    padding: 0;
    overflow: hidden;
    background:
      radial-gradient(circle at 14% 20%, rgba(34, 211, 238, 0.14), transparent 24%),
      radial-gradient(circle at 84% 14%, rgba(56, 189, 248, 0.12), transparent 22%),
      linear-gradient(180deg, #030712 0%, #07111e 55%, #091321 100%);
  }

  .landscape-mobile-run.run-shell-battle-first::before {
    inset: 62px 3% 170px;
    opacity: 0.34;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-run-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    gap: 0;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-hud-stack {
    position: relative;
    z-index: 34;
    gap: 6px;
    padding: max(6px, env(safe-area-inset-top)) 10px 4px;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-topbar-shell {
    padding: 8px 10px;
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(7, 12, 21, 0.92), rgba(4, 9, 18, 0.96));
    border: 1px solid rgba(103, 232, 249, 0.12);
    box-shadow:
      0 12px 26px rgba(2, 6, 23, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .landscape-mobile-run.run-shell-battle-first .arena-topbar-row.landscape-mobile-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }

  .landscape-mobile-run.run-shell-battle-first .topbar-badge-rail.compact,
  .landscape-mobile-run.run-shell-battle-first .mobile-hud-chip-rail {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .landscape-mobile-run.run-shell-battle-first .topbar-badge-rail.compact::-webkit-scrollbar,
  .landscape-mobile-run.run-shell-battle-first .mobile-hud-chip-rail::-webkit-scrollbar,
  .landscape-mobile-run.run-shell-battle-first .bench-grid::-webkit-scrollbar,
  .landscape-mobile-run.run-shell-battle-first .battle-shop-row::-webkit-scrollbar,
  .landscape-mobile-run.run-shell-battle-first .shop-synergy-preview-row::-webkit-scrollbar {
    display: none;
  }

  .landscape-mobile-run.run-shell-battle-first .topbar-badge {
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.62rem;
  }

  .landscape-mobile-run.run-shell-battle-first .mobile-hud-chip {
    min-height: 40px;
    padding: 6px 9px;
    border-radius: 14px;
  }

  .landscape-mobile-run.run-shell-battle-first .mobile-hud-chip strong {
    font-size: 0.74rem;
  }

  .landscape-mobile-run.run-shell-battle-first .topbar-icon-button {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-main,
  .landscape-mobile-run.run-shell-battle-first .arena-stage-column {
    min-height: 0;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-stage-column {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .landscape-mobile-run.run-shell-battle-first .battle-stage-panel {
    padding: 0 10px;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-battlefield {
    min-height: 0;
    height: 100%;
    border-radius: 24px;
    box-shadow:
      0 18px 40px rgba(0, 0, 0, 0.28),
      inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  }

  .landscape-mobile-run.run-shell-battle-first .arena-duel-grid {
    min-height: 100%;
    padding: 42px 10px 12px;
    gap: 12px;
  }

  .landscape-mobile-run.run-shell-battle-first .board-zone {
    padding-inline: 0;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-duel-grid::before,
  .landscape-mobile-run.run-shell-battle-first .section-label-row,
  .landscape-mobile-run.run-shell-battle-first .arena-sidebar-overlay {
    display: none;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-battlefield .arena-board-block:not(.side-bench) .arena-grid-wrap {
    padding: 12px;
    border-radius: 20px;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-grid {
    gap: 8px;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-tile:not(.compact) {
    min-height: clamp(78px, 10vw, 108px);
    padding: 6px;
    border-radius: 16px;
  }

  .landscape-mobile-run.run-shell-battle-first .battlefield-unit-info {
    top: -16px;
    min-width: 118px;
    max-width: 144px;
    gap: 3px;
    padding: 4px 7px 6px;
    border-radius: 10px;
  }

  .landscape-mobile-run.run-shell-battle-first .battlefield-name {
    font-size: 0.62rem;
  }

  .landscape-mobile-run.run-shell-battle-first .battlefield-level,
  .landscape-mobile-run.run-shell-battle-first .battlefield-unit-info .affinity-badge {
    display: none;
  }

  .landscape-mobile-run.run-shell-battle-first .battlefield-hp {
    height: 5px;
  }

  .landscape-mobile-run.run-shell-battle-first .battlefield-hp-icon {
    width: 14px;
    height: 14px;
  }

  .landscape-mobile-run.run-shell-battle-first .battlefield-unit .tile-stage,
  .landscape-mobile-run.run-shell-battle-first .battlefield-unit .tile-stage.no-asset {
    min-height: clamp(122px, 13vw, 164px);
    transform: translateY(-34px) scale(1.2);
  }

  .landscape-mobile-run.run-shell-battle-first .battlefield-unit .tile-stage.variant-boss {
    min-height: clamp(168px, 18vw, 248px);
    transform: translateY(-28px) scale(1.34);
  }

  .landscape-mobile-run.run-shell-battle-first .tile-index {
    font-size: 0.56rem;
    top: 6px;
    right: 8px;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-spotlight-layer {
    top: 8px;
    left: 10px;
    right: 10px;
  }

  .landscape-mobile-run.run-shell-battle-first .phase-state-strip,
  .landscape-mobile-run.run-shell-battle-first .spotlight-card.compact-status,
  .landscape-mobile-run.run-shell-battle-first .replay-bar {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .landscape-mobile-run.run-shell-battle-first .phase-state-copy p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-bottom-rail {
    gap: 8px;
    padding: 0 10px calc(8px + env(safe-area-inset-bottom));
  }

  .landscape-mobile-run.run-shell-battle-first .bench-dock-panel .arena-board-block.side-bench .arena-grid-wrap {
    padding: 8px 10px;
    border-radius: 18px;
  }

  .landscape-mobile-run.run-shell-battle-first .bench-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(82px, 14vw);
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
  }

  .landscape-mobile-run.run-shell-battle-first .arena-board-block.side-bench .arena-tile.compact,
  .landscape-mobile-run.run-shell-battle-first .bench-rail .arena-tile.compact {
    min-height: 92px;
    padding: 8px 9px;
    border-radius: 14px;
  }

  .landscape-mobile-run.run-shell-battle-first .tile-core.compact .tile-name {
    font-size: 0.74rem;
  }

  .landscape-mobile-run.run-shell-battle-first .tile-core.compact .tile-level,
  .landscape-mobile-run.run-shell-battle-first .tile-core.compact .tile-role,
  .landscape-mobile-run.run-shell-battle-first .tile-core.compact .tile-tag {
    font-size: 0.62rem;
  }

  .landscape-mobile-run.run-shell-battle-first .bench-sell-zone {
    padding: 9px 10px;
    border-radius: 14px;
  }

  .landscape-mobile-run.run-shell-battle-first .battle-shop-dock-inner {
    gap: 10px;
    padding: 10px 12px 12px;
    border-radius: 20px;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-drawer-handle {
    width: 52px;
  }

  .landscape-mobile-run.run-shell-battle-first .battle-shop-title {
    gap: 3px;
  }

  .landscape-mobile-run.run-shell-battle-first .battle-shop-title .section-title {
    font-size: 0.74rem;
    letter-spacing: 0.18em;
  }

  .landscape-mobile-run.run-shell-battle-first .battle-shop-head,
  .landscape-mobile-run.run-shell-battle-first .battle-shop-market,
  .landscape-mobile-run.run-shell-battle-first .shop-bottom-meta {
    gap: 8px;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-quick-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .landscape-mobile-run.run-shell-battle-first .battle-shop-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(206px, 26vw);
    grid-template-columns: none;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-card {
    min-height: 132px;
    aspect-ratio: auto;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-card-stage {
    gap: 8px;
    animation: none;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-card-topline {
    gap: 8px;
    align-items: flex-start;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-card-title-stack h3 {
    font-size: 0.82rem;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-card-title-stack .shop-card-ability-line {
    max-width: none;
    font-size: 0.6rem;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-card-portrait {
    width: 76px;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-card-bottom {
    gap: 8px;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-card-meta.portrait {
    justify-content: flex-start;
    gap: 4px;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-card .affinity-badge {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 0.5rem;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-card-buy-button {
    width: 100%;
    min-height: 34px;
    border-radius: 12px;
    font-size: 0.72rem;
  }

  .landscape-mobile-run.run-shell-battle-first .battle-shop-controls .premium-dock-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .landscape-mobile-run.run-shell-battle-first .premium-reroll-button,
  .landscape-mobile-run.run-shell-battle-first .premium-side-button {
    min-height: 62px;
    min-width: 0;
    padding: 8px;
    border-radius: 16px;
    clip-path: none;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-control-copy {
    gap: 3px;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-control-copy strong {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-control-copy span,
  .landscape-mobile-run.run-shell-battle-first .premium-shop-chip {
    font-size: 0.64rem;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-synergy-preview-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    gap: 6px;
  }

  .landscape-mobile-run.run-shell-battle-first .shop-synergy-pill {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 0.62rem;
  }

  .landscape-mobile-run.run-shell-battle-first.combat-focus .arena-battlefield {
    transform: scale(1.015);
    box-shadow:
      0 0 36px rgba(34, 211, 238, 0.08),
      0 18px 42px rgba(0, 0, 0, 0.3);
  }

  .landscape-mobile-run.run-shell-battle-first.combat-focus .bench-dock-panel,
  .landscape-mobile-run.run-shell-battle-first.combat-focus .battle-shop-dock {
    opacity: 0.78;
  }
}

@media (pointer: coarse) and (orientation: portrait) and (max-width: 960px) {
  .landscape-mobile-run.run-shell-battle-first .landscape-orientation-guard {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
      radial-gradient(circle at top, rgba(34, 211, 238, 0.14), transparent 34%),
      linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(8, 14, 24, 0.98));
  }

  .landscape-orientation-card {
    width: min(340px, calc(100vw - 40px));
    display: grid;
    gap: 12px;
    padding: 24px 20px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(103, 232, 249, 0.18);
    background:
      linear-gradient(180deg, rgba(10, 18, 31, 0.96), rgba(4, 9, 18, 0.98));
    box-shadow:
      0 20px 44px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .landscape-orientation-card h2 {
    font-size: 1.3rem;
  }

  .landscape-orientation-card p {
    color: rgba(191, 219, 254, 0.76);
  }

  .landscape-mobile-run.run-shell-battle-first .arena-run-shell,
  .landscape-mobile-run.run-shell-battle-first #run-menu-overlay,
  .landscape-mobile-run.run-shell-battle-first #run-upgrade-overlay {
    visibility: hidden;
    pointer-events: none;
  }
}
