:root {
  color-scheme: dark;
  --bg: #0b0c0f;
  --bg2: #11151c;
  --panel: rgba(12, 15, 20, 0.75);
  --line: rgba(255, 255, 255, 0.15);
  --text: #eef2f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: visible;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(157, 36, 48, 0.2), transparent 35%),
    radial-gradient(circle at 80% 60%, rgba(143, 37, 21, 0.15), transparent 40%),
    linear-gradient(150deg, var(--bg), var(--bg2));
}

body.live-embed {
  background: #05080d;
}

body.live-embed #hud,
body.live-embed #fps-corner,
body.live-embed #chat-wrap,
body.live-embed #minimap-wrap,
body.live-embed #commentator-panel,
body.live-embed #stats-toggle,
body.live-embed #stats-panel,
body.live-embed #mobile-controls,
body.live-embed #dev-console,
body.live-embed #dev-console-toggle,
body.live-embed #replay-game-controls,
body.live-embed #replay-load-overlay,
body.live-embed #run-start-overlay,
body.live-embed #join-overlay {
  display: none !important;
}

body.live-embed #top-center-hud {
  top: 8px;
  transform: translateX(-50%) scale(0.92);
  transform-origin: top center;
}

body.live-embed #top-center-hud .top-center-row {
  padding: 6px 12px;
  font-size: 12px;
}

body.live-embed #bottom-hud {
  bottom: 8px;
  z-index: 14;
  width: min(760px, calc(100vw - 16px));
  transform: translateX(-50%) scale(0.9);
  transform-origin: bottom center;
}

body.live-embed #bottom-hud.hidden {
  display: none;
}

body.live-embed #skill-bar {
  margin-bottom: 6px;
}

body.live-embed .skill-slot-large {
  width: 48px;
  height: 54px;
}

body.live-embed .skill-slot-small {
  width: 36px;
  height: 40px;
}

body.live-embed #xp-wrap {
  padding: 6px 8px 7px;
}

body.live-embed #xp-level {
  font-size: 11px;
  min-width: 42px;
}

body.live-embed .xp-readout {
  margin-bottom: 5px;
}

body.live-embed .xp-readout::before,
body.live-embed .xp-readout::after {
  width: 18px;
}

body.live-embed .xp-kicker {
  display: none;
}

body.live-embed #xp-bar {
  height: 12px;
}

body.live-embed #xp-text {
  font-size: 10px;
}

body.live-embed #xp-levelup-burst {
  bottom: 20px;
  font-size: 10px;
}

#game,
#game-webgl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

#game-webgl {
  z-index: 0;
  pointer-events: none;
}

#game {
  z-index: 1;
  background: transparent;
}

#game.hidden {
  display: none;
}

#game-webgl.hidden {
  display: none;
}

#hit-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 58;
  pointer-events: none;
  overflow: hidden;
  --hit-flash: 0;
}

#hit-screen-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 36, 46, calc(var(--hit-flash) * 0.46)) 0%, rgba(155, 14, 22, calc(var(--hit-flash) * 0.24)) 36%, rgba(65, 6, 10, calc(var(--hit-flash) * 0.1)) 68%, rgba(0, 0, 0, 0) 100%);
  opacity: clamp(0, var(--hit-flash), 0.85);
}

.hit-screen-splat {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--splat-size, 80px);
  height: var(--splat-size, 80px);
  transform: translate(calc(-50% + var(--sx, 0px)), calc(-50% + var(--sy, 0px))) rotate(var(--rot, 0deg)) scale(0.2);
  border-radius: 56% 44% 48% 52% / 54% 42% 58% 46%;
  background: radial-gradient(circle at 38% 34%, rgba(255, 182, 182, 0.25) 0 10%, rgba(177, 11, 17, 0.82) 42%, rgba(92, 5, 9, 0.94) 100%);
  box-shadow: 0 0 16px rgba(144, 12, 20, 0.44);
  opacity: 0;
  animation: hitScreenSplatIn 150ms ease-out forwards, hitScreenSplatFade var(--fade, 1600ms) ease-in forwards;
}

@keyframes hitScreenSplatIn {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--sx, 0px)), calc(-50% + var(--sy, 0px))) rotate(var(--rot, 0deg)) scale(0.16);
  }
  100% {
    opacity: 0.92;
    transform: translate(calc(-50% + var(--sx, 0px)), calc(-50% + var(--sy, 0px))) rotate(var(--rot, 0deg)) scale(1);
  }
}

@keyframes hitScreenSplatFade {
  0%, 12% {
    opacity: 0.9;
    filter: blur(0px);
  }
  100% {
    opacity: 0;
    filter: blur(1.1px);
  }
}

.mission-victory-overlay {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow: hidden;
  pointer-events: auto;
  background:
    linear-gradient(180deg, rgba(2, 6, 12, 0.32), rgba(3, 7, 13, 0.82)),
    repeating-linear-gradient(112deg, rgba(128, 32, 42, 0.055) 0 2px, transparent 2px 18px);
}

.mission-victory-overlay::before,
.mission-victory-overlay::after {
  content: "";
  position: absolute;
  inset: -18%;
  pointer-events: none;
}

.mission-victory-overlay::before {
  background: repeating-conic-gradient(from -18deg at 50% 50%, rgba(122, 34, 38, 0.13) 0 7deg, transparent 7deg 18deg);
  mix-blend-mode: screen;
  opacity: 0;
  animation: missionVictoryRays 1300ms cubic-bezier(.15,.78,.22,1) forwards;
}

.mission-victory-overlay::after {
  background: linear-gradient(90deg, transparent 0 34%, rgba(255, 255, 255, 0.18) 48%, transparent 62% 100%);
  transform: translateX(-64%) skewX(-18deg);
  animation: missionVictorySweep 1600ms ease-out 220ms forwards;
}

.mission-victory-fanfare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(120, 25, 35, 0.14) 12%, transparent 20% 80%, rgba(154, 52, 18, 0.1) 88%, transparent 96%),
    linear-gradient(0deg, rgba(143, 29, 44, 0.16) 0 2px, transparent 2px 100%);
  background-size: 100% 100%, 100% 18px;
  opacity: 0;
  animation: missionVictoryFanfare 900ms ease-out 80ms forwards;
}

.mission-victory-bursts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.mission-victory-spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--spark-w, 8px);
  height: var(--spark-h, 3px);
  border-radius: 999px;
  background: var(--spark-color, #b4534a);
  box-shadow: 0 0 12px rgba(127, 29, 29, 0.42);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--spark-rot, 0deg));
  animation: missionVictorySpark var(--spark-life, 1100ms) cubic-bezier(.16,.82,.24,1) var(--spark-delay, 0ms) forwards;
}

.mission-victory-card {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100vw - 24px));
  max-height: min(80vh, 820px);
  display: grid;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(136, 32, 42, 0.48);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(14, 19, 28, 0.97), rgba(6, 10, 18, 0.96)),
    linear-gradient(135deg, rgba(120, 25, 35, 0.18), transparent 42%, rgba(180, 83, 74, 0.08));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 0 34px rgba(127, 29, 29, 0.22);
  padding: clamp(14px, 2.2vw, 22px);
  transform: translateY(28px) scale(0.9) rotate(-0.6deg);
  opacity: 0;
  animation: missionVictoryCardIn 650ms cubic-bezier(.12,.86,.18,1.12) 150ms forwards;
}

.mission-victory-card.is-fit {
  overflow: visible;
}

.mission-victory-card.is-scrollable {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.mission-victory-head {
  display: grid;
  gap: 6px;
}

.mission-victory-kicker {
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid rgba(184, 117, 82, 0.48);
  border-radius: 6px;
  background: rgba(69, 16, 24, 0.58);
  color: #e9c89b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mission-victory-head h2 {
  margin: 0;
  width: fit-content;
  color: #ead29b;
  font-family: "Bahnschrift SemiCondensed", "Arial Narrow", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: clamp(38px, 6.4vw, 78px);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  text-shadow:
    0 1px 0 rgba(68, 18, 22, 0.96),
    0 3px 0 rgba(35, 10, 14, 0.76),
    0 14px 32px rgba(116, 52, 26, 0.36),
    0 0 22px rgba(214, 180, 111, 0.22);
}

.mission-victory-head h2::after {
  content: "";
  display: block;
  width: 78%;
  height: 3px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(143, 29, 44, 0.88), rgba(214, 180, 111, 0.78), transparent);
  box-shadow: 0 0 14px rgba(214, 180, 111, 0.2);
}

.mission-victory-head p {
  margin: 0;
  max-width: 820px;
  color: #cbd5e1;
  font-size: clamp(14px, 1.8vw, 17px);
  line-height: 1.38;
}

.mission-victory-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.mission-victory-stat {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(12, 17, 27, 0.74);
}

.mission-victory-stat span {
  color: #a9b8ca;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.mission-victory-stat b {
  color: #ead8b5;
  font-size: clamp(17px, 2.5vw, 25px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.mission-victory-objectives,
.mission-victory-rewards {
  display: grid;
  gap: 6px;
  color: #e5e7eb;
}

.mission-victory-section-title {
  color: #d8a1a1;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mission-victory-objective-list,
.mission-victory-reward-list {
  display: grid;
  gap: 5px;
}

.mission-victory-objective,
.mission-victory-reward {
  display: grid;
  grid-template-columns: minmax(170px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(7, 12, 22, 0.68);
}

.mission-victory-objective strong,
.mission-victory-reward strong {
  color: #f8fafc;
  overflow-wrap: anywhere;
}

.mission-victory-objective span,
.mission-victory-reward span {
  color: #d8c07a;
  font-weight: 900;
  white-space: nowrap;
}

.mission-victory-reward span {
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

.mission-victory-progress {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.95);
}

.mission-victory-progress i {
  display: block;
  height: 100%;
  width: var(--goal-progress, 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, #8f1d2c, #b4534a 58%, #d6b46f);
  box-shadow: 0 0 14px rgba(127, 29, 29, 0.34);
}

.mission-victory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.mission-victory-actions button {
  position: relative;
  overflow: hidden;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(184, 117, 82, 0.34);
  padding: 10px 16px;
  color: #f7ead8;
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.055em;
  cursor: pointer;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.mission-victory-actions button::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 245, 220, 0.16), transparent 42%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.13), transparent);
  opacity: 0.58;
  pointer-events: none;
}

.mission-victory-actions button::after {
  content: "";
  position: absolute;
  left: -42%;
  top: 0;
  width: 34%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 240, 210, 0.28), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}

.mission-victory-primary {
  background:
    radial-gradient(circle at 24% 0%, rgba(239, 68, 68, 0.24), transparent 42%),
    linear-gradient(135deg, rgba(95, 12, 24, 0.98), rgba(147, 26, 36, 0.96) 54%, rgba(78, 16, 24, 0.98));
  box-shadow: 0 11px 28px rgba(95, 12, 24, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.mission-victory-secondary {
  background:
    radial-gradient(circle at 26% 0%, rgba(184, 117, 82, 0.13), transparent 40%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(47, 18, 24, 0.94));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.045) inset;
}

.mission-victory-actions button:hover,
.mission-victory-actions button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(216, 160, 114, 0.68);
  filter: brightness(1.07) saturate(1.04);
}

.mission-victory-actions button:hover::after,
.mission-victory-actions button:focus-visible::after {
  opacity: 1;
  animation: missionVictoryButtonSweep 680ms ease-out forwards;
}

.mission-victory-primary:hover,
.mission-victory-primary:focus-visible {
  box-shadow: 0 14px 34px rgba(127, 29, 29, 0.42), 0 0 22px rgba(185, 28, 28, 0.2);
}

.mission-victory-secondary:hover,
.mission-victory-secondary:focus-visible {
  box-shadow: 0 13px 30px rgba(0, 0, 0, 0.36), 0 0 18px rgba(184, 117, 82, 0.16);
}

@keyframes missionVictoryCardIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.88) rotate(-0.8deg); }
  68% { opacity: 1; transform: translateY(-5px) scale(1.025) rotate(0.35deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}

@keyframes missionVictoryRays {
  0% { opacity: 0; transform: scale(0.72) rotate(-10deg); }
  38% { opacity: 0.92; }
  100% { opacity: 0.28; transform: scale(1.12) rotate(6deg); }
}

@keyframes missionVictorySweep {
  0% { opacity: 0; transform: translateX(-64%) skewX(-18deg); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translateX(76%) skewX(-18deg); }
}

@keyframes missionVictoryFanfare {
  0% { opacity: 0; transform: scaleY(0.6); }
  28% { opacity: 1; }
  100% { opacity: 0.46; transform: scaleY(1); }
}

@keyframes missionVictorySpark {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--spark-rot, 0deg)) scaleX(0.4);
  }
  12% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--spark-x, 0px)), calc(-50% + var(--spark-y, 0px))) rotate(var(--spark-rot, 0deg)) scaleX(1);
  }
}

@keyframes missionVictoryButtonSweep {
  0% { left: -42%; }
  100% { left: 112%; }
}

@media (max-width: 760px) {
  .mission-victory-card {
    max-height: 88vh;
    padding: 14px;
  }

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

  .mission-victory-objective,
  .mission-victory-reward {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .mission-victory-objective span,
  .mission-victory-reward span {
    white-space: normal;
  }

  .mission-victory-actions {
    justify-content: stretch;
  }

  .mission-victory-actions button {
    flex: 1 1 100%;
  }
}

#hud {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  z-index: 61;
}

#top-center-hud {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  pointer-events: none;
  display: grid;
  justify-items: center;
  gap: 6px;
}

#top-center-hud.hidden {
  display: none;
}

#top-center-hud .top-center-row {
  background: rgba(8, 13, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #e2e8f0;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

#top-center-hud .top-sep {
  opacity: 0.55;
  margin: 0 6px;
}

#commentator-panel {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 72px);
  right: 12px;
  z-index: 72;
  width: min(430px, calc(100vw - 24px));
  display: grid;
  gap: 10px;
  padding: 14px 16px 13px;
  border-radius: 16px 6px 16px 6px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 36, 36, 0.2), transparent 19%),
    radial-gradient(circle at top right, rgba(255, 132, 97, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(12, 16, 24, 0.94), rgba(5, 8, 13, 0.9));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 18px 42px rgba(0, 0, 0, 0.42),
    0 0 26px rgba(220, 38, 38, 0.18);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

#commentator-panel::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(248, 113, 113, 0.9), transparent);
  pointer-events: none;
}

#commentator-panel.hidden {
  display: none;
}

.commentator-kicker {
  display: inline-flex;
  align-items: center;
  position: relative;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 10px 3px 10px 3px;
  border: 1px solid rgba(248, 113, 113, 0.26);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.42), rgba(255, 255, 255, 0.05));
  color: #fecaca;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.commentator-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.commentator-panel-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 9px 3px 9px 3px;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.58), rgba(8, 13, 20, 0.78));
  color: #fee2e2;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.12);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.commentator-panel-close:hover,
.commentator-panel-close:focus-visible {
  border-color: rgba(248, 113, 113, 0.64);
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.82), rgba(8, 13, 20, 0.82));
  transform: translateY(-1px);
}

.commentator-panel-close:active {
  transform: translateY(1px) scale(0.96);
  background: linear-gradient(135deg, rgba(153, 27, 27, 0.86), rgba(8, 13, 20, 0.92));
}

.commentator-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.commentator-voice-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff3ec;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.commentator-voice-btn:hover,
.commentator-voice-btn:focus-visible {
  border-color: rgba(255, 190, 170, 0.38);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.commentator-voice-btn.is-active {
  border-color: rgba(255, 164, 134, 0.42);
  background: linear-gradient(135deg, rgba(181, 39, 24, 0.9), rgba(255, 121, 87, 0.24));
}

.commentator-voice-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.commentator-voice-status {
  flex: 1 1 180px;
  color: #f0d0c4;
  font-size: 12px;
  line-height: 1.4;
}

#commentator-title {
  font-size: 18px;
  line-height: 1.2;
}

#commentator-text {
  margin: 0;
  color: #d9e2ef;
  line-height: 1.55;
  font-size: 14px;
}

.commentator-volume-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "range range";
  align-items: center;
  gap: 7px 10px;
  padding: 8px 9px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px 3px 10px 3px;
  background: rgba(2, 6, 12, 0.48);
}

.commentator-volume-control span {
  grid-area: label;
  min-width: 0;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.commentator-volume-control strong {
  grid-area: value;
  color: #fecaca;
  font-size: 12px;
}

.commentator-volume-control input[type="range"] {
  grid-area: range;
  width: 100%;
  accent-color: #ef4444;
}

.commentator-speech-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.commentator-speech-chip {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px 3px 10px 3px;
  background: rgba(2, 6, 12, 0.58);
  box-shadow: inset 0 0 18px rgba(15, 23, 42, 0.4);
}

.commentator-speech-chip span {
  display: block;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.commentator-speech-chip strong {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.commentator-queue-list {
  display: grid;
  gap: 5px;
  max-height: 118px;
  overflow: hidden;
}

.commentator-queue-item,
.commentator-queue-empty,
.commentator-queue-more {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 9px 3px 9px 3px;
  background: rgba(8, 13, 20, 0.58);
}

.commentator-queue-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 5px 8px;
}

.commentator-queue-item.is-active {
  border-color: rgba(248, 113, 113, 0.48);
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.54), rgba(8, 13, 20, 0.7));
  box-shadow: 0 0 18px rgba(220, 38, 38, 0.16);
}

.commentator-queue-item.is-urgent {
  border-color: rgba(251, 191, 36, 0.44);
}

.commentator-queue-label {
  color: #fecaca;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.commentator-queue-text {
  min-width: 0;
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.commentator-queue-empty,
.commentator-queue-more {
  padding: 7px 9px;
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
}

.boss-spawn-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.72);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.9), rgba(69, 10, 10, 0.92));
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(153, 27, 27, 0.35), 0 8px 18px rgba(127, 29, 29, 0.36), inset 0 0 18px rgba(220, 38, 38, 0.24);
  animation: bossAlertPulse 0.8s ease-in-out infinite;
}

.boss-spawn-alert.hidden {
  display: none;
}

@keyframes bossAlertPulse {
  0%, 100% { transform: translateY(0); filter: brightness(1); }
  50% { transform: translateY(-1px); filter: brightness(1.08); }
}

.replay-load-overlay {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 62px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 58;
  width: min(420px, calc(100vw - 24px));
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 14, 24, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
}

.replay-load-label {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.replay-load-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.9);
}

.replay-load-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  transition: width 0.15s ease;
}

.replay-load-fill.indeterminate {
  width: 35%;
  animation: replayLoadIndeterminate 1.1s ease-in-out infinite;
}

.replay-load-meta {
  font-size: 12px;
  color: #cbd5e1;
}

@keyframes replayLoadIndeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.run-start-overlay {
  --run-start-bg-image: url('/assets/backgrounds/screen-loading.jpg');
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
  background-color: #03060a;
  opacity: 1;
  transition: background-color 0.72s ease;
}

.run-start-overlay.hidden {
  display: none;
}

.run-start-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(3, 6, 10, 0.68)),
    var(--run-start-bg-image) center / cover no-repeat;
  transform: scale(1.035);
  animation: runStartBgDrift 5.2s ease-in-out infinite alternate;
}

.run-start-glass {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 14%, transparent 86%, rgba(255, 255, 255, 0.04)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
  opacity: 0.46;
}

.run-start-panel {
  position: absolute;
  left: 50%;
  bottom: max(32px, calc(env(safe-area-inset-bottom) + 30px));
  width: min(560px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(4, 9, 16, 0.76);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(-50%);
}

.run-start-label {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f8fafc;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.42);
}

.run-start-track {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 12, 20, 0.82);
  box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.48);
}

.run-start-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f97316, #facc15 48%, #22c55e);
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.36);
  transition: width 0.18s ease;
}

.run-start-meta {
  min-height: 18px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 650;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.run-start-impact-img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(680px, 70vw);
  max-height: 70vh;
  object-fit: contain;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.04) rotate(-4deg);
  filter: drop-shadow(0 16px 34px rgba(0, 0, 0, 0.54));
  will-change: transform, opacity;
}

.run-start-overlay.is-intro .run-start-bg,
.run-start-overlay.is-intro .run-start-glass,
.run-start-overlay.is-intro .run-start-panel {
  opacity: 0;
  transition: opacity 0.72s ease, transform 0.72s ease;
}

.run-start-overlay.is-intro {
  background-color: rgba(3, 6, 10, 0);
}

.run-start-overlay.is-intro .run-start-bg {
  transform: scale(1.12);
}

.run-start-overlay.impact-active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(248, 113, 113, 0.12) 38%, rgba(0, 0, 0, 0));
  opacity: 0;
  animation: runStartImpactFlash 480ms ease-out;
}

.run-start-overlay.impact-active .run-start-impact-img {
  animation: runStartImpactCrash 1240ms cubic-bezier(.2, .88, .18, 1) forwards;
}

@keyframes runStartBgDrift {
  0% { transform: scale(1.035) translate3d(-0.45%, -0.35%, 0); }
  100% { transform: scale(1.055) translate3d(0.45%, 0.35%, 0); }
}

@keyframes runStartImpactCrash {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.04) rotate(-4deg);
  }
  24% {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(1.08) rotate(0.6deg);
  }
  68% {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(1.16) rotate(0deg);
  }
  84% {
    opacity: 0.9;
    transform: translate3d(-50%, -50%, 0) scale(1.1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.9) rotate(0deg);
  }
}

@keyframes runStartImpactFlash {
  0% { opacity: 0; }
  28% { opacity: 0.95; }
  100% { opacity: 0; }
}

#bottom-hud {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 11;
  pointer-events: none;
  width: min(1120px, calc(100vw - 20px));
}

#bottom-hud.hidden {
  display: none;
}

#fps-corner {
  position: fixed;
  left: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 12px);
  z-index: 12;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: max-content;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(7, 12, 20, 0.8);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

#fps-corner.hidden {
  display: none;
}

#minimap-wrap {
  position: fixed;
  left: 12px;
  top: calc(env(safe-area-inset-top) + 12px);
  bottom: auto;
  z-index: 12;
  pointer-events: none;
  width: 220px;
  height: 220px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(7, 12, 20, 0.8);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}

#minimap-wrap.hidden {
  display: none;
}

#minimap {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 10px;
  image-rendering: pixelated;
}

#skill-bar {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 8px;
  pointer-events: auto;
}

.skill-dock {
  display: grid;
  justify-items: center;
  gap: 5px;
  max-width: 100%;
}

.skill-dock-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  max-width: 100%;
}

.skill-dock-row-primary {
  flex-wrap: wrap;
}

.skill-dock-row-passive {
  flex-wrap: wrap;
  gap: 5px;
}

.skill-chip {
  color: #e5e7eb;
}

.skill-slot {
  --skill-color: #60a5fa;
  --rarity-color: #d1d5db;
  --cooldown: 100%;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  isolation: isolate;
  cursor: help;
  transition: transform 120ms ease, opacity 120ms ease, filter 120ms ease;
}

.skill-slot-large {
  width: 56px;
  height: 62px;
}

.skill-slot-small {
  width: 40px;
  height: 44px;
}

.skill-slot-ring {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background:
    conic-gradient(from -90deg, var(--skill-color) var(--cooldown), rgba(93, 104, 123, 0.2) 0),
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.03));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--rarity-color) 62%, transparent),
    0 10px 18px rgba(0,0,0,0.34),
    0 0 16px color-mix(in srgb, var(--skill-color) 28%, transparent);
  opacity: 0.96;
}

.skill-slot-core {
  position: absolute;
  inset: 3px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 45% 28%, color-mix(in srgb, var(--skill-color) 42%, transparent), transparent 45%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(3, 7, 18, 0.96));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.skill-slot-icon {
  position: absolute;
  inset: 8px 8px 12px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--skill-color) 34%, transparent), transparent 64%),
    rgba(2, 6, 23, 0.42);
  overflow: hidden;
}

.skill-slot-small .skill-slot-icon {
  inset: 7px 7px 9px;
}

.skill-slot-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.skill-slot-icon.has-image {
  background: rgba(2, 6, 23, 0.24);
}

.skill-slot-icon.has-image .skill-slot-glyph {
  display: none;
}

.skill-slot-glyph {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 #020617, 0 0 10px color-mix(in srgb, var(--skill-color) 70%, transparent);
}

.skill-slot-small .skill-slot-glyph {
  font-size: 10px;
}

.skill-slot-level,
.skill-slot-timer,
.skill-slot-stack {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 14px;
  padding: 0 4px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(2, 6, 23, 0.86);
  color: #f8fafc;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.skill-slot-level {
  left: 2px;
  top: 2px;
  color: #dbeafe;
}

.skill-slot-timer {
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  min-width: 30px;
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.34);
}

.skill-slot-stack {
  right: 2px;
  bottom: 3px;
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.28);
}

.skill-slot-ready-dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #86efac;
  box-shadow: 0 0 10px rgba(134, 239, 172, 0.82);
}

.skill-slot-small .skill-slot-level {
  min-width: 16px;
  height: 12px;
  padding: 0 3px;
  font-size: 8px;
}

.skill-slot-small .skill-slot-ready-dot {
  right: 4px;
  bottom: 4px;
  width: 6px;
  height: 6px;
}

.skill-slot.is-cooling .skill-slot-core {
  filter: grayscale(0.22) brightness(0.74);
}

.skill-slot.is-cooling .skill-slot-ring {
  opacity: 0.72;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.28),
    0 8px 14px rgba(0,0,0,0.3);
}

.skill-slot.is-passive {
  opacity: 0.9;
}

.skill-slot.is-passive .skill-slot-ring {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--skill-color) 55%, transparent), rgba(93, 104, 123, 0.16)),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
}

.skill-slot.is-empty {
  opacity: 0.52;
}

.skill-slot.is-empty .skill-slot-core {
  filter: grayscale(0.65) brightness(0.65);
}

.skill-slot.is-ready-pulse .skill-slot-ring {
  animation: skillReadyPulse 1600ms ease-out both;
}

.skill-slot.is-ready-pulse::before,
.skill-slot.is-ready-pulse::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 14px;
  pointer-events: none;
  z-index: 4;
}

.skill-slot.is-ready-pulse::before {
  background:
    linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.82) 46%, rgba(255,255,255,0.24) 52%, transparent 70%);
  mix-blend-mode: screen;
  transform: translateX(-86%) skewX(-18deg);
  animation: skillReadyGlint 1150ms ease-out 100ms both;
}

.skill-slot.is-ready-pulse::after {
  border: 1px solid color-mix(in srgb, var(--skill-color) 76%, white 24%);
  box-shadow:
    0 0 18px color-mix(in srgb, var(--skill-color) 62%, transparent),
    0 0 36px color-mix(in srgb, var(--skill-color) 30%, transparent);
  opacity: 0;
  animation: skillReadyAura 1600ms ease-out both;
}

.skill-slot.is-ready-pulse .skill-slot-core::after {
  content: "";
  position: absolute;
  inset: -40% -70%;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,0.72) 48%, rgba(255,255,255,0.16) 54%, transparent 64%);
  transform: translateX(-58%) rotate(8deg);
  animation: skillReadyCoreGlint 1050ms ease-out 140ms both;
  pointer-events: none;
}

.skill-slot.is-cast-pulse {
  animation: skillCastKick 560ms cubic-bezier(0.2, 1.7, 0.35, 1) both;
}

.skill-slot.is-cast-pulse::before,
.skill-slot.is-cast-pulse::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 15px;
  pointer-events: none;
  z-index: 4;
}

.skill-slot.is-cast-pulse::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.72), color-mix(in srgb, var(--skill-color) 62%, transparent) 28%, transparent 64%);
  mix-blend-mode: screen;
  animation: skillCastFlash 620ms ease-out both;
}

.skill-slot.is-cast-pulse::after {
  border: 2px solid color-mix(in srgb, var(--skill-color) 72%, white 28%);
  box-shadow:
    0 0 12px color-mix(in srgb, var(--skill-color) 72%, transparent),
    0 0 28px color-mix(in srgb, var(--skill-color) 38%, transparent);
  animation: skillCastRing 820ms ease-out both;
}

.skill-slot:hover,
.skill-slot:focus-visible {
  transform: translateY(-4px) scale(1.04);
  filter: brightness(1.08);
}

.skill-slot:hover .skill-slot-ring,
.skill-slot:focus-visible .skill-slot-ring {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--rarity-color) 86%, transparent),
    0 12px 24px rgba(0,0,0,0.38),
    0 0 22px color-mix(in srgb, var(--skill-color) 48%, transparent);
}

.skill-slot:hover .skill-slot-core,
.skill-slot:focus-visible .skill-slot-core {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.2),
    inset 0 0 18px color-mix(in srgb, var(--skill-color) 32%, transparent);
}

.skill-slot:hover .skill-slot-core::before,
.skill-slot:focus-visible .skill-slot-core::before {
  content: "";
  position: absolute;
  inset: -42% -74%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 38%, rgba(255,255,255,0.72) 48%, rgba(255,255,255,0.18) 54%, transparent 66%);
  transform: translateX(-62%) rotate(8deg);
  animation: skillHoverGlint 960ms ease-out both;
}

@keyframes skillReadyPulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  22% {
    transform: scale(1.12);
    filter: brightness(1.8);
  }
  52% {
    transform: scale(1.03);
    filter: brightness(1.24);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes skillReadyGlint {
  0% {
    opacity: 0;
    transform: translateX(-86%) skewX(-18deg);
  }
  18% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateX(86%) skewX(-18deg);
  }
}

@keyframes skillReadyCoreGlint {
  0% {
    opacity: 0;
    transform: translateX(-58%) rotate(8deg);
  }
  24% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(58%) rotate(8deg);
  }
}

@keyframes skillReadyAura {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }
  18% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

@keyframes skillCastKick {
  0% {
    transform: scale(1);
  }
  18% {
    transform: scale(0.9);
  }
  44% {
    transform: scale(1.13);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes skillCastFlash {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  20% {
    opacity: 0.95;
    transform: scale(0.96);
  }
  100% {
    opacity: 0;
    transform: scale(1.38);
  }
}

@keyframes skillCastRing {
  0% {
    opacity: 0.95;
    transform: scale(0.72);
  }
  100% {
    opacity: 0;
    transform: scale(1.34);
  }
}

@keyframes skillHoverGlint {
  0% {
    opacity: 0;
    transform: translateX(-62%) rotate(8deg);
  }
  22% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateX(62%) rotate(8deg);
  }
}

.skill-tooltip {
  --tooltip-color: #60a5fa;
  --tooltip-arrow-x: 50%;
  position: fixed;
  left: 0;
  top: 0;
  width: min(360px, calc(100vw - 16px));
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 0%, color-mix(in srgb, var(--tooltip-color) 26%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
  border: 1px solid color-mix(in srgb, var(--tooltip-color) 54%, rgba(148, 163, 184, 0.34));
  border-radius: 8px;
  padding: 10px;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.35;
  z-index: 20000;
  box-shadow:
    0 18px 40px rgba(0,0,0,0.52),
    0 0 24px color-mix(in srgb, var(--tooltip-color) 26%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.12);
  pointer-events: none;
  animation: skillTooltipIn 120ms ease-out both;
}

.skill-tooltip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(118deg, transparent 0 34%, rgba(255,255,255,0.16) 44%, transparent 56%),
    linear-gradient(90deg, color-mix(in srgb, var(--tooltip-color) 48%, transparent), transparent 42%);
  opacity: 0.52;
  transform: translateX(-64%);
  animation: skillTooltipGlint 1450ms ease-out both;
  pointer-events: none;
}

.skill-tooltip::after {
  content: "";
  position: absolute;
  left: var(--tooltip-arrow-x);
  width: 10px;
  height: 10px;
  background: rgba(8, 13, 24, 0.98);
  border: 1px solid color-mix(in srgb, var(--tooltip-color) 54%, rgba(148, 163, 184, 0.34));
  transform: translateX(-50%) rotate(45deg);
}

.skill-tooltip.is-above::after {
  bottom: -6px;
  border-left: 0;
  border-top: 0;
}

.skill-tooltip.is-below::after {
  top: -6px;
  border-right: 0;
  border-bottom: 0;
}

.skill-tooltip.hidden {
  display: none;
}

.skill-tooltip-head,
.skill-tooltip-desc,
.skill-tooltip-stats {
  position: relative;
  z-index: 1;
}

.skill-tooltip-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.skill-tooltip-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--tooltip-color) 36%, transparent), transparent 64%),
    rgba(2, 6, 23, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.15),
    0 0 16px color-mix(in srgb, var(--tooltip-color) 34%, transparent);
}

.skill-tooltip-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skill-tooltip-icon span {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 950;
  text-shadow: 0 1px 0 #020617, 0 0 10px var(--tooltip-color);
}

.skill-tooltip-head-copy {
  min-width: 0;
}

.skill-tooltip-kicker {
  color: color-mix(in srgb, var(--tooltip-color) 72%, #f8fafc);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-tooltip-title {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.18;
  margin-top: 2px;
  text-shadow: 0 0 16px color-mix(in srgb, var(--tooltip-color) 30%, transparent);
}

.skill-tooltip-state {
  align-self: start;
  min-width: max-content;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--tooltip-color) 42%, transparent);
  background: color-mix(in srgb, var(--tooltip-color) 16%, rgba(2, 6, 23, 0.78));
  color: #f8fafc;
  font-size: 10px;
  font-weight: 900;
}

.skill-tooltip-desc {
  color: #cbd5e1;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.skill-tooltip-effect {
  position: relative;
  z-index: 1;
  margin-top: 7px;
  padding: 7px 8px;
  border-radius: 7px;
  border: 1px solid color-mix(in srgb, var(--tooltip-color) 28%, rgba(148, 163, 184, 0.18));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--tooltip-color) 16%, rgba(15, 23, 42, 0.76)), rgba(15, 23, 42, 0.64));
  color: #eaf4ff;
  font-size: 11.5px;
  font-weight: 760;
}

.skill-tooltip-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.skill-tooltip-line {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 750;
}

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

@keyframes skillTooltipGlint {
  0% {
    opacity: 0;
    transform: translateX(-64%);
  }
  24% {
    opacity: 0.62;
  }
  100% {
    opacity: 0;
    transform: translateX(64%);
  }
}

#xp-wrap {
  --xp-progress: 0%;
  --xp-edge-x: 4%;
  --xp-core-a: #14f1ff;
  --xp-core-b: #4ade80;
  --xp-core-c: #facc15;
  --xp-core-d: #fb7185;
  width: min(780px, 100%);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  padding: 9px 12px 11px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(20, 241, 255, 0.18), transparent 18%, transparent 82%, rgba(250, 204, 21, 0.12)),
    radial-gradient(circle at var(--xp-edge-x) 92%, rgba(250, 204, 21, 0.22), transparent 22%),
    linear-gradient(180deg, rgba(16, 24, 38, 0.95), rgba(3, 7, 18, 0.94));
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.48),
    0 0 18px rgba(34, 211, 238, 0.14);
  isolation: isolate;
}

#xp-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(112deg, transparent 0 34%, rgba(255,255,255,0.12) 45%, transparent 57%),
    radial-gradient(circle at 14% 22%, rgba(125, 211, 252, 0.12), transparent 28%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 7px);
  transform: translateX(-58%);
  opacity: 0.52;
  animation: xpPanelSheen 5.8s ease-in-out infinite;
}

#xp-wrap::after {
  content: "";
  position: absolute;
  left: var(--xp-edge-x);
  bottom: 7px;
  z-index: 0;
  width: 82px;
  height: 26px;
  pointer-events: none;
  transform: translateX(-48%);
  background: radial-gradient(ellipse at center, rgba(255, 247, 237, 0.72), rgba(250, 204, 21, 0.42) 28%, rgba(20, 241, 255, 0.22) 52%, transparent 74%);
  opacity: 0;
  filter: blur(7px);
}

.xp-readout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.xp-readout::before,
.xp-readout::after {
  content: "";
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.58), rgba(250, 204, 21, 0.28), transparent);
  opacity: 0.72;
}

#xp-level {
  min-width: 48px;
  padding: 4px 8px;
  border: 1px solid rgba(250, 204, 21, 0.38);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), transparent 48%),
    radial-gradient(circle at 32% 0%, rgba(250, 204, 21, 0.32), transparent 58%),
    linear-gradient(135deg, rgba(10, 18, 28, 0.9), rgba(2, 6, 23, 0.92));
  color: #fef3c7;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  box-shadow:
    0 0 14px rgba(250, 204, 21, 0.18),
    inset 0 0 0 1px rgba(255,255,255,0.07);
}

.xp-readout-main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
}

.xp-kicker {
  color: #a7f3d0;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.42);
}

#xp-bar {
  position: relative;
  z-index: 1;
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.18) 0 1px, transparent 1px 9.09%),
    radial-gradient(circle at var(--xp-edge-x) 50%, rgba(250, 204, 21, 0.18), transparent 22%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(9, 16, 28, 0.98));
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08),
    inset 0 1px 5px rgba(0, 0, 0, 0.78),
    inset 0 0 0 1px rgba(255,255,255,0.05);
}

#xp-bar::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 1;
  border-radius: inherit;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.11) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-18deg, rgba(125, 211, 252, 0.05) 0 5px, rgba(250, 204, 21, 0.035) 5px 10px);
  opacity: 0.5;
  pointer-events: none;
}

#xp-bar::after {
  content: "";
  position: absolute;
  left: var(--xp-edge-x);
  top: 1px;
  bottom: 1px;
  z-index: 5;
  width: 2px;
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.82);
  box-shadow:
    0 0 8px rgba(250, 204, 21, 0.84),
    0 0 16px rgba(20, 241, 255, 0.48);
  opacity: 0.42;
  transform: translateX(-1px);
}

.xp-track-glass {
  position: absolute;
  inset: 2px;
  z-index: 4;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), transparent 42%),
    linear-gradient(90deg, rgba(255,255,255,0.08), transparent 12%, transparent 88%, rgba(255,255,255,0.08)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.065) 0 1px, transparent 1px 34px);
  mix-blend-mode: screen;
  opacity: 0.62;
  pointer-events: none;
}

#xp-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 30%, rgba(255,255,255,0.36), transparent 18%),
    radial-gradient(circle at 62% 62%, rgba(250, 204, 21, 0.28), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.04) 45%, rgba(0,0,0,0.18) 100%),
    linear-gradient(90deg, #0ea5e9 0%, var(--xp-core-a) 28%, #2dd4bf 52%, var(--xp-core-b) 70%, var(--xp-core-c) 92%, var(--xp-core-d) 100%);
  box-shadow:
    0 0 16px rgba(20, 241, 255, 0.4),
    0 0 26px rgba(250, 204, 21, 0.14),
    inset 0 0 10px rgba(255,255,255,0.16);
  transition: width 420ms cubic-bezier(0.2, 0.86, 0.18, 1);
}

#xp-fill::before {
  content: "";
  position: absolute;
  inset: 1px 0;
  border-radius: inherit;
  background:
    linear-gradient(112deg, transparent 0 35%, rgba(255,255,255,0.42) 45%, rgba(255,255,255,0.08) 54%, transparent 66%),
    radial-gradient(circle at 30% 50%, rgba(255,255,255,0.2), transparent 18%),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.13) 0 6px, transparent 6px 16px),
    repeating-linear-gradient(90deg, rgba(2, 6, 23, 0.16) 0 1px, transparent 1px 11px);
  opacity: 0.62;
  animation: xpFillFlow 1.65s linear infinite;
}

#xp-fill::after {
  content: "";
  position: absolute;
  right: -6px;
  top: -5px;
  width: 14px;
  height: calc(100% + 10px);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, #fff7ed 0 18%, rgba(250, 204, 21, 0.94) 38%, rgba(20, 241, 255, 0.42) 66%, transparent 78%);
  opacity: 0.5;
  filter: blur(1px);
  transform: scaleY(0.72);
}

#xp-gain-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 0%;
  z-index: 2;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.9), rgba(250, 204, 21, 0.66), rgba(20, 241, 255, 0));
  opacity: 0;
  filter: blur(0.5px);
  transform: translateX(-10%);
  pointer-events: none;
}

#xp-wrap.is-xp-gaining {
  animation: xpPanelPulse 720ms ease-out both;
}

#xp-wrap.is-xp-gaining::after {
  opacity: 1;
  animation: xpEdgeGlow 760ms ease-out both;
}

#xp-wrap.is-xp-gaining #xp-fill::after {
  opacity: 1;
  animation: xpEdgeSpark 760ms ease-out both;
}

#xp-wrap.is-xp-gaining #xp-gain-fill {
  animation: xpGainSweep 760ms ease-out both;
}

#xp-wrap.is-xp-level-up {
  animation: xpLevelUpPulse 1080ms ease-out both;
}

#xp-wrap.is-xp-level-up #xp-level {
  animation: xpLevelBadgeBurst 1100ms ease-out both;
}

#xp-wrap.is-xp-level-up #xp-bar {
  animation: xpTrackLevelFlash 1120ms ease-out both;
}

#xp-levelup-burst {
  position: absolute;
  left: var(--xp-edge-x);
  bottom: 24px;
  z-index: 7;
  padding: 5px 10px;
  border: 1px solid rgba(250, 204, 21, 0.56);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.03)),
    rgba(3, 7, 18, 0.9);
  color: #fff7ed;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow:
    0 0 8px rgba(250, 204, 21, 0.72),
    0 0 18px rgba(20, 241, 255, 0.42);
  box-shadow:
    0 0 16px rgba(250, 204, 21, 0.3),
    0 0 30px rgba(20, 241, 255, 0.18),
    inset 0 0 0 1px rgba(255,255,255,0.08);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px) scale(0.82);
}

#xp-wrap.is-xp-level-up #xp-levelup-burst {
  animation: xpLevelUpBurst 1120ms cubic-bezier(0.2, 1.28, 0.22, 1) both;
}

#xp-text {
  font-size: 11px;
  font-weight: 800;
  color: #bfdbfe;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.28);
}

@keyframes xpPanelSheen {
  0%, 58% {
    opacity: 0;
    transform: translateX(-58%);
  }
  70% {
    opacity: 0.52;
  }
  100% {
    opacity: 0;
    transform: translateX(58%);
  }
}

@keyframes xpFillFlow {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 120px 0, 48px 0; }
}

@keyframes xpPanelPulse {
  0% {
    box-shadow:
      0 14px 34px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255,255,255,0.1),
      0 0 18px rgba(34, 211, 238, 0.12);
  }
  28% {
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.44),
      inset 0 1px 0 rgba(255,255,255,0.16),
      0 0 24px rgba(34, 211, 238, 0.3),
      0 0 34px rgba(250, 204, 21, 0.18);
  }
  100% {
    box-shadow:
      0 14px 34px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255,255,255,0.1),
      0 0 18px rgba(34, 211, 238, 0.12);
  }
}

@keyframes xpLevelUpPulse {
  0% {
    transform: scale(1);
    box-shadow:
      0 14px 34px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255,255,255,0.1),
      inset 0 -1px 0 rgba(0,0,0,0.48),
      0 0 18px rgba(34, 211, 238, 0.14);
  }
  18% {
    transform: scale(1.022);
    box-shadow:
      0 18px 46px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255,255,255,0.22),
      inset 0 -1px 0 rgba(0,0,0,0.38),
      0 0 34px rgba(250, 204, 21, 0.46),
      0 0 44px rgba(20, 241, 255, 0.34);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 14px 34px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255,255,255,0.1),
      inset 0 -1px 0 rgba(0,0,0,0.48),
      0 0 18px rgba(34, 211, 238, 0.14);
  }
}

@keyframes xpLevelBadgeBurst {
  0% {
    color: #fef3c7;
    transform: scale(1);
    box-shadow:
      0 0 14px rgba(250, 204, 21, 0.18),
      inset 0 0 0 1px rgba(255,255,255,0.07);
  }
  20% {
    color: #ffffff;
    transform: scale(1.16);
    box-shadow:
      0 0 18px rgba(250, 204, 21, 0.72),
      0 0 30px rgba(20, 241, 255, 0.34),
      inset 0 0 0 1px rgba(255,255,255,0.2);
  }
  100% {
    color: #fef3c7;
    transform: scale(1);
    box-shadow:
      0 0 14px rgba(250, 204, 21, 0.18),
      inset 0 0 0 1px rgba(255,255,255,0.07);
  }
}

@keyframes xpTrackLevelFlash {
  0% {
    filter: brightness(1);
  }
  22% {
    filter: brightness(1.45) saturate(1.24);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes xpLevelUpBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.78);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -12px) scale(1.08);
  }
  58% {
    opacity: 1;
    transform: translate(-50%, -20px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -34px) scale(0.94);
  }
}

@keyframes xpEdgeGlow {
  0% {
    opacity: 0;
    transform: translateX(-48%) scaleX(0.45);
  }
  26% {
    opacity: 1;
    transform: translateX(-48%) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-48%) scaleX(1.55);
  }
}

@keyframes xpEdgeSpark {
  0% {
    opacity: 0.24;
    transform: scaleY(0.72) scaleX(0.75);
  }
  30% {
    opacity: 1;
    transform: scaleY(1.02) scaleX(1.2);
  }
  100% {
    opacity: 0.34;
    transform: scaleY(0.72) scaleX(1);
  }
}

@keyframes xpGainSweep {
  0% {
    opacity: 0;
    transform: translateX(-18%) scaleX(0.72);
  }
  18% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateX(18%) scaleX(1.24);
  }
}

#levelup-overlay {
  position: fixed;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 25;
  pointer-events: auto;
  width: min(920px, calc(100vw - 24px));
  background: rgba(5, 8, 14, 0.92);
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 14px;
  padding: 12px;
  backdrop-filter: blur(10px);
}

#levelup-overlay.hidden {
  display: none;
}

.levelup-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}

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

.skill-option {
  background: rgba(14, 20, 32, 0.95);
  border: 1px solid rgba(148,163,184,0.35);
  border-radius: 10px;
  padding: 10px;
  color: #e5e7eb;
  cursor: pointer;
}

.skill-option:hover {
  border-color: rgba(52,211,153,0.9);
  background: rgba(15, 35, 32, 0.95);
}

.skill-option .nm {
  font-size: 17px;
  font-weight: 700;
}

.skill-option .meta {
  margin-top: 4px;
  font-size: 12px;
  color: #93c5fd;
}

.skill-option .desc {
  margin-top: 6px;
  font-size: 13px;
  color: #cbd5e1;
}

.panel {
  min-width: 260px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  backdrop-filter: blur(8px);
}

.panel h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.5px;
}

.panel p {
  margin: 6px 0 0;
  opacity: 0.9;
}

#info-panel {
  position: relative;
  z-index: 60;
  pointer-events: auto;
}

#scoreboard {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  right: 12px;
  z-index: 41;
  max-width: 360px;
  min-width: 260px;
  max-height: min(52vh, 420px);
  overflow: auto;
  text-align: left;
}

body.replay-game-active #scoreboard {
  top: calc(env(safe-area-inset-top) + 112px);
}

#scoreboard.is-minimized {
  min-width: 0;
  width: auto;
  max-width: 220px;
  max-height: none;
  overflow: visible;
}

#scoreboard .score-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#scoreboard .score-title {
  font-weight: 700;
  letter-spacing: 0.4px;
}

#scoreboard:not(.is-minimized) .score-head {
  margin-bottom: 6px;
}

.scoreboard-toggle {
  flex: 0 0 auto;
}

#scoreboard .score-row {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#scoreboard .score-player-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#scoreboard .score-row.me {
  font-weight: 700;
  color: #f8fafc;
}

#scoreboard .score-row {
  font-size: 12px;
}

#scoreboard .score-player-text {
  line-height: 1.25;
}

.tab-scoreboard {
  position: fixed;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 95;
  width: min(700px, calc(100vw - 20px));
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(10, 15, 28, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 50px rgba(2, 6, 23, 0.55);
}

.tab-scoreboard-title {
  margin: 0 0 8px;
  font-size: 13px;
  color: #cbd5e1;
}

.tab-scoreboard table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.tab-scoreboard th,
.tab-scoreboard td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-scoreboard th {
  color: #93c5fd;
  font-weight: 700;
}

.tab-scoreboard th:nth-child(2),
.tab-scoreboard td:nth-child(2) {
  text-align: center;
}

.tab-scoreboard tr.me td {
  color: #f8fafc;
  font-weight: 700;
}

.tab-scoreboard td.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .tab-scoreboard {
    top: 50%;
    width: calc(100vw - 12px);
    max-height: min(66vh, 500px);
    padding: 8px;
  }

  .tab-scoreboard table {
    font-size: 11px;
  }

  .tab-scoreboard th,
  .tab-scoreboard td {
    padding: 5px 6px;
  }
}
.conn-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.conn-meta {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1;
}
.conn-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
}

.conn-lvl-0 { background: #6b7280; }
.conn-lvl-1 { background: #991b1b; }
.conn-lvl-2 { background: #b91c1c; }
.conn-lvl-3 { background: #dc2626; }
.conn-lvl-4 { background: #ea580c; }
.conn-lvl-5 { background: #f97316; }
.conn-lvl-6 { background: #ca8a04; }
.conn-lvl-7 { background: #84cc16; }
.conn-lvl-8 { background: #22c55e; }
.conn-lvl-9 { background: #16a34a; }
.conn-lvl-10 { background: #15803d; }

#hud.menu-hidden {
  display: none;
}

#join-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(128, 4, 18, 0.35), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(109, 10, 22, 0.25), transparent 42%),
    linear-gradient(160deg, rgba(9, 2, 5, 0.92), rgba(25, 4, 8, 0.9));
  z-index: 20;
  overflow: hidden;
}

#join-overlay::before,
#join-overlay::after {
  content: '';
  position: absolute;
  inset: -20%;
  pointer-events: none;
}

#join-overlay::before {
  background:
    radial-gradient(circle at 12% 20%, rgba(220, 30, 40, 0.23) 0 10%, transparent 35%),
    radial-gradient(circle at 78% 14%, rgba(170, 16, 36, 0.2) 0 9%, transparent 33%),
    radial-gradient(circle at 65% 82%, rgba(200, 18, 34, 0.16) 0 8%, transparent 32%);
  animation: bloodPulse 6.5s ease-in-out infinite;
}

#join-overlay::after {
  background: repeating-linear-gradient(
    118deg,
    rgba(120, 16, 22, 0.06) 0 14px,
    rgba(30, 5, 8, 0.02) 14px 28px
  );
  mix-blend-mode: screen;
  animation: bloodDrift 14s linear infinite;
}

@keyframes bloodPulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.07); opacity: 1; }
}

@keyframes bloodDrift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-8%, -6%, 0); }
}

#join-form {
  position: relative;
  z-index: 2;
  background: #10151d;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
  width: min(1460px, calc(100vw - 24px));
  margin-top: clamp(16px, 4vh, 40px);
  max-height: calc(100vh - 20px - clamp(16px, 4vh, 40px));
  overflow: auto;
}
#join-form input,
#join-form button {
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

#join-form input {
  background: #0b0f15;
  color: var(--text);
}

.auth-card {
  display: grid;
  gap: 10px;
  margin-bottom: 4px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(8, 12, 18, 0.72);
}

.auth-card:not([open]) {
  gap: 0;
  padding-bottom: 8px;
}

.auth-card-summary {
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
}

.auth-card-summary::-webkit-details-marker {
  display: none;
}

.auth-card-summary::after {
  content: attr(data-label-close);
  float: right;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.auth-card:not([open]) .auth-card-summary::after {
  content: attr(data-label-open);
}

.auth-card-body {  
  padding-top: 0px !important;
  margin-top: 0px;
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

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

.auth-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}

.auth-summary {
  margin-top: 4px;
  font-size: 12px;
  color: #cbd5e1;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.auth-tab,
.auth-action,
.provider-btn,
#join-form button.ghost {
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
}

.auth-tab {
  background: rgba(22, 30, 42, 0.78);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease, color .18s ease, opacity .18s ease;
  opacity: .78;
}

.auth-tab:hover {
  border-color: rgba(255,255,255,0.3);
  opacity: .94;
}

.auth-tab.active {
  background: linear-gradient(135deg, #0f766e, #059669);
  border-color: rgba(110, 231, 183, 0.95);
  color: #f0fdf4;
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.28), 0 12px 24px rgba(5, 150, 105, 0.22);
  transform: translateY(-1px);
}

.auth-tab:focus-visible {
  outline: none;
  border-color: rgba(148, 163, 184, 0.9);
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.22);
}

.auth-panel {
  display: none;
  gap: 8px;
}

.auth-panel.active {
  display: grid;
}

.auth-copy {
  font-size: 12px;
  color: #cbd5e1;
}

.auth-action {
  border: none;
  background: linear-gradient(135deg, #dc2626, #be123c);
  cursor: pointer;
}

.providers-card {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.providers-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.providers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.provider-btn {
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
}

.provider-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.auth-feedback {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
}

.auth-feedback.ok {
  border-color: rgba(34,197,94,0.35);
  background: rgba(20, 83, 45, 0.3);
  color: #bbf7d0;
}

.auth-feedback.err {
  border-color: rgba(244,63,94,0.35);
  background: rgba(127, 29, 29, 0.3);
  color: #fecdd3;
}

.field-hint {
  min-height: 18px;
  font-size: 12px;
  color: #94a3b8;
}

.field-hint.ok {
  margin-bottom: 10px;
  color: #86efac;
}

.field-hint.err {
  color: #fda4af;
}

.hidden {
  display: none !important;
}

.account-progress-summary {
  margin-top: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(8, 12, 18, 0.58);
  font-size: 12px;
  color: #cbd5e1;
}

#menu-panel-skills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

#menu-panel-skills > label,
#menu-panel-skills > .account-progress-summary,
#menu-panel-skills > .hero-action-feedback {
  grid-column: 1 / -1;
}

.character-select {
  display: none;
  place-items: center;
  padding: 14px 0 12px;
  overflow: visible;
  align-self: start;
}

.hero-wheel {
  --radius: 156px;
  position: relative;
  width: min(var(--wheel-size, 460px), calc(100vw - 90px));
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    radial-gradient(circle at center, rgba(12, 24, 32, 0.92) 0 31%, rgba(11, 20, 30, 0.88) 31% 54%, rgba(8, 13, 20, 0.65) 54% 100%),
    conic-gradient(from -90deg, rgba(34, 211, 238, 0.08), rgba(52, 211, 153, 0.08), rgba(167, 139, 250, 0.08), rgba(96, 165, 250, 0.08), rgba(245, 158, 11, 0.08), rgba(34, 211, 238, 0.08));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 14px 28px rgba(0,0,0,0.35);
}

.hero-wheel-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(8, 14, 22, 0.95);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  pointer-events: none;
}

.hero-center-label {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

.hero-center-name {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
}

.char-option {
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(8, 12, 18, 0.8);
  border-radius: 12px;
  padding: 6px 6px;
  display: grid;
  justify-items: center;
  gap: 4px;
  cursor: pointer;
  color: #e2e8f0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.wheel-option {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  transform: translate(-50%, -50%) translate(var(--x, 0px), var(--y, 0px));
  border-color: color-mix(in srgb, var(--accent) 58%, rgba(255,255,255,0.2));
  z-index: 1;
}

.char-option:not(.wheel-option):hover {
  transform: translateY(-1px);
}

.wheel-option:hover {
  transform: translate(-50%, -50%) translate(var(--x, 0px), var(--y, 0px)) scale(1.05);
}

.char-option.focused {
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45), 0 0 18px rgba(14, 165, 233, 0.28);
}

.char-option.active {
  border-color: rgba(74, 222, 128, 0.98);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.45), 0 0 14px rgba(22, 163, 74, 0.42), inset 0 0 0 1px rgba(74, 222, 128, 0.24);
  background: rgba(9, 36, 20, 0.9);
  color: #dcfce7;
}

.char-option.locked {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.88);
  color: #94a3b8;
}

.char-lock {
  font-size: 10px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.35);
}

.char-preview {
  width: 52px;
  height: 58px;
  image-rendering: pixelated;
}

.char-label {
  font-size: 11px;
  line-height: 1;
}

.hero-tree-panel {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(8, 12, 18, 0.72);
  padding: 10px;
  align-self: start;
}

.hero-loadout-shell {
  display: grid;
  gap: 12px;
}

.hero-skill-panels-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.hero-loadout-layout {
  display: grid;
  gap: 12px;
}

.hero-loadout-card {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(9, 14, 24, 0.72);
  padding: 10px;
}

.hero-profile-card {
  --hero-accent: #38bdf8;
  --hero-xp: 0%;
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--hero-accent) 36%, rgba(148, 163, 184, 0.22));
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--hero-accent) 20%, transparent), transparent 38%),
    linear-gradient(145deg, rgba(16, 20, 31, 0.96), rgba(6, 8, 13, 0.94) 54%, rgba(10, 10, 12, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 28px color-mix(in srgb, var(--hero-accent) 10%, transparent);
}

.hero-profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--hero-accent) 24%, transparent), transparent 34%),
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.08), transparent 24%);
  opacity: 0.74;
}

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

.hero-profile-head {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

.hero-profile-portrait {
  min-width: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--hero-accent) 46%, rgba(255, 255, 255, 0.16));
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--hero-accent) 24%, transparent), transparent 56%),
    #05070b;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 20px color-mix(in srgb, var(--hero-accent) 18%, transparent);
}

.hero-profile-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.hero-profile-main {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.hero-profile-kicker,
.hero-profile-section-title {
  color: color-mix(in srgb, var(--hero-accent) 48%, #cbd5e1);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
}

.hero-profile-title {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.hero-profile-title strong {
  min-width: 0;
  overflow: hidden;
  color: #fff7ed;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-profile-title span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.hero-profile-title span.ok {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(20, 83, 45, 0.42);
  color: #86efac;
}

.hero-profile-title span.locked {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.34);
  color: #fecaca;
}

.hero-profile-tagline {
  min-height: 15px;
  color: #aeb8c4;
  font-size: 12px;
  line-height: 1.25;
}

.hero-profile-level {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  color: #e5edf7;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
}

.hero-profile-level b {
  color: #f8e7b0;
}

.hero-profile-xp {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.72);
}

.hero-profile-xp i {
  display: block;
  width: var(--hero-xp);
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #f97316, #facc15 48%, color-mix(in srgb, var(--hero-accent) 50%, #fef3c7));
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.38);
}

.hero-profile-summary-chips,
.hero-profile-attr-grid,
.hero-profile-bonus-grid {
  display: grid;
  gap: 6px;
}

.hero-profile-summary-chips {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-profile-summary-chips span,
.hero-profile-attr,
.hero-profile-bonus,
.hero-profile-source {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(5, 8, 14, 0.58);
}

.hero-profile-summary-chips span {
  display: grid;
  gap: 2px;
  padding: 6px 7px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.05;
}

.hero-profile-summary-chips b {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-profile-section-title {
  margin: 8px 0 -1px;
}

.hero-profile-attr-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-profile-attr {
  --attr-pct: 0%;
  position: relative;
  display: grid;
  gap: 2px;
  overflow: hidden;
  padding: 7px 7px 8px;
}

.hero-profile-attr::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  width: var(--attr-pct);
  background: linear-gradient(90deg, var(--hero-accent), #facc15);
  opacity: 0.82;
}

.hero-profile-attr span {
  color: color-mix(in srgb, var(--hero-accent) 58%, #cbd5e1);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.hero-profile-attr strong {
  color: #f8fafc;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.hero-profile-attr b {
  overflow: hidden;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.hero-profile-bonus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.1;
}

.hero-profile-bonus strong {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.hero-profile-bonus-damage strong { color: #fecdd3; }
.hero-profile-bonus-rate strong { color: #fde68a; }
.hero-profile-bonus-reload strong { color: #bfdbfe; }
.hero-profile-bonus-speed strong { color: #bae6fd; }
.hero-profile-bonus-guard strong { color: #bbf7d0; }
.hero-profile-bonus-regen strong { color: #fbcfe8; }
.hero-profile-bonus-field strong { color: #99f6e4; }
.hero-profile-bonus-dodge strong { color: #ddd6fe; }

.hero-profile-source-list {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 0;
  max-height: 122px;
  overflow: auto;
  padding-right: 2px;
}

.hero-profile-source {
  --source-color: #38bdf8;
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border-color: color-mix(in srgb, var(--source-color) 28%, rgba(148, 163, 184, 0.15));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--source-color) 12%, transparent), transparent 42%),
    rgba(5, 8, 14, 0.58);
}

.hero-profile-source span {
  color: color-mix(in srgb, var(--source-color) 58%, #cbd5e1);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.hero-profile-source b {
  overflow: hidden;
  color: #dbeafe;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-profile-unlock-meta .hero-lock-meta {
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(69, 10, 10, 0.28);
}

.hero-profile-action-row .hero-main-action {
  margin-top: 0;
}

.hero-loadout-card-top {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.hero-loadout-portrait-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.95), rgba(10, 14, 24, 0.95));
}

.hero-loadout-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.hero-loadout-copy {
  min-width: 0;
}

.hero-loadout-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.hero-loadout-stage-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.hero-loadout-stage-portrait {
  display: grid;
  gap: 12px;
  align-content: start;
}

.hero-loadout-hero-head {
  padding: 2px 0 0;
}

.hero-loadout-hero-head .hero-tagline {
  white-space: normal;
}

.hero-loadout-portrait-large {
  min-height: 280px;
}

.hero-paper-loadout {
  display: grid;
  gap: 14px;
}

.hero-paper-doll {
  position: relative;
  overflow: hidden;
  width: min(100%, 980px);
  margin: 0 auto;
  border: 1px solid rgba(135, 143, 156, 0.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 22%, color-mix(in srgb, var(--hero-accent, #e11d2e) 20%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(7, 10, 16, 0.74), rgba(5, 7, 11, 0.92));
  padding: 10px;
}

.hero-paper-doll::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 30%, rgba(255, 255, 255, 0.055), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 22px);
  opacity: 0.75;
}

.hero-paper-doll-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(180px, 230px) minmax(260px, 310px) minmax(180px, 230px);
  grid-template-areas:
    ". head ."
    "left portrait right"
    "armor portrait rings"
    "melee legs rings";
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.hero-paper-slot {
  min-width: 0;
}

.hero-paper-head { grid-area: head; }
.hero-paper-left-hand { grid-area: left; }
.hero-paper-right-hand { grid-area: right; }
.hero-paper-armor { grid-area: armor; }
.hero-paper-melee { grid-area: melee; }
.hero-paper-legs { grid-area: legs; }

.hero-paper-head,
.hero-paper-legs {
  width: 100%;
  justify-self: center;
}

.hero-paper-left-hand,
.hero-paper-armor,
.hero-paper-melee {
  justify-self: end;
}

.hero-paper-right-hand,
.hero-paper-rings {
  justify-self: start;
}

.hero-paper-rings {
  grid-area: rings;
  display: grid;
  gap: 7px;
  min-width: 0;
}

.hero-paper-portrait {
  position: relative;
  grid-area: portrait;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 310px;
  justify-self: center;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--hero-accent, #e11d2e) 34%, rgba(255, 255, 255, 0.14));
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--hero-accent, #e11d2e) 22%, transparent), transparent 42%),
    radial-gradient(circle at 50% 88%, rgba(225, 22, 30, 0.2), transparent 36%),
    linear-gradient(180deg, rgba(15, 20, 30, 0.9), rgba(5, 7, 10, 0.98));
  box-shadow:
    inset 0 0 30px color-mix(in srgb, var(--hero-accent, #e11d2e) 13%, transparent),
    0 16px 34px rgba(0, 0, 0, 0.24);
}

.hero-paper-portrait::before,
.hero-paper-portrait::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-paper-portrait::before {
  z-index: 2;
  inset: 13px;
  border: 1px solid color-mix(in srgb, var(--hero-accent, #e11d2e) 32%, transparent);
  border-radius: 12px;
  transform: rotate(2deg);
}

.hero-paper-portrait::after {
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(3, 7, 14, 0.1) 0%, rgba(3, 7, 14, 0.02) 42%, rgba(3, 7, 14, 0.72) 100%),
    radial-gradient(ellipse at 50% 88%, color-mix(in srgb, var(--hero-accent, #e11d2e) 30%, transparent), transparent 62%);
}

.hero-paper-portrait .hero-loadout-portrait {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(1.04) contrast(1.04);
}

.hero-paper-portrait-ring {
  position: absolute;
  z-index: 2;
  width: 76%;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--hero-accent, #e11d2e) 28%, transparent);
  box-shadow:
    inset 0 0 22px color-mix(in srgb, var(--hero-accent, #e11d2e) 12%, transparent),
    0 0 30px color-mix(in srgb, var(--hero-accent, #e11d2e) 13%, transparent);
  opacity: 0.82;
}

.hero-paper-portrait-name {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 7, 10, 0.72);
  color: #fff2eb;
  backdrop-filter: blur(6px);
}

.hero-paper-portrait-name b,
.hero-paper-portrait-name span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-paper-portrait-name span {
  color: #cbd5e1;
  font-size: 11px;
}

.hero-paper-slot .hero-equip-slot {
  min-height: 88px;
  padding: 6px;
  border-radius: 8px;
  border-color: color-mix(in srgb, var(--skill-color, #94a3b8) 28%, rgba(148, 163, 184, 0.24));
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--skill-color, #94a3b8) 9%, transparent), transparent 40%),
    rgba(9, 13, 20, 0.78);
}

.hero-paper-slot .hero-equip-slot-layout {
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 8px;
}

.hero-paper-slot .hero-equip-slot-side {
  display: contents;
}

.hero-paper-slot .hero-equip-slot-icon-button {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: start;
  width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 7px;
}

.hero-paper-slot .hero-equip-slot-icon-button .hero-equip-slot-icon {
  grid-area: 1 / 1 / 2 / 2;
  grid-column: auto;
  grid-row: auto;
  width: 52px;
  height: 52px;
  min-height: 52px;
  justify-self: stretch;
  align-self: stretch;
  border-radius: 7px;
}

.hero-paper-slot .hero-equip-slot-icon-button .hero-equip-slot-icon.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-paper-slot .hero-equip-slot > .hero-equip-slot-layout > .hero-equip-slot-side > .hero-equip-slot-icon {
  grid-column: 1;
  grid-row: 1;
  width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 7px;
}

.hero-paper-slot .hero-equip-slot .hero-equip-action,
.hero-paper-slot .hero-equip-slot .hero-equip-slot-empty-cta {
  box-sizing: border-box;
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero-paper-slot .hero-equip-slot-copy {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  gap: 3px;
}

.hero-paper-slot .hero-equip-slot-label {
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.hero-paper-slot .hero-equip-slot-name {
  font-size: 12px;
  line-height: 1.1;
}

.hero-paper-slot .hero-equip-slot-meta {
  font-size: 10px;
  line-height: 1.2;
}

.hero-quick-belt,
.hero-inventory-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(135, 143, 156, 0.18);
  border-radius: 12px;
  background: rgba(7, 10, 16, 0.62);
  padding: 12px;
}

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

.hero-inventory-panel .inventory-category-list {
  max-height: 520px;
  overflow-x: hidden;
  overflow-anchor: none;
}

.hero-inventory-panel .inventory-category-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.hero-loadout-stage.is-loadout-enter,
.hero-paper-loadout.is-loadout-enter {
  animation: heroLoadoutStageEnter 760ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-profile-card {
  --panel-accent: var(--hero-accent, #38bdf8);
}

.hero-talents-card {
  --panel-accent: #f59e0b;
}

.hero-unique-skills-card {
  --panel-accent: #38bdf8;
}

.hero-profile-card.is-loadout-enter,
.hero-talents-card.is-loadout-enter,
.hero-unique-skills-card.is-loadout-enter {
  animation: heroCharacterPanelEnter 760ms cubic-bezier(.16, .9, .22, 1) var(--panel-enter-delay, 0ms) both;
  will-change: opacity, transform, filter;
}

.hero-talents-card.is-loadout-enter .hero-tree-list > .hero-node,
.hero-unique-skills-card.is-loadout-enter .hero-tree-list > .hero-node {
  animation: heroCharacterPanelRowEnter 560ms cubic-bezier(.16, .9, .22, 1) 170ms both;
}

.hero-talents-card.is-loadout-enter .hero-tree-list > .hero-node:nth-child(2),
.hero-unique-skills-card.is-loadout-enter .hero-tree-list > .hero-node:nth-child(2) {
  animation-delay: 210ms;
}

.hero-talents-card.is-loadout-enter .hero-tree-list > .hero-node:nth-child(3),
.hero-unique-skills-card.is-loadout-enter .hero-tree-list > .hero-node:nth-child(3) {
  animation-delay: 250ms;
}

.hero-talents-card.is-loadout-enter .hero-tree-list > .hero-node:nth-child(4),
.hero-unique-skills-card.is-loadout-enter .hero-tree-list > .hero-node:nth-child(4) {
  animation-delay: 290ms;
}

.hero-talents-card.is-loadout-enter .hero-tree-list > .hero-node:nth-child(n + 5),
.hero-unique-skills-card.is-loadout-enter .hero-tree-list > .hero-node:nth-child(n + 5) {
  animation-delay: 330ms;
}

.hero-paper-doll.is-loadout-enter {
  animation: heroPaperDollEnter 820ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-paper-doll.is-loadout-enter::before {
  animation: heroPaperDollSweep 1050ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-paper-portrait.is-loadout-enter {
  animation:
    heroPaperPortraitEnter 860ms cubic-bezier(.16, .9, .22, 1) both,
    heroPaperPortraitAccentFlash 1.35s cubic-bezier(.16, .9, .22, 1) both;
}

.hero-paper-portrait.is-loadout-enter::after {
  animation: heroPaperPortraitAccentSweep 1.05s cubic-bezier(.16, .9, .22, 1) both;
}

.hero-paper-portrait.is-loadout-enter .hero-loadout-portrait {
  animation: heroPaperPortraitImageEnter 940ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-paper-portrait.is-loadout-enter .hero-paper-portrait-ring {
  animation: heroPaperPortraitRingEnter 980ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-paper-portrait.is-loadout-enter .hero-paper-portrait-name {
  animation: heroPaperPortraitNameEnter 720ms cubic-bezier(.16, .9, .22, 1) 110ms both;
}

.hero-quick-belt.is-loadout-enter,
.hero-inventory-panel.is-loadout-enter {
  animation: heroLoadoutPanelEnter 780ms cubic-bezier(.16, .9, .22, 1) 90ms both;
}

.hero-inventory-panel.is-loadout-enter .inventory-item-card {
  animation: heroInventoryItemEnter 700ms cubic-bezier(.16, .9, .22, 1) 140ms both;
}

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

.hero-slot-group-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cbd5e1;
}

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

.hero-equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.hero-equip-slot {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 128px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.62);
  padding: 8px;
  transition:
    border-color 170ms ease,
    box-shadow 170ms ease,
    filter 170ms ease,
    transform 170ms ease;
}

.hero-equip-slot::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 24% 22%, color-mix(in srgb, var(--skill-color, #39c1d9) 28%, transparent), transparent 34%),
    linear-gradient(120deg, transparent 0 28%, rgba(255, 255, 255, 0.1), transparent 62%),
    radial-gradient(circle at 88% 86%, rgba(255, 78, 78, 0.12), transparent 34%);
  transform: translateY(4px) scale(0.985);
  transition:
    opacity 170ms ease,
    transform 170ms ease;
}

.hero-equip-slot::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 26% 24%, color-mix(in srgb, var(--skill-color, #d1d5db) 34%, transparent), transparent 34%),
    linear-gradient(115deg, transparent 0 26%, rgba(255, 255, 255, 0.18), transparent 58%);
  transform: translateX(-26%) rotate(-8deg);
}

.hero-equip-slot:hover,
.hero-equip-slot:focus-within {
  border-color: color-mix(in srgb, var(--skill-color, #39c1d9) 52%, rgba(255, 255, 255, 0.2));
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--skill-color, #39c1d9) 18%, transparent),
    0 12px 24px rgba(0, 0, 0, 0.24),
    inset 0 0 24px color-mix(in srgb, var(--skill-color, #39c1d9) 10%, transparent);
}

.hero-equip-slot:hover::before,
.hero-equip-slot:focus-within::before {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-equip-slot-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.hero-equip-slot-side {
  display: grid;
  grid-template-rows: 90px auto;
  gap: 6px;
  justify-items: start;
  align-items: start;
}

.hero-equip-slot-icon-button {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  min-height: 90px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

#join-form .hero-equip-slot-icon-button,
#join-form .hero-equip-slot-icon-button:hover,
#join-form .hero-equip-slot-icon-button:focus-visible {
  box-sizing: border-box;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
  filter: none;
}

#join-form .hero-equip-slot-icon-button:hover,
#join-form .hero-equip-slot-icon-button:focus-visible {
  transform: none;
}

.hero-equip-slot-icon-button .inventory-item-icon {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-height: 100%;
  justify-self: stretch;
  align-self: stretch;
  transition:
    border-color 170ms ease,
    box-shadow 170ms ease,
    filter 170ms ease,
    transform 170ms ease;
}

.hero-equip-slot-icon-button:hover .inventory-item-icon,
.hero-equip-slot-icon-button:focus-visible .inventory-item-icon {
  border-color: color-mix(in srgb, var(--skill-color, #39c1d9) 64%, rgba(255, 255, 255, 0.22));
  filter: brightness(1.12) saturate(1.08);
  transform: scale(1.025);
  box-shadow:
    0 0 18px color-mix(in srgb, var(--skill-color, #39c1d9) 24%, transparent),
    inset 0 0 18px rgba(255, 255, 255, 0.08);
}

.hero-equip-slot-icon-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--skill-color, #39c1d9) 72%, #ffffff);
  outline-offset: 3px;
}

.hero-equip-slot .hero-equip-slot-icon {
  grid-area: auto;
  width: 90px;
  height: 90px;
  min-height: 90px;
  justify-self: start;
  align-self: start;
}

.hero-equip-slot.is-equip-flash {
  animation: battleHubSkillSlotFlash 1.35s cubic-bezier(.16, .9, .22, 1);
}

.hero-equip-slot.is-equip-flash::after {
  animation: heroEquipSlotSweep 1.05s cubic-bezier(.16, .9, .22, 1);
}

.hero-equip-slot.is-equip-flash .hero-equip-slot-icon {
  animation: battleHubSkillIconPop 900ms cubic-bezier(.16, .9, .22, 1);
}

.hero-equip-slot.is-loadout-enter-slot,
.hero-equip-slot.is-loadout-enter-slot::after,
.hero-equip-slot.is-loadout-enter-slot .hero-equip-slot-icon {
  animation-delay: calc(var(--slot-enter-index, 0) * 55ms);
  animation-fill-mode: both;
}

.hero-equip-slot.is-unequip-flash {
  animation: heroEquipSlotUnequipFlash 1.2s cubic-bezier(.16, .9, .22, 1);
}

.hero-equip-slot.is-unequip-flash::after {
  background:
    radial-gradient(circle at 25% 24%, rgba(248, 113, 113, 0.28), transparent 34%),
    linear-gradient(115deg, transparent 0 28%, rgba(248, 113, 113, 0.2), transparent 58%);
  animation: heroEquipSlotUnequipSweep 960ms cubic-bezier(.4, 0, .22, 1);
}

.hero-equip-slot.is-unequip-flash .hero-equip-slot-icon {
  animation: heroEquipSlotIconUnequip 820ms cubic-bezier(.4, 0, .22, 1);
}

@keyframes heroEquipSlotSweep {
  0% {
    opacity: 0;
    transform: translateX(-34%) rotate(-8deg);
  }

  22% {
    opacity: 0.9;
  }

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

@keyframes heroEquipSlotUnequipFlash {
  0% {
    transform: scale(1.01);
    filter: brightness(1.22) saturate(1.22);
    box-shadow:
      0 0 0 1px rgba(248, 113, 113, 0.34),
      0 0 24px rgba(248, 113, 113, 0.2);
  }

  48% {
    transform: scale(0.985);
    filter: brightness(0.82) saturate(0.82);
    box-shadow:
      0 0 0 1px rgba(248, 113, 113, 0.18),
      0 0 16px rgba(248, 113, 113, 0.12);
  }

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

@keyframes heroEquipSlotUnequipSweep {
  0% {
    opacity: 0;
    transform: translateX(28%) rotate(8deg);
  }

  26% {
    opacity: 0.78;
  }

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

@keyframes heroEquipSlotIconUnequip {
  0% {
    opacity: 1;
    transform: scale(1.08) rotate(3deg);
    filter: brightness(1.35);
  }

  48% {
    opacity: 0.54;
    transform: scale(0.86) rotate(-5deg);
    filter: brightness(0.78) saturate(0.78);
  }

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

@keyframes heroLoadoutStageEnter {
  0% {
    opacity: 0.24;
    transform: translateY(12px) scale(0.992);
    filter: blur(5px) saturate(0.75);
  }

  58% {
    opacity: 1;
    transform: translateY(-2px) scale(1.004);
    filter: blur(0) saturate(1.12);
  }

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

@keyframes heroCharacterPanelEnter {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.986);
    filter: blur(6px) saturate(0.72);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.02),
      0 0 0 color-mix(in srgb, var(--panel-accent, #38bdf8) 0%, transparent);
  }

  42% {
    opacity: 1;
    transform: translateY(-2px) scale(1.004);
    filter: blur(0) saturate(1.14);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.055),
      0 0 0 1px color-mix(in srgb, var(--panel-accent, #38bdf8) 28%, transparent),
      0 0 28px color-mix(in srgb, var(--panel-accent, #38bdf8) 16%, transparent);
  }

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

@keyframes heroCharacterPanelRowEnter {
  0% {
    opacity: 0;
    transform: translateX(-10px) scale(0.992);
    filter: brightness(0.82) saturate(0.82);
  }

  70% {
    opacity: 1;
    transform: translateX(2px) scale(1.002);
    filter: brightness(1.08) saturate(1.08);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: brightness(1) saturate(1);
  }
}

@keyframes heroPaperDollEnter {
  0% {
    opacity: 0.3;
    transform: translateY(10px) scale(0.985);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }

  48% {
    opacity: 1;
    transform: translateY(-2px) scale(1.006);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--hero-accent, #e11d2e) 36%, transparent),
      0 0 34px color-mix(in srgb, var(--hero-accent, #e11d2e) 18%, transparent);
  }

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

@keyframes heroPaperDollSweep {
  0% {
    opacity: 0.16;
    transform: translateX(-16%);
  }

  38% {
    opacity: 0.95;
  }

  100% {
    opacity: 0.75;
    transform: translateX(0);
  }
}

@keyframes heroPaperPortraitEnter {
  0% {
    opacity: 0.36;
    transform: translateY(14px) scale(0.94);
    filter: brightness(0.75) saturate(0.72);
  }

  54% {
    opacity: 1;
    transform: translateY(-3px) scale(1.018);
    filter: brightness(1.22) saturate(1.18);
  }

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

@keyframes heroPaperPortraitAccentFlash {
  0% {
    border-color: color-mix(in srgb, var(--hero-accent, #e11d2e) 28%, rgba(255, 255, 255, 0.14));
    box-shadow:
      inset 0 0 30px color-mix(in srgb, var(--hero-accent, #e11d2e) 13%, transparent),
      0 16px 34px rgba(0, 0, 0, 0.24);
  }

  22% {
    border-color: color-mix(in srgb, var(--hero-accent, #e11d2e) 78%, rgba(255, 255, 255, 0.22));
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--hero-accent, #e11d2e) 62%, transparent),
      0 0 28px color-mix(in srgb, var(--hero-accent, #e11d2e) 58%, transparent),
      0 0 46px rgba(255, 255, 255, 0.1),
      inset 0 0 42px color-mix(in srgb, var(--hero-accent, #e11d2e) 26%, transparent);
  }

  100% {
    border-color: color-mix(in srgb, var(--hero-accent, #e11d2e) 34%, rgba(255, 255, 255, 0.14));
    box-shadow:
      inset 0 0 30px color-mix(in srgb, var(--hero-accent, #e11d2e) 13%, transparent),
      0 16px 34px rgba(0, 0, 0, 0.24);
  }
}

@keyframes heroPaperPortraitAccentSweep {
  0% {
    opacity: 0.15;
    transform: translateX(-18%) rotate(-3deg) scale(1.04);
  }

  24% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: translateX(0) rotate(0) scale(1);
  }
}

@keyframes heroPaperPortraitImageEnter {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.9);
    filter:
      drop-shadow(0 18px 20px rgba(0, 0, 0, 0.46))
      drop-shadow(0 0 0 color-mix(in srgb, var(--hero-accent, #e11d2e) 0%, transparent));
  }

  42% {
    opacity: 1;
    transform: translateY(-4px) scale(1.035);
    filter:
      drop-shadow(0 20px 24px rgba(0, 0, 0, 0.52))
      drop-shadow(0 0 24px color-mix(in srgb, var(--hero-accent, #e11d2e) 34%, transparent));
  }

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

@keyframes heroPaperPortraitRingEnter {
  0% {
    opacity: 0;
    transform: scale(0.72) rotate(-8deg);
  }

  58% {
    opacity: 0.95;
    transform: scale(1.08) rotate(2deg);
  }

  100% {
    opacity: 0.82;
    transform: scale(1) rotate(0);
  }
}

@keyframes heroPaperPortraitNameEnter {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroLoadoutPanelEnter {
  0% {
    opacity: 0.18;
    transform: translateY(12px);
    filter: blur(4px);
  }

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

@keyframes heroInventoryItemEnter {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

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

.hero-equip-slot-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.hero-equip-slot .hero-equip-action,
.hero-equip-slot .hero-equip-slot-empty-cta {
  width: 130px;
  min-width: 130px;
  min-height: 34px;
  padding: 6px 10px;
  justify-self: start;
  text-align: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1.1;
}

.hero-equip-slot .hero-equip-action {
  display: inline-flex;
  align-items: center;
}

.hero-equip-slot.empty {
  color: #94a3b8;
}

.hero-equip-slot-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #93c5fd;
}

.hero-equip-slot-hotkey {
  color: #fcd34d;
}

.hero-equip-slot-name {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.hero-equip-slot-meta {
  font-size: 11px;
  color: #cbd5e1;
}

.hero-equip-slot-empty-cta {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(18, 24, 33, 0.92), rgba(10, 14, 22, 0.94));
  color: #f8fafc;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-equip-modal-card {
  width: min(760px, calc(100vw - 24px));
}

.hero-equip-modal-body {
  display: grid;
  gap: 12px;
}

.hero-equip-modal-empty {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
}

.hero-equip-current-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--skill-color, #39c1d9) 34%, rgba(148, 163, 184, 0.22));
  border-radius: 10px;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--skill-color, #39c1d9) 16%, transparent), transparent 42%),
    linear-gradient(135deg, rgba(14, 20, 31, 0.94), rgba(7, 9, 13, 0.84));
}

.hero-equip-current-card.empty {
  border-style: dashed;
  color: #94a3b8;
}

.hero-equip-current-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.hero-equip-current-label,
.hero-equip-section-title {
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-equip-current-name {
  color: #fff2eb;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.hero-equip-current-meta {
  color: #cbd5e1;
  font-size: 12px;
}

.hero-equip-current-stats {
  color: #e5edf7;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.hero-equip-section-title {
  margin-top: 2px;
}

.hero-equip-picker-list {
  display: grid;
  gap: 10px;
}

.hero-equip-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(12, 18, 28, 0.82);
}

.hero-equip-picker-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.hero-equip-picker-name {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 700;
}

.hero-equip-picker-meta {
  color: #cbd5e1;
  font-size: 12px;
}

.hero-equip-picker-meta-eq {
  color: #86efac;
}

.hero-equip-picker-icon {
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.hero-equip-action,
.inventory-mini-btn {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(30, 41, 59, 0.88);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
}

.inventory-mini-btn.active {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(20, 83, 45, 0.78);
  color: #dcfce7;
}

.inventory-mini-btn.danger {
  border-color: rgba(244, 63, 94, 0.34);
  background: rgba(127, 29, 29, 0.8);
  color: #fecaca;
}

.inventory-mini-btn.disabled-like {
  border-color: rgba(248, 113, 113, 0.34);
  color: #fecaca;
  background: rgba(69, 10, 10, 0.52);
}

.inventory-item-list,
.inventory-category-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}

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

.inventory-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 10px;
}

.inventory-filter-tab {
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.42);
  background: rgba(15, 23, 42, 0.76);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inventory-filter-tab.active {
  border-color: rgba(56, 189, 248, 0.9);
  background: linear-gradient(180deg, rgba(21, 47, 76, 0.98), rgba(18, 35, 59, 0.94));
  color: #f8fafc;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.18), 0 0 20px rgba(239, 68, 68, 0.14);
}

.inventory-category-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.inventory-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inventory-item-card {
  display: grid;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.62);
  padding: 8px;
}

.inventory-item-card-compact {
  min-height: 108px;
  align-content: start;
}

.inventory-item-layout {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  grid-template-areas:
    "icon main"
    "actions actions";
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.inventory-item-main {
  grid-area: main;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.inventory-item-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  min-height: 90px;
  align-self: start;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(21, 26, 37, 0.96), rgba(10, 14, 22, 0.96));
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inventory-item-icon.has-image {
  overflow: hidden;
  background: #05070b;
  color: inherit;
}

.inventory-item-icon.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.inventory-item-icon-head { color: #9cc8ff; }
.inventory-item-icon-armor { color: #ffd9a0; }
.inventory-item-icon-legs { color: #d8c8ff; }
.inventory-item-icon-hands { color: #ffaf98; }
.inventory-item-icon-melee { color: #fda4af; }
.inventory-item-icon-ring { color: #f7d775; }
.inventory-item-icon-consumable { color: #80f0bc; }
.inventory-item-icon-other { color: #c4c8d1; }

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

.inventory-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.inventory-item-meta,
.inventory-item-values,
.inventory-item-consumable {
  font-size: 11px;
  color: #cbd5e1;
}

.inventory-item-stats,
.hero-equip-slot-stats,
.hero-equip-picker-stats {
  color: #9bd7ff;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.inventory-item-stats {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hero-equip-slot-stats {
  color: #a7f3d0;
}

.hero-equip-picker-stats {
  margin-top: 4px;
  color: #bfdbfe;
}

.inventory-item-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inventory-item-chip {
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(8, 12, 18, 0.72);
  color: #cbd5e1;
  font-size: 10px;
  line-height: 1.2;
}

.inventory-item-chip-eq {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.28);
}

.inventory-item-actions-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inventory-item-actions-compact {
  grid-area: actions;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  min-width: 0;
  justify-content: stretch;
  align-items: start;
}

.inventory-item-actions-inline {
  margin-top: 2px;
  flex-wrap: nowrap;
  align-items: center;
}

.inventory-text-action {
  width: 78px;
  min-width: 78px;
  height: 38px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: normal;
  word-break: break-word;
}

.inventory-text-action.danger {
  width: 92px;
  min-width: 92px;
}

.inventory-text-action.upgrade {
  width: 94px;
  min-width: 94px;
}

#join-form .inventory-item-actions-inline .inventory-text-action {
  font-size: 12px !important;
}

#join-form .inventory-item-actions-compact .inventory-text-action {
  font-size: 12px !important;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 4px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

#join-form .inventory-item-actions-compact .inventory-text-action.danger,
#join-form .inventory-item-actions-compact .inventory-text-action.upgrade {
  width: 100%;
  min-width: 0;
}

#join-form .inventory-item-actions-compact .inventory-text-action:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.inventory-mini-btn-icon {
  width: 30px;
  min-width: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

@media (max-width: 760px) {
  .inventory-item-layout {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
  }

  .inventory-item-icon {
    width: 72px;
    height: 72px;
    min-height: 72px;
  }
}

.rarity-common {
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
}

.rarity-uncommon {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.22);
}

.rarity-rare {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.22);
}

.rarity-epic {
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.24);
}

.rarity-legendary {
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.28);
}

@media (max-width: 980px) {
  #menu-panel-skills {
    grid-template-columns: 1fr;
  }

  .hero-skill-panels-row {
    grid-template-columns: 1fr;
  }

  .hero-loadout-stage-grid {
    grid-template-columns: 1fr;
  }

  .hero-loadout-card-top {
    grid-template-columns: 1fr;
  }

  .hero-paper-doll-grid {
    grid-template-columns: repeat(2, minmax(0, 250px));
    grid-template-areas:
      "portrait portrait"
      "head armor"
      "left right"
      "melee rings"
      "legs rings";
    justify-content: center;
  }

  .hero-paper-portrait {
    min-height: 320px;
  }

  .hero-quick-belt-grid {
    grid-template-columns: 1fr;
  }

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

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

.hero-tagline {
  margin-top: 2px;
  font-size: 12px;
  color: #94a3b8;
}

.hero-lock-meta {
  font-size: 12px;
  color: #fecaca;
  display: grid;
  gap: 3px;
}

.hero-lock-meta.unlocked {
  color: #86efac;
}

.hero-main-action {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
  color: #f8fafc;
  font-weight: 700;
}

.hero-main-action:disabled {
  filter: grayscale(0.45);
  opacity: 0.7;
}

.hero-tree-list {
  display: grid;
  gap: 6px;
}

.hero-node {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(15, 23, 42, 0.56);
}

.hero-node > div {
  min-width: 0;
}

.hero-node.hero-unique-skill {
  justify-content: flex-start;
}

.hero-node.hero-unique-skill > div {
  flex: 1 1 auto;
}

.hero-node-name {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

.hero-node-desc {
  font-size: 11px;
  color: #93c5fd;
}

.hero-node-detail-hit {
  appearance: none;
  display: grid;
  gap: 1px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  cursor: pointer;
}

#join-form .hero-node-detail-hit {
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  transition: color 160ms ease, text-shadow 160ms ease;
}

.hero-node-detail-hit .hero-node-name,
.hero-node-detail-hit .hero-node-desc {
  display: block;
}

.hero-node-detail-hit:hover .hero-node-name,
.hero-node-detail-hit:focus-visible .hero-node-name {
  color: color-mix(in srgb, var(--skill-color, #38bdf8) 42%, #ffffff);
  text-shadow: 0 0 12px color-mix(in srgb, var(--skill-color, #38bdf8) 22%, transparent);
}

.hero-node-detail-hit:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--skill-color, #38bdf8) 58%, rgba(255, 255, 255, 0.22));
  outline-offset: 3px;
}

.hero-req {
  font-size: 11px;
  font-weight: 600;
}

.hero-req.ok {
  color: #86efac;
}

.hero-req.lack {
  color: #fca5a5;
}

.hero-node-lack {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(69, 10, 10, 0.24);
}

.hero-node-up {
  min-width: 86px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.4);
  background: rgba(20, 83, 45, 0.76);
  color: #dcfce7;
  font-size: 11px;
  font-weight: 700;
}

.hero-node-up:disabled {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
}

.hero-node-up-lack,
.hero-node-up-lack:disabled {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.8);
  color: #fecaca;
}

.hero-unique-skill-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 8px;
}

.hero-node.hero-unique-skill {
  --skill-color: #38bdf8;
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  overflow: hidden;
  isolation: isolate;
  border-color: color-mix(in srgb, var(--skill-color) 34%, rgba(148, 163, 184, 0.2));
  background:
    radial-gradient(circle at 9% 20%, color-mix(in srgb, var(--skill-color) 16%, transparent), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(5, 8, 15, 0.7));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 0 color-mix(in srgb, var(--skill-color) 0%, transparent);
  transition:
    border-color 170ms ease,
    box-shadow 170ms ease,
    filter 170ms ease,
    transform 170ms ease;
}

.hero-node.hero-unique-skill::before,
.hero-node.hero-unique-skill::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.hero-node.hero-unique-skill::before {
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 14% 50%, color-mix(in srgb, var(--skill-color) 26%, transparent), transparent 30%),
    linear-gradient(110deg, transparent 0 26%, rgba(255, 255, 255, 0.08), transparent 62%);
  opacity: 0;
  transform: translateX(-2%) scale(0.985);
  transition:
    opacity 170ms ease,
    transform 170ms ease;
}

.hero-node.hero-unique-skill::after {
  inset: -24%;
  opacity: 0;
  background:
    radial-gradient(circle at 24% 28%, color-mix(in srgb, var(--skill-color) 36%, transparent), transparent 34%),
    linear-gradient(115deg, transparent 0 28%, rgba(255, 255, 255, 0.22), transparent 58%);
  transform: translateX(-34%) rotate(-8deg);
}

.hero-node.hero-unique-skill > .battle-hub-hero-skill-icon,
.hero-node.hero-unique-skill > .hero-unique-skill-copy,
.hero-node.hero-unique-skill > .hero-skill-upgrade-action {
  position: relative;
  z-index: 1;
}

.hero-node.hero-unique-skill > .hero-unique-skill-copy {
  min-width: 0;
}

.hero-node.hero-unique-skill:hover,
.hero-node.hero-unique-skill:focus-within {
  border-color: color-mix(in srgb, var(--skill-color) 58%, rgba(255, 255, 255, 0.18));
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--skill-color) 16%, transparent),
    0 0 22px color-mix(in srgb, var(--skill-color) 18%, transparent),
    inset 0 0 24px color-mix(in srgb, var(--skill-color) 9%, transparent);
}

.hero-node.hero-unique-skill:hover::before,
.hero-node.hero-unique-skill:focus-within::before {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.hero-node.hero-unique-skill.can-upgrade {
  border-color: color-mix(in srgb, var(--skill-color) 52%, rgba(74, 222, 128, 0.22));
}

.hero-node.hero-unique-skill.hero-node-lack {
  border-color: color-mix(in srgb, var(--skill-color) 18%, rgba(248, 113, 113, 0.36));
  background:
    radial-gradient(circle at 9% 20%, color-mix(in srgb, var(--skill-color) 10%, transparent), transparent 28%),
    linear-gradient(180deg, rgba(50, 18, 24, 0.58), rgba(15, 8, 14, 0.76));
}

.hero-node.hero-unique-skill.is-skill-upgrade-flash,
.hero-node.hero-unique-skill.is-skill-unlock-flash {
  animation: heroSkillSocketFlash 1.35s cubic-bezier(.16, .9, .22, 1);
}

.hero-node.hero-unique-skill.is-skill-upgrade-flash::after,
.hero-node.hero-unique-skill.is-skill-unlock-flash::after {
  animation: heroEquipSlotSweep 1.05s cubic-bezier(.16, .9, .22, 1);
}

.hero-node.hero-unique-skill.is-skill-upgrade-flash .hero-unique-skill-icon,
.hero-node.hero-unique-skill.is-skill-unlock-flash .hero-unique-skill-icon {
  animation: battleHubSkillIconPop 900ms cubic-bezier(.16, .9, .22, 1);
}

.hero-node.hero-unique-skill.is-skill-upgrade-flash .hero-skill-upgrade-action,
.hero-node.hero-unique-skill.is-skill-unlock-flash .hero-skill-upgrade-action {
  animation: heroSkillSocketButtonKick 820ms cubic-bezier(.16, .9, .22, 1);
}

.hero-node.hero-unique-skill .hero-node-name {
  color: #f8fafc;
}

.hero-node.hero-unique-skill .hero-node-desc {
  color: #aeb8c4;
}

.hero-node.hero-unique-skill .hero-req.ok {
  color: color-mix(in srgb, var(--skill-color) 48%, #bbf7d0);
  text-shadow: 0 0 12px color-mix(in srgb, var(--skill-color) 18%, transparent);
}

.hero-node.hero-unique-skill .hero-unique-skill-icon {
  border-color: color-mix(in srgb, var(--skill-color) 62%, rgba(255, 255, 255, 0.18));
  box-shadow:
    0 0 18px color-mix(in srgb, var(--skill-color) 22%, transparent),
    inset 0 0 14px rgba(255, 255, 255, 0.06);
}

.hero-node.hero-talent-node {
  --skill-color: var(--talent-color, #38bdf8);
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  overflow: hidden;
  isolation: isolate;
  border-color: color-mix(in srgb, var(--skill-color) 34%, rgba(148, 163, 184, 0.22));
  background:
    radial-gradient(circle at 9% 22%, color-mix(in srgb, var(--skill-color) 15%, transparent), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(6, 9, 16, 0.72));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.024),
    0 0 0 color-mix(in srgb, var(--skill-color) 0%, transparent);
  transition:
    border-color 170ms ease,
    box-shadow 170ms ease,
    filter 170ms ease,
    transform 170ms ease;
}

.hero-node.hero-talent-node::before,
.hero-node.hero-talent-node::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.hero-node.hero-talent-node::before {
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 14% 50%, color-mix(in srgb, var(--skill-color) 24%, transparent), transparent 31%),
    linear-gradient(110deg, transparent 0 24%, rgba(255, 255, 255, 0.075), transparent 62%);
  opacity: 0;
  transform: translateX(-2%) scale(0.985);
  transition:
    opacity 170ms ease,
    transform 170ms ease;
}

.hero-node.hero-talent-node::after {
  inset: -24%;
  opacity: 0;
  background:
    radial-gradient(circle at 24% 28%, color-mix(in srgb, var(--skill-color) 35%, transparent), transparent 34%),
    linear-gradient(115deg, transparent 0 28%, rgba(255, 255, 255, 0.2), transparent 58%);
  transform: translateX(-34%) rotate(-8deg);
}

.hero-node.hero-talent-node > .hero-talent-icon,
.hero-node.hero-talent-node > .hero-talent-copy,
.hero-node.hero-talent-node > .hero-talent-upgrade-action {
  position: relative;
  z-index: 1;
}

.hero-node.hero-talent-node > .hero-talent-copy {
  min-width: 0;
}

.hero-node.hero-talent-node:hover,
.hero-node.hero-talent-node:focus-within {
  border-color: color-mix(in srgb, var(--skill-color) 58%, rgba(255, 255, 255, 0.18));
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--skill-color) 15%, transparent),
    0 0 22px color-mix(in srgb, var(--skill-color) 18%, transparent),
    inset 0 0 24px color-mix(in srgb, var(--skill-color) 8%, transparent);
}

.hero-node.hero-talent-node:hover::before,
.hero-node.hero-talent-node:focus-within::before {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.hero-node.hero-talent-node.can-upgrade {
  border-color: color-mix(in srgb, var(--skill-color) 52%, rgba(74, 222, 128, 0.22));
}

.hero-node.hero-talent-node.hero-node-lack {
  border-color: color-mix(in srgb, var(--skill-color) 18%, rgba(248, 113, 113, 0.36));
  background:
    radial-gradient(circle at 9% 20%, color-mix(in srgb, var(--skill-color) 10%, transparent), transparent 28%),
    linear-gradient(180deg, rgba(50, 18, 24, 0.58), rgba(15, 8, 14, 0.76));
}

.hero-node.hero-talent-node.is-talent-upgrade-flash {
  animation: heroSkillSocketFlash 1.25s cubic-bezier(.16, .9, .22, 1);
}

.hero-node.hero-talent-node.is-talent-upgrade-flash::after {
  animation: heroEquipSlotSweep 1s cubic-bezier(.16, .9, .22, 1);
}

.hero-node.hero-talent-node.is-talent-upgrade-flash .hero-talent-icon {
  animation: battleHubSkillIconPop 860ms cubic-bezier(.16, .9, .22, 1);
}

.hero-node.hero-talent-node.is-talent-upgrade-flash .hero-talent-upgrade-action {
  animation: heroSkillSocketButtonKick 760ms cubic-bezier(.16, .9, .22, 1);
}

.hero-node.hero-talent-node .hero-node-name {
  color: #f8fafc;
}

.hero-node.hero-talent-node .hero-node-desc {
  color: #aeb8c4;
}

.hero-node-current-effect {
  display: inline;
  color: color-mix(in srgb, var(--skill-color) 56%, #d7fff0);
  font-weight: 900;
  white-space: normal;
  text-shadow: 0 0 10px color-mix(in srgb, var(--skill-color) 20%, transparent);
}

.hero-node.hero-talent-node .hero-req.ok {
  color: color-mix(in srgb, var(--skill-color) 48%, #bbf7d0);
  text-shadow: 0 0 12px color-mix(in srgb, var(--skill-color) 18%, transparent);
}

.hero-talent-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--skill-color) 62%, rgba(255, 255, 255, 0.18));
  border-radius: 8px;
  background:
    radial-gradient(circle at 34% 24%, color-mix(in srgb, var(--skill-color) 42%, transparent), transparent 55%),
    linear-gradient(145deg, rgba(8, 12, 22, 0.95), rgba(2, 6, 12, 0.88));
  box-shadow:
    0 0 18px color-mix(in srgb, var(--skill-color) 22%, transparent),
    inset 0 0 14px rgba(255, 255, 255, 0.06);
}

.hero-talent-icon.has-image {
  background: #020617;
}

.hero-talent-icon.has-image::before,
.hero-talent-icon.has-image::after,
.hero-talent-icon.has-image .hero-talent-icon-core {
  display: none;
}

.hero-talent-icon.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
  filter: saturate(1.08) contrast(1.04);
}

.hero-talent-icon::before,
.hero-talent-icon::after,
.hero-talent-icon-core {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-talent-icon::before {
  inset: 7px;
  border: 2px solid color-mix(in srgb, var(--skill-color) 70%, rgba(255, 255, 255, 0.18));
  border-radius: 999px;
  box-shadow:
    0 0 12px color-mix(in srgb, var(--skill-color) 34%, transparent),
    inset 0 0 10px color-mix(in srgb, var(--skill-color) 18%, transparent);
}

.hero-talent-icon::after {
  inset: 10px;
  background: color-mix(in srgb, var(--skill-color) 82%, #ffffff);
  clip-path: polygon(14% 52%, 58% 14%, 50% 42%, 84% 42%, 34% 86%, 47% 58%);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--skill-color) 46%, transparent));
  opacity: 0.95;
}

.hero-talent-icon-core {
  inset: 4px;
  border-radius: 7px;
  background:
    linear-gradient(110deg, transparent 0 34%, rgba(255, 255, 255, 0.2), transparent 64%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 9px);
  opacity: 0.36;
}

.hero-talent-icon-damage::after {
  clip-path: polygon(47% 4%, 58% 35%, 91% 31%, 64% 51%, 73% 86%, 47% 65%, 20% 86%, 30% 51%, 3% 31%, 36% 35%);
}

.hero-talent-icon-rate::after {
  clip-path: polygon(20% 18%, 80% 18%, 80% 36%, 48% 36%, 48% 47%, 80% 47%, 80% 65%, 48% 65%, 48% 82%, 20% 55%);
}

.hero-talent-icon-guard::after {
  clip-path: polygon(50% 4%, 84% 18%, 78% 66%, 50% 92%, 22% 66%, 16% 18%);
}

.hero-talent-icon-dodge::after {
  clip-path: polygon(20% 70%, 48% 16%, 52% 45%, 82% 31%, 60% 84%, 55% 56%);
  transform: rotate(9deg);
}

.hero-talent-icon-field::after {
  inset: 9px;
  border: 3px solid color-mix(in srgb, var(--skill-color) 78%, #ffffff);
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--skill-color) 88%, #ffffff) 0 22%, transparent 24% 100%);
  clip-path: none;
}

.hero-talent-icon-regen::after {
  clip-path: polygon(40% 16%, 60% 16%, 60% 40%, 84% 40%, 84% 60%, 60% 60%, 60% 84%, 40% 84%, 40% 60%, 16% 60%, 16% 40%, 40% 40%);
}

.hero-detail-icon-button {
  appearance: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

#join-form .hero-detail-icon-button {
  min-width: 42px;
  border: 1px solid color-mix(in srgb, var(--skill-color) 62%, rgba(255, 255, 255, 0.18)) !important;
  border-radius: 8px !important;
  background:
    radial-gradient(circle at 34% 24%, color-mix(in srgb, var(--skill-color) 42%, transparent), transparent 55%),
    linear-gradient(145deg, rgba(8, 12, 22, 0.95), rgba(2, 6, 12, 0.88)) !important;
  color: #fff2eb !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow:
    0 0 18px color-mix(in srgb, var(--skill-color) 22%, transparent),
    inset 0 0 14px rgba(255, 255, 255, 0.06) !important;
}

#join-form .hero-detail-icon-button.has-image {
  background: #020617 !important;
}

.hero-detail-icon-button:hover,
.hero-detail-icon-button:focus-visible {
  border-color: color-mix(in srgb, var(--skill-color) 82%, rgba(255, 255, 255, 0.32)) !important;
  filter: brightness(1.22) saturate(1.14);
  transform: translateY(-1px) scale(1.04) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--skill-color) 42%, transparent) !important,
    0 0 24px color-mix(in srgb, var(--skill-color) 38%, transparent) !important,
    inset 0 0 18px rgba(255, 255, 255, 0.08) !important;
  outline: none;
}

.hero-detail-icon-button:active {
  transform: translateY(0) scale(0.985) !important;
}

.hero-node.hero-unique-skill .hero-detail-icon-button img,
.hero-node.hero-talent-node .hero-detail-icon-button img {
  pointer-events: none;
}

.hero-node.hero-unique-skill .hero-detail-icon-button::after,
.hero-node.hero-talent-node .hero-detail-icon-button::before {
  transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease;
}

.hero-node.hero-unique-skill .hero-detail-icon-button:hover::after,
.hero-node.hero-unique-skill .hero-detail-icon-button:focus-visible::after,
.hero-node.hero-talent-node .hero-detail-icon-button:hover::before,
.hero-node.hero-talent-node .hero-detail-icon-button:focus-visible::before {
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--skill-color) 72%, transparent));
}

.hero-skill-upgrade-action.hero-talent-upgrade-action {
  min-width: 86px;
}

.hero-skill-upgrade-action {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 6px;
  min-width: 96px;
  min-height: 42px;
  overflow: hidden;
  isolation: isolate;
  border-color: color-mix(in srgb, var(--skill-color) 34%, rgba(148, 163, 184, 0.28));
  border-radius: 9px;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--skill-color) 16%, transparent), transparent 35%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--skill-color) 12%, transparent), transparent 48%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.11), transparent 34%),
    linear-gradient(180deg, #171a20 0%, #080a0f 54%, #030407 100%);
  color: #edf3fb;
  font-size: 0;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.42);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 18px color-mix(in srgb, var(--skill-color) 10%, transparent),
    0 10px 20px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -14px 24px rgba(0, 0, 0, 0.42);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    transform 160ms ease;
}

.hero-skill-upgrade-action-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0 26%, rgba(255, 255, 255, 0.18), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 10px);
  opacity: 0.22;
  transform: translateX(-18%);
  transition:
    opacity 180ms ease,
    transform 280ms ease;
}

.hero-skill-upgrade-action-level,
.hero-skill-upgrade-action-mark {
  position: relative;
  z-index: 1;
}

.hero-skill-upgrade-action-level {
  overflow: hidden;
  font-size: 13px;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-skill-upgrade-action-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid color-mix(in srgb, var(--skill-color) 34%, rgba(255, 255, 255, 0.14));
  border-radius: 7px;
  background:
    radial-gradient(circle at 40% 10%, color-mix(in srgb, var(--skill-color) 18%, transparent), transparent 58%),
    linear-gradient(180deg, rgba(32, 36, 46, 0.94), rgba(5, 6, 10, 0.96));
  color: color-mix(in srgb, var(--skill-color) 34%, #ffffff);
  font-size: 12px;
  line-height: 1;
  box-shadow:
    0 0 10px color-mix(in srgb, var(--skill-color) 10%, transparent),
    inset 0 0 12px rgba(255, 255, 255, 0.035);
}

.hero-skill-upgrade-action.is-ready {
  border-color: color-mix(in srgb, var(--skill-color) 58%, rgba(255, 255, 255, 0.18));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--skill-color) 12%, transparent),
    0 0 22px color-mix(in srgb, var(--skill-color) 18%, transparent),
    0 10px 20px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -14px 24px rgba(0, 0, 0, 0.4);
}

.hero-skill-upgrade-action:hover:not(:disabled),
.hero-skill-upgrade-action:focus-visible:not(:disabled) {
  border-color: color-mix(in srgb, var(--skill-color) 74%, rgba(255, 255, 255, 0.26));
  filter: brightness(1.15) saturate(1.08);
  transform: translateY(-1px) scale(1.015);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--skill-color) 30%, transparent),
    0 0 30px color-mix(in srgb, var(--skill-color) 28%, transparent),
    0 14px 26px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -12px 22px rgba(0, 0, 0, 0.34);
}

.hero-skill-upgrade-action:hover:not(:disabled) .hero-skill-upgrade-action-frame,
.hero-skill-upgrade-action:focus-visible:not(:disabled) .hero-skill-upgrade-action-frame {
  opacity: 0.56;
  transform: translateX(22%);
}

.hero-skill-upgrade-action:disabled {
  cursor: default;
  opacity: 0.72;
  filter: saturate(0.76);
}

.hero-skill-upgrade-action.is-loading,
.hero-skill-upgrade-action.is-loading:disabled {
  cursor: progress;
  opacity: 1;
  filter: saturate(1.08) brightness(1.05);
  border-color: color-mix(in srgb, var(--skill-color) 72%, rgba(255, 255, 255, 0.26));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--skill-color) 20%, transparent),
    0 0 24px color-mix(in srgb, var(--skill-color) 24%, transparent),
    0 10px 20px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -14px 24px rgba(0, 0, 0, 0.4);
}

.hero-skill-upgrade-action.is-loading .hero-skill-upgrade-action-frame {
  opacity: 0.62;
  transform: translateX(18%);
}

.hero-skill-upgrade-action.is-loading .hero-skill-upgrade-action-mark::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid color-mix(in srgb, var(--skill-color) 62%, #ffffff);
  border-top-color: transparent;
  border-radius: 999px;
  animation: battleHubSkillModalCore 720ms linear infinite;
}

.hero-skill-upgrade-action.hero-node-up-lack,
.hero-skill-upgrade-action.hero-node-up-lack:disabled {
  border-color: rgba(248, 113, 113, 0.34);
  background:
    radial-gradient(circle at 20% 0%, rgba(254, 202, 202, 0.12), transparent 34%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.07), transparent 36%),
    linear-gradient(180deg, rgba(37, 20, 26, 0.96), rgba(8, 7, 11, 0.98));
  color: #fecaca;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.hero-skill-upgrade-action.is-maxed,
.hero-skill-upgrade-action.is-maxed:disabled {
  grid-template-columns: minmax(0, 1fr);
  border-color: color-mix(in srgb, var(--skill-color) 46%, #fef08a 54%);
  background:
    radial-gradient(circle at 16% 0%, rgba(254, 240, 138, 0.38), transparent 38%),
    radial-gradient(circle at 88% 100%, color-mix(in srgb, var(--skill-color) 24%, rgba(250, 204, 21, 0.24)), transparent 48%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(56, 47, 18, 0.98), rgba(13, 10, 4, 0.98));
  color: #fef9c3;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--skill-color) 24%, rgba(250, 204, 21, 0.28)),
    0 0 24px color-mix(in srgb, var(--skill-color) 26%, rgba(250, 204, 21, 0.28)),
    0 10px 20px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -14px 24px rgba(0, 0, 0, 0.34);
  animation: heroMaxedActionPulse 2.8s ease-in-out infinite;
}

.hero-skill-upgrade-action.is-maxed::before,
.hero-skill-upgrade-action.is-maxed:disabled::before {
  content: "";
  position: absolute;
  inset: -45% auto -45% -52%;
  z-index: 1;
  width: 48%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.52), transparent);
  filter: blur(1px);
  opacity: 0;
  transform: translateX(-40%) skewX(-14deg);
  animation: heroMaxedActionSweep 3.6s ease-in-out infinite;
}

.hero-skill-upgrade-action.is-maxed::after,
.hero-skill-upgrade-action.is-maxed:disabled::after {
  content: "MAX";
  position: absolute;
  top: 4px;
  right: 6px;
  z-index: 2;
  color: color-mix(in srgb, var(--skill-color) 26%, #fff7b8);
  font-size: 7px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.08em;
  text-shadow:
    0 0 8px rgba(250, 204, 21, 0.52),
    0 0 14px color-mix(in srgb, var(--skill-color) 38%, transparent);
  opacity: 0.92;
}

.hero-skill-upgrade-action.is-maxed .hero-skill-upgrade-action-frame {
  opacity: 0.5;
  transform: translateX(8%);
  background:
    linear-gradient(105deg, transparent 0 24%, rgba(255, 255, 255, 0.22), transparent 62%),
    repeating-linear-gradient(90deg, rgba(254, 240, 138, 0.07) 0 1px, transparent 1px 9px);
}

.hero-skill-upgrade-action.is-maxed .hero-skill-upgrade-action-level {
  color: #fffce7;
  font-size: 14px;
  text-shadow:
    0 0 10px rgba(250, 204, 21, 0.52),
    0 0 18px color-mix(in srgb, var(--skill-color) 32%, transparent);
}

.hero-skill-upgrade-action.is-maxed .hero-skill-upgrade-action-mark {
  width: 30px;
  border-color: rgba(250, 204, 21, 0.3);
  background:
    radial-gradient(circle at 50% 14%, rgba(254, 240, 138, 0.26), transparent 58%),
    linear-gradient(180deg, rgba(49, 42, 20, 0.96), rgba(9, 8, 5, 0.98));
  color: #fef3c7;
  font-size: 9px;
}

@keyframes heroSkillSocketFlash {
  0% {
    transform: scale(0.99);
    filter: brightness(0.92) saturate(0.92);
    box-shadow: 0 0 0 color-mix(in srgb, var(--skill-color) 0%, transparent);
  }

  24% {
    transform: scale(1.018);
    filter: brightness(1.5) saturate(1.38);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--skill-color) 58%, transparent),
      0 0 28px color-mix(in srgb, var(--skill-color) 50%, transparent),
      0 0 48px rgba(255, 255, 255, 0.1);
  }

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

@keyframes heroSkillSocketButtonKick {
  0% { transform: scale(0.96); }
  28% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes heroMaxedActionPulse {
  0%, 100% {
    filter: brightness(1) saturate(1);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--skill-color) 24%, rgba(250, 204, 21, 0.28)),
      0 0 20px color-mix(in srgb, var(--skill-color) 20%, rgba(250, 204, 21, 0.22)),
      0 10px 20px rgba(0, 0, 0, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.24),
      inset 0 -14px 24px rgba(0, 0, 0, 0.34);
  }

  48% {
    filter: brightness(1.16) saturate(1.16);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--skill-color) 34%, rgba(250, 204, 21, 0.48)),
      0 0 30px color-mix(in srgb, var(--skill-color) 28%, rgba(250, 204, 21, 0.38)),
      0 0 46px rgba(254, 240, 138, 0.12),
      0 12px 22px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.32),
      inset 0 -12px 22px rgba(0, 0, 0, 0.28);
  }
}

@keyframes heroMaxedActionSweep {
  0%, 52% {
    opacity: 0;
    transform: translateX(-40%) skewX(-14deg);
  }

  64% {
    opacity: 0.82;
  }

  86%, 100% {
    opacity: 0;
    transform: translateX(390%) skewX(-14deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-node.hero-unique-skill.is-skill-upgrade-flash,
  .hero-node.hero-unique-skill.is-skill-unlock-flash,
  .hero-node.hero-unique-skill.is-skill-upgrade-flash::after,
  .hero-node.hero-unique-skill.is-skill-unlock-flash::after,
  .hero-node.hero-unique-skill.is-skill-upgrade-flash .hero-unique-skill-icon,
  .hero-node.hero-unique-skill.is-skill-unlock-flash .hero-unique-skill-icon,
  .hero-node.hero-unique-skill.is-skill-upgrade-flash .hero-skill-upgrade-action,
  .hero-node.hero-unique-skill.is-skill-unlock-flash .hero-skill-upgrade-action,
  .hero-node.hero-talent-node.is-talent-upgrade-flash,
  .hero-node.hero-talent-node.is-talent-upgrade-flash::after,
  .hero-node.hero-talent-node.is-talent-upgrade-flash .hero-talent-icon,
  .hero-node.hero-talent-node.is-talent-upgrade-flash .hero-talent-upgrade-action,
  .hero-skill-upgrade-action.is-maxed,
  .hero-skill-upgrade-action.is-maxed::before {
    animation: none;
  }
}

.hero-action-feedback {
  margin-top: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15, 23, 42, 0.7);
}

.hero-action-feedback.ok {
  border-color: rgba(34,197,94,0.35);
  background: rgba(20, 83, 45, 0.3);
  color: #bbf7d0;
}

.hero-action-feedback.err {
  border-color: rgba(244,63,94,0.35);
  background: rgba(127, 29, 29, 0.3);
  color: #fecdd3;
}

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

.join-feedback {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid rgba(244, 63, 94, 0.35);
  background: rgba(127, 29, 29, 0.28);
  color: #fecdd3;
}

#join-form button {
  cursor: pointer;
  background: linear-gradient(135deg, #3a1e1e, #be123c);
  color: #fff;
  border: none;
}

#join-form button.secondary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

#join-form .actions button {
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

#join-form .actions button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

@media (max-width: 720px) {
  .replay-load-overlay {
    top: calc(env(safe-area-inset-top) + 54px);
  }

  #skill-bar {
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 8px 0 10px;
    scrollbar-width: none;
  }

  #skill-bar::-webkit-scrollbar {
    display: none;
  }

  #hud {
    flex-direction: column;
    right: auto;
    top: 8px;
  }

  #top-center-hud {
    top: 8px;
    width: calc(100vw - 24px);
    max-width: 560px;
  }

  #top-center-hud .top-center-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 12px;
    padding: 7px 10px 7px 42px;
  }

  #commentator-panel {
    top: calc(env(safe-area-inset-top) + 78px);
    right: 8px;
    left: 8px;
    width: auto;
    padding: 12px 14px;
  }

  #commentator-title {
    font-size: 16px;
  }

  #commentator-text {
    font-size: 13px;
  }

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

  .commentator-queue-item {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .boss-spawn-alert {
    width: min(92vw, 380px);
    min-width: 0;
    font-size: 11px;
    padding: 5px 10px;
    letter-spacing: 0.45px;
  }

  .panel {
    min-width: 0;
    width: calc(100vw - 24px);
  }

  #bottom-hud {
    width: calc(100vw - 16px);
    bottom: calc(env(safe-area-inset-bottom) + 8px);
  }

  #fps-corner {
    right: 74px;
    bottom: calc(env(safe-area-inset-bottom) + 126px);
    font-size: 11px;
  }

  #minimap-wrap {
    left: 8px;
    bottom: calc(env(safe-area-inset-bottom) + 156px);
    width: 148px;
    height: 148px;
    padding: 6px;
  }

  #stats-toggle {
    right: 8px;
    bottom: calc(env(safe-area-inset-bottom) + 126px);
    padding: 7px 10px;
    font-size: 12px;
  }

  #stats-panel {
    right: 8px;
    bottom: calc(env(safe-area-inset-bottom) + 168px);
    width: min(300px, calc(100vw - 16px));
    max-height: 40vh;
    padding: 9px;
  }

  .levelup-options {
    grid-template-columns: 1fr;
  }

  #join-form {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    padding: 12px;
    gap: 7px;
  }

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

  .auth-tabs,
  .providers-grid,
  .actions {
    grid-template-columns: 1fr;
  }
  .hero-wheel {
    width: min(300px, calc(100vw - 42px));
    --radius: 96px;
  }

  .wheel-option {
    width: 68px;
    padding: 5px 4px;
    transform: translate(-50%, -50%) translate(var(--x, 0px), var(--y, 0px));
  }

  .wheel-option:hover {
    transform: translate(-50%, -50%) translate(var(--x, 0px), var(--y, 0px)) scale(1.03);
  }

  .wheel-option .char-preview {
    width: 44px;
    height: 50px;
  }

  .wheel-option .char-label {
    font-size: 10px;
  }

  .wheel-option .char-lock {
    font-size: 9px;
  }
  .hero-tree-head {
    display: grid;
    gap: 6px;
  }

  .hero-node {
    grid-template-columns: 1fr;
    display: grid;
  }

  .rooms-list {
    max-height: 160px;
  }
}


#net-meta {
  line-height: 1.25;
}

#net-meta .net-line {
  display: block;
}
#quality-select {
  pointer-events: auto;
  background: #0b0f15;
  color: #e5e7eb;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  padding: 2px 6px;
}


.rooms-browser {
  margin-top: 6px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  padding: 8px;
  background: rgba(8, 12, 18, 0.55);
}

.rooms-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  color: #dbeafe;
}

#join-form button.mini {
  padding: 4px 8px;
  font-size: 12px;
  background: #334155;
}

.rooms-list {
  display: grid;
  gap: 6px;
  max-height: 190px;
  overflow: auto;
  font-size: 13px;
}

.room-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255,255,255,0.08);
}

.room-code {
  font-weight: 600;
  letter-spacing: 0.4px;
}

.room-meta {
  color: #cbd5e1;
}

.room-join {
  padding: 5px 8px;
  border-radius: 6px;
  border: none;
  background: #0ea5e9;
  color: white;
  cursor: pointer;
}

.room-join:disabled {
  background: #475569;
  cursor: not-allowed;
}

#info-panel.is-hidden {
  display: none;
}

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

.panel-head h1 {
  margin: 0;
}

.panel-close {
  pointer-events: auto;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #e5e7eb;
  font: inherit;
  font-size: 22px;
  line-height: 0.80;
  cursor: pointer;
  padding: 0 0 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.panel-close:hover,
.panel-close:focus-visible {
  border-color: rgba(255, 180, 120, 0.52);
  background: rgba(255, 143, 83, 0.14);
  color: #fff5ee;
  transform: translateY(-1px);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.24),
    0 0 16px rgba(255, 143, 83, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.14);
}

.panel-close:active {
  transform: translateY(1px) scale(0.96);
  background: rgba(255, 143, 83, 0.2);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.2),
    inset 0 1px 8px rgba(0,0,0,0.18);
}

.panel-close-sm {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 18px;
}

#toggle-info,
#join-toggle-info {
  position: fixed;  
  top: calc(env(safe-area-inset-top) + 14px);
  left: 235px;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(9, 14, 22, 0.8);
  color: #e5e7eb;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

#toggle-info:hover,
#join-toggle-info:hover {
  background: rgba(20, 29, 43, 0.9);
}

#toggle-info.hidden,
#join-toggle-info.hidden {
  display: none;
}

#toggle-info.minimap-hidden {
  left: 12px;
}

#toggle-info .menu-burger,
#join-toggle-info .menu-burger {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
}

#toggle-info .menu-label,
#join-toggle-info .menu-label {
  display: inline-block;
  line-height: 1;
}

#join-toggle-info {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  left: 12px;
  z-index: 70;
  pointer-events: auto;
}

#join-toggle-info.hidden {
  display: none;
}
.settings-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
}

@media (max-width: 520px) {
  .settings-toggles {
    grid-template-columns: 1fr;
  }
}

.shadow-option {
  pointer-events: auto;
  margin: 0;
}

.shadow-option label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shadow-range-option {
  display: grid;
  gap: 6px;
}

.shadow-range-option label {
  justify-content: space-between;
}

.shadow-range-option input[type="range"] {
  width: min(220px, 100%);
  accent-color: #38bdf8;
}

#shadow-toggle {
  pointer-events: auto;
}
#stats-toggle {
  position: fixed;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 12px);
  z-index: 29;
  pointer-events: auto;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(9, 14, 22, 0.86);
  color: #e2e8f0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#stats-toggle.hidden {
  display: none;
}

#stats-panel {
  position: fixed;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 58px);
  z-index: 29;
  width: min(320px, calc(100vw - 24px));
  max-height: min(52vh, 420px);
  overflow: auto;
  pointer-events: auto;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  background: rgba(8, 13, 20, 0.9);
  backdrop-filter: blur(10px);
  padding: 10px;
}

#stats-panel.hidden {
  display: none;
}

#stats-panel .panel-head {
  align-items: center;
  margin-bottom: 12px;
}

.stats-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 0;
  color: #dbeafe;
}

#stats-content {
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: #d1d5db;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.stats-row b {
  color: #f8fafc;
  font-weight: 700;
}

#mobile-controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  padding: 0 12px;
  display: none;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
  z-index: 30;
}

#mobile-controls.active {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: end;
}

#mobile-controls .stick {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(8, 12, 18, 0.38);
  backdrop-filter: blur(4px);
  position: relative;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

#move-stick,
#aim-stick {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom) + 8px);
  margin-bottom: 0 !important;
  grid-row: 1 !important;
}

#move-stick {
  right: 12px !important;
  left: auto !important;
  grid-column: 3 !important;
  justify-self: end !important;
}

#aim-stick {
  left: 12px !important;
  right: auto !important;
  grid-column: 1 !important;
  justify-self: start !important;
}

#move-stick.dynamic-active,
#aim-stick.dynamic-active {
  position: fixed !important;
  transform: translate(-50%, -50%);
  margin: 0 !important;
  z-index: 34;
  grid-column: auto !important;
  justify-self: auto !important;
  left: auto;
  right: auto;
  bottom: auto;
}

#aim-stick[hidden] {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
}

#mobile-controls .stick-knob {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(236, 241, 249, 0.4);
  border: 1px solid rgba(255,255,255,0.45);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

#mobile-controls .stick-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -16px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.8px;
  color: rgba(226,232,240,0.9);
  pointer-events: none;
}

#jump-btn {
  --jump-progress: 1;
  pointer-events: auto;
  grid-column: 3;
  justify-self: end;
  align-self: end;
  margin-bottom: 124px;
  min-width: 104px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.34);
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(37,99,235,0.72) 0 calc(var(--jump-progress) * 100%), rgba(120, 8, 8, 0.78) calc(var(--jump-progress) * 100%) 100%);
  color: #fee2e2;
  font-weight: 700;
  letter-spacing: 0.6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

#jump-btn:active {
  transform: translateY(1px) scale(0.98);
  background: rgba(160, 16, 16, 0.82);
}


@media (pointer: coarse) {
  #game {
    touch-action: none;
  }
}
.records-browser .rooms-list {
  max-height: 180px;
}

#join-form .record-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e5e7eb;
}

.record-rank {
  width: 24px;
  color: #facc15;
  font-weight: 700;
}

.record-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #e5e7eb;
}

.record-meta {
  color: #cbd5e1;
  font-size: 12px;
}
.records-pager {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.records-pager #records-page {
  font-size: 12px;
  color: #cbd5e1;
}

.records-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.death-result {
  display: none;
  margin-top: 15px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(25, 10, 12, 0.55);
  color: #fecaca;
  font-size: 12px;
  line-height: 1.35;
}

#join-overlay.death-mode .death-result {
  display: block;
}

#join-overlay.death-cinematic-active #join-form {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
}

.death-cinematic {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: auto;
  overflow: hidden;
}

#join-overlay.death-cinematic-active .death-cinematic {
  display: flex;
}

.death-text {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(52px, 11vw, 156px);
  letter-spacing: 2px;
  color: #ffd4d4;
  text-shadow: 0 2px 0 #5c0000, 0 10px 36px rgba(180,0,0,0.75);
  transform: translateZ(0) scale(0.06);
  opacity: 0;
}

#join-overlay.death-cinematic-active .death-text {
  animation: deathSlam 1.2s cubic-bezier(0.08, 0.78, 0.12, 1) forwards;
}

.death-impact {
  position: absolute;
  width: min(80vw, 900px);
  height: min(42vw, 520px);
  background: radial-gradient(circle at center, rgba(190, 10, 16, 0.65) 0%, rgba(70, 6, 10, 0.45) 48%, rgba(16, 4, 8, 0) 74%);
  filter: blur(0.5px);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.2);
}

#join-overlay.death-cinematic-active .death-impact {
  animation: deathImpact 1.4s ease-out forwards;
}

.death-drips {
  display: none;
}

.death-screen-blood {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  overflow: hidden;
}

.death-screen-shot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--drop-size, 10px);
  height: var(--drop-size, 10px);
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 185, 185, 0.86) 0 18%, rgba(188, 15, 18, 0.98) 52%, rgba(110, 4, 8, 0.98) 100%);
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.35);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2);
  animation: deathScreenShotFly var(--fly-dur, 480ms) cubic-bezier(.2,.78,.2,1) var(--delay, 0ms) forwards;
}

.death-screen-splat {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--splat-size, 58px);
  height: var(--splat-size, 58px);
  transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px))) rotate(var(--rot, 0deg)) scale(0.08);
  border-radius: 54% 46% 42% 58% / 52% 38% 62% 48%;
  background: radial-gradient(circle at 36% 32%, rgba(255, 186, 186, 0.35) 0 12%, rgba(173, 10, 16, 0.82) 40%, rgba(96, 3, 8, 0.95) 100%);
  box-shadow: 0 0 14px rgba(127, 29, 29, 0.42);
  opacity: 0;
  animation: deathScreenSplatIn 170ms ease-out var(--delay, 0ms) forwards, deathScreenSplatFade var(--fade-dur, 1250ms) ease-in calc(var(--delay, 0ms) + 170ms) forwards;
}

.death-screen-splat::before,
.death-screen-splat::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  background: rgba(144, 8, 12, 0.88);
  opacity: 0.72;
}

.death-screen-splat::before {
  width: 26%;
  height: 26%;
  left: -10%;
  top: 42%;
}

.death-screen-splat::after {
  width: 18%;
  height: 18%;
  right: -8%;
  top: 18%;
}

@keyframes deathScreenShotFly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25);
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px))) scale(0.86);
  }
}

@keyframes deathScreenSplatIn {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px))) rotate(var(--rot, 0deg)) scale(0.12);
  }
  100% {
    opacity: 0.95;
    transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px))) rotate(var(--rot, 0deg)) scale(1);
  }
}

@keyframes deathScreenSplatFade {
  0% {
    opacity: 0.95;
    filter: blur(0px);
  }
  100% {
    opacity: 0;
    filter: blur(1px);
  }
}

.death-drips {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(92, 6, 10, 0) 0 56%, rgba(130, 8, 14, 0.38) 74%, rgba(96, 5, 11, 0) 100%);
  opacity: 0;
  transform: translateY(-16%);
  filter: blur(0.35px);
  overflow: hidden;
}

.death-drips::before,
.death-drips::after {
  content: '';
  position: absolute;
  inset: -8% 0 0 0;
  pointer-events: none;
  opacity: 0;
}

.death-drips::before {
  background:
    radial-gradient(8px 16px at 8% 6%, rgba(178, 10, 16, 0.92) 0 56%, rgba(178, 10, 16, 0) 75%),
    radial-gradient(9px 18px at 17% 8%, rgba(198, 15, 22, 0.88) 0 55%, rgba(198, 15, 22, 0) 74%),
    radial-gradient(7px 14px at 29% 7%, rgba(162, 8, 14, 0.9) 0 58%, rgba(162, 8, 14, 0) 76%),
    radial-gradient(10px 20px at 42% 9%, rgba(188, 13, 20, 0.88) 0 54%, rgba(188, 13, 20, 0) 74%),
    radial-gradient(8px 16px at 56% 7%, rgba(172, 10, 16, 0.9) 0 57%, rgba(172, 10, 16, 0) 76%),
    radial-gradient(9px 18px at 72% 8%, rgba(192, 16, 22, 0.86) 0 54%, rgba(192, 16, 22, 0) 74%),
    radial-gradient(8px 16px at 86% 6%, rgba(165, 9, 15, 0.88) 0 56%, rgba(165, 9, 15, 0) 76%),
    radial-gradient(7px 14px at 95% 9%, rgba(142, 7, 12, 0.85) 0 58%, rgba(142, 7, 12, 0) 76%);
}

.death-drips::after {
  background:
    radial-gradient(7px 14px at 12% 4%, rgba(150, 8, 13, 0.82) 0 58%, rgba(150, 8, 13, 0) 78%),
    radial-gradient(8px 16px at 24% 5%, rgba(175, 11, 17, 0.8) 0 56%, rgba(175, 11, 17, 0) 76%),
    radial-gradient(6px 12px at 38% 4%, rgba(138, 7, 12, 0.8) 0 60%, rgba(138, 7, 12, 0) 79%),
    radial-gradient(8px 16px at 51% 6%, rgba(170, 10, 16, 0.8) 0 56%, rgba(170, 10, 16, 0) 76%),
    radial-gradient(7px 14px at 66% 4%, rgba(146, 8, 13, 0.78) 0 58%, rgba(146, 8, 13, 0) 78%),
    radial-gradient(9px 17px at 81% 6%, rgba(176, 11, 17, 0.8) 0 55%, rgba(176, 11, 17, 0) 75%),
    radial-gradient(7px 14px at 92% 5%, rgba(140, 8, 12, 0.78) 0 58%, rgba(140, 8, 12, 0) 78%);
}

#join-overlay.death-cinematic-active .death-drips {
  animation: deathDrips 2s ease-out 0.7s forwards;
}

#join-overlay.death-cinematic-active .death-drips::before {
  animation: deathDripsFlowA 2.3s linear 0.7s forwards;
}

#join-overlay.death-cinematic-active .death-drips::after {
  animation: deathDripsFlowB 2.8s linear 0.8s forwards;
}

.death-continue {
  position: absolute;
  bottom: 14vh;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(10, 16, 24, 0.88);
  color: #f8fafc;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

#join-overlay.death-cinematic-active .death-continue {
  animation: deathContinueIn 0.35s ease-out 1.55s forwards;
  pointer-events: auto;
}

@keyframes deathSlam {
  0% { opacity: 0; transform: perspective(900px) translateZ(-1000px) scale(0.05); }
  62% { opacity: 1; transform: perspective(900px) translateZ(0) scale(1.14); }
  76% { transform: perspective(900px) translateZ(0) scale(0.96) rotate(-1.1deg); }
  100% { opacity: 1; transform: perspective(900px) translateZ(0) scale(1) rotate(0deg); }
}

@keyframes deathImpact {
  0% { opacity: 0; transform: scale(0.12); }
  58% { opacity: 0.75; transform: scale(1.08); }
  100% { opacity: 0.2; transform: scale(1.42); }
}

@keyframes deathDrips {
  0% { opacity: 0; transform: translateY(-18%); }
  22% { opacity: 0.84; }
  70% { opacity: 0.52; }
  100% { opacity: 0; transform: translateY(8%); }
}

@keyframes deathDripsFlowA {
  0% { opacity: 0; transform: translate3d(0,-24%,0) scaleY(0.92); }
  18% { opacity: 0.92; }
  72% { opacity: 0.58; }
  100% { opacity: 0; transform: translate3d(6%,72%,0) scaleY(1.06); }
}

@keyframes deathDripsFlowB {
  0% { opacity: 0; transform: translate3d(0,-30%,0) scaleY(0.9); }
  24% { opacity: 0.78; }
  70% { opacity: 0.46; }
  100% { opacity: 0; transform: translate3d(-4%,90%,0) scaleY(1.08); }
}

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


#join-form select {
  font: inherit;
  padding: 1px 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: #0b0f15;
  color: var(--text);
}

.sync-settings {
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 8px;
  background: rgba(8, 12, 18, 0.45);
  padding-bottom: 0px;
}

.sync-settings > summary {
  cursor: pointer;
  color: #dbeafe;
  font-size: 13px;
  margin-bottom: 8px;
  user-select: none;
}

.sync-settings .sync-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.sync-settings label {
  font-size: 12px;
  color: #cbd5e1;
}

.sync-settings input {
  margin-top: 2px;
}

#records-total {
  color: #cbd5e1;
  font-weight: 500;
}

.presence-meta {
  margin-bottom: 6px;
  font-size: 12px;
  color: #cbd5e1;
}

.presence-count {
  font-weight: 700;
  color: #e2e8f0;
}

.presence-count.hot {
  color: #22c55e;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.28);
}



/* Keep mobile HUD layout overrides at the very end so base rules above don't override them. */
@media (max-width: 720px) {
  #bottom-hud {
    left: 7px;
    right: 7px;
    transform: none;
    width: auto;
    bottom: calc(env(safe-area-inset-bottom) + 20px);
  }

  #fps-corner {
    left: 8px;
    bottom: calc(env(safe-area-inset-bottom) + 146px);
    font-size: 12px;
  }

  #minimap-wrap {
    left: 8px;
    bottom: calc(env(safe-area-inset-bottom) + 188px);
    width: 144px;
    height: 144px;
  }

  #stats-toggle {
    right: 8px;
    bottom: calc(env(safe-area-inset-bottom) + 146px);
    padding: 7px 10px;
    font-size: 12px;
  }

  #stats-panel {
    right: 8px;
    bottom: calc(env(safe-area-inset-bottom) + 188px);
    width: min(300px, calc(100vw - 16px));
    max-height: 42vh;
    padding: 9px;
  }

  #mobile-controls {
    bottom: calc(env(safe-area-inset-bottom) + 120px);
    padding: 0 10px;
  }

  #mobile-controls .stick {
    width: 108px;
    height: 108px;
  }

  #jump-btn {
    min-width: 98px;
    height: 44px;
    margin-bottom: 128px;
    font-size: 14px;
  }

  #levelup-overlay {
    width: calc(100vw - 12px);
    left: 6px;
    right: 6px;
    top: 56%;
    transform: translateY(-50%);
    max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 210px);
    overflow: auto;
    padding: 10px;
  }

  .levelup-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .skill-option {
    padding: 8px;
  }

  .skill-option .nm {
    font-size: 14px;
  }

  .skill-option .meta,
  .skill-option .desc {
    font-size: 12px;
  }

  body.levelup-open #bottom-hud,
  body.levelup-open #stats-toggle,
  body.levelup-open #fps-corner,
  body.levelup-open #minimap-wrap {
    display: none !important;
  }

  body.levelup-open #mobile-controls.active {
    opacity: 0;
  }
}

/* Mobile HUD and records details overlay fixes */
#stats-toggle {
  z-index: 35;
}

#stats-panel {
  z-index: 36;
}

#join-form .record-row {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.55);
  padding: 6px;
}

#join-form .record-row:hover {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(30, 58, 110, 0.35);
}

.record-details-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  z-index: 90;
  background: rgba(2, 6, 14, 0.64);
  backdrop-filter: blur(5px);
}

.record-details-modal.hidden {
  display: none;
}

.record-details-card {
  width: min(560px, calc(100vw - 24px));
  max-height: min(78vh, 760px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  background: rgba(8, 14, 24, 0.96);
  padding: 10px;
}

.record-details-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.record-details-head .mini {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px 0 10px;
  border: 1px solid rgba(255, 218, 196, 0.2);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(38, 17, 22, 0.94), rgba(11, 13, 18, 0.92));
  color: #fff3ed;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    background 170ms ease,
    box-shadow 170ms ease,
    filter 170ms ease;
}

.record-details-head .mini::after {
  content: "";
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent calc(50% - 1px), #fff7f0 calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) center / 10px 10px no-repeat,
    linear-gradient(-45deg, transparent calc(50% - 1px), #fff7f0 calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) center / 10px 10px no-repeat,
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.46), transparent 28%),
    linear-gradient(135deg, rgba(255, 126, 98, 0.32), rgba(74, 22, 27, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 218, 0.4),
    inset 0 -6px 10px rgba(59, 7, 13, 0.32),
    0 0 0 1px rgba(255, 109, 86, 0.14),
    0 5px 11px rgba(0, 0, 0, 0.2);
  transition:
    background 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease;
}

.record-details-head .mini:hover,
.record-details-head .mini:focus-visible {
  border-color: rgba(255, 177, 122, 0.58);
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(71, 22, 26, 0.96), rgba(13, 15, 20, 0.94));
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    0 0 20px rgba(255, 103, 72, 0.18),
    0 12px 26px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.record-details-head .mini:hover::after,
.record-details-head .mini:focus-visible::after {
  background:
    linear-gradient(45deg, transparent calc(50% - 1px), #ffffff calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) center / 9px 9px no-repeat,
    linear-gradient(-45deg, transparent calc(50% - 1px), #ffffff calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) center / 9px 9px no-repeat,
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.56), transparent 28%),
    linear-gradient(135deg, rgba(255, 148, 112, 0.42), rgba(96, 24, 29, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(255, 238, 226, 0.6),
    inset 0 -6px 10px rgba(59, 7, 13, 0.26),
    0 0 0 1px rgba(255, 134, 103, 0.22),
    0 0 16px rgba(255, 104, 86, 0.3),
    0 7px 13px rgba(0, 0, 0, 0.26);
  transform: rotate(90deg);
}

.record-details-head .mini:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.28),
    inset 0 1px 8px rgba(0, 0, 0, 0.28);
}

#record-details-title {
  color: #e2e8f0;
  font-size: 14px;
}

.record-details-body {
  display: grid;
  gap: 8px;
  color: #d1d5db;
  font-size: 13px;
}

.rd-summary {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15, 23, 42, 0.45);
}

.rd-grid {
  display: grid;
  gap: 5px;
}

.rd-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.rd-row b {
  color: #f8fafc;
  text-align: right;
}

.rd-subtitle {
  margin-top: 3px;
  font-weight: 700;
  color: #cbd5e1;
}

.rd-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rd-skill {
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(30, 41, 59, 0.55);
  color: #e2e8f0;
  font-size: 12px;
}

.record-details-empty {
  color: #94a3b8;
  font-size: 12px;
}

.record-replay-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.record-replay-panel.hidden {
  display: none;
}

.record-replay-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.record-replay-speeds {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.record-replay-speeds.hidden {
  display: none;
}

.record-replay-speeds .mini.active {
  background: rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.75);
  color: #e0f2fe;
}

.record-replay-meta {
  color: #94a3b8;
  font-size: 12px;
}

.record-replay-stage {
  position: relative;
}

.record-replay-stage-load {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  min-width: 132px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 14, 24, 0.9);
  color: #f8fafc;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.record-replay-stage-load.hidden {
  display: none;
}

.record-replay-controls {
  display: grid;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 16, 26, 0.72);
}

.record-replay-controls.hidden {
  display: none;
}

#record-replay-progress {
  width: 100%;
}

.record-replay-canvas {
  width: 100%;
  aspect-ratio: 13 / 8;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 50% 45%, rgba(34, 197, 94, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(6, 12, 20, 0.98));
  image-rendering: pixelated;
}

#replay-game-controls {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  right: 12px;
  z-index: 55;
  display: grid;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 14, 24, 0.86);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

#replay-game-controls.hidden {
  display: none;
}

.replay-game-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.replay-game-row-bottom {
  align-items: center;
}

.replay-game-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

#replay-game-meta {
  color: #e2e8f0;
  font-size: 12px;
  white-space: nowrap;
}

#replay-game-progress {
  flex: 1 1 240px;
  min-width: 180px;
}

@media (max-width: 720px) {
  #toggle-info,
#join-toggle-info {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 8px);
    left: 160px;
    z-index: 42;
  }

  #scoreboard {
    margin-top: 44px;
  }

  #stats-panel {
    bottom: calc(env(safe-area-inset-bottom) + 190px);
  }

  .record-details-card {
    width: calc(100vw - 16px);
    max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 18px);
  }

  body.replay-game-active #minimap-wrap {
    top: calc(env(safe-area-inset-top) + 112px);
    bottom: auto;
  }

  body.replay-game-active #scoreboard {
    margin-top: 70px;
  }

  #replay-game-controls {
    left: 8px;
    right: 8px;
    top: calc(env(safe-area-inset-top) + 8px);
  }

  .replay-game-row-bottom {
    align-items: stretch;
  }

  .replay-game-nav {
    width: 100%;
    justify-content: space-between;
  }

  #replay-game-progress {
    width: 100%;
  }

  #toggle-info.minimap-hidden {
    left: 8px;
  }
}

@media (max-width: 720px) {
  #toggle-info,
#join-toggle-info {
    top: calc(env(safe-area-inset-top) + 8px);
    left: 156px;
  }

  #fps-corner {
    left: 8px;
    bottom: calc(env(safe-area-inset-bottom) + 120px);
  }

  #stats-toggle {
    right: 8px;
    bottom: calc(env(safe-area-inset-bottom) + 120px);
  }

  #stats-panel {
    right: 8px;
    bottom: calc(env(safe-area-inset-bottom) + 146px);
  }

  #bottom-hud {
    bottom: calc(env(safe-area-inset-bottom) + 6px);
  }

  #skill-bar {
    position: fixed;
    left: 7px;
    right: 7px;
    bottom: calc(env(safe-area-inset-bottom) + 66px);
    margin-bottom: 0;
    justify-items: stretch;
    overflow-x: auto;
    overflow-y: visible;
    padding: 3px 2px 6px;
    scrollbar-width: none;
  }

  #skill-bar::-webkit-scrollbar {
    display: none;
  }

  #skill-bar .skill-dock {
    width: max-content;
    min-width: 100%;
    justify-items: start;
  }

  #skill-bar .skill-dock-row {
    width: max-content;
    max-width: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  #skill-bar .skill-slot-large {
    width: 48px;
    height: 54px;
  }

  #skill-bar .skill-slot-small {
    width: 34px;
    height: 38px;
  }

  #skill-bar .skill-dock-row-passive {
    gap: 4px;
  }

  #xp-wrap {
    width: 100%;
    padding: 6px 8px 7px;
  }

  .xp-readout {
    margin-bottom: 5px;
  }

  .xp-readout::before,
  .xp-readout::after {
    width: 16px;
  }

  .xp-kicker {
    display: none;
  }

  #xp-bar {
    height: 13px;
  }

  #xp-levelup-burst {
    bottom: 20px;
    font-size: 10px;
  }

  #mobile-controls {
    bottom: calc(env(safe-area-inset-bottom) + 86px);
  }

  #jump-btn {
    margin-bottom: 96px;
  }

  #minimap-wrap {
    left: 12px;
    top: calc(env(safe-area-inset-top) + 52px);
    bottom: auto;
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 720px) {
  #toggle-info,
#join-toggle-info {
    top: calc(env(safe-area-inset-top) + 10px);
    left: 12px;
    width: 32px;
    height: 30px;
    padding: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10;
    line-height: 1;
    z-index: 44;
  }

  #toggle-info .menu-label,
#join-toggle-info .menu-label {
    display: none;
    width: 0;
    overflow: hidden;
    opacity: 0;
  }

  #toggle-info .menu-burger,
#join-toggle-info .menu-burger {
    font-size: 18px;
    color: #e5e7eb;
  }

  #toggle-info.minimap-hidden {
    left: 12px;
  }

  #mobile-controls {
    bottom: calc(env(safe-area-inset-bottom) + 152px);
  }

  #jump-btn {
    margin-bottom: 82px;
    margin-top: 15px;
  }

  #minimap-wrap {
    left: 12px;
    top: calc(env(safe-area-inset-top) + 52px);
    bottom: auto;
    width: 136px;
    height: 136px;
  }

  body.replay-game-active #replay-game-controls {
    top: calc(env(safe-area-inset-top) + 48px);
  }

  body.replay-game-active #minimap-wrap {
    top: calc(env(safe-area-inset-top) + 182px);
    bottom: auto;
  }

  body.replay-game-active #mobile-controls.active {
    grid-template-columns: 1fr auto;
  }

  #mobile-controls.replay-active.active {
    grid-template-columns: 1fr auto;
  }

  body.replay-game-active #mobile-controls .stick {
    display: none;
  }

  #mobile-controls.replay-active .stick {
    display: none;
  }

  body.replay-game-active #jump-btn {
    grid-column: 2;
    justify-self: end;
  }

  #mobile-controls.replay-active #jump-btn {
    grid-column: 2;
    justify-self: end;
  }

  body.replay-game-active #jump-btn {
    display: none;
  }

  #mobile-controls.replay-active #jump-btn {
    display: none;
  }
}


#levelup-overlay {
  z-index: 50;
}


#dev-console {
  position: fixed;
  left: 14px;
  bottom: 52px;
  width: min(620px, calc(100vw - 24px));
  max-height: min(42vh, 340px);
  z-index: 60;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 12px;
  background: rgba(6, 10, 16, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#dev-console.hidden {
  display: none;
}

.dev-console-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(20, 28, 40, 0.8);
  border-bottom: 1px solid rgba(255,255,255,0.16);
  font-size: 13px;
}

.dev-console-hint {
  color: #93c5fd;
  font-size: 12px;
}

#dev-console-log {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  font-family: Consolas, Menlo, Monaco, monospace;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.dev-console-line {
  margin-bottom: 4px;
  color: #dbeafe;
}

.dev-console-line.err {
  color: #fda4af;
}

.dev-console-line.ok {
  color: #86efac;
}

#dev-console-form {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 8px;
}

#dev-console-input {
  width: 100%;
  border: 1px solid rgba(148,163,184,0.4);
  border-radius: 8px;
  background: rgba(2, 6, 14, 0.9);
  color: #f8fafc;
  font-family: Consolas, Menlo, Monaco, monospace;
  font-size: 13px;
  padding: 8px 10px;
}

#dev-console-input:focus {
  outline: none;
  border-color: rgba(59,130,246,0.85);
}

#dev-console-toggle {
  position: fixed;
  right: 12px;
  bottom: 62px;
  z-index: 10;
  min-width: 44px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.45);
  background: rgba(6, 10, 16, 0.88);
  color: #bfdbfe;
  font-weight: 700;
  letter-spacing: 0.5px;
}

#dev-console-toggle.hidden {
  display: none;
}

body.levelup-open #dev-console-toggle {
  display: none !important;
}

@media (max-width: 720px) {
  #dev-console-toggle {
    top: calc(env(safe-area-inset-top) + 10px);
    right: 12px;
    bottom: auto;
    width: 32px;
    min-width: 32px;
    height: 30px;
    padding: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    z-index: 44;
  }
}


@media (max-width: 720px) {
  #join-overlay {
    place-items: start center;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: calc(env(safe-area-inset-top) + 8px) 6px calc(env(safe-area-inset-bottom) + 8px);
  }

  #join-form {
    margin: 0 auto;
    margin-top: clamp(8px, 3vw, 20px);
    width: calc(100vw - 12px);
    max-height: none;
    min-height: 0;
    overflow: visible;
  }
}

#mobile-controls.sticks-ghost .stick {
  opacity: 0;
}

#mobile-controls.sticks-ghost .stick-knob,
#mobile-controls.sticks-ghost .stick-label {
  opacity: 0;
}




#mobile-controls.dynamic-enabled .stick:not(.dynamic-active) {
  opacity: 0;
  pointer-events: none;
}

#mobile-controls.dynamic-enabled .stick:not(.dynamic-active) .stick-knob,
#mobile-controls.dynamic-enabled .stick:not(.dynamic-active) .stick-label {
  opacity: 0;
}











/* Main menu v2 layout + hero galleries */
.main-menu-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(100px, 1fr));
  gap: 10px;
  margin: 6px 0 8px;
  margin-top: 0px;
}

.main-menu-tab {
  border: 1px solid rgba(148, 163, 184, 0.36) !important;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(30, 41, 59, 0.88)) !important;
  color: #cbd5e1 !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.main-menu-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.58) !important;
}

.main-menu-tab.active {
  color: #e0f2fe !important;
  border-color: rgba(56, 189, 248, 0.95) !important;
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.92), rgba(3, 105, 161, 0.84)) !important;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.34), 0 0 20px rgba(14, 165, 233, 0.32);
}

.menu-panel {
  display: none;
  gap: 8px;
}

.menu-panel.active {
  display: grid;
}

#menu-panel-menu {
  grid-template-columns: 1fr;
}

.info-panel-menu-host:empty,
#info-panel-hud-host:empty {
  display: none;
}

#menu-panel-menu #info-panel {
  width: 100%;
  min-width: 0;
  max-width: none;
  z-index: auto;
}

#menu-panel-menu #info-panel-close {
  display: none;
}

.panel-variant-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

/* wheel card style (variant 1) */
.char-option {
  border: 1px solid color-mix(in srgb, var(--accent, #38bdf8) 60%, rgba(148, 163, 184, 0.5)) !important;
  background: linear-gradient(160deg, rgba(12, 18, 30, 0.95), rgba(7, 10, 18, 0.92)) !important;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08), 0 0 18px color-mix(in srgb, var(--accent, #38bdf8) 30%, transparent);
}

.char-option.active {
  background: linear-gradient(160deg, rgba(12, 28, 24, 0.96), rgba(6, 14, 12, 0.94)) !important;
  border-color: rgba(74, 222, 128, 0.95) !important;
}

.char-option.locked {
  background: linear-gradient(160deg, rgba(20, 24, 38, 0.94), rgba(10, 13, 24, 0.94)) !important;
}

/* variant 2: slanted card strip */
.hero-gallery-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  align-items: start;
  padding: 6px 2px 2px;
}

.hero-v2-item {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 6px 10px 10px;
  isolation: isolate;
}

.hero-v2-item::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 4px 8px 28px;
  border-radius: 15px;
  pointer-events: none;
  opacity: 0;
  background: color-mix(in srgb, var(--accent, #38bdf8) 38%, transparent);
  filter: blur(18px);
  transform: translateY(5px) scale(0.94);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    filter 180ms ease,
    background 180ms ease;
}

.hero-v2-item:has(.hero-v2-card:hover)::before,
.hero-v2-item:has(.hero-v2-card.focused)::before,
.hero-v2-item:has(.hero-v2-card.active)::before {
  opacity: 0.74;
  transform: translateY(2px) scale(1);
  filter: blur(20px);
}

.hero-v2-card {
  --accent: #38bdf8;
  --hero-card-rise: 0px;
  position: relative;
  width: 132px;
  height: 210px;
  border-radius: 11px;
  border: 2px solid color-mix(in srgb, var(--accent) 70%, #f8fafc);
  background: linear-gradient(160deg, rgba(8, 12, 20, 0.98), rgba(18, 24, 36, 0.94));
  transform: translateY(var(--hero-card-rise));
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.95), 0 0 24px color-mix(in srgb, var(--accent) 30%, transparent), 0 16px 32px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  z-index: 1;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    transform 180ms ease;
}

.hero-v2-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.06), inset 0 -28px 30px rgba(2, 6, 23, 0.72);
}

.hero-v2-card::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: -24%;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 26% 22%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 34%),
    linear-gradient(115deg, transparent 0 27%, rgba(255, 255, 255, 0.2), transparent 58%);
  transform: translateX(-30%) rotate(-8deg);
}

.hero-v2-card.is-roster-select-flash {
  animation: heroRosterCardSelectFlash 1.35s cubic-bezier(.16, .9, .22, 1) both;
}

.hero-v2-card.is-roster-select-flash::after {
  animation: heroRosterCardSelectSweep 1.05s cubic-bezier(.16, .9, .22, 1) both;
}

.hero-v2-card.is-roster-select-flash .hero-v2-inner {
  animation: heroRosterCardInnerPulse 900ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-v2-card.is-roster-deselect-flash {
  animation: heroRosterCardDeselect 680ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-v2-card:hover,
.hero-v2-card.focused {
  --hero-card-rise: -2px;
  border-color: color-mix(in srgb, var(--accent) 78%, #f8fafc);
  filter: brightness(1.04);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 62%, transparent),
    0 0 22px color-mix(in srgb, var(--accent) 38%, transparent),
    0 18px 36px rgba(0, 0, 0, 0.38);
}

.hero-v2-card.active {
  --hero-card-rise: -2px;
  border-color: color-mix(in srgb, var(--accent) 88%, #f8fafc);
  filter: brightness(1.05);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 62%, transparent),
    0 0 30px color-mix(in srgb, var(--accent) 46%, transparent),
    0 18px 36px rgba(0, 0, 0, 0.4);
}

.hero-v2-card.active:hover,
.hero-v2-card.active.focused {
  border-color: color-mix(in srgb, var(--accent) 92%, #fff);
  filter: brightness(1.07);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent),
    0 0 34px color-mix(in srgb, var(--accent) 54%, transparent),
    0 18px 36px rgba(0, 0, 0, 0.4);
}

.hero-v2-card.locked {
  filter: grayscale(0.35);
  opacity: 0.82;
}

@keyframes heroRosterCardSelectFlash {
  0% {
    filter: brightness(0.94) saturate(0.92);
    box-shadow: 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
  }

  22% {
    filter: brightness(1.5) saturate(1.42);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--accent) 68%, transparent),
      0 0 30px color-mix(in srgb, var(--accent) 60%, transparent),
      0 0 50px rgba(255, 255, 255, 0.1),
      0 18px 36px rgba(0, 0, 0, 0.4);
  }

  100% {
    filter: brightness(1.05) saturate(1);
  }
}

@keyframes heroRosterCardDeselect {
  0% {
    filter: brightness(1.08) saturate(1.08);
    border-color: color-mix(in srgb, var(--accent) 88%, #fff);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--accent) 64%, transparent),
      0 0 30px color-mix(in srgb, var(--accent) 52%, transparent),
      0 18px 34px rgba(0, 0, 0, 0.44);
  }

  58% {
    filter: brightness(1.02) saturate(1.02);
    border-color: color-mix(in srgb, var(--accent) 52%, rgba(226, 232, 240, 0.18));
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent),
      0 0 18px color-mix(in srgb, var(--accent) 24%, transparent),
      0 14px 28px rgba(0, 0, 0, 0.36);
  }

  100% {
    filter: brightness(1) saturate(1);
  }
}

@keyframes heroRosterCardSelectSweep {
  0% {
    opacity: 0;
    transform: translateX(-34%) rotate(-8deg);
  }

  22% {
    opacity: 0.9;
  }

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

@keyframes heroRosterCardInnerPulse {
  0% { transform: scale(0.985); }
  34% { transform: scale(1.018); }
  100% { transform: scale(1); }
}

.hero-v2-inner {
  position: absolute;
  inset: 8px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.26);
  background: radial-gradient(circle at 50% 20%, rgba(148, 163, 184, 0.26), rgba(15, 23, 42, 0.74) 55%, rgba(2, 6, 23, 0.92));
  transform: none;
  display: grid;
  place-items: center;
}

.hero-v2-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-v2-preview {
  width: 88px;
  height: 98px;
  image-rendering: pixelated;
}

.hero-v2-name {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  text-align: center;
}

.hero-v2-status {
  font-size: 11px;
  text-align: center;
}

.hero-v2-status.selected {
  color: #86efac;
}

.hero-v2-status.unlocked {
  color: #f8fafc;
}

.hero-v2-status.locked {
  color: #f87171;
}

.profile-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(8, 12, 20, 0.74);
  padding: 10px;
  color: #dbeafe;
  display: grid;
  gap: 6px;
}

.profile-hero-list {
  display: grid;
  gap: 4px;
}

.profile-hero-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
}

.profile-run-list {
  display: grid;
  gap: 6px;
}

#join-form .profile-run-row {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.55);
  padding: 6px;
  display: grid;
  gap: 4px;
}

#join-form .profile-run-row:hover {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(30, 58, 110, 0.35);
}

.profile-run-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
}

.profile-run-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
  color: #e2e8f0;
}

.profile-run-meta {
  color: #86efac;
}

.profile-run-empty {
  font-size: 12px;
  color: #94a3b8;
}

.profile-run-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-run-history-title {
  font-weight: 700;
}

.profile-run-history-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-run-history-page {
  font-size: 12px;
  color: #94a3b8;
}

/* keep global red buttons from overriding custom menu controls */
#join-form .main-menu-tab,
#join-form .char-option,
#join-form .hero-main-action,
#join-form .hero-node-up,
#join-form .hero-v2-card {
  border-width: 1px;
}

#join-form .hero-main-action,
#join-form .hero-node-up,
#join-form .main-menu-tab,
#join-form .char-option,
#join-form .hero-v2-card {
  color: inherit;
}

@media (max-width: 1100px) {
  #join-form {
    width: min(920px, calc(100vw - 16px));
  }
}

@media (max-width: 720px) {
  .main-menu-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-gallery-v2 {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
  }

  .hero-v2-card {
    width: 120px;
    height: 190px;
  }
}

#join-form .hero-main-action {
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  background: linear-gradient(135deg, #0369a1, #0ea5e9) !important;
  color: #f8fafc !important;
}

#join-form .hero-node-up {
  border: 1px solid color-mix(in srgb, var(--skill-color, #38bdf8) 34%, rgba(148, 163, 184, 0.28)) !important;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--skill-color, #38bdf8) 16%, transparent), transparent 35%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--skill-color, #38bdf8) 12%, transparent), transparent 48%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.11), transparent 34%),
    linear-gradient(180deg, #171a20 0%, #080a0f 54%, #030407 100%) !important;
  color: #edf3fb !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 18px color-mix(in srgb, var(--skill-color, #38bdf8) 10%, transparent),
    0 10px 20px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -14px 24px rgba(0, 0, 0, 0.42) !important;
}

#join-form .hero-node-up.is-ready {
  border-color: color-mix(in srgb, var(--skill-color, #38bdf8) 58%, rgba(255, 255, 255, 0.18)) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--skill-color, #38bdf8) 12%, transparent),
    0 0 22px color-mix(in srgb, var(--skill-color, #38bdf8) 18%, transparent),
    0 10px 20px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -14px 24px rgba(0, 0, 0, 0.4) !important;
}

#join-form .hero-node-up:hover:not(:disabled),
#join-form .hero-node-up:focus-visible:not(:disabled) {
  border-color: color-mix(in srgb, var(--skill-color, #38bdf8) 74%, rgba(255, 255, 255, 0.26)) !important;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--skill-color, #38bdf8) 24%, transparent), transparent 35%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--skill-color, #38bdf8) 15%, transparent), transparent 48%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #1d222b 0%, #0a0d13 54%, #030407 100%) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--skill-color, #38bdf8) 30%, transparent),
    0 0 30px color-mix(in srgb, var(--skill-color, #38bdf8) 28%, transparent),
    0 14px 26px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -12px 22px rgba(0, 0, 0, 0.34) !important;
}

#join-form .hero-node-up.hero-node-up-lack,
#join-form .hero-node-up.hero-node-up-lack:disabled {
  border-color: rgba(248, 113, 113, 0.34) !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(254, 202, 202, 0.12), transparent 34%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.07), transparent 36%),
    linear-gradient(180deg, rgba(37, 20, 26, 0.96), rgba(8, 7, 11, 0.98)) !important;
  color: #fecaca !important;
}

#join-form .hero-node-up.is-maxed,
#join-form .hero-node-up.is-maxed:disabled {
  grid-template-columns: minmax(0, 1fr);
  border-color: color-mix(in srgb, var(--skill-color, #38bdf8) 46%, #fef08a 54%) !important;
  background:
    radial-gradient(circle at 16% 0%, rgba(254, 240, 138, 0.38), transparent 38%),
    radial-gradient(circle at 88% 100%, color-mix(in srgb, var(--skill-color, #38bdf8) 24%, rgba(250, 204, 21, 0.24)), transparent 48%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(56, 47, 18, 0.98), rgba(13, 10, 4, 0.98)) !important;
  color: #fef9c3 !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--skill-color, #38bdf8) 24%, rgba(250, 204, 21, 0.28)),
    0 0 24px color-mix(in srgb, var(--skill-color, #38bdf8) 26%, rgba(250, 204, 21, 0.28)),
    0 10px 20px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -14px 24px rgba(0, 0, 0, 0.34) !important;
}

#menu-panel-play {
  grid-template-columns: minmax(340px, 0.95fr) minmax(430px, 1.05fr);
  grid-template-areas:
    "roomLabel records"
    "roomInput records"
    "sync records"
    "actions records"
    "rooms records"
    "feedback records"
    "result records";
  grid-auto-rows: min-content;
  column-gap: 12px;
  row-gap: 8px;
  align-items: start;
}

#menu-panel-play > #room-code-label { grid-area: roomLabel; }
#menu-panel-play > #room-code { grid-area: roomInput; }
#menu-panel-play > #sync-settings { grid-area: sync; }
#menu-panel-play > .actions { grid-area: actions; }
#menu-panel-play > #join-feedback { grid-area: feedback; }
#menu-panel-play > #death-result { grid-area: result; }
#menu-panel-play > #rooms-browser { grid-area: rooms; }
#menu-panel-play > #records-browser {
  grid-area: records;
  align-self: start;
}

@media (max-width: 980px) {
  #menu-panel-play {
    grid-template-columns: 1fr;
    grid-template-areas:
      "roomLabel"
      "roomInput"
      "sync"
      "actions"
      "feedback"
      "result"
      "rooms"
      "records";
  }
}




.hero-v2-lock {
  position: absolute;
  width: 52px;
  height: 52px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.9;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(248, 250, 252, 0.28));
}





.death-rewards-panel {
  z-index: 4;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -42%) scale(0.96);
  width: min(560px, calc(100vw - 28px));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(8, 14, 22, 0.92);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45), 0 0 24px rgba(220, 38, 38, 0.22);
  backdrop-filter: blur(8px);
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.death-rewards-panel .death-rewards-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fecaca;
  margin-bottom: 8px;
}

.death-rewards-body {
  display: grid;
  gap: 6px;
  color: #e2e8f0;
  font-size: 13px;
}
.death-rewards-menu-btn {
  margin-top: 10px;
  width: 100%;
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(12, 74, 110, 0.95), rgba(2, 132, 199, 0.9));
  color: #e0f2fe;
  font-weight: 700;
  padding: 9px 12px;
  cursor: pointer;
}

.death-rewards-menu-btn:hover {
  border-color: rgba(125, 211, 252, 0.8);
  filter: brightness(1.08);
}


.death-reward-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(15, 23, 42, 0.56);
}

.death-reward-row b {
  color: #fef3c7;
}

.death-reward-cards {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.death-reward-cards span {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(244, 63, 94, 0.34);
  background: rgba(127, 29, 29, 0.36);
  color: #fecdd3;
  font-size: 12px;
}

.death-reward-cards.muted {
  color: #94a3b8;
  font-size: 12px;
}

#join-overlay.death-rewards-visible .death-text,
#join-overlay.death-rewards-visible .death-impact {
  opacity: 0;
  transition: opacity 0.35s ease;
}

#join-overlay.death-rewards-visible .death-rewards-panel {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

#join-overlay.death-cinematic-active .death-continue {
  animation: deathContinueIn 0.35s ease-out 3.2s forwards;
  pointer-events: auto;
}

@media (max-width: 720px) {
  .death-rewards-panel {
    width: min(94vw, 460px);
    padding: 10px;
  }

  .death-rewards-title {
    font-size: 16px;
  }

  .death-reward-row {
    font-size: 12px;
    padding: 5px 7px;
  }
}


.death-drips {
  display: none !important;
}


.news-card {
  gap: 10px;
}

.news-main-title {
  font-size: 18px;
  color: #f1f5f9;
}

.news-sub {
  color: #cbd5e1;
  line-height: 1.45;
}

.news-items {
  display: grid;
  gap: 8px;
}

.news-item {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 10px;
  background: rgba(10, 18, 32, 0.55);
}

.news-item-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.news-item-button:hover {
  border-color: rgba(56, 189, 248, 0.52);
  background: rgba(12, 26, 45, 0.72);
  transform: translateY(-1px);
}

.news-item-title {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
}

.news-item-meta {
  font-size: 12px;
  color: #93c5fd;
}

.news-item-detail {
  gap: 10px;
  background: rgba(10, 18, 32, 0.68) !important;
}

.news-list {
  display: grid;
  gap: 6px;
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.4;
}

.news-media-strip,
.news-media-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
}

.news-media-thumb {
  flex: 0 0 auto;
  width: 132px;
  padding: 0;
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.65);
  cursor: zoom-in;
}

.news-media-strip .news-media-thumb {
  width: 92px;
  cursor: pointer;
}

.news-media-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.news-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(5px);
}

.news-lightbox-panel {
  position: relative;
  max-width: min(980px, 94vw);
  max-height: 86vh;
}

.news-lightbox-panel img {
  max-width: 100%;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid rgba(191, 219, 254, 0.32);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
}

.news-lightbox-close,
.news-lightbox-prev,
.news-lightbox-next,
.news-lightbox-counter {
  position: absolute;
  background: rgba(15, 23, 42, 0.86);
}

.news-lightbox-close {
  top: 10px;
  right: 10px;
}

.news-lightbox-counter {
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 5px 9px;
  border-radius: 999px;
  color: #e0f2fe;
  font-size: 12px;
}

.news-lightbox-prev,
.news-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
}

.news-lightbox-prev { left: 10px; }
.news-lightbox-next { right: 10px; }

.news-back-btn {
  width: fit-content;
}

.news-comments-title {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
}

.news-comments-wrap {
  display: grid;
  gap: 8px;
}

.news-comment {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(71, 85, 105, 0.45);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.45);
}

.news-comment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.news-comment-author {
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.news-comment-date {
  color: #94a3b8;
  font-size: 11px;
}

.news-comment-text {
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.35;
}

.news-comment-reply-btn {
  justify-self: start;
}

.news-comment-replies {
  display: grid;
  gap: 7px;
  margin-left: 12px;
  padding-left: 8px;
  border-left: 1px solid rgba(71, 85, 105, 0.45);
}

.news-comment-reply {
  background: rgba(12, 18, 35, 0.52);
}

.news-comment-compose {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(71, 85, 105, 0.42);
  border-radius: 10px;
  background: rgba(12, 20, 36, 0.55);
  padding: 8px;
}

.news-comment-reply-compose {
  margin-top: 2px;
}

.news-comment-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(2, 8, 24, 0.72);
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.35;
  padding: 7px 8px;
  resize: vertical;
}

.news-comment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.news-comment-shortcut-hint {
  align-self: center;
  margin-left: auto;
  color: rgba(203, 213, 225, 0.5);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}



#join-form .news-item-button {
  border: 1px solid rgba(71, 85, 105, 0.5) !important;
  background: rgba(10, 18, 32, 0.55) !important;
  color: #e2e8f0 !important;
}

#join-form .news-item-button:hover {
  border-color: rgba(56, 189, 248, 0.52) !important;
  background: rgba(12, 26, 45, 0.72) !important;
}




.news-detail-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.news-share-btn {
  min-width: 110px;
}

.news-share-toast {
  position: absolute;
  top: -30px;
  left: 0;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: rgba(20, 83, 45, 0.88);
  color: #dcfce7;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.news-share-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .news-share-toast {
    top: -26px;
    font-size: 11px;
  }
}

.news-comment-delete-btn {
  justify-self: start;
  margin-right: 0;
  border-color: rgba(244, 63, 94, 0.45) !important;
  color: #fecdd3 !important;
}



.news-comment-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.news-comment-identity,
.news-comment-hero {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
}

.news-comment-identity {
  justify-self: start;
}


.news-comment-author-btn {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #93c5fd !important;
  cursor: pointer;
  text-decoration: none;
  text-underline-offset: 2px;
}

.news-comment-author-btn:hover {
  color: #bae6fd !important;
}


.news-comment-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
}


#author-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  background:
    radial-gradient(circle at 18% 10%, rgba(248, 113, 113, 0.16), transparent 30%),
    rgba(2, 4, 10, 0.72);
  backdrop-filter: blur(8px);
}

#author-profile-modal:not(.hidden) .record-details-card {
  animation: authorProfileDialogIn 360ms cubic-bezier(0.18, 0.92, 0.22, 1.08) both;
}

#author-profile-modal .record-details-card {
  width: min(980px, calc(100vw - 24px));
  max-height: min(88vh, 920px);
  border-color: rgba(255, 218, 196, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 14% 4%, rgba(248, 113, 113, 0.14), transparent 32%),
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--profile-accent, #fb923c) 14%, transparent), transparent 28%),
    linear-gradient(180deg, rgba(14, 18, 28, 0.98), rgba(5, 8, 15, 0.98));
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#author-profile-modal .record-details-head {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 4px 2px 8px;
  background: linear-gradient(180deg, rgba(11, 15, 24, 0.96), rgba(11, 15, 24, 0));
}

#author-profile-modal #author-profile-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #fff3ed;
  font-size: 16px;
}

.author-profile-title-live {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(255, 121, 91, 0.44);
  border-radius: 999px;
  background: rgba(255, 82, 58, 0.14);
  color: #ffe1d5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(255, 86, 66, 0.18);
}

#author-profile-modal .record-details-body {
  gap: 12px;
}

.author-profile-shell {
  --profile-accent: #fb923c;
  --hero-xp: 0%;
  display: grid;
  gap: 12px;
  color: #e5e7eb;
}

.author-profile-hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(136px, 164px) minmax(0, 1fr);
  gap: 16px;
  min-height: 240px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--profile-accent) 36%, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  background:
    radial-gradient(circle at 22% 18%, color-mix(in srgb, var(--profile-accent) 22%, transparent), transparent 34%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.72), rgba(5, 8, 15, 0.92));
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.author-profile-hero-card::after {
  content: "";
  position: absolute;
  left: -18%;
  right: -18%;
  top: -18%;
  height: 24%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--profile-accent) 24%, transparent), transparent);
  filter: blur(12px);
  animation: authorProfileScan 980ms ease-out 120ms both;
  pointer-events: none;
}

.author-profile-hero-art {
  position: relative;
  display: grid;
  place-items: stretch;
  align-self: center;
  justify-self: center;
  width: min(154px, 100%);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 24%, color-mix(in srgb, var(--profile-accent) 30%, transparent), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(2, 6, 23, 0.34));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--profile-accent) 48%, rgba(255, 255, 255, 0.18)),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 -28px 30px rgba(0, 0, 0, 0.36),
    0 0 28px color-mix(in srgb, var(--profile-accent) 20%, transparent);
}

.author-profile-hero-art::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--profile-accent) 52%, transparent);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.06),
    0 0 22px color-mix(in srgb, var(--profile-accent) 22%, transparent);
  pointer-events: none;
}

.author-profile-hero-art img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: drop-shadow(0 20px 22px rgba(0, 0, 0, 0.52));
  animation: authorProfileHeroRise 460ms cubic-bezier(0.2, 0.9, 0.2, 1.08) both;
}

.author-profile-hero-info {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.author-profile-kicker {
  color: #fecaca;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.author-profile-hero-info h3 {
  margin: 0;
  color: #fff7ed;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 0.95;
  text-shadow: 0 0 22px color-mix(in srgb, var(--profile-accent) 24%, transparent);
}

.author-profile-hero-info p {
  max-width: 58ch;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.48;
}

.author-profile-hero-xp {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 900;
}

.author-profile-hero-xp i {
  position: relative;
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.author-profile-hero-xp i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--hero-xp);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--profile-accent), #fff0c7);
  box-shadow: 0 0 16px color-mix(in srgb, var(--profile-accent) 55%, transparent);
}

.author-profile-hero-stats,
.author-profile-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.author-profile-hero-stats span,
.author-profile-strip span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 11px;
  text-align: center;
}

.author-profile-hero-stats b,
.author-profile-strip b {
  color: #f8fafc;
  font-size: 16px;
  line-height: 1;
}

.author-profile-card {
  border-color: rgba(255, 218, 196, 0.14);
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--profile-accent) 10%, transparent), transparent 28%),
    rgba(15, 23, 42, 0.58);
}

.author-profile-slot-grid,
.author-profile-equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.author-profile-slot {
  --slot-color: #fb923c;
  --slot-delay: 0ms;
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 72px;
  overflow: hidden;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--slot-color) 34%, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--slot-color) 14%, transparent), transparent 32%),
    rgba(2, 6, 23, 0.4);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  animation: authorProfileSlotIn 360ms cubic-bezier(0.2, 0.9, 0.2, 1.08) var(--slot-delay) both;
}

.author-profile-slot::before {
  content: "";
  position: absolute;
  inset: -40% -80%;
  background: linear-gradient(112deg, transparent 38%, rgba(255, 255, 255, 0.46) 49%, transparent 62%);
  transform: translateX(-58%) rotate(8deg);
  animation: authorProfileSlotGlint 1400ms ease-out calc(var(--slot-delay) + 180ms) both;
  pointer-events: none;
}

.author-profile-slot.is-locked,
.author-profile-slot.is-empty {
  filter: saturate(0.72);
  opacity: 0.72;
}

.author-profile-slot-ring {
  position: absolute;
  left: 9px;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border-radius: 10px;
  background:
    conic-gradient(from -90deg, var(--slot-color), rgba(255, 255, 255, 0.08), var(--slot-color)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.02));
  opacity: 0.9;
  box-shadow: 0 0 16px color-mix(in srgb, var(--slot-color) 24%, transparent);
}

.author-profile-slot-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--slot-color) 38%, transparent), transparent 62%),
    rgba(2, 6, 23, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
}

.author-profile-slot-icon img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.author-profile-slot-icon.has-image > span {
  display: none;
}

.author-profile-slot-icon span {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  text-shadow: 0 0 12px var(--slot-color);
}

.author-profile-slot div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.author-profile-slot b,
.author-profile-slot span,
.author-profile-slot small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-profile-slot b {
  color: #f8fafc;
  font-size: 13px;
}

.author-profile-slot span,
.author-profile-slot small {
  color: #cbd5e1;
  font-size: 11px;
}

.author-profile-slot small {
  color: #94a3b8;
}

.author-profile-slot em {
  position: relative;
  z-index: 1;
  color: #f8fafc;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

#author-profile-modal .profile-hero-row.is-active {
  color: #fff7ed;
  text-shadow: 0 0 12px color-mix(in srgb, var(--profile-accent, #fb923c) 28%, transparent);
}

@keyframes authorProfileDialogIn {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.94);
    filter: saturate(0.8) brightness(0.86);
  }
  62% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1) brightness(1);
  }
}

@keyframes authorProfileHeroRise {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes authorProfileScan {
  0% { opacity: 0; transform: translateY(0); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translateY(340px); }
}

@keyframes authorProfileSlotIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes authorProfileSlotGlint {
  0% { opacity: 0; transform: translateX(-58%) rotate(8deg); }
  24% { opacity: 0.78; }
  100% { opacity: 0; transform: translateX(58%) rotate(8deg); }
}

@media (max-width: 720px) {
  #author-profile-modal .record-details-card {
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
  }

  .author-profile-hero-card,
  .author-profile-slot-grid,
  .author-profile-equipment-grid {
    grid-template-columns: 1fr;
  }

  .author-profile-hero-art {
    width: min(154px, 58vw);
  }

  .author-profile-hero-stats,
  .author-profile-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .author-profile-slot {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
  }

  .author-profile-slot em {
    grid-column: 2;
  }

  #author-profile-modal .profile-run-row {
    grid-template-columns: 1fr;
  }

  #author-profile-modal .profile-run-launch {
    width: fit-content;
  }
}

@media (prefers-reduced-motion: reduce) {
  #author-profile-modal:not(.hidden) .record-details-card,
  .author-profile-hero-card::after,
  .author-profile-hero-art img,
  .author-profile-slot,
  .author-profile-slot::before {
    animation: none;
  }

  .author-profile-slot {
    opacity: 1;
    transform: none;
  }
}


#author-profile-modal .profile-run-row {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.55);
  padding: 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}

#author-profile-modal .profile-run-row:hover {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(30, 58, 110, 0.35);
}

#author-profile-modal .author-profile-live-run {
  border-color: rgba(255, 128, 94, 0.34);
  background:
    radial-gradient(circle at 0 0, rgba(255, 90, 70, 0.14), transparent 38%),
    rgba(65, 18, 25, 0.42);
}

#author-profile-modal .profile-run-copy {
  min-width: 0;
}

#author-profile-modal .profile-run-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 218, 196, 0.2);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(71, 22, 26, 0.9), rgba(13, 15, 20, 0.92));
  color: #fff3ed;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    filter 150ms ease,
    box-shadow 150ms ease;
}

#author-profile-modal .profile-run-launch:hover,
#author-profile-modal .profile-run-launch:focus-visible {
  border-color: rgba(255, 177, 122, 0.58);
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    0 0 16px rgba(255, 103, 72, 0.18),
    0 10px 22px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

#author-profile-modal .profile-run-launch:active {
  transform: translateY(1px) scale(0.98);
}





.rating-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.rating-category-btn {
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.34) !important;
  background: rgba(15, 23, 42, 0.66) !important;
  color: #cbd5e1 !important;
}

.rating-category-btn.active {
  border-color: rgba(56, 189, 248, 0.9) !important;
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.88), rgba(3, 105, 161, 0.78)) !important;
  color: #e0f2fe !important;
}

.rating-row {
  cursor: default;
}



.rating-value-text {
  display: inline-block;
  margin-right: 8px;
}

.rating-play-btn {
  padding: 2px 9px !important;
  line-height: 1.2;
}

/* Play panel mode selector replaces Top records in Play tab */
#menu-panel-play {
  grid-template-areas:
    "roomLabel mode"
    "roomInput mode"
    "sync mode"
    "actions mode"
    "rooms mode"
    "feedback mode"
    "result mode";
}

#menu-panel-play > #game-mode-panel {
  grid-area: mode;
  align-self: start;
}

#menu-panel-play > #records-browser {
  display: none !important;
}

.game-mode-options {
  display: grid;
  gap: 8px;
}

.game-mode-option {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.75));
  border-radius: 10px;
  padding: 10px 12px;
  color: #dbeafe;
  text-align: left;
  cursor: pointer;
}

.game-mode-option b {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.game-mode-option span {
  display: block;
  font-size: 12px;
  color: #93c5fd;
}

.game-mode-option.active {
  border-color: rgba(34, 197, 94, 0.9);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4), 0 0 18px rgba(34, 197, 94, 0.22);
}

.game-mode-option:disabled,
.game-mode-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 980px) {
  #menu-panel-play {
    grid-template-areas:
      "roomLabel"
      "roomInput"
      "sync"
      "actions"
      "mode"
      "feedback"
      "result"
      "rooms";
  }
}

.rating-mode-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
}

.rating-mode-label {
  font-size: 12px;
  color: #93c5fd;
}

.rating-mode-select {
  min-width: 170px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  padding: 6px 10px;
}

.menu-version-trigger {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, 0.46);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(8, 16, 28, 0.86);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.menu-version-trigger:hover {
  border-color: rgba(125, 211, 252, 0.9);
  color: #e0f2fe;
  background: rgba(10, 24, 40, 0.94);
}

#join-overlay.death-mode .menu-version-trigger,
#join-overlay.death-cinematic-active .menu-version-trigger {
  display: none;
}

.game-version-card {
  width: min(700px, calc(100vw - 24px));
}

.version-history {
  display: grid;
  gap: 10px;
}

.version-entry {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.52);
  padding: 9px 10px;
  display: grid;
  gap: 5px;
}

.version-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #e2e8f0;
  font-size: 13px;
}

.version-entry-head b {
  color: #f8fafc;
}

.version-entry p {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .menu-version-trigger {
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom) + 8px);
    font-size: 11px;
    padding: 4px 9px;
  }
}


.session-exit-btn {
  pointer-events: auto;
  margin-top: 10px;
  width: 100%;
  border: 1px solid rgba(248, 113, 113, 0.62);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.9), rgba(153, 27, 27, 0.85));
  color: #fee2e2;
  font: inherit;
  font-weight: 700;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, filter 0.18s ease;
}

.session-exit-btn:hover {
  border-color: rgba(252, 165, 165, 0.9);
  filter: brightness(1.08);
}

.session-exit-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}






#chat-wrap {
  position: fixed;
  left: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 162px);
  z-index: 13;
  width: min(420px, calc(100vw - 24px));
  pointer-events: auto;
  display: grid;
  gap: 6px;
}

#chat-wrap.hidden {
  display: none;
}

.chat-messages {
  max-height: min(28vh, 220px);
  overflow: auto;
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(5, 10, 16, 0.62);
  backdrop-filter: blur(6px);
}

.chat-messages.hidden {
  display: none;
}

.chat-line {
  font-size: 12px;
  line-height: 1.3;
  color: #e2e8f0;
  word-break: break-word;
}

.chat-line .chat-time {
  color: #93c5fd;
  margin-right: 5px;
}

.chat-line .chat-name {
  color: #f8fafc;
  font-weight: 700;
  margin-right: 4px;
}

.chat-line.system {
  color: #fda4af;
}

.chat-form {
  display: flex;
  gap: 6px;
  align-items: center;
}

#chat-input {
  flex: 1 1 auto;
  width: 100%;
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 8px;
  background: rgba(8, 16, 26, 0.88);
  color: #e2e8f0;
  font: inherit;
  font-size: 12px;
  padding: 8px 10px;
  outline: none;
}

#chat-input:focus {
  border-color: rgba(125, 211, 252, 0.85);
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.3);
}

.chat-send {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  border-radius: 8px;
  background: rgba(8, 16, 26, 0.92);
  color: #7dd3fc;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}


.chat-send svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.chat-send:hover {
  border-color: rgba(125, 211, 252, 0.95);
  color: #bae6fd;
}

.chat-send:active {
  transform: translateY(1px);
}

.chat-send:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.35);
}

.chat-shortcut-hint {
  color: rgba(186, 230, 253, 0.46);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 720px) {
  #chat-wrap {
    left: 8px;
    bottom: calc(env(safe-area-inset-bottom) + 154px);
    width: calc(100vw - 16px);
  }

  .chat-messages {
    max-height: min(24vh, 180px);
  }
}


.death-reward-pvp {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  display: grid;
  gap: 6px;
}

.death-reward-pvp-title {
  font-size: 13px;
  font-weight: 800;
  color: #93c5fd;
  cursor: pointer;
}

.death-reward-pvp-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.death-reward-pvp-table th,
.death-reward-pvp-table td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.death-reward-pvp-table th {
  color: #93c5fd;
  font-weight: 700;
}

.death-reward-pvp-table td.num {
  font-variant-numeric: tabular-nums;
}

.death-reward-pvp-table tr.me td {
  color: #f8fafc;
  font-weight: 700;
}

.death-rewards-panel {
  z-index: 12;
  width: min(920px, calc(100vw - 24px));
  max-height: min(820px, calc(100dvh - 28px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(136, 32, 42, 0.6);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18, 15, 20, 0.98), rgba(7, 8, 13, 0.97)),
    linear-gradient(135deg, rgba(127, 29, 29, 0.24), transparent 44%, rgba(87, 83, 78, 0.12));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 0 38px rgba(127, 29, 29, 0.28);
  padding: clamp(14px, 2.2vw, 22px);
  transform: translate(-50%, -42%) scale(0.9) rotate(0.7deg);
  backdrop-filter: blur(9px);
}

.death-rewards-panel.is-fit {
  overflow: hidden;
}

.death-rewards-panel.is-scrollable {
  overflow: hidden;
}

.death-rewards-panel .death-rewards-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

#join-overlay.death-rewards-visible .death-rewards-panel {
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

.death-rewards-panel .death-rewards-title {
  margin: 0;
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid rgba(184, 117, 82, 0.45);
  border-radius: 6px;
  background: rgba(69, 16, 24, 0.62);
  color: #f0b1a8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.death-defeat-head {
  display: grid;
  gap: 6px;
}

.death-defeat-kicker {
  color: #b7c0cc;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.death-defeat-head h2 {
  margin: 0;
  color: #f0c0ad;
  font-family: "Bahnschrift SemiCondensed", "Arial Narrow", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: clamp(36px, 6.2vw, 76px);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  text-shadow:
    0 1px 0 rgba(68, 18, 22, 0.96),
    0 3px 0 rgba(16, 6, 10, 0.82),
    0 14px 32px rgba(127, 29, 29, 0.34),
    0 0 20px rgba(240, 177, 168, 0.18);
}

.death-defeat-head h2::after {
  content: "";
  display: block;
  width: 74%;
  height: 3px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.94), rgba(184, 117, 82, 0.7), transparent);
  box-shadow: 0 0 14px rgba(127, 29, 29, 0.24);
}

.death-defeat-head p {
  margin: 0;
  max-width: 820px;
  color: #cbd5e1;
  font-size: clamp(14px, 1.8vw, 17px);
  line-height: 1.38;
}

.death-defeat-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.death-defeat-stat {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(10, 13, 20, 0.78);
}

.death-defeat-stat span {
  color: #a9b8ca;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.death-defeat-stat b {
  color: #f0d6c7;
  font-size: clamp(17px, 2.5vw, 25px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.death-defeat-objectives,
.death-defeat-rewards {
  display: grid;
  gap: 6px;
  color: #e5e7eb;
}

.death-defeat-section-title {
  color: #d8a1a1;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.death-defeat-objective-list,
.death-defeat-reward-list {
  display: grid;
  gap: 5px;
}

.death-defeat-objective,
.death-defeat-reward-list .death-reward-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(7, 10, 17, 0.72);
}

.death-defeat-objective strong,
.death-defeat-reward-list .death-reward-row span {
  color: #f8fafc;
  overflow-wrap: anywhere;
}

.death-defeat-objective span,
.death-defeat-reward-list .death-reward-row b {
  color: #e2b59f;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.death-defeat-objective.is-done span {
  color: #a7f3d0;
}

.death-defeat-progress {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.95);
}

.death-defeat-progress i {
  display: block;
  height: 100%;
  width: var(--goal-progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #58151b, #8f1d2c 58%, #c08457);
  box-shadow: 0 0 14px rgba(127, 29, 29, 0.34);
}

.death-defeat-objective.is-done .death-defeat-progress i {
  background: linear-gradient(90deg, #166534, #4ade80);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.22);
}

.death-defeat-loading {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(7, 10, 17, 0.72);
  color: #e5e7eb;
  font-weight: 800;
}

.death-rewards-menu-btn {
  position: relative;
  justify-self: end;
  overflow: hidden;
  width: auto;
  min-height: 40px;
  margin-top: 0;
  border-radius: 8px;
  border: 1px solid rgba(184, 117, 82, 0.36);
  padding: 10px 16px;
  background:
    radial-gradient(circle at 24% 0%, rgba(239, 68, 68, 0.2), transparent 42%),
    linear-gradient(135deg, rgba(47, 18, 24, 0.98), rgba(95, 12, 24, 0.96));
  color: #f7ead8;
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  box-shadow: 0 11px 28px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.055) inset;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.death-rewards-menu-btn:hover,
.death-rewards-menu-btn:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(216, 160, 114, 0.68);
  filter: brightness(1.08) saturate(1.04);
  box-shadow: 0 14px 34px rgba(127, 29, 29, 0.36), 0 0 20px rgba(184, 117, 82, 0.14);
  outline: none;
}

@media (max-width: 760px) {
  .death-rewards-panel {
    width: min(94vw, 560px);
    max-height: calc(100dvh - 20px);
    padding: 14px;
  }

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

  .death-defeat-objective,
  .death-defeat-reward-list .death-reward-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .death-defeat-objective span,
  .death-defeat-reward-list .death-reward-row b {
    text-align: left;
  }

  .death-rewards-menu-btn {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-height: 860px) {
  .death-rewards-panel {
    gap: 8px;
    padding: clamp(12px, 1.7vw, 18px);
  }

  .death-defeat-head {
    gap: 4px;
  }

  .death-defeat-head h2 {
    font-size: clamp(34px, 5.2vw, 58px);
    line-height: 0.94;
  }

  .death-defeat-head h2::after {
    margin-top: 4px;
  }

  .death-defeat-head p {
    font-size: clamp(13px, 1.55vw, 15px);
    line-height: 1.28;
  }

  .death-defeat-stats {
    gap: 5px;
  }

  .death-defeat-stat {
    padding: 6px 9px;
  }

  .death-defeat-stat b {
    font-size: clamp(16px, 2vw, 22px);
  }

  .death-defeat-objective,
  .death-defeat-reward-list .death-reward-row {
    padding: 5px 9px;
  }

  .death-reward-cards {
    gap: 5px;
  }

  .death-reward-cards span {
    padding: 3px 7px;
    font-size: 11px;
  }

  .death-rewards-menu-btn {
    min-height: 36px;
    padding: 8px 14px;
  }
}
#pvp-duration-wrap {
  margin-top: 6px;
}

/* Crimson Wars menu redesign */
#cw-menu-root {
  display: grid;
  width: 100%;
  height: 100%;
}

#cw-menu-root > #join-form.cw-shell {
  min-height: 100%;
  align-self: stretch;
}

#join-overlay {
  height: 100%;
  overflow: hidden;
  background: transparent;
  isolation: auto;
}

#join-overlay::before,
#join-overlay::after {
  display: none;
}

#join-form.cw-shell {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 10px;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  display: grid;
  grid-template-rows: 1fr;
  gap: 18px;
  color: #f0ece7;
  font-family: "Bahnschrift SemiCondensed", "Arial Narrow", "Segoe UI", sans-serif;
}

html.battle-hub-embed {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body.battle-hub-embed {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body.battle-hub-embed #cw-menu-root {
  height: auto;
  min-height: 100vh;
}

body.battle-hub-embed #join-overlay {
  position: relative;
  min-height: 0;
  height: auto;
  overflow: visible;
  overflow-x: hidden;
  padding: 0;
}

body.battle-hub-embed #join-overlay.death-mode,
body.battle-hub-embed #join-overlay.death-cinematic-active {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(128, 4, 18, 0.35), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(109, 10, 22, 0.25), transparent 42%),
    linear-gradient(160deg, rgba(9, 2, 5, 0.92), rgba(25, 4, 8, 0.9));
}

body.battle-hub-embed #join-form,
body.battle-hub-embed #join-form.cw-shell {
  width: 100%;
  height: auto;
  min-height: 100vh;
  max-width: none;
  margin: 0;
  max-height: none;
  overflow: visible;
}

body.battle-hub-embed #join-overlay.death-mode #join-form,
body.battle-hub-embed #join-overlay.death-cinematic-active #join-form,
body.battle-hub-embed #join-overlay.death-mode #join-form.cw-shell,
body.battle-hub-embed #join-overlay.death-cinematic-active #join-form.cw-shell {
  width: min(1460px, calc(100vw - 24px));
  height: auto;
  min-height: 0;
  max-height: calc(100vh - 20px);
  margin: 0;
  overflow: auto;
}

#join-form.cw-shell::before {
  display: none;
}

.cw-shell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
  min-height: 100%;
  gap: 18px;
  align-items: stretch;
}

.cw-shell-aside,
.cw-shell-main {
  display: grid;
  min-height: 100%;
  gap: 18px;
}

.cw-shell-main {
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
}

.cw-shell-heading {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 16px;
  padding: 2px 0 0;
}

.cw-shell-heading-copy {
  display: grid;
  gap: 6px;
}

.cw-shell-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cw-shell-title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 0.95;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff2eb;
  text-shadow:
    0 0 18px rgba(255, 88, 76, 0.18),
    0 0 34px rgba(225, 22, 30, 0.14);
}

.menu-version-slot {
  display: inline-flex;
  align-items: center;
}

@property --avatar-accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #39c1d9;
}

.battle-hub-player-card {
  --avatar-accent: #39c1d9;
  --skill-color: var(--avatar-accent);
  position: relative;
  display: grid;
  grid-template-columns: clamp(104px, 12vw, 144px) minmax(0, 1fr) minmax(150px, 220px);
  align-items: stretch;
  gap: 14px;
  width: 100%;
  min-width: 0;
  padding: 10px 13px 10px 10px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(135, 143, 156, 0.34);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(22, 24, 28, 0.96), rgba(9, 10, 12, 0.96)),
    radial-gradient(circle at 0 0, rgba(57, 193, 217, 0.18), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(225, 22, 30, 0.18), transparent 36%);
  background:
    linear-gradient(135deg, rgba(22, 24, 28, 0.96), rgba(9, 10, 12, 0.96)),
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--avatar-accent) 28%, transparent), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(225, 22, 30, 0.18), transparent 36%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 16px 34px rgba(0, 0, 0, 0.34);
  transition:
    --avatar-accent 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.battle-hub-player-card.is-hero-swap-revealing {
  animation: battleHubPlayerCardEnter 820ms cubic-bezier(.16, .9, .22, 1) both;
}

.battle-hub-player-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(57, 193, 217, 0.24), transparent 34%),
    linear-gradient(135deg, transparent 0 22px, rgba(255, 255, 255, 0.05) 22px 23px, transparent 23px);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--avatar-accent) 42%, transparent), transparent 34%),
    linear-gradient(135deg, transparent 0 22px, rgba(255, 255, 255, 0.05) 22px 23px, transparent 23px);
  opacity: 0.55;
}

.battle-hub-player-card::after {
  content: "";
  position: absolute;
  inset: -18% -10%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-34%) rotate(-7deg) scale(1.02);
  transform-origin: center;
  background:
    radial-gradient(circle at 24% 20%, color-mix(in srgb, var(--avatar-accent) 38%, transparent), transparent 30%),
    linear-gradient(115deg, transparent 0 34%, rgba(255, 255, 255, 0.2) 45%, transparent 58%);
  mix-blend-mode: screen;
  will-change: opacity, transform;
}

.battle-hub-player-card.is-hero-swap-covering::after {
  animation: none;
}

.battle-hub-player-card.is-hero-swap-revealing::after {
  animation: battleHubPlayerAccentSweep 960ms cubic-bezier(.16, .9, .22, 1) both;
}

.battle-hub-player-card.is-hero-swap-covering::before,
.battle-hub-player-card.is-hero-swap-revealing::before {
  will-change: opacity, filter;
}

.battle-hub-player-card.is-hero-swap-covering::before {
  animation: battleHubPlayerAmbientCover 180ms ease-out forwards;
}

.battle-hub-player-card.is-hero-swap-revealing::before {
  animation: battleHubPlayerAmbientReveal 820ms cubic-bezier(.16, .9, .22, 1) both;
}

.battle-hub-player-card.is-hero-swap-covering > .battle-hub-player-avatar-wrap,
.battle-hub-player-card.is-hero-swap-covering > .battle-hub-player-body,
.battle-hub-player-card.is-hero-swap-covering > .battle-hub-profile-rating,
.battle-hub-player-card.is-hero-swap-revealing > .battle-hub-player-avatar-wrap,
.battle-hub-player-card.is-hero-swap-revealing > .battle-hub-player-body,
.battle-hub-player-card.is-hero-swap-revealing > .battle-hub-profile-rating {
  will-change: opacity, transform, filter;
}

.battle-hub-player-card.is-hero-swap-covering > .battle-hub-player-avatar-wrap,
.battle-hub-player-card.is-hero-swap-covering > .battle-hub-player-body,
.battle-hub-player-card.is-hero-swap-covering > .battle-hub-profile-rating {
  animation: battleHubHeroContentVeil 280ms ease-out forwards;
}

.battle-hub-player-card.is-hero-swap-revealing > .battle-hub-player-avatar-wrap,
.battle-hub-player-card.is-hero-swap-revealing > .battle-hub-player-body,
.battle-hub-player-card.is-hero-swap-revealing > .battle-hub-profile-rating {
  animation: battleHubHeroContentReveal 620ms cubic-bezier(.18, .82, .2, 1) forwards;
}

.battle-hub-player-card.is-hero-swap-revealing > .battle-hub-player-avatar-wrap,
.battle-hub-player-card.is-hero-swap-revealing > .battle-hub-profile-rating {
  animation:
    battleHubHeroContentReveal 620ms cubic-bezier(.18, .82, .2, 1) forwards,
    battleHubPlayerPanelFlash 1.35s cubic-bezier(.16, .9, .22, 1) 90ms both;
}

.battle-hub-player-card.is-hero-swap-revealing .battle-hub-player-account-level,
.battle-hub-player-card.is-hero-swap-revealing .battle-hub-player-xp-track,
.battle-hub-player-card.is-hero-swap-revealing .battle-hub-profile-stat,
.battle-hub-player-card.is-hero-swap-revealing .battle-hub-hero-skills,
.battle-hub-player-card.is-hero-swap-revealing .battle-hub-hero-skill {
  --skill-color: var(--avatar-accent);
  animation: battleHubSkillSlotFlash 1.35s cubic-bezier(.16, .9, .22, 1) both;
}

.battle-hub-player-card.is-hero-swap-revealing .battle-hub-player-name,
.battle-hub-player-card.is-hero-swap-revealing .battle-hub-profile-rating-value {
  animation: battleHubPlayerTextFlash 1.15s cubic-bezier(.16, .9, .22, 1) 80ms both;
}

.battle-hub-player-card.is-hero-swap-revealing .battle-hub-profile-stat:nth-child(2),
.battle-hub-player-card.is-hero-swap-revealing .battle-hub-hero-skill:nth-child(2) {
  animation-delay: 55ms;
}

.battle-hub-player-card.is-hero-swap-revealing .battle-hub-profile-stat:nth-child(3),
.battle-hub-player-card.is-hero-swap-revealing .battle-hub-hero-skill:nth-child(3) {
  animation-delay: 110ms;
}

.battle-hub-player-card.is-hero-swap-revealing .battle-hub-profile-stat:nth-child(4),
.battle-hub-player-card.is-hero-swap-revealing .battle-hub-hero-skill:nth-child(4) {
  animation-delay: 165ms;
}

.battle-hub-player-card.is-hero-swap-revealing .battle-hub-profile-stat:nth-child(5),
.battle-hub-player-card.is-hero-swap-revealing .battle-hub-hero-skill:nth-child(5) {
  animation-delay: 220ms;
}

.battle-hub-player-card.is-hero-swap-revealing .battle-hub-profile-stat:nth-child(6),
.battle-hub-player-card.is-hero-swap-revealing .battle-hub-hero-skill:nth-child(6) {
  animation-delay: 275ms;
}

@keyframes battleHubPlayerAmbientCover {
  0% {
    opacity: 0.55;
    filter: saturate(1) brightness(1);
  }

  100% {
    opacity: 0.3;
    filter: saturate(0.82) brightness(0.86);
  }
}

@keyframes battleHubPlayerAmbientReveal {
  0% {
    opacity: 0.3;
    filter: saturate(0.82) brightness(0.86);
  }

  52% {
    opacity: 0.72;
    filter: saturate(1.12) brightness(1.06);
  }

  100% {
    opacity: 0.55;
    filter: saturate(1) brightness(1);
  }
}

@keyframes battleHubPlayerAccentSweep {
  0% {
    opacity: 0;
    transform: translateX(-34%) rotate(-7deg) scale(1.02);
  }

  24% {
    opacity: 0.78;
  }

  100% {
    opacity: 0;
    transform: translateX(34%) rotate(-7deg) scale(1.02);
  }
}

@keyframes battleHubHeroContentVeil {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0) saturate(1);
  }

  100% {
    opacity: 0.18;
    transform: translateY(2px) scale(0.992);
    filter: blur(7px) saturate(0.68);
  }
}

@keyframes battleHubHeroContentReveal {
  0% {
    opacity: 0.18;
    transform: translateY(12px) scale(0.992);
    filter: blur(4px) saturate(0.76);
  }

  58% {
    opacity: 1;
    transform: translateY(-2px) scale(1.004);
    filter: blur(0) saturate(1.12);
  }

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

@keyframes battleHubPlayerCardEnter {
  0% {
    opacity: 0.34;
    transform: translateY(12px) scale(0.992);
    filter: blur(5px) saturate(0.75);
    border-color: rgba(135, 143, 156, 0.34);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.05),
      0 16px 34px rgba(0, 0, 0, 0.34);
  }

  58% {
    opacity: 1;
    transform: translateY(-2px) scale(1.004);
    filter: blur(0) saturate(1.12);
    border-color: color-mix(in srgb, var(--avatar-accent) 74%, rgba(255, 255, 255, 0.22));
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--avatar-accent) 58%, transparent),
      0 0 28px color-mix(in srgb, var(--avatar-accent) 46%, transparent),
      0 0 50px rgba(255, 255, 255, 0.08),
      inset 0 0 34px color-mix(in srgb, var(--avatar-accent) 16%, transparent),
      0 16px 34px rgba(0, 0, 0, 0.34);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0) saturate(1);
    border-color: rgba(135, 143, 156, 0.34);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.05),
      0 16px 34px rgba(0, 0, 0, 0.34);
  }
}

@keyframes battleHubPlayerPanelFlash {
  0% {
    border-color: rgba(135, 143, 156, 0.24);
    box-shadow: 0 0 0 color-mix(in srgb, var(--avatar-accent) 0%, transparent);
  }

  24% {
    border-color: color-mix(in srgb, var(--avatar-accent) 76%, rgba(255, 255, 255, 0.2));
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--avatar-accent) 52%, transparent),
      0 0 24px color-mix(in srgb, var(--avatar-accent) 48%, transparent);
  }

  68% {
    border-color: color-mix(in srgb, var(--avatar-accent) 42%, rgba(255, 255, 255, 0.14));
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--avatar-accent) 18%, transparent),
      0 0 16px color-mix(in srgb, var(--avatar-accent) 24%, transparent);
  }

  100% {
    border-color: rgba(135, 143, 156, 0.24);
    box-shadow: 0 0 0 color-mix(in srgb, var(--avatar-accent) 0%, transparent);
  }
}

@keyframes battleHubAvatarLightSweep {
  0% {
    opacity: 0;
    transform: translateX(-42%) rotate(-8deg) scale(1.08);
  }

  22% {
    opacity: 0.92;
  }

  62% {
    opacity: 0.46;
  }

  100% {
    opacity: 0;
    transform: translateX(42%) rotate(-8deg) scale(1.08);
  }
}

@keyframes battleHubAvatarImageFlare {
  0% {
    filter: brightness(0.9) saturate(0.88);
  }

  28% {
    filter:
      brightness(1.28)
      saturate(1.22)
      drop-shadow(0 0 18px color-mix(in srgb, var(--avatar-accent) 34%, transparent));
  }

  100% {
    filter: brightness(1) saturate(1);
  }
}

@keyframes battleHubPlayerTextFlash {
  0% {
    color: #fff2eb;
    text-shadow:
      0 0 18px rgba(255, 88, 76, 0.16),
      0 0 32px rgba(225, 22, 30, 0.12);
  }

  24% {
    color: #fffdf8;
    text-shadow:
      0 0 14px color-mix(in srgb, var(--avatar-accent) 72%, transparent),
      0 0 30px color-mix(in srgb, var(--avatar-accent) 54%, transparent),
      0 0 48px rgba(255, 255, 255, 0.1);
  }

  100% {
    color: #fff2eb;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-loadout-stage.is-loadout-enter,
  .hero-paper-loadout.is-loadout-enter,
  .hero-paper-doll.is-loadout-enter,
  .hero-paper-doll.is-loadout-enter::before,
  .hero-paper-portrait.is-loadout-enter,
  .hero-paper-portrait.is-loadout-enter .hero-loadout-portrait,
  .hero-paper-portrait.is-loadout-enter .hero-paper-portrait-ring,
  .hero-paper-portrait.is-loadout-enter .hero-paper-portrait-name,
  .hero-quick-belt.is-loadout-enter,
  .hero-inventory-panel.is-loadout-enter,
  .hero-inventory-panel.is-loadout-enter .inventory-item-card,
  .hero-profile-card.is-loadout-enter,
  .hero-talents-card.is-loadout-enter,
  .hero-unique-skills-card.is-loadout-enter,
  .hero-talents-card.is-loadout-enter .hero-tree-list > .hero-node,
  .hero-unique-skills-card.is-loadout-enter .hero-tree-list > .hero-node,
  .hero-equip-slot.is-loadout-enter-slot,
  .hero-equip-slot.is-loadout-enter-slot::after,
  .hero-equip-slot.is-loadout-enter-slot .hero-equip-slot-icon,
  .hero-v2-card.is-roster-select-flash,
  .hero-v2-card.is-roster-select-flash::after,
  .hero-v2-card.is-roster-select-flash .hero-v2-inner,
  .hero-v2-card.is-roster-deselect-flash,
  .battle-hub-player-card.is-hero-swap-revealing,
  .battle-hub-player-card.is-hero-swap-revealing .battle-hub-player-account-level,
  .battle-hub-player-card.is-hero-swap-revealing .battle-hub-player-xp-track,
  .battle-hub-player-card.is-hero-swap-revealing .battle-hub-profile-stat,
  .battle-hub-player-card.is-hero-swap-revealing .battle-hub-hero-skills,
  .battle-hub-player-card.is-hero-swap-revealing .battle-hub-hero-skill,
  .battle-hub-player-card.is-hero-swap-revealing .battle-hub-player-name,
  .battle-hub-player-card.is-hero-swap-revealing .battle-hub-profile-rating-value,
  .battle-hub-player-card.is-hero-swap-covering::before,
  .battle-hub-player-card.is-hero-swap-revealing::before,
  .battle-hub-player-card.is-hero-swap-covering::after,
  .battle-hub-player-card.is-hero-swap-revealing::after,
  .battle-hub-player-card.is-hero-swap-covering > .battle-hub-player-avatar-wrap,
  .battle-hub-player-card.is-hero-swap-covering > .battle-hub-player-body,
  .battle-hub-player-card.is-hero-swap-covering > .battle-hub-profile-rating,
  .battle-hub-player-card.is-hero-swap-revealing > .battle-hub-player-avatar-wrap,
  .battle-hub-player-card.is-hero-swap-revealing > .battle-hub-player-body,
  .battle-hub-player-card.is-hero-swap-revealing > .battle-hub-profile-rating,
  .battle-hub-player-card.is-hero-swap-revealing > .battle-hub-player-avatar-wrap::before,
  .battle-hub-player-card.is-hero-swap-revealing > .battle-hub-player-avatar-wrap .battle-hub-player-avatar,
  #join-form .battle-hub-presence-refresh.is-refreshing::after {
    animation: none;
  }
}

.battle-hub-player-avatar-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100%;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(57, 193, 217, 0.42);
  border: 1px solid color-mix(in srgb, var(--avatar-accent) 58%, rgba(255, 255, 255, 0.14));
  background: rgba(7, 9, 12, 0.9);
  box-shadow: 0 0 18px rgba(57, 193, 217, 0.24);
  box-shadow: 0 0 18px color-mix(in srgb, var(--avatar-accent) 34%, transparent);
}

.battle-hub-player-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 24% 18%, color-mix(in srgb, var(--avatar-accent) 42%, transparent), transparent 34%),
    linear-gradient(115deg, transparent 0 30%, rgba(255, 255, 255, 0.26), transparent 58%);
  mix-blend-mode: screen;
  transform: translateX(-42%) rotate(-8deg) scale(1.08);
}

.battle-hub-player-card.is-hero-swap-revealing > .battle-hub-player-avatar-wrap::before {
  animation: battleHubAvatarLightSweep 1.08s cubic-bezier(.16, .9, .22, 1) 110ms both;
}

.battle-hub-player-card.is-hero-swap-revealing > .battle-hub-player-avatar-wrap .battle-hub-player-avatar {
  animation: battleHubAvatarImageFlare 1.18s cubic-bezier(.16, .9, .22, 1) 70ms both;
}

.battle-hub-player-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  image-rendering: auto;
}

.battle-hub-player-level {
  position: absolute;
  z-index: 3;
  right: 5px;
  bottom: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  height: 21px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  background: rgba(9, 10, 12, 0.86);
  color: #fff2eb;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 12px rgba(225, 22, 30, 0.32);
}

.battle-hub-player-body {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  gap: 9px;
  align-content: start;
}

.battle-hub-player-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  min-width: 0;
}

.battle-hub-player-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.battle-hub-player-name {
  min-width: 0;
  overflow: hidden;
  color: #fff2eb;
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
  text-shadow:
    0 0 18px rgba(255, 88, 76, 0.16),
    0 0 32px rgba(225, 22, 30, 0.12);
}

.battle-hub-player-account-level,
.battle-hub-player-state {
  color: #9fabb6;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.battle-hub-player-account-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(255, 107, 75, 0.42);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(127, 5, 9, 0.58), rgba(38, 8, 12, 0.7)),
    radial-gradient(circle at top right, rgba(255, 159, 74, 0.22), transparent 58%);
  color: #fff2eb;
  font-size: 13px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 18px rgba(225, 22, 30, 0.18);
}

.battle-hub-player-xp {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 1fr);
  align-items: start;
  gap: 6px;
  min-width: 0;
}

.battle-hub-player-xp::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: -7px;
  height: 22px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at var(--xp-spark-x, 18%) 50%, color-mix(in srgb, var(--avatar-accent) 36%, transparent), transparent 56%),
    radial-gradient(ellipse at 74% 40%, rgba(255, 159, 74, 0.18), transparent 52%);
  filter: blur(9px);
  opacity: 0.8;
  animation: battleHubXpAura 3.8s ease-in-out infinite alternate;
}

.battle-hub-player-xp-track {
  position: relative;
  display: block;
  width: 100%;
  height: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 211, 110, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 224, 142, 0.12), transparent 34%, rgba(0, 0, 0, 0.48) 100%),
    linear-gradient(90deg, rgba(12, 8, 3, 0.98), rgba(24, 17, 8, 0.92) 52%, rgba(9, 7, 4, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 226, 156, 0.24),
    inset 0 -2px 5px rgba(0, 0, 0, 0.72),
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 236, 190, 0.08),
    0 0 18px rgba(245, 158, 11, 0.18);
}

.battle-hub-player-xp-track::before,
.battle-hub-player-xp-track::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.battle-hub-player-xp-track::before {
  background:
    linear-gradient(180deg, rgba(255, 232, 170, 0.2), transparent 34%, rgba(0, 0, 0, 0.34) 100%),
    linear-gradient(90deg, rgba(255, 226, 156, 0.07), transparent 8%, transparent 92%, rgba(255, 226, 156, 0.09));
  opacity: 0.64;
}

.battle-hub-player-xp-track::after {
  inset: 2px 7px auto 8px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 236, 190, 0.18), rgba(255, 211, 110, 0.06), transparent);
  opacity: 0.9;
}

.battle-hub-player-xp-fill {
  position: relative;
  display: block;
  width: 0%;
  height: 100%;
  overflow: hidden;
  border-radius: 7px 3px 3px 7px;
  background:
    linear-gradient(180deg, rgba(255, 250, 220, 0.66) 0%, rgba(255, 224, 142, 0.28) 23%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(90deg,
      #a16207 0%,
      #d97706 28%,
      #f59e0b 66%,
      #ffe08a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 232, 0.56),
    inset 0 -2px 4px rgba(120, 53, 15, 0.58),
    0 0 16px rgba(245, 158, 11, 0.56),
    0 0 28px rgba(251, 191, 36, 0.36);
  transition: width 260ms cubic-bezier(.2, .86, .24, 1);
}

.battle-hub-player-xp-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.08) 33%, transparent 56%),
    linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, 0.46) 48%, transparent 62%);
  transform: translateX(-78%);
  mix-blend-mode: screen;
  animation: battleHubXpCharge 2.25s ease-in-out infinite;
}

.battle-hub-player-xp-fill::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -8px;
  width: 18px;
  bottom: -5px;
  background:
    radial-gradient(ellipse at center, rgba(255, 252, 220, 0.94), rgba(251, 191, 36, 0.52) 42%, transparent 72%);
  filter: blur(2px);
  opacity: 0.82;
  pointer-events: none;
}

.battle-hub-player-xp-text {
  color: #c8b5ad;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@keyframes battleHubXpAura {
  0% { opacity: 0.46; transform: translateX(-2%); }
  100% { opacity: 0.9; transform: translateX(2%); }
}

@keyframes battleHubXpParticles {
  0% { background-position: 0 0; }
  100% { background-position: 170px 0; }
}

@keyframes battleHubXpScan {
  0%, 28% { transform: translateX(-100%); opacity: 0; }
  42% { opacity: 0.34; }
  72%, 100% { transform: translateX(100%); opacity: 0; }
}

@keyframes battleHubXpCharge {
  0% { transform: translateX(-85%); opacity: 0; }
  32% { opacity: 0.62; }
  100% { transform: translateX(85%); opacity: 0; }
}

.battle-hub-profile-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.battle-hub-profile-stat {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 7px 8px;
  overflow: hidden;
  border: 1px solid rgba(135, 143, 156, 0.2);
  border-radius: 7px;
  background: rgba(7, 9, 12, 0.48);
}

.battle-hub-profile-stat b {
  overflow: hidden;
  color: #9fabb6;
  font-size: 10px;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.battle-hub-profile-stat strong {
  overflow: hidden;
  color: #fff2eb;
  font-size: 13px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.battle-hub-hero-skills {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(135, 143, 156, 0.2);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(12, 15, 19, 0.74), rgba(7, 9, 12, 0.54)),
    radial-gradient(circle at top left, color-mix(in srgb, var(--avatar-accent) 22%, transparent), transparent 44%);
}

.battle-hub-hero-skills-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.battle-hub-hero-skills-head span,
.battle-hub-hero-skills-head strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.07em;
}

.battle-hub-hero-skills-head span {
  color: #9fabb6;
}

.battle-hub-hero-skills-head strong {
  color: #fff2eb;
  font-variant-numeric: tabular-nums;
}

.battle-hub-hero-skills-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.battle-hub-hero-skill {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  min-width: 0;
  min-height: 68px;
  padding: 7px;
  overflow: hidden;
  appearance: none;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--skill-color, #d1d5db) 42%, rgba(135, 143, 156, 0.18));
  border-radius: 7px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--skill-color, #d1d5db) 11%, transparent), rgba(7, 9, 12, 0.5)),
    rgba(7, 9, 12, 0.46);
  color: inherit;
  font: inherit;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, opacity 150ms ease, filter 150ms ease;
}

.battle-hub-hero-skill::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 1px solid color-mix(in srgb, var(--skill-color, #d1d5db) 42%, transparent);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--skill-type-color, #94a3b8) 42%, transparent);
  opacity: 0.7;
}

.battle-hub-hero-skill::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 0% 50%, color-mix(in srgb, var(--skill-color, #d1d5db) 28%, transparent), transparent 58%),
    radial-gradient(ellipse at 62% 48%, color-mix(in srgb, var(--skill-color, #d1d5db) 24%, transparent), transparent 64%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.13), transparent 76%);
  opacity: 0;
  transform: scaleX(0.98);
  transform-origin: left center;
  transition: opacity 160ms ease, transform 220ms ease;
}

.battle-hub-hero-skill:hover,
.battle-hub-hero-skill:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--skill-hover-color, var(--skill-color, #d1d5db)) 78%, rgba(255, 255, 255, 0.28));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 18px color-mix(in srgb, var(--skill-hover-color, var(--skill-color, #d1d5db)) 28%, transparent);
  outline: none;
}

#join-form .battle-hub-hero-skill:hover,
#join-form .battle-hub-hero-skill:focus-visible {
  border-color: color-mix(in srgb, var(--skill-hover-color, var(--skill-color, #d1d5db)) 78%, rgba(255, 255, 255, 0.28));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 18px color-mix(in srgb, var(--skill-hover-color, var(--skill-color, #d1d5db)) 28%, transparent);
}

.battle-hub-hero-skill:hover::after,
.battle-hub-hero-skill:focus-visible::after {
  background:
    radial-gradient(ellipse at 0% 50%, color-mix(in srgb, var(--skill-hover-color, var(--skill-color, #d1d5db)) 30%, transparent), transparent 58%),
    radial-gradient(ellipse at 70% 0%, color-mix(in srgb, var(--skill-hover-color, var(--skill-color, #d1d5db)) 24%, transparent), transparent 62%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.035), color-mix(in srgb, var(--skill-hover-color, var(--skill-color, #d1d5db)) 18%, transparent), transparent 76%);
  opacity: 0.58;
  transform: scaleX(1);
}

.battle-hub-hero-skill-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--skill-color, #d1d5db) 62%, rgba(255, 255, 255, 0.18));
  border-radius: 7px;
  background:
    radial-gradient(circle at 35% 25%, color-mix(in srgb, var(--skill-color, #d1d5db) 46%, transparent), transparent 56%),
    rgba(4, 6, 9, 0.74);
  color: #fff2eb;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  box-shadow: 0 0 14px color-mix(in srgb, var(--skill-color, #d1d5db) 24%, transparent);
}

.battle-hub-hero-skill-icon.has-image {
  background: rgba(4, 6, 9, 0.88);
}

.battle-hub-hero-skill-icon.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: cover;
}

.hero-node.hero-unique-skill .battle-hub-hero-skill-icon.hero-unique-skill-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}

.hero-node.hero-unique-skill .battle-hub-hero-skill-icon.hero-unique-skill-icon img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  object-fit: cover;
  object-position: center;
}

.battle-hub-hero-skill-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.battle-hub-hero-skill-name {
  overflow: hidden;
  color: #fff2eb;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-hub-hero-skill-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  color: #9fabb6;
  font-size: 9px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.battle-hub-hero-skill-meta b,
.battle-hub-hero-skill-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-hub-hero-skill-meta b {
  color: color-mix(in srgb, var(--skill-type-color, #d1d5db) 76%, #fff2eb);
}

.battle-hub-hero-skill-meta strong {
  color: #c8b5ad;
  font-weight: 800;
}

.battle-hub-hero-skill-stats {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.battle-hub-hero-skill-stats span {
  overflow: hidden;
  color: #9fabb6;
  font-size: 9px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-hub-hero-skill.is-unlocked {
  border-color: color-mix(in srgb, var(--skill-color, #d1d5db) 68%, rgba(255, 255, 255, 0.18));
}

.battle-hub-hero-skill.is-maxed {
  border-color: color-mix(in srgb, var(--skill-color, #d1d5db) 72%, #facc15 28%);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--skill-type-color, #94a3b8) 8%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(44, 34, 13, 0.18), rgba(7, 9, 12, 0.68)),
    rgba(7, 9, 12, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 0 14px rgba(250, 204, 21, 0.04),
    0 0 12px color-mix(in srgb, var(--skill-color, #d1d5db) 10%, rgba(245, 158, 11, 0.12));
}

.battle-hub-hero-skill.is-maxed::before {
  border-top-color: color-mix(in srgb, var(--skill-color, #d1d5db) 55%, #fef08a 45%);
  background: linear-gradient(90deg, color-mix(in srgb, var(--skill-type-color, #94a3b8) 12%, transparent), rgba(254, 240, 138, 0.045), transparent 58%);
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, var(--skill-type-color, #94a3b8) 72%, #facc15 28%),
    inset 0 1px 0 color-mix(in srgb, var(--skill-color, #d1d5db) 32%, transparent);
  opacity: 0.72;
}

.battle-hub-hero-skill.is-maxed::after {
  background:
    radial-gradient(ellipse at 0% 50%, color-mix(in srgb, var(--skill-type-color, #94a3b8) 7%, transparent), transparent 56%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.012), color-mix(in srgb, #fef08a 18%, transparent), transparent 72%);
  opacity: 0.18;
  transform: scaleX(1);
}

.battle-hub-hero-skill.is-maxed:hover,
.battle-hub-hero-skill.is-maxed:focus-visible {
  border-color: color-mix(in srgb, var(--skill-color, #d1d5db) 62%, #fef08a 38%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    inset 0 0 16px rgba(250, 204, 21, 0.06),
    0 0 16px color-mix(in srgb, var(--skill-color, #d1d5db) 18%, rgba(245, 158, 11, 0.16));
}

#join-form .battle-hub-hero-skill.is-maxed:hover,
#join-form .battle-hub-hero-skill.is-maxed:focus-visible {
  border-color: color-mix(in srgb, var(--skill-color, #d1d5db) 62%, #fef08a 38%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    inset 0 0 16px rgba(250, 204, 21, 0.06),
    0 0 16px color-mix(in srgb, var(--skill-color, #d1d5db) 18%, rgba(245, 158, 11, 0.16));
}

.battle-hub-hero-skill.is-maxed .battle-hub-hero-skill-icon {
  border-color: color-mix(in srgb, var(--skill-color, #d1d5db) 56%, #fef08a 44%);
  background:
    radial-gradient(circle at 35% 25%, color-mix(in srgb, var(--skill-type-color, #94a3b8) 16%, transparent), transparent 58%),
    radial-gradient(circle at 72% 72%, rgba(254, 240, 138, 0.1), transparent 58%),
    rgba(20, 14, 5, 0.82);
  box-shadow:
    0 0 10px color-mix(in srgb, var(--skill-color, #d1d5db) 16%, rgba(250, 204, 21, 0.15)),
    inset 0 0 9px rgba(250, 204, 21, 0.05);
}

.battle-hub-hero-skill.is-maxed .battle-hub-hero-skill-name {
  color: #fff7d6;
}

.battle-hub-hero-skill.is-maxed .battle-hub-hero-skill-stats span {
  color: #d9cda5;
}

.battle-hub-hero-skill.is-unlocked .battle-hub-hero-skill-meta strong {
  color: #22c55e;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.22);
}

.battle-hub-hero-skill.is-maxed .battle-hub-hero-skill-meta strong {
  color: #facc15;
  text-shadow:
    0 0 10px rgba(250, 204, 21, 0.34),
    0 0 18px rgba(245, 158, 11, 0.22),
    0 0 16px color-mix(in srgb, var(--skill-type-color, #facc15) 28%, transparent);
}

.battle-hub-hero-skill.is-maxed .battle-hub-hero-skill-meta b {
  color: color-mix(in srgb, var(--skill-type-color, #facc15) 76%, #fff7d6);
  text-shadow: 0 0 12px color-mix(in srgb, var(--skill-type-color, #facc15) 28%, transparent);
}

.battle-hub-hero-skill.is-locked {
  opacity: 0.68;
}

.battle-hub-hero-skill.can-afford {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 16px color-mix(in srgb, var(--skill-color, #d1d5db) 18%, transparent);
}

.battle-hub-hero-skill.is-skill-flash {
  animation: battleHubSkillSlotFlash 1.35s cubic-bezier(.16, .9, .22, 1);
}

.battle-hub-hero-skill.is-skill-flash::after {
  opacity: 0;
  animation: heroEquipSlotSweep 1.05s cubic-bezier(.16, .9, .22, 1);
}

.battle-hub-hero-skill.is-skill-flash .battle-hub-hero-skill-icon {
  animation: battleHubSkillIconPop 900ms cubic-bezier(.16, .9, .22, 1);
}

@keyframes battleHubSkillSlotFlash {
  0% {
    transform: scale(0.985);
    filter: brightness(0.9) saturate(0.9);
    box-shadow: 0 0 0 color-mix(in srgb, var(--skill-color, #d1d5db) 0%, transparent);
  }

  22% {
    transform: scale(1.018);
    filter: brightness(1.55) saturate(1.45);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--skill-color, #d1d5db) 62%, transparent),
      0 0 26px color-mix(in srgb, var(--skill-color, #d1d5db) 58%, transparent),
      0 0 46px rgba(255, 255, 255, 0.1);
  }

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

@keyframes battleHubSkillIconPop {
  0% { transform: scale(0.82) rotate(-4deg); }
  34% { transform: scale(1.18) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  .battle-hub-hero-skill.is-skill-flash,
  .battle-hub-hero-skill.is-skill-flash::after,
  .battle-hub-hero-skill.is-skill-flash .battle-hub-hero-skill-icon {
    animation: none;
  }
}

.battle-hub-hero-skill-placeholder {
  grid-column: 1 / -1;
  padding: 10px;
  border: 1px dashed rgba(135, 143, 156, 0.24);
  border-radius: 7px;
  color: #9fabb6;
  font-size: 11px;
  text-align: center;
}

.battle-hub-skill-modal {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  padding: 20px;
}

.battle-hub-skill-modal.hidden {
  display: none;
}

.battle-hub-skill-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--avatar-accent, #39c1d9) 18%, transparent), transparent 42%),
    rgba(2, 4, 8, 0.72);
  backdrop-filter: blur(9px);
  opacity: 0;
  transition:
    opacity 320ms ease,
    backdrop-filter 320ms ease;
}

.battle-hub-skill-modal.is-open .battle-hub-skill-modal-backdrop {
  opacity: 1;
}

.battle-hub-skill-modal-card {
  position: relative;
  width: min(680px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 28px));
  overflow: hidden auto;
  border: 1px solid color-mix(in srgb, var(--avatar-accent, #39c1d9) 38%, rgba(255, 255, 255, 0.16));
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(16, 19, 25, 0.98), rgba(6, 8, 12, 0.98)),
    radial-gradient(circle at top left, color-mix(in srgb, var(--avatar-accent, #39c1d9) 24%, transparent), transparent 42%),
    radial-gradient(circle at bottom right, rgba(225, 22, 30, 0.16), transparent 40%);
  box-shadow:
    0 28px 78px rgba(0, 0, 0, 0.58),
    0 0 42px color-mix(in srgb, var(--avatar-accent, #39c1d9) 18%, transparent);
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  filter: blur(2px) brightness(0.94);
  transition:
    opacity 260ms ease,
    transform 300ms cubic-bezier(.16, .9, .22, 1),
    filter 300ms ease;
}

.battle-hub-skill-modal.is-open .battle-hub-skill-modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0) brightness(1);
}

.battle-hub-skill-modal-card::before,
.battle-hub-skill-modal-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.battle-hub-skill-modal-card::before {
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(115deg, transparent 0 28%, rgba(255, 255, 255, 0.06), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 18px);
  opacity: 0.55;
}

.battle-hub-skill-modal-card::after {
  left: -30%;
  right: -30%;
  top: -40%;
  height: 80%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--avatar-accent, #39c1d9) 34%, transparent), transparent 62%);
  filter: blur(26px);
  opacity: 0.46;
  animation: battleHubSkillModalMist 4s ease-in-out infinite alternate;
}

.battle-hub-skill-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 34% 18%, rgba(255, 255, 255, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(18, 22, 30, 0.92), rgba(7, 9, 12, 0.84));
  color: #fff2eb;
  cursor: pointer;
  font-size: 0;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition:
    border-color 170ms ease,
    background 170ms ease,
    box-shadow 170ms ease,
    filter 170ms ease,
    transform 170ms ease;
}

.battle-hub-skill-modal-close::before,
.battle-hub-skill-modal-close::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: #fff2eb;
  box-shadow: 0 0 12px color-mix(in srgb, var(--skill-color, #d1d5db) 42%, transparent);
  transition:
    background 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease;
}

.battle-hub-skill-modal-close::before {
  transform: rotate(45deg);
}

.battle-hub-skill-modal-close::after {
  transform: rotate(-45deg);
}

.battle-hub-skill-modal-close:hover,
.battle-hub-skill-modal-close:focus-visible {
  border-color: color-mix(in srgb, var(--skill-color, #d1d5db) 58%, rgba(255, 255, 255, 0.22));
  background:
    radial-gradient(circle at 34% 18%, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(42, 16, 20, 0.94), rgba(13, 9, 13, 0.9));
  filter: brightness(1.12);
  transform: translateY(-1px) rotate(4deg);
  box-shadow:
    0 0 22px color-mix(in srgb, var(--skill-color, #d1d5db) 22%, transparent),
    0 12px 24px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.battle-hub-skill-modal-close:hover::before,
.battle-hub-skill-modal-close:focus-visible::before {
  transform: rotate(45deg) scaleX(1.12);
}

.battle-hub-skill-modal-close:hover::after,
.battle-hub-skill-modal-close:focus-visible::after {
  transform: rotate(-45deg) scaleX(1.12);
}

.battle-hub-skill-modal-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.battle-hub-skill-modal-hero {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}

.battle-hub-skill-modal-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--skill-color, #d1d5db) 54%, rgba(255, 255, 255, 0.18));
  border-radius: 10px;
  background:
    radial-gradient(circle at 48% 38%, color-mix(in srgb, var(--skill-color, #d1d5db) 58%, transparent), transparent 34%),
    radial-gradient(circle at 20% 80%, rgba(225, 22, 30, 0.2), transparent 44%),
    linear-gradient(180deg, rgba(18, 21, 29, 0.9), rgba(5, 7, 11, 0.96));
  box-shadow: inset 0 0 30px color-mix(in srgb, var(--skill-color, #d1d5db) 18%, transparent);
}

.battle-hub-skill-modal-art::before,
.battle-hub-skill-modal-art::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border-radius: inherit;
}

.battle-hub-skill-modal-art::before {
  display: none;
}

.battle-hub-skill-modal-art::after {
  background: conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--skill-color, #d1d5db) 34%, transparent), transparent 42%);
  filter: blur(8px);
  animation: battleHubSkillModalCore 4s linear infinite;
}

.battle-hub-skill-modal-art span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #fff2eb;
  font-size: 30px;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 0 24px color-mix(in srgb, var(--skill-color, #d1d5db) 64%, transparent);
}

.battle-hub-skill-modal-art span.has-image {
  width: 100%;
  height: 100%;
  padding: 12px;
  font-size: 0;
  text-shadow: none;
}

.battle-hub-skill-modal-art span.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 98px;
  max-height: 112px;
  object-fit: contain;
  border-radius: 9px;
  filter:
    drop-shadow(0 0 18px color-mix(in srgb, var(--skill-color, #d1d5db) 36%, transparent))
    drop-shadow(0 12px 18px rgba(0, 0, 0, 0.38));
}

.battle-hub-skill-modal-art.has-item-image::before {
  display: none;
}

.battle-hub-skill-modal-art.has-image {
  min-height: 132px;
  background: rgba(4, 6, 9, 0.94);
}

.battle-hub-skill-modal-art.has-image img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.battle-hub-skill-modal-head {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.battle-hub-skill-modal-kicker,
.battle-hub-skill-modal-head small {
  color: #9fabb6;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.battle-hub-skill-modal-head strong {
  color: #fff2eb;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 0.95;
  text-shadow: 0 0 26px color-mix(in srgb, var(--skill-color, #d1d5db) 22%, transparent);
}

.battle-hub-skill-modal-desc {
  margin: 0;
  color: #c8b5ad;
  font-size: 14px;
  line-height: 1.45;
}

.battle-hub-skill-modal-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.battle-hub-skill-modal-stats section,
.battle-hub-skill-modal-economy span {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(135, 143, 156, 0.22);
  border-radius: 9px;
  background: rgba(7, 9, 12, 0.48);
}

.battle-hub-skill-modal-stats b,
.battle-hub-skill-modal-economy b {
  color: #9fabb6;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.battle-hub-skill-modal-stats section div {
  display: grid;
  gap: 5px;
}

.battle-hub-skill-modal-stats span {
  color: #fff2eb;
  font-size: 13px;
  line-height: 1.2;
}

.battle-hub-skill-modal-economy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.battle-hub-skill-modal-economy strong {
  color: #fff2eb;
  font-size: 18px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.battle-hub-skill-modal-economy .has-value strong {
  color: #22c55e;
  text-shadow: 0 0 16px rgba(34, 197, 94, 0.22);
}

.battle-hub-skill-modal-status {
  min-height: 34px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c8b5ad;
  background: rgba(7, 9, 12, 0.46);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.battle-hub-skill-modal-status.ok {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.26);
}

.battle-hub-skill-modal-status.warn {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.28);
}

.battle-hub-skill-modal-action {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  border: 1px solid rgba(255, 150, 120, 0.64);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 221, 148, 0.34), transparent 34%),
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--skill-color, #ff5a45) 34%, transparent), transparent 42%),
    linear-gradient(180deg, #ff6048 0%, #e11d2e 42%, #8f0710 100%);
  color: #fff2eb;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: none;
  text-shadow: 0 1px 0 rgba(82, 0, 0, 0.46);
  box-shadow:
    0 0 28px rgba(225, 29, 46, 0.42),
    0 10px 22px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -16px 28px rgba(67, 0, 5, 0.22);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    transform 160ms ease;
}

.battle-hub-skill-modal-action::before {
  content: "";
  position: absolute;
  inset: -45% auto -45% -42%;
  width: 42%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  filter: blur(1px);
  transform: translateX(-40%) skewX(-14deg);
  opacity: 0;
  transition: transform 360ms ease, opacity 180ms ease;
}

.battle-hub-skill-modal-action-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.battle-hub-skill-modal-action.is-loading,
.battle-hub-skill-modal-action.is-loading:disabled {
  cursor: progress;
  opacity: 1;
  filter: saturate(1.1) brightness(1.08);
  box-shadow:
    0 0 36px rgba(225, 29, 46, 0.5),
    0 10px 22px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -16px 28px rgba(67, 0, 5, 0.22);
}

.battle-hub-skill-modal-action.is-loading .battle-hub-skill-modal-action-label::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 242, 235, 0.88);
  border-top-color: transparent;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(255, 242, 235, 0.28);
  animation: battleHubSkillModalCore 720ms linear infinite;
}

.battle-hub-skill-modal-action:hover:not(:disabled),
.battle-hub-skill-modal-action:focus-visible:not(:disabled) {
  border-color: rgba(255, 224, 180, 0.82);
  filter: brightness(1.12) saturate(1.14);
  transform: translateY(-1px);
  box-shadow:
    0 0 38px rgba(255, 55, 70, 0.55),
    0 14px 26px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -14px 28px rgba(67, 0, 5, 0.16);
}

.battle-hub-skill-modal-action:hover:not(:disabled)::before,
.battle-hub-skill-modal-action:focus-visible:not(:disabled)::before {
  opacity: 1;
  transform: translateX(380%) skewX(-14deg);
}

.battle-hub-skill-modal-action:disabled {
  cursor: default;
  opacity: 0.48;
  box-shadow: none;
}

.battle-hub-skill-modal.is-closing .battle-hub-skill-modal-backdrop {
  opacity: 0;
  backdrop-filter: blur(2px);
  transition-duration: 360ms;
}

.battle-hub-skill-modal.is-closing .battle-hub-skill-modal-card {
  opacity: 0;
  transform: translateY(14px) scale(0.955);
  filter: blur(3px) brightness(0.86);
  transition:
    opacity 320ms ease,
    transform 360ms cubic-bezier(.4, 0, .22, 1),
    filter 360ms ease;
}

.battle-hub-skill-modal.is-purchased .battle-hub-skill-modal-card {
  animation: battleHubSkillModalPurchase 520ms cubic-bezier(.16, .9, .22, 1) forwards;
}

.battle-hub-skill-modal.is-busy .battle-hub-skill-modal-card {
  filter: brightness(1.15);
}

@keyframes battleHubSkillModalPurchase {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }

  38% {
    opacity: 1;
    transform: translateY(-4px) scale(1.025);
    filter: brightness(1.65) saturate(1.45);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--avatar-accent, #39c1d9) 64%, transparent),
      0 0 52px color-mix(in srgb, var(--avatar-accent, #39c1d9) 48%, transparent),
      0 28px 78px rgba(0, 0, 0, 0.58);
  }

  100% {
    opacity: 0;
    transform: translateY(-18px) scale(0.9);
    filter: blur(8px) brightness(1.8);
  }
}

@keyframes battleHubSkillModalMist {
  from { transform: translateX(-4%); }
  to { transform: translateX(4%); }
}

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

.hero-progression-modal {
  z-index: 94;
}

.hero-progression-modal .hero-progression-modal-card {
  width: min(760px, calc(100vw - 24px));
}

.hero-progression-modal .battle-hub-skill-modal-content {
  gap: 16px;
}

.hero-progression-modal-hero {
  grid-template-columns: 132px minmax(0, 1fr);
}

.hero-progression-modal-art {
  min-height: 148px;
}

.hero-progression-modal-art.is-talent.has-image img {
  object-fit: cover;
}

.hero-progression-modal-art.is-talent:not(.has-image) span {
  width: 78px;
  height: 78px;
  border: 1px solid color-mix(in srgb, var(--skill-color, #d1d5db) 64%, rgba(255, 255, 255, 0.18));
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--skill-color, #d1d5db) 42%, transparent), transparent 60%),
    linear-gradient(145deg, rgba(13, 17, 24, 0.96), rgba(3, 6, 11, 0.96));
}

.hero-progression-modal-head {
  align-content: start;
}

.hero-progression-level-track {
  position: relative;
  width: min(100%, 360px);
  height: 10px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--skill-color, #38bdf8) 38%, rgba(255, 255, 255, 0.14));
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(2, 6, 12, 0.74);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.36),
    0 0 16px color-mix(in srgb, var(--skill-color, #38bdf8) 16%, transparent);
}

.hero-progression-level-track i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--skill-color, #38bdf8) 74%, #ffffff), #fef3c7),
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 46%);
  box-shadow:
    0 0 16px color-mix(in srgb, var(--skill-color, #38bdf8) 42%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: width 260ms cubic-bezier(.16, .9, .22, 1);
}

.hero-progression-modal-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-progression-modal-stats section div {
  display: grid;
  gap: 6px;
}

.hero-progression-stat-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid color-mix(in srgb, var(--skill-color, #38bdf8) 18%, rgba(148, 163, 184, 0.18));
  border-radius: 7px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--skill-color, #38bdf8) 9%, transparent), transparent 38%),
    rgba(2, 6, 12, 0.44);
}

.hero-progression-stat-row b {
  overflow: hidden;
  color: #aeb8c4;
  font-size: 11px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
  text-transform: none;
}

.hero-progression-stat-row strong {
  color: color-mix(in srgb, var(--skill-color, #38bdf8) 36%, #fff2eb);
  font-size: 13px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  text-shadow: 0 0 12px color-mix(in srgb, var(--skill-color, #38bdf8) 18%, transparent);
}

.hero-progression-modal .battle-hub-skill-modal-economy strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.08;
  white-space: normal;
}

.hero-progression-modal.is-purchased .battle-hub-skill-modal-card {
  animation: heroProgressionModalPurchasePulse 620ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-progression-modal.is-purchased .hero-progression-level-track i {
  animation: heroProgressionLevelFlash 620ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-progression-modal.is-busy .hero-progression-modal-action {
  filter: brightness(1.16) saturate(1.2);
}

@keyframes heroProgressionModalPurchasePulse {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }

  34% {
    opacity: 1;
    transform: translateY(-3px) scale(1.018);
    filter: brightness(1.48) saturate(1.35);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--skill-color, #38bdf8) 66%, transparent),
      0 0 46px color-mix(in srgb, var(--skill-color, #38bdf8) 48%, transparent),
      0 28px 78px rgba(0, 0, 0, 0.58);
  }

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

@keyframes heroProgressionLevelFlash {
  0% {
    filter: brightness(1);
  }

  38% {
    filter: brightness(1.7) saturate(1.35);
  }

  100% {
    filter: brightness(1);
  }
}

@media (max-width: 720px) {
  .battle-hub-skill-modal {
    padding: 10px;
  }

  .battle-hub-skill-modal-content {
    padding: 14px;
  }

  .battle-hub-skill-modal-hero,
  .battle-hub-skill-modal-stats,
  .battle-hub-skill-modal-economy {
    grid-template-columns: 1fr;
  }

  .battle-hub-skill-modal-art {
    min-height: 104px;
  }

  .hero-progression-modal-hero,
  .hero-progression-modal-stats {
    grid-template-columns: 1fr;
  }

  .hero-progression-modal-art {
    min-height: 116px;
  }

  .hero-progression-stat-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .hero-progression-stat-row strong {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-progression-modal.is-purchased .battle-hub-skill-modal-card,
  .hero-progression-modal.is-purchased .hero-progression-level-track i {
    animation: none;
  }
}

.battle-hub-skill-modal.hero-equip-modal {
  z-index: 93;
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-modal-card {
  width: min(760px, calc(100vw - 24px));
  border-color: color-mix(in srgb, var(--skill-color, #39c1d9) 42%, rgba(255, 255, 255, 0.16));
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-modal-head strong {
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.05;
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-modal-body {
  display: grid;
  gap: 12px;
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-modal-empty {
  padding: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(7, 9, 12, 0.42);
  color: #d7dde6;
  font-size: 14px;
  line-height: 1.45;
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-picker-list {
  display: grid;
  gap: 10px;
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-picker-row {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border-color: color-mix(in srgb, var(--skill-color, #39c1d9) 24%, rgba(148, 163, 184, 0.22));
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--skill-color, #39c1d9) 13%, transparent), transparent 42%),
    rgba(7, 9, 12, 0.62);
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-picker-row::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.78;
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-picker-icon,
.battle-hub-skill-modal.hero-equip-modal .hero-equip-picker-copy,
.battle-hub-skill-modal.hero-equip-modal .hero-equip-picker-row .hero-equip-action {
  position: relative;
  z-index: 1;
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-picker-name {
  color: #fff2eb;
  font-size: 15px;
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-picker-meta {
  color: #aeb8c4;
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-picker-meta-eq {
  color: #bbf7d0;
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-action {
  min-width: 118px;
  min-height: 38px;
  border-color: color-mix(in srgb, var(--skill-color, #ff5a45) 42%, rgba(255, 255, 255, 0.16));
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 221, 148, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(62, 22, 26, 0.96), rgba(13, 10, 15, 0.92));
  color: #fff2eb;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.02em;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    transform 160ms ease;
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-action:hover:not(:disabled),
.battle-hub-skill-modal.hero-equip-modal .hero-equip-action:focus-visible:not(:disabled) {
  border-color: color-mix(in srgb, var(--skill-color, #ff5a45) 72%, rgba(255, 255, 255, 0.24));
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow:
    0 0 20px color-mix(in srgb, var(--skill-color, #ff5a45) 26%, transparent),
    0 12px 22px rgba(0, 0, 0, 0.26);
}

.battle-hub-skill-modal.hero-equip-modal .hero-equip-action:disabled {
  cursor: default;
  opacity: 0.58;
}

@media (max-width: 720px) {
  .battle-hub-skill-modal.hero-equip-modal .hero-equip-current-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 12px;
  }

  .battle-hub-skill-modal.hero-equip-modal .hero-equip-current-name {
    font-size: 15px;
  }

  .battle-hub-skill-modal.hero-equip-modal .hero-equip-picker-row {
    display: grid;
    gap: 12px;
  }

  .battle-hub-skill-modal.hero-equip-modal .hero-equip-action {
    width: 100%;
  }
}

.battle-hub-profile-rating {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  padding: 12px 14px;
  border-left: 1px solid rgba(135, 143, 156, 0.24);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent),
    radial-gradient(circle at top right, rgba(225, 22, 30, 0.16), transparent 54%);
  box-shadow: 0 0 0 color-mix(in srgb, var(--avatar-accent, #39c1d9) 0%, transparent);
  transition:
    border-color 260ms ease,
    box-shadow 360ms ease,
    filter 260ms ease;
}

.battle-hub-profile-rating-label,
.battle-hub-profile-rating-detail {
  overflow: hidden;
  max-width: 100%;
  color: #9fabb6;
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.08em;
}

.battle-hub-profile-rating-value {
  max-width: 100%;
  overflow: hidden;
  color: #fff2eb;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 0.92;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(225, 22, 30, 0.24);
}

#battle-hub-player-rating-value {
  text-shadow: none !important;
}

.battle-hub-presence-block {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid rgba(135, 143, 156, 0.22);
}

.battle-hub-presence-head {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.battle-hub-presence-head span {
  display: none;
}

#join-form .battle-hub-presence-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 86px;
  min-height: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #22c55e;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  text-shadow: 0 0 12px rgba(34, 197, 94, 0.22);
}

#join-form .battle-hub-presence-refresh::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background:
    conic-gradient(from 35deg, transparent 0 58deg, #22c55e 96deg, #38bdf8 190deg, #facc15 285deg, transparent 360deg);
  opacity: 0;
  transform: scale(0.72) rotate(0deg);
  will-change: opacity, transform, filter;
  filter:
    drop-shadow(0 0 5px rgba(34, 197, 94, 0.36))
    drop-shadow(0 0 9px rgba(56, 189, 248, 0.18));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
  transition:
    opacity 220ms ease,
    transform 260ms ease,
    filter 220ms ease;
}

#join-form .battle-hub-presence-refresh.is-refreshing::after {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  animation: battleHubRefreshLoaderSpin 820ms linear infinite;
}

#join-form .battle-hub-presence-refresh:hover,
#join-form .battle-hub-presence-refresh:focus-visible {
  color: #86efac;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  text-shadow:
    0 0 10px rgba(34, 197, 94, 0.34),
    0 0 22px rgba(34, 197, 94, 0.18);
}

@keyframes battleHubRefreshLoaderSpin {
  100% {
    transform: scale(1) rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #join-form .battle-hub-presence-refresh.is-refreshing::after {
    animation: none;
  }
}

.battle-hub-presence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.battle-hub-presence span {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 6px 5px;
  border: 1px solid rgba(135, 143, 156, 0.18);
  border-radius: 6px;
  background: rgba(7, 9, 12, 0.42);
  text-align: center;
}

.battle-hub-presence b {
  overflow: hidden;
  color: #9fabb6;
  font-size: 9px;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.battle-hub-presence strong {
  overflow: hidden;
  color: #fff2eb;
  font-size: 13px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.battle-hub-presence strong.hot {
  color: #22c55e;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.32);
}

.battle-hub-version-slot {
  display: none;
}

.cw-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, 0.04) 18px 19px, transparent 19px),
    linear-gradient(-45deg, transparent 0 18px, rgba(255, 255, 255, 0.04) 18px 19px, transparent 19px);
  opacity: 0.55;
}

.cw-kicker,
.providers-title,
.rooms-head,
.rating-mode-label,
.death-rewards-title {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: #9fabb6;
}

.cw-progress {
  display: grid;
  gap: 6px;
  width: 100%;
}

.cw-progress-track {
  width: 100%;
  height: 10px;
  border: 1px solid rgba(168, 177, 188, 0.3);
  background: rgba(8, 8, 10, 0.88);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  overflow: hidden;
}

.cw-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7f0509, #e1161e 52%, #ff6b4b);
  box-shadow: 0 0 16px rgba(225, 22, 30, 0.48);
}

.cw-progress-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c8b5ad;
}

.cw-hero-card,
.cw-stat-tile,
.cw-panel,
.cw-run-card,
.rooms-browser,
.profile-card,
.news-card,
.record-details-card,
.auth-card,
#menu-panel-menu #info-panel {
  position: relative;
  border: 1px solid rgba(135, 143, 156, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(19, 19, 21, 0.96), rgba(8, 8, 10, 0.96)),
    radial-gradient(circle at top right, rgba(225, 22, 30, 0.08), transparent 34%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 -18px 34px rgba(101, 3, 12, 0.14),
    0 20px 44px rgba(0, 0, 0, 0.36);
}

.cw-panel,
.cw-run-card,
.cw-settings-row,
.profile-card,
.rooms-browser,
.news-card {
  padding: 16px;
}

.cw-shell .cw-panel.menu-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.cw-shell .cw-panel.menu-panel::before {
  content: none;
}

.cw-hero-card {
  padding: 14px 16px;
}

.cw-copy,
.auth-copy,
.cw-auth-headline,
.presence-meta,
.news-sub,
.profile-run-empty,
.profile-run-meta,
.news-item-meta,
#join-form .profile-run-row,
.news-comment-text,
.news-comment-date {
  color: #c1bab3;
}

.cw-hero-title,
.profile-run-history-title,
.news-main-title,
.news-item-title,
#record-details-title,
#game-version-title,
.providers-title {
  font-size: 20px;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #f8f0ea;
}

.cw-stat-tile {
  padding: 12px 14px;
}

.cw-stat-label {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #8f99a6;
}

.cw-stat-value {
  font-size: 20px;
  color: #fff5ee;
}

.cw-nav-tabs,
.auth-tabs,
.game-mode-options,
.rating-categories,
.providers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cw-button,
#join-form .main-menu-tab,
#join-form button,
.provider-btn,
.rating-category-btn,
.auth-tab,
.game-mode-option {
  position: relative;
  border: 1px solid rgba(138, 145, 160, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(23, 23, 25, 0.96), rgba(9, 9, 11, 0.98));
  color: #f4ede8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.cw-button:hover,
#join-form button:not(.battle-hub-hero-skill):not(.hero-arena-slot):not(.hero-node-up):not(.hero-detail-icon-button):not(.hero-node-detail-hit):not(.battle-hub-presence-refresh):hover,
.provider-btn:hover,
.game-mode-option:hover,
.auth-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(225, 22, 30, 0.52);
  box-shadow: 0 0 18px rgba(225, 22, 30, 0.2);
}

.cw-button-primary,
#join-form .main-menu-tab.active,
#join-form .auth-tab.active,
#join-form .game-mode-option.active,
.rating-category-btn.active {
  background:
    linear-gradient(180deg, rgba(121, 7, 12, 0.96), rgba(43, 6, 7, 0.98)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  border-color: rgba(255, 81, 81, 0.75);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(225, 22, 30, 0.16),
    0 0 22px rgba(225, 22, 30, 0.34);
}

#join-form .main-menu-tab.active::after,
#join-form .auth-tab.active::after,
#join-form .game-mode-option.active::after,
.rating-category-btn.active::after {
  content: "";
  position: absolute;
  inset: auto 10px -1px 10px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff4048, transparent);
  box-shadow: 0 0 10px rgba(255, 64, 72, 0.75);
}

#join-form .main-menu-tab,
.auth-tab,
.rating-category-btn,
.provider-btn {
  min-height: 46px;
  padding: 0 16px;
}

#join-form .actions button,
.auth-action {
  min-height: 52px;
  padding: 0 18px;
}

.cw-shell .menu-panel {
  display: none;
  gap: 16px;
}

.cw-shell .menu-panel.active {
  display: grid;
  height: 100%;
  min-height: 0;
}

.cw-shell #menu-panel-play,
.cw-shell #menu-panel-characters,
.cw-shell #menu-panel-skills,
.cw-shell #menu-panel-profile,
.cw-shell #menu-panel-rating,
.cw-shell #menu-panel-news,
.cw-shell #menu-panel-menu {
  grid-template-areas: none;
  grid-auto-flow: row;
}

.cw-menu-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: start;
}

.cw-column {
  display: grid;
  gap: 16px;
}

.cw-subpanel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cw-subpanel-emphasis {
  background:
    radial-gradient(circle at top left, rgba(120, 9, 15, 0.22), transparent 38%),
    linear-gradient(180deg, rgba(20, 14, 16, 0.98), rgba(8, 8, 10, 0.98));
}

.run-setup-host,
.campaign-browser-host {
  display: grid;
  gap: 14px;
}

.campaign-browser-host {
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  align-items: start;
}

.run-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.run-type-tab {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(135, 143, 156, 0.24);
  border-radius: 999px;
  background: rgba(10, 12, 18, 0.78);
  color: #f0ece7;
  cursor: pointer;
}

.run-type-tab.active {
  border-color: rgba(255, 81, 81, 0.7);
  background: linear-gradient(180deg, rgba(121, 7, 12, 0.92), rgba(43, 6, 7, 0.96));
  box-shadow: 0 0 20px rgba(225, 22, 30, 0.24);
}

.run-setup-copy,
.run-campaign-note,
.campaign-passive-copy,
.run-setup-empty {
  color: #b5bfca;
  font-size: 13px;
  line-height: 1.55;
}

.run-map-grid,
.campaign-card-grid,
.campaign-level-list {
  display: grid;
  gap: 12px;
}

.run-map-grid,
.campaign-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.campaign-level-list {
  grid-template-columns: 1fr;
}

.run-map-card,
.campaign-card,
.campaign-level-card {
  display: grid;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(135, 143, 156, 0.22);
  border-radius: 14px;
  background: rgba(10, 12, 18, 0.78);
  color: #f0ece7;
  padding: 12px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.run-map-card:hover,
.campaign-card:hover,
.campaign-level-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 81, 81, 0.36);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.run-map-card.is-selected,
.campaign-card.is-selected,
.campaign-level-card.is-selected {
  border-color: rgba(255, 81, 81, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 81, 81, 0.2), 0 0 22px rgba(225, 22, 30, 0.2);
}

.campaign-level-card.is-locked {
  opacity: 0.58;
  cursor: not-allowed;
}

.run-map-cover,
.campaign-card-cover {
  position: relative;
  display: block;
  min-height: 92px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 18% 18%, var(--cover-glow, rgba(255,255,255,0.18)), transparent 34%),
    linear-gradient(135deg, var(--cover-from, #182230), var(--cover-to, #0b1017));
}

.run-map-cover,
.campaign-card-cover {
  isolation: isolate;
}

.run-map-cover img,
.campaign-card-cover img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.run-map-cover.has-image::before,
.campaign-card-cover.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 7, 10, 0.08), rgba(5, 7, 10, 0.38)),
    radial-gradient(circle at 18% 18%, var(--cover-glow, rgba(255,255,255,0.18)), transparent 40%);
}

.campaign-card-cover {
  min-height: 118px;
  padding: 12px;
  align-content: end;
}

.campaign-card-cover b {
  position: relative;
  z-index: 3;
  align-self: end;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
}

.run-map-cover::after,
.campaign-card-cover::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: auto -8% -18% 40%;
  height: 88px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--cover-accent, #f97316), transparent 68%);
  opacity: 0.42;
  filter: blur(22px);
}

.run-map-name,
.campaign-detail-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff7ed;
}

.run-map-subtitle,
.campaign-card-head small,
.campaign-level-brief,
.campaign-level-scenario {
  color: #b5bfca;
  font-size: 12px;
  line-height: 1.45;
}

#join-form .run-map-card,
#join-form .run-map-name,
#join-form .run-map-subtitle {
  text-transform: none;
  letter-spacing: 0;
}

#join-form .run-map-subtitle {
  font-size: 13px;
  line-height: 1.5;
}

#join-form .campaign-card,
#join-form .campaign-card-head,
#join-form .campaign-card-head strong,
#join-form .campaign-card-head small,
#join-form .campaign-card-desc,
#join-form .campaign-level-card,
#join-form .campaign-level-head,
#join-form .campaign-level-head b,
#join-form .campaign-level-head small,
#join-form .campaign-level-brief,
#join-form .campaign-level-scenario {
  text-transform: none;
  letter-spacing: 0;
}

#join-form .campaign-card-head small,
#join-form .campaign-card-desc,
#join-form .campaign-level-brief,
#join-form .campaign-level-scenario {
  font-size: 13px;
  line-height: 1.5;
}

.run-map-meta,
.campaign-card-stats,
.campaign-detail-meta {
  color: #fca5a5;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0.02em;
}

.campaign-card-stats.is-complete {
  color: #9fd7aa;
  font-weight: 800;
  text-shadow: 0 0 14px rgba(74, 222, 128, 0.18);
}

.campaign-card-head {
  display: grid;
  width: 100%;
  gap: 7px;
  align-items: start;
}

.campaign-card-head strong,
.campaign-card-head small,
.campaign-card-desc {
  display: block;
  width: 100%;
}

.campaign-card-head strong {
  color: #fff7ed;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 800;
}

.campaign-level-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.campaign-level-status {
  flex: 0 0 auto;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

.campaign-level-status.is-completed {
  color: #8bd79b;
  text-shadow: 0 0 14px rgba(34, 197, 94, 0.22);
}

.campaign-level-status.is-available {
  color: #e6bf68;
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.campaign-level-status.is-locked {
  color: #a8b0bd;
  opacity: 0.82;
}

.campaign-card-desc {
  color: #d4dce6;
  font-size: 13px;
  line-height: 1.5;
}

.campaign-detail-shell {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.campaign-detail-main {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(135, 143, 156, 0.2);
  background: rgba(8, 10, 16, 0.74);
}

.campaign-detail-copy {
  color: #d7dde6;
  font-size: 13px;
  line-height: 1.55;
}

.campaign-level-goals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.run-goal-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(253, 186, 116, 0.26);
  background: rgba(65, 27, 11, 0.5);
  color: #fed7aa;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.cw-shell label,
#join-form .sync-grid label,
#join-form .field-row label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9ea8b5;
}

#join-form input,
#join-form select,
#join-form textarea {
  min-height: 46px;
  border: 1px solid rgba(135, 143, 156, 0.28);
  border-radius: 10px;
  background: rgba(6, 6, 8, 0.9);
  color: #f0ece7;
  padding: 0 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

#join-form textarea {
  min-height: 110px;
  padding: 12px 14px;
  resize: vertical;
}

#join-form input:focus,
#join-form select:focus,
#join-form textarea:focus {
  outline: none;
  border-color: rgba(255, 81, 81, 0.8);
  box-shadow:
    0 0 0 1px rgba(255, 81, 81, 0.2),
    0 0 18px rgba(225, 22, 30, 0.2);
}

.auth-card-summary {
  list-style: none;
  margin: -16px -16px 0;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(135, 143, 156, 0.18);
}

.auth-card-body {
  display: grid;
  gap: 14px;
  padding-top: 14px;
}

.auth-panel {
  display: none;
  gap: 10px;
}

.auth-panel.active {
  display: grid;
}

.providers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.provider-btn:disabled {
  opacity: 0.74;
}

.cw-auth-headline {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.auth-summary-nickname {
  color: #6ff0a6;
  font-weight: 700;
}

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

.player-access-host {
  display: grid;
  min-width: 0;
}

.cw-profile-auth-slot {
  grid-column: 1 / -1;
}

.player-access-card.is-profile-access-card {
  min-width: 0;
}

.player-access-card.is-profile-access-card #player-access-details {
  max-width: none;
}

.cw-profile-main,
.cw-profile-side {
  display: grid;
  gap: 16px;
  align-content: start;
}

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

.cw-profile-side {
  align-self: start;
}

.profile-run-history-head,
.profile-run-history-pager,
.rooms-head,
.news-detail-actions,
.news-comment-head,
.news-comment-actions,
.news-comment-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rooms-head {
  margin-bottom: 12px;
}

.rooms-list,
.profile-run-list,
.news-items,
.news-comments-wrap,
.hero-gallery-v2,
.profile-hero-list {
  display: grid;
  gap: 10px;
}

#join-form.cw-shell .character-select {
  display: block;
}

#menu-panel-skills #character-label,
#menu-panel-skills .character-select {
  display: none !important;
}

#menu-panel-skills .hero-tree-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  min-height: 0;
}

#menu-panel-skills .hero-loadout-shell > .hero-loadout-card:first-child:not(.hero-profile-card) {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

#menu-panel-skills .hero-skill-panels-row {
  grid-template-columns: 1fr;
}

#menu-panel-skills .hero-skill-panels-row .hero-loadout-card {
  border: 1px solid rgba(135, 143, 156, 0.22);
  background: rgba(10, 12, 18, 0.7);
}

.profile-run-row,
.news-item-button,
.record-row.rating-row,
.news-comment,
.profile-hero-row {
  border: 1px solid rgba(135, 143, 156, 0.22);
  border-radius: 12px;
  background: rgba(12, 12, 14, 0.78);
}

#join-form .profile-run-row,
.news-item-button,
.record-row.rating-row {
  padding: 12px 14px;
}

.profile-run-main,
.profile-run-head,
.record-row.rating-row,
.profile-hero-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
}

.news-item-button {
  text-align: left;
}

.news-item-button:hover,
#join-form .profile-run-row:hover {
  border-color: rgba(225, 22, 30, 0.4);
  transform: translateY(-1px);
}

.record-row.rating-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
}

.record-rank,
.record-name,
.record-meta,
.rating-value-text {
  color: #f0ece7;
}

.record-name {
  text-transform: none !important;
}

.record-name button {
  text-transform: none !important;
}

.record-rank {
  font-weight: 900;
  color: #ff9a7a;
}

.rating-mode-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}

.news-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid rgba(225, 22, 30, 0.36);
}

.news-comment {
  padding: 12px 14px;
}

.news-comment-replies {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-left: 14px;
  border-left: 1px solid rgba(225, 22, 30, 0.22);
}

.cw-skill-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.cw-skill-node {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(135, 143, 156, 0.22);
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.88);
  color: #ddd5cf;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.cw-skill-node-core {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #676f7a;
  box-shadow: 0 0 10px rgba(103, 111, 122, 0.35);
}

.cw-skill-node.is-ready .cw-skill-node-core {
  background: #39c1d9;
}

.cw-skill-node.is-locked .cw-skill-node-core {
  background: #8a1d24;
}

.cw-skill-node.is-elite .cw-skill-node-core {
  background: #e1161e;
  box-shadow: 0 0 12px rgba(225, 22, 30, 0.65);
}

.hero-gallery-v2 {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.hero-tree-panel,
#info-panel-menu-host {
  min-height: 320px;
}

.join-feedback,
.auth-feedback,
.hero-action-feedback {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(225, 22, 30, 0.25);
  background: rgba(70, 10, 14, 0.42);
}

.death-result {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 1180px) {
  #join-form.cw-shell {
    width: calc(100vw - 18px);
    margin: 9px;
  }

  .cw-shell-grid,
  .cw-menu-grid,
  .cw-profile-grid {
    grid-template-columns: 1fr;
  }

  .cw-profile-main,
  .cw-profile-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  #join-form.cw-shell {
    padding: 10px;
    gap: 14px;
  }

  .cw-shell-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .battle-hub-player-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 10px;
  }

  .battle-hub-player-avatar-wrap {
    grid-column: 1 / -1;
    min-height: 0;
    height: clamp(176px, 46vw, 260px);
    border-radius: 10px;
  }

  .battle-hub-player-avatar-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(180deg, transparent 42%, rgba(4, 7, 12, 0.18) 68%, rgba(4, 7, 12, 0.72) 100%),
      radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--avatar-accent) 20%, transparent), transparent 38%);
  }

  .battle-hub-player-avatar {
    object-position: center 22%;
  }

  .battle-hub-player-level {
    z-index: 2;
    right: 8px;
    bottom: 8px;
  }

  .battle-hub-player-body {
    grid-column: 1 / -1;
  }

  .battle-hub-profile-rating {
    grid-column: 1 / -1;
    justify-items: center;
    border-top: 1px solid rgba(135, 143, 156, 0.24);
    border-left: 0;
    padding: 10px 2px 0;
  }

  .battle-hub-profile-rating-label,
  .battle-hub-profile-rating-detail,
  .battle-hub-profile-rating-value {
    text-align: center;
  }

  .battle-hub-profile-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .battle-hub-hero-skills-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .providers-grid,
  .record-row.rating-row {
    grid-template-columns: 1fr;
  }

  .cw-nav-tabs,
  .auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #join-form .main-menu-tab:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 460px) {
  .battle-hub-player-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 9px;
  }

  .battle-hub-player-avatar-wrap {
    height: clamp(158px, 58vw, 224px);
  }

  .battle-hub-player-name {
    font-size: 24px;
  }

  .battle-hub-player-top {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .battle-hub-player-meta {
    justify-content: flex-start;
  }

  .battle-hub-player-meta {
    flex-wrap: wrap;
  }

  .battle-hub-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Crimson Wars readability + settings polish */
#join-form.cw-shell {
  padding: 10px;
  box-sizing: border-box;
  font-family: "Segoe UI Variable Text", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.45;
}

.cw-panel,
.cw-settings-row,
.profile-card,
.rooms-browser,
.news-card,
.auth-card,
#menu-panel-menu #info-panel,
#join-form input,
#join-form select,
#join-form textarea,
.cw-button,
#join-form .main-menu-tab,
#join-form button,
.provider-btn,
.rating-category-btn,
.auth-tab,
.game-mode-option {
  border-radius: 9px;
}

.cw-kicker,
.providers-title,
.rooms-head,
.rating-mode-label,
.death-rewards-title,
#join-form label,
.presence-meta,
.cw-copy,
.auth-copy,
.cw-auth-headline {
  letter-spacing: 0.04em;
}

#join-form,
#join-form input,
#join-form select,
#join-form textarea,
#join-form button {
  font-family: inherit;
}

#join-form input,
#join-form select,
#join-form textarea {
  display: block;
  width: 100%;
  min-height: 40px;
  margin-bottom: 12px;
}

#join-form textarea {
  min-height: 96px;
}

#join-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0 40px 0 14px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(240, 236, 231, 0.9) 50%),
    linear-gradient(135deg, rgba(240, 236, 231, 0.9) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

#join-form .main-menu-tab,
#join-form button,
.provider-btn,
.rating-category-btn,
.auth-tab,
.game-mode-option {
  letter-spacing: 0.04em;
  font-weight: 700;
}

#menu-panel-menu,
#menu-panel-play,
#menu-panel-characters,
#menu-panel-skills,
#menu-panel-profile,
#menu-panel-rating,
#menu-panel-news {
  padding: 18px;
}

#info-panel-menu-host {
  min-height: 320px;
  padding: 10px;
}

#info-panel-menu-host #info-panel {
  border-radius: 9px;
  padding: 18px 18px 16px;
}

#info-panel-menu-host #info-panel p {
  margin: 0 0 8px;
  color: #d3d8df;
}

#info-panel-menu-host #info-panel .panel-head {
  margin-bottom: 12px;
}

#info-panel-menu-host #info-panel h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: none;
}

#info-panel-menu-host .settings-toggles {
  margin-top: 14px;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px 22px;
}

#info-panel-menu-host .shadow-option {
  min-width: 0;
}

#info-panel-menu-host .shadow-option label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
  color: #d9dde3;
  font-size: 14px;
  line-height: 1.2;
}

#info-panel-menu-host .shadow-option input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
}

#info-panel-menu-host .shadow-range-option {
  display: grid;
  gap: 8px;
}

#info-panel-menu-host .shadow-range-option label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

#player-access-details.is-authenticated .cw-auth-headline,
#player-access-details.is-authenticated .auth-tabs,
#player-access-details.is-authenticated .auth-panel,
#player-access-details.is-authenticated .providers-card,
#player-access-details.is-authenticated #player-auth-feedback {
  display: none !important;
}

#player-access-details.needs-nickname-setup .auth-rename-panel {
  display: grid !important;
  gap: 10px;
  margin-top: 14px;
}

#player-access-details.needs-nickname-setup #player-auth-feedback {
  display: block !important;
}

#player-access-details.is-authenticated .auth-card-body {
  gap: 0;
}

#player-access-details.is-authenticated .auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#player-access-details.is-collapsed {
  display: none;
}

#player-access-details {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

#player-access-details .auth-card-body {
  padding-top: 0;
}

#profile-character-stats {
  align-self: start;
  align-content: start;
  align-items: start;
}

#profile-character-stats > b {
  display: block;
  margin-bottom: 10px;
}

#profile-character-stats .profile-hero-list {
  display: grid;
  gap: 12px;
  align-content: start;
}

#profile-character-stats .profile-hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(140px, auto) auto;
  align-items: start;
  gap: 10px 18px;
  padding: 14px 16px;
  border: 1px solid rgba(135, 143, 156, 0.22);
  border-radius: 10px;
  background: rgba(12, 12, 14, 0.78);
  font-size: 13px;
  line-height: 1.4;
}

#profile-character-stats .profile-hero-row span {
  display: block;
}

#profile-character-stats .profile-hero-row span:first-child {
  font-weight: 700;
  color: #f0ece7;
}

#profile-character-stats .profile-hero-row span:nth-child(2) {
  color: #c9d2dd;
}

#profile-character-stats .profile-hero-row span:last-child {
  justify-self: end;
  color: #7df0a8;
  font-weight: 700;
}

@media (max-width: 720px) {
  #profile-character-stats .profile-hero-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #profile-character-stats .profile-hero-row span:last-child {
    justify-self: start;
  }
}

/* Hide skills nav button for now */
#main-menu-tabs [data-menu-tab="skills"] {
  display: none !important;
}

/* Rating controls layout */
#rating-board {
  align-content: start;
}

#rating-board .rating-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

#rating-board .rating-header-row > b {
  display: block;
  margin: 0;
}

#rating-board .rating-mode-wrap {
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 10px;
  margin: 0;
}

#rating-board .rating-mode-select {
  width: auto;
  min-width: 180px;
  max-width: 220px;
}

#rating-board .rating-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  width: 100%;
  margin-bottom: 16px;
}

#rating-board .rating-category-btn {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  text-align: center;
  padding: 10px 14px;
}

@media (max-width: 820px) {
  #rating-board .rating-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  #rating-board .rating-mode-wrap {
    align-items: start;
  }

  #rating-board .rating-categories {
    grid-template-columns: 1fr;
  }
}

#news-feed .news-item-title,
#news-feed .news-main-title {
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.25;
  font-weight: 400;
}

#news-feed .news-item-meta,
#news-feed .news-sub {
  text-transform: none;
  letter-spacing: 0.01em;
}

/* Settings rebuilt layout */
#menu-panel-menu {
  padding: 20px 22px 22px;
}

#menu-panel-menu > .cw-settings-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#menu-panel-menu > .cw-settings-shell > .cw-subpanel-head,
#menu-panel-menu > .cw-settings-shell > .settings-source-host {
  display: none !important;
}

#menu-panel-menu .cw-settings-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  align-content: start;
}

#menu-panel-menu .cw-settings-section + .cw-settings-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(135, 143, 156, 0.18);
}

#settings-sync-card {
  margin-top: 22px;
}

#settings-sync-card .cw-copy {
  margin: 0 0 12px;
  color: #b9c2ce;
  line-height: 1.45;
}

#settings-sync-card .sync-settings {
  margin: 0;
}

#menu-panel-menu .cw-settings-host {
  display: grid;
  gap: 14px;
  align-content: start;
}

#menu-panel-menu .cw-settings-host > p,
#menu-panel-menu .cw-settings-host > .settings-toggles {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#menu-panel-menu .cw-settings-host > p {
  color: #d3d8df;
  line-height: 1.45;
}

#settings-graphics-host > p {
  display: grid;
  gap: 10px;
  max-width: 300px;
  padding: 12px 14px;
  border: 1px solid rgba(135, 143, 156, 0.18);
  border-radius: 12px;
  background: rgba(10, 12, 18, 0.72);
}

#settings-graphics-host > p .cw-settings-inline-label {
  color: #b9c2ce;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#settings-graphics-host > p select {
  max-width: 220px;
}

#settings-toggles-host .settings-toggles {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
  margin: 0;
}

#settings-toggles-host .shadow-option {
  margin: 0;
  min-height: 0;
  padding: 0 !important;
  border: 1px solid rgba(135, 143, 156, 0.2);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(10, 12, 17, 0.92), rgba(7, 9, 13, 0.96)),
    radial-gradient(circle at top right, rgba(225, 22, 30, 0.05), transparent 36%);
}

#settings-toggles-host .shadow-option label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  padding: 10px 14px !important;
  white-space: normal;
  color: #d9dde3;
  font-size: 13px;
  line-height: 1.2;
}

#settings-toggles-host .shadow-option input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
}

#settings-toggles-host .shadow-range-option {
  display: grid;
  gap: 8px;
}

#settings-toggles-host .shadow-range-option label {
  display: flex;
  justify-content: space-between;
  grid-template-columns: none;
}

#settings-toggles-host .shadow-range-option input[type="range"] {
  width: calc(100% - 28px);
  margin: 0 14px 10px;
}

@media (max-width: 980px) {
  #settings-toggles-host .settings-toggles {
    grid-template-columns: 1fr;
  }
}

/* Settings rebuild */
#menu-panel-menu {
  padding: 20px 22px 22px;
}

#menu-panel-menu .cw-settings-row {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  gap: 0;
}

#menu-panel-menu .cw-subpanel-head {
  margin: 0 0 16px;
  padding: 0 2px;
}

#info-panel-menu-host {
  min-height: 0;
  padding: 0;
}

#info-panel-menu-host #info-panel {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#info-panel-menu-host #info-panel .panel-head,
#info-panel-menu-host #info-panel-close {
  display: none !important;
}

#info-panel-menu-host #info-panel > p,
#info-panel-menu-host #info-panel > .settings-toggles,
#info-panel-menu-host #info-panel > .session-exit-btn {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(135, 143, 156, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(19, 19, 21, 0.96), rgba(8, 8, 10, 0.96)),
    radial-gradient(circle at top right, rgba(225, 22, 30, 0.06), transparent 34%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 12px 28px rgba(0, 0, 0, 0.18);
}

#info-panel-menu-host #info-panel > p {
  color: #d3d8df;
  line-height: 1.45;
}

#info-panel-menu-host #info-panel > p:has(#quality-select),
#info-panel-menu-host #info-panel > p:has(#language-select),
#info-panel-menu-host #info-panel > p:has(#game-sfx-volume) {
  display: grid;
  gap: 10px;
}

#info-panel-menu-host #info-panel > p:has(#language-select) {
  max-width: 300px;
}

#info-panel-menu-host #language-select {
  width: 96% !important;
  max-width: none !important;
  margin: 0 auto 10px !important;
  padding-left: 16px;
  padding-right: 42px;
}

#language-select {
  width: 96% !important;
  max-width: none !important;
  margin: 0 auto 10px !important;
}

#info-panel-menu-host .settings-toggles {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

#info-panel-menu-host .shadow-option {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(135, 143, 156, 0.16);
  border-radius: 10px;
  background: rgba(8, 11, 16, 0.72);
}

#info-panel-menu-host .shadow-option label {
  white-space: normal;
}

#info-panel-menu-host .session-exit-btn {
  width: fit-content;
  justify-self: start;
}

@media (max-width: 980px) {
  #info-panel-menu-host .settings-toggles {
    grid-template-columns: 1fr;
  }
}

/* Characters layout: roster full width, loadout below */
#menu-panel-characters {
  grid-template-columns: 1fr;
  height: auto !important;
  min-height: max-content;
  align-content: start;
}

#menu-panel-play,
#menu-panel-menu,
#menu-panel-news {
  height: auto !important;
  min-height: max-content;
  align-content: start;
}

#menu-panel-characters .hero-gallery-v2 {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  grid-template-columns: none;
  gap: 6px;
  align-items: start;
  justify-items: stretch;
  width: 100%;
  min-width: 0;
  margin: -18px -12px -20px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 24px 12px 34px;
  scrollbar-width: thin;
}

#menu-panel-characters .hero-gallery-v2 .hero-v2-item {
  min-width: 0;
}

#menu-panel-characters .hero-gallery-v2 .hero-v2-card {
  aspect-ratio: 2 / 3;
  width: 100%;
  height: auto;
  min-width: 0;
  max-width: none;
}

#join-form #menu-panel-characters .hero-gallery-v2 .hero-v2-card:hover,
#join-form #menu-panel-characters .hero-gallery-v2 .hero-v2-card.focused {
  border-color: color-mix(in srgb, var(--accent, #38bdf8) 78%, #f8fafc) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent, #38bdf8) 62%, transparent),
    0 0 22px color-mix(in srgb, var(--accent, #38bdf8) 38%, transparent),
    0 18px 36px rgba(0, 0, 0, 0.38) !important;
}

#join-form #menu-panel-characters .hero-gallery-v2 .hero-v2-card.active,
#join-form #menu-panel-characters .hero-gallery-v2 .hero-v2-card.active:hover,
#join-form #menu-panel-characters .hero-gallery-v2 .hero-v2-card.active.focused {
  border-color: color-mix(in srgb, var(--accent, #38bdf8) 90%, #fff) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent, #38bdf8) 70%, transparent),
    0 0 28px color-mix(in srgb, var(--accent, #38bdf8) 52%, transparent),
    0 18px 36px rgba(0, 0, 0, 0.4) !important;
}

#menu-panel-characters .hero-gallery-v2 .hero-v2-inner {
  inset: 0;
  border: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 20%, rgba(148, 163, 184, 0.22), rgba(15, 23, 42, 0.78) 58%, rgba(2, 6, 23, 0.94)),
    linear-gradient(180deg, rgba(10, 12, 18, 0.96), rgba(5, 6, 9, 0.98));
}

#menu-panel-characters .hero-gallery-v2 .hero-v2-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

#menu-panel-characters .hero-gallery-v2.hero-arena-roster {
  display: block;
  width: 100%;
  min-width: 0;
  margin: -4px 0 -6px;
  padding: 0;
  overflow: visible;
}

#menu-panel-characters > .cw-subpanel.hero-roster-panel-collapsed {
  display: none !important;
}

.hero-arena-roster-shell {
  --arena-accent: #38bdf8;
  position: relative;
  display: grid;
  gap: 12px;
  overflow: hidden;
  min-height: 214px;
  padding: 14px 16px 16px;
  border: 1px solid color-mix(in srgb, var(--arena-accent) 34%, rgba(135, 143, 156, 0.22));
  border-radius: 8px 8px 0 0;
  background:
    radial-gradient(ellipse at 50% 16%, color-mix(in srgb, var(--arena-accent) 13%, transparent), transparent 42%),
    linear-gradient(90deg, rgba(2, 4, 9, 0.96), rgba(7, 11, 18, 0.76) 48%, rgba(2, 4, 9, 0.96)),
    linear-gradient(180deg, #0a0d13 0%, #05070b 58%, #020306 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 -34px 42px rgba(0, 0, 0, 0.52),
    0 16px 34px rgba(0, 0, 0, 0.28);
  isolation: isolate;
}

.hero-arena-roster-shell::before,
.hero-arena-roster-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.hero-arena-roster-shell::before {
  inset: 0;
  opacity: 0.48;
  background:
    linear-gradient(90deg, rgba(2, 4, 9, 0.94) 0%, rgba(2, 4, 9, 0.24) 46%, rgba(2, 4, 9, 0.95) 100%),
    linear-gradient(180deg, rgba(2, 4, 9, 0.76), rgba(2, 4, 9, 0.9)),
    url("/assets/backgrounds/screen-replay.jpg") center 48% / cover no-repeat;
  filter: grayscale(0.55) saturate(0.5) brightness(0.56) contrast(1.08);
  transform: scale(1.02);
}

.hero-arena-roster-shell::after {
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 8%, color-mix(in srgb, var(--arena-accent) 18%, transparent) 18%, transparent 33% 67%, rgba(148, 163, 184, 0.08) 82%, transparent 94%),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.06) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.045) 0 1px, transparent 1px 42px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, transparent 28%, rgba(0, 0, 0, 0.36) 64%, rgba(0, 0, 0, 0.76) 100%);
  opacity: 0.86;
}

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

.hero-arena-roster-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.hero-arena-roster-head > div:first-child,
.hero-arena-roster-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.hero-arena-roster-head span,
.hero-arena-roster-meta span {
  color: #9aa7b8;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-arena-roster-head strong {
  color: #fff2eb;
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.12);
}

.hero-arena-roster-meta {
  justify-items: end;
  text-align: right;
}

.hero-arena-roster-meta b {
  overflow: hidden;
  max-width: 280px;
  color: color-mix(in srgb, var(--arena-accent) 52%, #f8fafc);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-arena-selected-hero {
  --name-accent: var(--arena-accent, #38bdf8);
  position: relative;
  display: grid;
  grid-template-columns: minmax(44px, 1fr) minmax(0, auto) minmax(44px, 1fr);
  align-items: center;
  gap: 14px;
  width: min(100%, 720px);
  min-width: 0;
  margin: -2px auto 0;
  padding: 1px 0 5px;
  isolation: isolate;
}

.hero-arena-selected-hero::before,
.hero-arena-selected-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  pointer-events: none;
  transform: translateX(-50%);
}

.hero-arena-selected-hero::before {
  z-index: -1;
  top: 50%;
  width: min(76%, 520px);
  height: 44px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--name-accent) 36%, transparent), transparent),
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.12), transparent 64%);
  filter: blur(12px);
  opacity: 0.54;
  transform: translate(-50%, -50%);
}

.hero-arena-selected-hero::after {
  right: 16%;
  bottom: 0;
  width: min(58%, 360px);
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--name-accent) 88%, #ffffff), transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--name-accent) 58%, transparent);
  opacity: 0.76;
}

.hero-arena-selected-line {
  display: block;
  height: 1px;
  min-width: 0;
  opacity: 0.76;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--name-accent) 64%, rgba(255, 255, 255, 0.28)));
  box-shadow: 0 0 12px color-mix(in srgb, var(--name-accent) 36%, transparent);
}

.hero-arena-selected-line:last-child {
  background: linear-gradient(90deg, color-mix(in srgb, var(--name-accent) 64%, rgba(255, 255, 255, 0.28)), transparent);
}

.hero-arena-selected-copy {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  padding: 2px 18px 3px;
}

.hero-arena-selected-copy::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 22px;
  border: 1px solid color-mix(in srgb, var(--name-accent) 24%, transparent);
  border-right: 0;
  border-left: 0;
  opacity: 0.42;
  transform: translateY(-50%) skewX(-16deg);
  pointer-events: none;
}

.hero-arena-selected-kicker,
.hero-arena-selected-sub {
  position: relative;
  z-index: 1;
  overflow: hidden;
  max-width: 100%;
  color: #9aa7b8;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-arena-selected-kicker {
  color: color-mix(in srgb, var(--name-accent) 42%, #cbd5e1);
}

.hero-arena-selected-title {
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  max-width: min(48ch, 100%);
  color: #fff7ed;
  font-size: 30px;
  font-weight: 950;
  line-height: 0.96;
  letter-spacing: 0;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow:
    0 0 1px #ffffff,
    0 0 18px color-mix(in srgb, var(--name-accent) 44%, transparent),
    0 0 34px rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-arena-selected-title::before,
.hero-arena-selected-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-arena-selected-title::before {
  color: color-mix(in srgb, var(--name-accent) 82%, #ffffff);
  transform: translateX(-2px);
}

.hero-arena-selected-title::after {
  color: #fb7185;
  transform: translateX(2px);
}

.hero-arena-selected-sub {
  color: #d7dde6;
  font-size: 11px;
}

.hero-arena-selected-hero.is-name-reveal {
  animation: heroArenaSelectedNamePanel 760ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-arena-selected-hero.is-name-reveal::before {
  animation: heroArenaSelectedNameGlow 1150ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-arena-selected-hero.is-name-reveal::after,
.hero-arena-selected-hero.is-name-reveal .hero-arena-selected-line {
  animation: heroArenaSelectedLine 760ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-arena-selected-hero.is-name-reveal .hero-arena-selected-title {
  animation: heroArenaSelectedNameReveal 860ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-arena-selected-hero.is-name-reveal .hero-arena-selected-title::before {
  animation: heroArenaSelectedNameGlitchA 640ms steps(2, end) 90ms both;
}

.hero-arena-selected-hero.is-name-reveal .hero-arena-selected-title::after {
  animation: heroArenaSelectedNameGlitchB 560ms steps(2, end) 130ms both;
}

@keyframes heroArenaSelectedNamePanel {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    filter: blur(6px) saturate(0.75);
  }

  48% {
    opacity: 1;
    transform: translateY(-1px) scale(1.012);
    filter: blur(0) saturate(1.25);
  }

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

@keyframes heroArenaSelectedNameGlow {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0.64);
  }

  38% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scaleX(1.12);
  }

  100% {
    opacity: 0.54;
    transform: translate(-50%, -50%) scaleX(1);
  }
}

@keyframes heroArenaSelectedLine {
  0% {
    opacity: 0;
    transform: scaleX(0.18);
  }

  52% {
    opacity: 1;
    transform: scaleX(1.04);
  }

  100% {
    opacity: 0.76;
    transform: scaleX(1);
  }
}

@keyframes heroArenaSelectedNameReveal {
  0% {
    opacity: 0.36;
    transform: translateY(8px) scale(0.94);
    filter: blur(4px) brightness(1.35);
  }

  34% {
    opacity: 1;
    transform: translateY(-2px) scale(1.045);
    filter: blur(0) brightness(1.4);
  }

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

@keyframes heroArenaSelectedNameGlitchA {
  0%, 100% {
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }

  18% {
    opacity: 0.78;
    clip-path: inset(0 0 58% 0);
  }

  36% {
    opacity: 0.42;
    clip-path: inset(62% 0 6% 0);
  }

  54% {
    opacity: 0.62;
    clip-path: inset(18% 0 43% 0);
  }
}

@keyframes heroArenaSelectedNameGlitchB {
  0%, 100% {
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }

  22% {
    opacity: 0.58;
    clip-path: inset(66% 0 0 0);
  }

  44% {
    opacity: 0.42;
    clip-path: inset(7% 0 70% 0);
  }

  66% {
    opacity: 0.5;
    clip-path: inset(38% 0 26% 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-arena-selected-hero.is-name-reveal,
  .hero-arena-selected-hero.is-name-reveal::before,
  .hero-arena-selected-hero.is-name-reveal::after,
  .hero-arena-selected-hero.is-name-reveal .hero-arena-selected-line,
  .hero-arena-selected-hero.is-name-reveal .hero-arena-selected-title,
  .hero-arena-selected-hero.is-name-reveal .hero-arena-selected-title::before,
  .hero-arena-selected-hero.is-name-reveal .hero-arena-selected-title::after {
    animation: none;
  }
}

.hero-arena-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 148px));
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  min-width: 0;
}

.hero-arena-slot {
  --accent: #38bdf8;
  --slot-rise: 0px;
  position: relative;
  display: grid;
  align-content: end;
  min-width: 0;
  height: 148px;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, rgba(226, 232, 240, 0.18));
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(9, 13, 22, 0.94), rgba(5, 7, 12, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 12px 26px rgba(0, 0, 0, 0.32);
  transform: translateY(var(--slot-rise)) skewX(-4deg);
  transform-origin: center bottom;
  cursor: pointer;
  isolation: isolate;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    transform 180ms ease;
}

.hero-arena-slot::before,
.hero-arena-slot::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 3;
}

.hero-arena-slot::before {
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(115deg, transparent 0 28%, rgba(255, 255, 255, 0.14), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 34%, rgba(0, 0, 0, 0.54));
  opacity: 0.46;
  transform: translateX(-18%);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.hero-arena-slot::after {
  inset: -28%;
  opacity: 0;
  background:
    radial-gradient(circle at 24% 20%, color-mix(in srgb, var(--accent) 48%, transparent), transparent 34%),
    linear-gradient(115deg, transparent 0 28%, rgba(255, 255, 255, 0.24), transparent 58%);
  transform: translateX(-34%) rotate(-8deg);
}

.hero-arena-slot:hover,
.hero-arena-slot:focus-visible,
.hero-arena-slot.focused {
  --slot-rise: -3px;
  border-color: color-mix(in srgb, var(--accent) 78%, #f8fafc);
  filter: brightness(1.08) saturate(1.08);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent),
    0 0 24px color-mix(in srgb, var(--accent) 42%, transparent),
    0 18px 34px rgba(0, 0, 0, 0.42);
}

#join-form .hero-arena-slot:hover,
#join-form .hero-arena-slot:focus-visible,
#join-form .hero-arena-slot.focused {
  transform: translateY(var(--slot-rise)) skewX(-4deg) !important;
  border-color: color-mix(in srgb, var(--accent) 78%, #f8fafc) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent) !important,
    0 0 24px color-mix(in srgb, var(--accent) 42%, transparent) !important,
    0 18px 34px rgba(0, 0, 0, 0.42) !important;
}

.hero-arena-slot:hover::before,
.hero-arena-slot:focus-visible::before,
.hero-arena-slot.focused::before {
  opacity: 0.74;
  transform: translateX(0);
}

.hero-arena-slot.active {
  border-color: color-mix(in srgb, var(--accent) 88%, #fff);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 64%, transparent),
    0 0 30px color-mix(in srgb, var(--accent) 52%, transparent),
    0 18px 34px rgba(0, 0, 0, 0.44);
}

.hero-arena-slot.is-roster-deselect-flash {
  animation: heroRosterCardDeselect 680ms cubic-bezier(.16, .9, .22, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .hero-arena-slot.is-roster-deselect-flash {
    animation: none;
  }
}

.hero-arena-slot.locked {
  filter: grayscale(0.42) brightness(0.78);
  opacity: 0.82;
}

.hero-arena-slot.is-roster-select-flash {
  animation: heroRosterCardSelectFlash 1.25s cubic-bezier(.16, .9, .22, 1) both;
}

.hero-arena-slot.is-roster-select-flash::after {
  animation: heroRosterCardSelectSweep 980ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-arena-slot.is-roster-select-flash .hero-arena-slot-portrait {
  animation: heroRosterCardInnerPulse 820ms cubic-bezier(.16, .9, .22, 1) both;
}

.hero-arena-slot > * {
  transform: skewX(4deg);
}

.hero-arena-slot-portrait {
  position: absolute;
  z-index: 1;
  inset: 5px 5px 30px;
  overflow: hidden;
  border-radius: 5px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  background: rgba(2, 6, 23, 0.72);
  transform: none;
  transform-origin: center center;
}

.hero-arena-slot-portrait img,
.hero-arena-slot-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scaleX(1.08);
  transform-origin: center center;
}

.hero-arena-slot-preview {
  image-rendering: pixelated;
}

.hero-arena-slot-badge {
  position: absolute;
  z-index: 4;
  top: 7px;
  left: 8px;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 46%, rgba(255, 255, 255, 0.16));
  background: rgba(0, 0, 0, 0.6);
  color: color-mix(in srgb, var(--accent) 62%, #f8fafc);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.hero-arena-slot-name,
.hero-arena-slot-status {
  position: relative;
  z-index: 2;
  min-width: 0;
  margin: 0 5px;
}

.hero-arena-slot-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 7px 3px;
  border-radius: 5px 5px 0 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 18%, rgba(0, 0, 0, 0.76)), rgba(0, 0, 0, 0.84));
  color: #f8fafc;
}

.hero-arena-slot-name b {
  overflow: hidden;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-arena-slot-name small {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--accent) 52%, #fef3c7);
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
}

.hero-arena-slot-status {
  display: block;
  overflow: hidden;
  padding: 0 7px 7px;
  border-radius: 0 0 5px 5px;
  background: rgba(0, 0, 0, 0.84);
  color: #aeb8c4;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#menu-panel-characters .hero-tree-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  min-height: 0;
}

#menu-panel-characters .hero-loadout-shell > .hero-loadout-card:first-child:not(.hero-profile-card) {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 0 6px;
}

#menu-panel-characters .hero-skill-panels-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

#menu-panel-characters #hero-character-panel > .hero-loadout-shell {
  display: grid;
  gap: 16px;
}

#menu-panel-characters #hero-character-panel > .hero-loadout-shell.hero-character-shell {
  gap: 12px;
}

#menu-panel-characters .hero-loadout-stage-portrait {
  padding-top: 24px;
}

#menu-panel-characters .hero-loadout-portrait-wrap.hero-loadout-portrait-large {
  display: none;
}

#menu-panel-characters .hero-ai3d-preview-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(103, 248, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(9, 20, 28, 0.96), rgba(4, 8, 13, 0.98)),
    radial-gradient(circle at top left, rgba(103, 248, 255, 0.18), transparent 46%);
  color: #dffbff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 10px 28px rgba(2, 8, 16, 0.28);
}

#menu-panel-characters .hero-ai3d-preview-link:hover {
  border-color: rgba(103, 248, 255, 0.62);
  color: #ffffff;
}

/* Play tab: normalize panel rhythm. */
#menu-panel-play {
  gap: 16px;
}

#menu-panel-play > #play-deploy-card {
  grid-column: 1 / -1;
}

#menu-panel-play > #campaign-browser-card {
  grid-column: 1 / -1;
}

.deploy-selection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.deploy-selection-chip {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(135, 143, 156, 0.24);
  border-radius: 10px;
  background: rgba(7, 9, 14, 0.7);
}

.deploy-selection-chip b {
  color: #9fabb6;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.deploy-selection-chip strong {
  overflow: hidden;
  color: #fff2eb;
  font-size: 14px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#menu-panel-play > .cw-column {
  align-content: start;
  gap: 16px;
}

#menu-panel-play.is-story-run > .cw-column-main {
  display: none;
}

#menu-panel-play.is-story-run > .cw-column-side {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

#menu-panel-play.is-story-run > .cw-column-side > #rooms-browser,
#menu-panel-play.is-story-run > .cw-column-side > #player-access-card {
  width: 100%;
  min-width: 0;
  align-self: stretch;
}

#menu-panel-play.is-story-run > .cw-column-side > #rooms-browser {
  grid-column: 1;
  margin-top: 0;
}

#menu-panel-play.is-story-run > .cw-column-side > #player-access-card {
  grid-column: 2;
}

#join-form.cw-shell .cw-shell-heading,
#join-form.cw-shell #main-menu-tabs,
#join-form.cw-shell .menu-panel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#join-form.cw-shell #main-menu-tabs.cw-nav-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0;
}

#join-form.cw-shell #main-menu-tabs .main-menu-tab {
  --accent: #ff4048;
  --menu-tab-rise: 0px;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding-right: clamp(8px, 1.2vw, 16px);
  padding-left: clamp(8px, 1.2vw, 16px);
  font-size: clamp(12px, 1.05vw, 14px);
  line-height: 1;
  letter-spacing: 0.025em;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--accent) 38%, rgba(138, 145, 160, 0.28)) !important;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, rgba(23, 23, 25, 0.96)), rgba(9, 9, 11, 0.98)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent);
  transform: translateY(var(--menu-tab-rise));
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    transform 180ms ease;
}

#join-form.cw-shell #main-menu-tabs .main-menu-tab[data-menu-tab="run"] { --accent: #22c55e; }
#join-form.cw-shell #main-menu-tabs .main-menu-tab[data-menu-tab="story"] { --accent: #f59e0b; }
#join-form.cw-shell #main-menu-tabs .main-menu-tab[data-menu-tab="characters"] { --accent: #38bdf8; }
#join-form.cw-shell #main-menu-tabs .main-menu-tab[data-menu-tab="profile"] { --accent: #818cf8; }
#join-form.cw-shell #main-menu-tabs .main-menu-tab[data-menu-tab="rating"] { --accent: #a855f7; }
#join-form.cw-shell #main-menu-tabs .main-menu-tab[data-menu-tab="news"] { --accent: #f43f5e; }
#join-form.cw-shell #main-menu-tabs .main-menu-tab[data-menu-tab="menu"] { --accent: #94a3b8; }

#join-form.cw-shell #main-menu-tabs .main-menu-tab::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -26%;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 26% 22%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 34%),
    linear-gradient(115deg, transparent 0 27%, rgba(255, 255, 255, 0.2), transparent 58%);
  transform: translateX(-30%) rotate(-8deg);
}

#join-form.cw-shell #main-menu-tabs .main-menu-tab:hover,
#join-form.cw-shell #main-menu-tabs .main-menu-tab:focus-visible {
  --menu-tab-rise: -1px;
  border-color: color-mix(in srgb, var(--accent) 66%, rgba(255, 255, 255, 0.2)) !important;
  filter: brightness(1.06);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent),
    0 0 22px color-mix(in srgb, var(--accent) 34%, transparent),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

#join-form.cw-shell #main-menu-tabs .main-menu-tab.active {
  --menu-tab-rise: -1px;
  color: #fff7ed !important;
  border-color: color-mix(in srgb, var(--accent) 78%, rgba(255, 255, 255, 0.2)) !important;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 24%, rgba(24, 24, 27, 0.96)), rgba(9, 9, 11, 0.98)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 1px color-mix(in srgb, var(--accent) 38%, transparent),
    0 0 24px color-mix(in srgb, var(--accent) 42%, transparent);
}

#join-form.cw-shell #main-menu-tabs .main-menu-tab.active::after {
  z-index: 1;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 78%, transparent);
}

#join-form.cw-shell #main-menu-tabs .main-menu-tab.is-menu-select-flash {
  animation: mainMenuTabSelectFlash 1.15s cubic-bezier(.16, .9, .22, 1) both;
}

#join-form.cw-shell #main-menu-tabs .main-menu-tab.is-menu-select-flash::before {
  animation: heroRosterCardSelectSweep 980ms cubic-bezier(.16, .9, .22, 1) both;
}

@keyframes mainMenuTabSelectFlash {
  0% {
    filter: brightness(0.94) saturate(0.92);
    transform: translateY(var(--menu-tab-rise)) scale(0.99);
    box-shadow: 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
  }

  22% {
    filter: brightness(1.5) saturate(1.42);
    transform: translateY(var(--menu-tab-rise)) scale(1.018);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--accent) 66%, transparent),
      0 0 30px color-mix(in srgb, var(--accent) 58%, transparent),
      0 0 50px rgba(255, 255, 255, 0.1),
      0 12px 26px rgba(0, 0, 0, 0.34);
  }

  100% {
    filter: brightness(1) saturate(1);
    transform: translateY(var(--menu-tab-rise)) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  #join-form.cw-shell #main-menu-tabs .main-menu-tab.is-menu-select-flash,
  #join-form.cw-shell #main-menu-tabs .main-menu-tab.is-menu-select-flash::before {
    animation: none;
  }
}

#join-form.cw-shell #menu-panel-menu,
#join-form.cw-shell #menu-panel-play,
#join-form.cw-shell #menu-panel-characters,
#join-form.cw-shell #menu-panel-skills,
#join-form.cw-shell #menu-panel-profile,
#join-form.cw-shell #menu-panel-rating,
#join-form.cw-shell #menu-panel-news {
  padding: 0;
}

#run-setup-card .run-setup-mode-panel {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#run-setup-card .run-setup-mode-panel .rooms-head {
  margin-bottom: 10px;
  color: #f0ece7;
}

#run-setup-card .run-setup-mode-panel .game-mode-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#run-setup-card .run-setup-mode-panel .game-mode-option {
  min-height: 58px;
}

#join-form #play-deploy-card button.secondary[data-mode="join"] {
  border-color: rgba(138, 145, 160, 0.34);
  background:
    linear-gradient(180deg, rgba(23, 23, 25, 0.96), rgba(9, 9, 11, 0.98)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent);
  color: #f4ede8;
}

#menu-panel-characters #hero-character-panel .hero-skill-panels-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 16px;
  align-items: start;
}

#menu-panel-characters #hero-character-panel .hero-skill-panels-row > .hero-loadout-card {
  min-width: 0;
}

#menu-panel-characters #hero-character-panel .hero-character-top-row {
  display: grid !important;
  grid-template-columns: minmax(300px, 0.9fr) minmax(560px, 1.35fr) minmax(340px, 1fr) !important;
  gap: 16px;
  align-items: start;
}

#menu-panel-characters #hero-character-panel .hero-character-dossier-stack {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

#menu-panel-characters #hero-character-panel .hero-character-skills-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 16px;
  align-items: stretch;
  align-self: stretch;
  height: 100%;
  min-width: 0;
}

#menu-panel-characters #hero-character-panel .hero-character-top-row > .hero-loadout-card,
#menu-panel-characters #hero-character-panel .hero-character-skills-row > .hero-loadout-card,
#menu-panel-characters #hero-character-panel .hero-character-dossier-stack > .hero-loadout-card {
  box-sizing: border-box;
  min-width: 0;
}

#menu-panel-characters #hero-character-panel .hero-character-top-row > .hero-talents-card,
#menu-panel-characters #hero-character-panel .hero-character-dossier-stack > .hero-talents-card,
#menu-panel-characters #hero-character-panel .hero-character-top-row > .hero-unique-skills-card,
#menu-panel-characters #hero-character-panel .hero-character-top-row > .hero-loadout-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

#menu-panel-characters #hero-character-panel .hero-character-top-row > .hero-loadout-stage .hero-paper-loadout {
  align-content: start;
  min-height: 0;
}

#menu-panel-characters #hero-character-panel .hero-character-top-row > .hero-loadout-stage .hero-inventory-panel .inventory-category-list {
  max-height: 360px;
}

#menu-panel-characters #hero-character-panel .hero-profile-head {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
}

#menu-panel-characters #hero-character-panel .hero-profile-portrait {
  width: 92px;
  align-self: start;
  justify-self: start;
}

#menu-panel-characters #hero-character-panel .hero-profile-card {
  grid-template-rows: auto auto auto auto auto auto auto minmax(0, 1fr);
  min-height: 0;
}

#menu-panel-characters #hero-character-panel .hero-profile-source-list {
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#menu-panel-characters #hero-character-panel .hero-character-skills-row > .hero-loadout-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

#menu-panel-characters #hero-character-panel .hero-character-top-row .hero-tree-list {
  align-content: start;
  align-items: start;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 5px 2px 8px 0;
  scroll-padding-bottom: 8px;
  scrollbar-gutter: stable;
}

/* Skills tab temporary placeholder */
#menu-panel-skills {
  display: none !important;
}

#menu-panel-skills.active {
  display: grid !important;
}

#menu-panel-skills .cw-subpanel {
  display: block !important;
  min-height: 220px;
}

#menu-panel-skills .cw-subpanel-head strong {
  display: none;
}

#menu-panel-skills .cw-subpanel-head::after {
  content: "\0412\0020\0440\0430\0437\0440\0430\0431\043e\0442\043a\0435";
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  color: #f8f0ea;
}

#menu-panel-skills .cw-skill-legend,
#menu-panel-skills #character-label,
#menu-panel-skills .account-progress-summary,
#menu-panel-skills .character-select,
#menu-panel-skills .hero-tree-panel,
#menu-panel-skills .hero-action-feedback {
  display: none !important;
}

#menu-panel-skills .cw-subpanel::after {
  content: "\0417\043e\043c\0431\0438\0020\0443\0447\0430\0442\0020\0440\0430\0437\043b\0438\0447\043d\044b\043c\0020\043d\0430\0432\044b\043a\0430\043c\0020\043e\0447\0435\043d\044c\0020\0431\044b\0441\0442\0440\043e.\0020\041c\044b\0020\0442\043e\043b\044c\043a\043e\0020\0443\0441\043f\0435\0432\0430\0435\043c\0020\0437\0430\043f\0438\0441\044b\0432\0430\0442\044c.";
  display: block;
  max-width: 620px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(225, 22, 30, 0.28);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(20, 14, 16, 0.96), rgba(8, 8, 10, 0.98)),
    radial-gradient(circle at top left, rgba(120, 9, 15, 0.18), transparent 42%);
  color: #d9dde3;
  font-size: 15px;
  line-height: 1.55;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 24px rgba(225, 22, 30, 0.08);
}

@media (max-width: 1180px) {
  body.battle-hub-embed #menu-panel-play.cw-menu-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  body.battle-hub-embed #menu-panel-play > .cw-column {
    grid-column: 1 / -1;
  }

  #menu-panel-characters #hero-character-panel .hero-character-top-row {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 900px) {
  #join-form.cw-shell #main-menu-tabs.cw-nav-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #run-setup-card .run-setup-mode-panel .game-mode-options {
    grid-template-columns: 1fr;
  }

  .campaign-browser-host {
    grid-template-columns: 1fr;
  }

  .deploy-selection-summary {
    grid-template-columns: 1fr;
  }

  .campaign-detail-shell {
    grid-template-columns: 1fr;
  }

  .run-map-grid,
  .campaign-card-grid {
    grid-template-columns: 1fr;
  }

  #menu-panel-characters .hero-skill-panels-row,
  #menu-panel-characters #hero-character-panel .hero-skill-panels-row,
  #menu-panel-characters #hero-character-panel .hero-character-skills-row {
    grid-template-columns: 1fr !important;
  }

  .hero-arena-roster-grid {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  }

  .hero-arena-slot {
    height: 132px;
  }
}

@media (max-width: 720px) {
  #menu-panel-play.is-story-run > .cw-column-side {
    grid-template-columns: 1fr;
  }

  .hero-arena-roster-shell {
    min-height: 0;
    padding: 12px;
  }

  .hero-arena-roster-head {
    align-items: start;
    flex-direction: column;
  }

  .hero-arena-roster-meta {
    justify-items: start;
    text-align: left;
  }

  .hero-arena-selected-hero {
    grid-template-columns: 1fr;
    gap: 5px;
    width: 100%;
    margin-top: 0;
  }

  .hero-arena-selected-line {
    display: none;
  }

  .hero-arena-selected-copy {
    padding-right: 8px;
    padding-left: 8px;
  }

  .hero-arena-selected-title {
    font-size: 24px;
  }

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

  .hero-profile-head,
  .hero-profile-bonus-grid,
  .hero-profile-summary-chips {
    grid-template-columns: 1fr;
  }

  .hero-profile-portrait {
    width: 96px;
    justify-self: start;
  }

  #menu-panel-characters .hero-paper-doll {
    padding: 10px;
  }

  #menu-panel-characters .hero-paper-doll-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "portrait"
      "head"
      "armor"
      "left"
      "right"
      "melee"
      "legs"
      "rings";
  }

  #menu-panel-characters .hero-paper-slot,
  #menu-panel-characters .hero-paper-rings {
    width: 100%;
    justify-self: stretch;
  }

  #menu-panel-characters .hero-paper-portrait {
    min-height: 300px;
  }

  #menu-panel-characters .hero-paper-portrait-name {
    display: grid;
  }

  #menu-panel-characters .hero-paper-slot .hero-equip-slot-layout {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  #menu-panel-characters .hero-paper-slot .hero-equip-slot-icon-button,
  #menu-panel-characters .hero-paper-slot .hero-equip-slot-icon-button .hero-equip-slot-icon {
    width: 56px;
    height: 56px;
    min-height: 56px;
  }

  #menu-panel-characters .inventory-category-grid {
    grid-template-columns: 1fr;
  }
}

/* Shared page loader */
html.cw-app-booting,
html.cw-app-booting body {
  overflow: hidden;
}

html.cw-app-booting #hud,
html.cw-app-booting #fps-corner,
html.cw-app-booting #chat-wrap,
html.cw-app-booting #minimap-wrap,
html.cw-app-booting #top-center-hud,
html.cw-app-booting #commentator-panel,
html.cw-app-booting #bottom-hud,
html.cw-app-booting #levelup-overlay,
html.cw-app-booting #game,
html.cw-app-booting #game-webgl,
html.cw-app-booting #join-overlay,
html.cw-app-booting #stats-toggle,
html.cw-app-booting #stats-panel,
html.cw-app-booting #mobile-controls,
html.cw-app-booting #dev-console,
html.cw-app-booting #dev-console-toggle {
  opacity: 0;
  pointer-events: none;
}

.cw-page-loader {
  --loader-progress: 0;
  --loader-progress-pct: 0%;
  --loader-blood: #8b1024;
  --loader-blood-hot: #f43f5e;
  --loader-electric: #67f8ff;
  --loader-electric-deep: #0c6b79;
  --loader-muzzle: #67f8ff;
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  padding: 20px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 20% 18%, rgba(78, 231, 255, 0.19), transparent 31%),
    radial-gradient(circle at 74% 64%, rgba(255, 51, 72, 0.24), transparent 32%),
    linear-gradient(180deg, rgba(3, 7, 13, 0.2), rgba(3, 7, 13, 0.9)),
    linear-gradient(115deg, rgba(12, 16, 21, 0.82), rgba(72, 4, 18, 0.62) 48%, rgba(2, 10, 16, 0.94)),
    url('/assets/backgrounds/screen-loading.jpg') center / cover no-repeat;
  isolation: isolate;
  letter-spacing: 0;
}

.cw-page-loader.hidden {
  display: none !important;
}

.cw-page-loader::before,
.cw-page-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.cw-page-loader::before {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.048) 0 1px, transparent 1px 7px),
    linear-gradient(90deg, rgba(103, 248, 255, 0.18), transparent 28%, rgba(244, 63, 94, 0.15) 74%, transparent);
  mix-blend-mode: screen;
  opacity: 0.5;
  animation: cwLoaderScreenStatic 1.4s steps(2, end) infinite;
}

.cw-page-loader::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(103, 248, 255, 0.12), transparent 25%),
    linear-gradient(90deg, transparent 0 12%, rgba(103, 248, 255, 0.22) 17%, transparent 23% 76%, rgba(244, 63, 94, 0.18) 84%, transparent 90%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.58), transparent 24% 72%, rgba(0, 0, 0, 0.72));
  opacity: 0.92;
  animation: cwLoaderWorldFlash 2.8s steps(1, end) infinite;
}

.cw-loader-scene,
.cw-loader-panel {
  position: relative;
  z-index: 1;
}

.cw-loader-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.cw-loader-backdrop,
.cw-loader-grid,
.cw-loader-scan,
.cw-loader-blood,
.cw-loader-electric,
.cw-loader-muzzle,
.cw-loader-hit-flash,
.cw-loader-rig,
.cw-loader-dossier {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cw-loader-backdrop {
  background:
    radial-gradient(ellipse at 18% 76%, rgba(127, 29, 29, 0.34), transparent 30%),
    radial-gradient(ellipse at 82% 24%, rgba(14, 165, 233, 0.2), transparent 34%),
    linear-gradient(100deg, rgba(12, 107, 121, 0.1), transparent 30% 66%, rgba(103, 248, 255, 0.13)),
    linear-gradient(180deg, transparent, rgba(2, 6, 12, 0.34));
  transform: translateY(0);
  transition: transform 420ms ease;
  animation: cwLoaderBackbeat 2.8s ease-in-out infinite;
}

.cw-loader-grid {
  background:
    linear-gradient(rgba(78, 231, 255, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 51, 72, 0.1) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
  opacity: 0.42;
  transform: perspective(620px) rotateX(58deg) translateY(12%);
  transform-origin: center bottom;
  animation: cwLoaderGridDrift 5.2s linear infinite;
}

.cw-loader-scan {
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(103, 248, 255, 0.32), rgba(255, 255, 255, 0.1), rgba(244, 63, 94, 0.14), transparent);
  filter: blur(1px);
  opacity: 0.74;
  transform: translateX(-110%) skewX(-12deg);
  animation: cwLoaderScan 2.2s cubic-bezier(.22, .78, .22, 1) infinite;
}

.cw-loader-hit-flash {
  opacity: 0;
  mix-blend-mode: screen;
  background: radial-gradient(circle at 50% 52%, rgba(244, 254, 255, 0.94), rgba(103, 248, 255, 0.34) 13%, rgba(244, 63, 94, 0.12) 28%, transparent 46%);
}

.cw-page-loader.is-electric-burst .cw-loader-hit-flash {
  background:
    linear-gradient(96deg, transparent 0 24%, rgba(78, 231, 255, 0.52) 28%, transparent 34% 66%, rgba(255, 255, 255, 0.38) 69%, transparent 74%),
    radial-gradient(circle at var(--electric-flash-x, 50%) var(--electric-flash-y, 52%), rgba(255, 246, 214, 0.82), rgba(78, 231, 255, 0.34) 13%, rgba(78, 231, 255, 0.12) 24%, transparent 44%);
  animation: cwLoaderElectricScreenHit 540ms steps(1, end) both;
}

.cw-page-loader.is-blood-burst .cw-loader-hit-flash {
  background:
    radial-gradient(circle at var(--blood-flash-x, 55%) var(--blood-flash-y, 48%), rgba(255, 138, 138, 0.54), rgba(255, 51, 72, 0.36) 14%, rgba(80, 7, 19, 0.27) 27%, transparent 50%),
    linear-gradient(90deg, transparent, rgba(255, 51, 72, 0.18), transparent);
  animation: cwLoaderBloodScreenHit 620ms steps(1, end) both;
}

.cw-page-loader.is-muzzle-burst .cw-loader-hit-flash {
  background:
    radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.96), rgba(103, 248, 255, 0.5) 12%, rgba(244, 63, 94, 0.2) 28%, transparent 46%),
    linear-gradient(96deg, transparent 0 30%, rgba(103, 248, 255, 0.24) 34%, transparent 42% 62%, rgba(244, 63, 94, 0.18) 68%, transparent 76%);
  animation: cwLoaderMuzzleScreenHit 480ms cubic-bezier(.14, .8, .18, 1) both;
}

.cw-loader-blood span,
.cw-loader-muzzle span {
  position: absolute;
  display: block;
  pointer-events: none;
}

.cw-loader-blood {
  z-index: 3;
  filter:
    drop-shadow(0 0 12px rgba(255, 51, 72, 0.2))
    drop-shadow(0 0 28px rgba(20, 3, 8, 0.3));
  mix-blend-mode: normal;
}

.cw-loader-blood span {
  --blood-x: 50%;
  --blood-y: 50%;
  --blood-from-x: -180px;
  --blood-from-y: -120px;
  --blood-mid-x: -42px;
  --blood-mid-y: -28px;
  --blood-size: 86px;
  --blood-angle: 0deg;
  --blood-delay: 0ms;
  --blood-duration: 2.8s;
  left: var(--blood-x);
  top: var(--blood-y);
  width: var(--blood-size);
  height: var(--blood-size);
  overflow: visible;
  border: 0;
  border-radius: 54% 46% 58% 42% / 48% 58% 42% 52%;
  background-color: rgba(123, 4, 24, 0.86);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 220, 220, 0.74), transparent 9%),
    radial-gradient(circle at 70% 34%, rgba(255, 73, 96, 0.5) 0 10%, transparent 18%),
    radial-gradient(circle at 31% 70%, rgba(48, 2, 12, 0.68) 0 11%, transparent 19%),
    radial-gradient(circle at 52% 52%, rgba(255, 35, 65, 0.98) 0 24%, rgba(142, 6, 29, 0.98) 52%, rgba(39, 2, 11, 0.82) 80%, transparent 100%);
  box-shadow:
    -14px -9px 0 -12px rgba(184, 11, 38, 0.82),
    15px -7px 0 -13px rgba(255, 51, 72, 0.66),
    -13px 13px 0 -13px rgba(78, 3, 17, 0.82),
    14px 13px 0 -14px rgba(119, 5, 26, 0.8),
    1px 17px 0 -15px rgba(244, 63, 94, 0.62),
    0 0 17px rgba(255, 51, 72, 0.3),
    inset 7px -10px 14px rgba(18, 2, 7, 0.62),
    inset -4px 5px 11px rgba(255, 154, 154, 0.16);
  filter: saturate(1.42) contrast(1.2);
  opacity: 0;
  transform: translate(-50%, -50%) translate(var(--blood-from-x), var(--blood-from-y)) scale(0.14) rotate(var(--blood-angle));
  transform-origin: center;
  will-change: opacity, filter, transform;
  animation: cwLoaderBloodImpact var(--blood-duration) cubic-bezier(.13, .76, .16, 1) infinite;
  animation-delay: var(--blood-delay);
}

.cw-loader-blood span::before,
.cw-loader-blood span::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.cw-loader-blood span::before {
  left: 50%;
  top: 50%;
  width: 26%;
  height: 118%;
  border-radius: 999px 999px 56% 56%;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 232, 232, 0.82), transparent 20%),
    linear-gradient(180deg, rgba(255, 73, 96, 0.92), rgba(121, 5, 25, 0.88) 54%, rgba(48, 2, 12, 0.15) 100%);
  box-shadow:
    0 0 12px rgba(255, 51, 72, 0.28),
    0 26px 34px rgba(88, 8, 21, 0.22);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--blood-angle)) scale(0.64, 1.62);
  animation: cwLoaderBloodDropTrail var(--blood-duration) cubic-bezier(.13, .76, .16, 1) infinite;
  animation-delay: var(--blood-delay);
}

.cw-loader-blood span::after {
  inset: -78%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 170, 170, 0.86) 0 3px, transparent 7px),
    radial-gradient(circle at 66% 17%, rgba(255, 46, 75, 0.88) 0 5px, transparent 11px),
    radial-gradient(circle at 82% 36%, rgba(88, 4, 20, 0.9) 0 6px, transparent 12px),
    radial-gradient(circle at 78% 66%, rgba(255, 72, 96, 0.82) 0 5px, transparent 11px),
    radial-gradient(circle at 58% 84%, rgba(72, 3, 16, 0.9) 0 7px, transparent 14px),
    radial-gradient(circle at 34% 82%, rgba(255, 103, 116, 0.72) 0 5px, transparent 11px),
    radial-gradient(circle at 16% 60%, rgba(89, 4, 20, 0.9) 0 6px, transparent 12px),
    radial-gradient(circle at 22% 31%, rgba(255, 70, 92, 0.82) 0 5px, transparent 11px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16) 0 4px, transparent 9px);
  filter:
    drop-shadow(0 0 8px rgba(255, 51, 72, 0.26))
    drop-shadow(0 0 16px rgba(88, 8, 21, 0.24));
  opacity: 0;
  transform: scale(0.18);
  animation: cwLoaderBloodSpray var(--blood-duration) cubic-bezier(.13, .76, .16, 1) infinite;
  animation-delay: var(--blood-delay);
}

.cw-page-loader.is-blood-burst .cw-loader-blood span,
.cw-page-loader.is-blood-burst .cw-loader-blood span::before,
.cw-page-loader.is-blood-burst .cw-loader-blood span::after {
  animation-duration: 1.85s;
}

.cw-loader-blood span:nth-child(1) { --blood-x: 12%; --blood-y: 24%; --blood-from-x: -220px; --blood-from-y: -130px; --blood-mid-x: -48px; --blood-mid-y: -28px; --blood-size: 74px; --blood-angle: -18deg; --blood-delay: 80ms; }
.cw-loader-blood span:nth-child(2) { --blood-x: 86%; --blood-y: 20%; --blood-from-x: 190px; --blood-from-y: -150px; --blood-mid-x: 42px; --blood-mid-y: -32px; --blood-size: 66px; --blood-angle: 22deg; --blood-delay: 520ms; }
.cw-loader-blood span:nth-child(3) { --blood-x: 24%; --blood-y: 78%; --blood-from-x: -170px; --blood-from-y: 180px; --blood-mid-x: -36px; --blood-mid-y: 40px; --blood-size: 96px; --blood-angle: 34deg; --blood-delay: 940ms; }
.cw-loader-blood span:nth-child(4) { --blood-x: 78%; --blood-y: 74%; --blood-from-x: 210px; --blood-from-y: 150px; --blood-mid-x: 48px; --blood-mid-y: 34px; --blood-size: 88px; --blood-angle: -28deg; --blood-delay: 1.38s; }
.cw-loader-blood span:nth-child(5) { --blood-x: 50%; --blood-y: 13%; --blood-from-x: 20px; --blood-from-y: -240px; --blood-mid-x: 4px; --blood-mid-y: -52px; --blood-size: 58px; --blood-angle: 8deg; --blood-delay: 1.82s; }
.cw-loader-blood span:nth-child(6) { --blood-x: 18%; --blood-y: 52%; --blood-from-x: -260px; --blood-from-y: 20px; --blood-mid-x: -58px; --blood-mid-y: 4px; --blood-size: 68px; --blood-angle: 68deg; --blood-delay: 2.22s; }
.cw-loader-blood span:nth-child(7) { --blood-x: 68%; --blood-y: 42%; --blood-from-x: 120px; --blood-from-y: -210px; --blood-mid-x: 28px; --blood-mid-y: -46px; --blood-size: 78px; --blood-angle: -52deg; --blood-delay: 2.58s; }
.cw-loader-blood span:nth-child(8) { --blood-x: 36%; --blood-y: 36%; --blood-from-x: -80px; --blood-from-y: -220px; --blood-mid-x: -18px; --blood-mid-y: -48px; --blood-size: 54px; --blood-angle: 18deg; --blood-delay: 2.94s; }
.cw-loader-blood span:nth-child(9) { --blood-x: 92%; --blood-y: 56%; --blood-from-x: 240px; --blood-from-y: 30px; --blood-mid-x: 54px; --blood-mid-y: 8px; --blood-size: 72px; --blood-angle: -8deg; --blood-delay: 3.28s; }

.cw-loader-electric {
  z-index: 1;
  mix-blend-mode: screen;
  opacity: 0.9;
}

.cw-loader-bolts {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cw-loader-bolt-set {
  --bolt-speed: 1.12s;
  --bolt-halo-dash: 190 810;
  --bolt-line-dash: 154 846;
  --bolt-core-dash: 124 876;
  --bolt-branch-dash: 64 236;
  opacity: 0.14;
  transform-origin: center;
  animation: cwLoaderBoltSetFlash 2.65s steps(1, end) infinite;
}

.cw-loader-bolt-set.bolt-a { animation-delay: 120ms; }
.cw-loader-bolt-set.bolt-b { animation-delay: 960ms; }
.cw-loader-bolt-set.bolt-c { animation-delay: 1.72s; }

.cw-page-loader.is-electric-burst .cw-loader-bolt-set {
  animation-duration: 1.12s;
}

.cw-loader-bolt-halo,
.cw-loader-bolt-line,
.cw-loader-bolt-core,
.cw-loader-bolt-branch {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
  vector-effect: non-scaling-stroke;
}

.cw-loader-bolt-halo {
  stroke: rgba(103, 248, 255, 0.28);
  stroke-width: 24;
  stroke-dasharray: var(--bolt-halo-dash);
  stroke-dashoffset: 1000;
  filter:
    url(#cwLoaderArcGlow)
    drop-shadow(0 0 20px rgba(103, 248, 255, 0.18));
  animation: cwLoaderBoltTravel var(--bolt-speed) cubic-bezier(.11, .82, .16, 1) infinite;
}

.cw-loader-bolt-line {
  stroke: rgba(51, 221, 235, 0.84);
  stroke-width: 6.4;
  stroke-dasharray: var(--bolt-line-dash);
  stroke-dashoffset: 1000;
  filter:
    drop-shadow(0 0 7px rgba(103, 248, 255, 0.82))
    drop-shadow(0 0 16px rgba(34, 211, 238, 0.34));
  animation: cwLoaderBoltTravel var(--bolt-speed) cubic-bezier(.11, .82, .16, 1) infinite;
}

.cw-loader-bolt-core {
  stroke: rgba(244, 254, 255, 0.98);
  stroke-width: 1.8;
  stroke-dasharray: var(--bolt-core-dash);
  stroke-dashoffset: 1000;
  filter:
    drop-shadow(0 0 4px rgba(255, 255, 255, 0.92))
    drop-shadow(0 0 13px rgba(103, 248, 255, 0.72));
  animation: cwLoaderBoltTravel var(--bolt-speed) cubic-bezier(.11, .82, .16, 1) infinite;
}

.cw-loader-bolt-branch {
  stroke: rgba(215, 253, 255, 0.88);
  stroke-width: 1.45;
  stroke-dasharray: var(--bolt-branch-dash);
  stroke-dashoffset: 300;
  filter:
    drop-shadow(0 0 7px rgba(103, 248, 255, 0.68))
    drop-shadow(0 0 16px rgba(244, 63, 94, 0.16));
  animation: cwLoaderBoltBranchTravel var(--bolt-speed) cubic-bezier(.11, .82, .16, 1) infinite;
}

.cw-loader-muzzle span {
  width: 116px;
  height: 116px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98) 0 4%, rgba(211, 255, 255, 0.94) 5% 8%, rgba(103, 248, 255, 0.74) 9% 16%, rgba(244, 63, 94, 0.34) 24%, transparent 44%),
    conic-gradient(from var(--burst-angle, 0deg), transparent 0 18deg, rgba(103, 248, 255, 0.34) 30deg, transparent 55deg 94deg, rgba(244, 63, 94, 0.32) 114deg, transparent 146deg 196deg, rgba(190, 242, 100, 0.24) 218deg, transparent 248deg 300deg, rgba(255, 255, 255, 0.28) 320deg, transparent 360deg);
  box-shadow:
    0 0 18px rgba(103, 248, 255, 0.46),
    0 0 38px rgba(244, 63, 94, 0.22),
    inset 0 0 18px rgba(255, 255, 255, 0.2);
  filter:
    drop-shadow(0 0 10px rgba(103, 248, 255, 0.34))
    drop-shadow(0 0 22px rgba(244, 63, 94, 0.18));
  mix-blend-mode: screen;
  opacity: 0;
  transform-origin: center;
  animation: cwLoaderMuzzlePop 2.25s cubic-bezier(.16, .78, .18, 1) infinite;
}

.cw-loader-muzzle span::before,
.cw-loader-muzzle span::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.cw-loader-muzzle span::before {
  inset: 10%;
  border: 1px solid rgba(103, 248, 255, 0.76);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.26), transparent 24%),
    conic-gradient(from calc(var(--burst-angle, 0deg) + 20deg), rgba(103, 248, 255, 0.12), rgba(244, 63, 94, 0.48), transparent 33%, rgba(103, 248, 255, 0.42), transparent 66%, rgba(255, 255, 255, 0.3), rgba(103, 248, 255, 0.12));
  box-shadow:
    0 0 26px rgba(103, 248, 255, 0.56),
    0 0 42px rgba(244, 63, 94, 0.2),
    inset 0 0 14px rgba(255, 255, 255, 0.22);
  animation: cwLoaderImpactRing 2.25s cubic-bezier(.14, .8, .18, 1) infinite;
  animation-delay: inherit;
}

.cw-loader-muzzle span::after {
  inset: -34%;
  background:
    radial-gradient(circle at 50% 4%, rgba(255, 255, 255, 0.96) 0 2.5px, transparent 4px),
    radial-gradient(circle at 76% 12%, rgba(103, 248, 255, 0.95) 0 2.5px, transparent 4px),
    radial-gradient(circle at 92% 44%, rgba(244, 63, 94, 0.86) 0 2.5px, transparent 4px),
    radial-gradient(circle at 72% 78%, rgba(190, 242, 100, 0.82) 0 2.5px, transparent 4px),
    radial-gradient(circle at 38% 92%, rgba(103, 248, 255, 0.92) 0 2.5px, transparent 4px),
    radial-gradient(circle at 10% 64%, rgba(255, 255, 255, 0.8) 0 2px, transparent 4px),
    radial-gradient(circle at 18% 22%, rgba(244, 63, 94, 0.78) 0 2.5px, transparent 4px),
    radial-gradient(circle at 58% 58%, rgba(255, 255, 255, 0.42) 0 4px, transparent 6px);
  filter:
    drop-shadow(0 0 7px rgba(103, 248, 255, 0.7))
    drop-shadow(0 0 14px rgba(244, 63, 94, 0.28));
  animation: cwLoaderImpactParticles 2.25s cubic-bezier(.13, .76, .16, 1) infinite;
  animation-delay: inherit;
}

.cw-page-loader.is-muzzle-burst .cw-loader-muzzle span,
.cw-page-loader.is-muzzle-burst .cw-loader-muzzle span::before,
.cw-page-loader.is-muzzle-burst .cw-loader-muzzle span::after {
  animation-duration: 1.38s;
}

.cw-loader-muzzle span:nth-child(1) { left: 13%; top: 31%; --burst-angle: 14deg; transform: rotate(8deg) scale(0.88); animation-delay: 220ms; }
.cw-loader-muzzle span:nth-child(2) { right: 13%; top: 14%; --burst-angle: 176deg; transform: rotate(176deg) scale(0.78); animation-delay: 640ms; }
.cw-loader-muzzle span:nth-child(3) { left: 24%; bottom: 15%; --burst-angle: -20deg; transform: rotate(-14deg) scale(0.72); animation-delay: 1.08s; }
.cw-loader-muzzle span:nth-child(4) { right: 18%; bottom: 20%; --burst-angle: 210deg; transform: rotate(194deg) scale(0.82); animation-delay: 1.54s; }
.cw-loader-muzzle span:nth-child(5) { left: 50%; top: 47%; --burst-angle: 88deg; transform: rotate(88deg) scale(0.62); animation-delay: 1.88s; }

.cw-loader-rig span {
  position: absolute;
  display: block;
  border: 1px solid rgba(78, 231, 255, 0.3);
  background: rgba(7, 12, 22, 0.18);
  box-shadow:
    0 0 18px rgba(78, 231, 255, 0.12),
    0 0 28px rgba(177, 18, 38, 0.08);
  opacity: 0;
  animation: cwLoaderRigBuild 1.8s cubic-bezier(.16, .9, .22, 1) forwards;
}

.cw-loader-rig span:nth-child(1) { left: 8%; top: 10%; width: 24%; height: 1px; animation-delay: 80ms; }
.cw-loader-rig span:nth-child(2) { right: 9%; top: 14%; width: 18%; height: 1px; animation-delay: 190ms; }
.cw-loader-rig span:nth-child(3) { left: 14%; bottom: 16%; width: 20%; height: 1px; animation-delay: 300ms; }
.cw-loader-rig span:nth-child(4) { right: 12%; bottom: 18%; width: 24%; height: 1px; animation-delay: 410ms; }
.cw-loader-rig span:nth-child(5) { left: 8%; top: 10%; width: 1px; height: 24%; animation-delay: 520ms; }
.cw-loader-rig span:nth-child(6) { right: 9%; top: 14%; width: 1px; height: 22%; animation-delay: 630ms; }
.cw-loader-rig span:nth-child(7) { left: 34%; bottom: 16%; width: 1px; height: 20%; animation-delay: 740ms; }
.cw-loader-rig span:nth-child(8) { right: 36%; bottom: 18%; width: 1px; height: 18%; animation-delay: 850ms; }

.cw-loader-dossier {
  display: grid;
  grid-template-columns: minmax(72px, 120px) minmax(92px, 170px);
  grid-auto-rows: 70px;
  gap: 10px;
  place-content: center;
  transform: translateY(0) scale(1);
  opacity: 0.7;
  transition:
    transform 420ms ease,
    opacity 420ms ease;
}

.cw-loader-dossier-card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(78, 231, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 51, 72, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(10, 12, 18, 0.46)),
    linear-gradient(90deg, rgba(78, 231, 255, 0.18), transparent 44%, rgba(255, 51, 72, 0.14));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 18px 36px rgba(0, 0, 0, 0.18),
    0 0 26px rgba(78, 231, 255, 0.07);
  opacity: 0;
  transform: translateY(16px) scale(0.94);
  animation: cwLoaderDossierBuild 920ms cubic-bezier(.16, .9, .22, 1) forwards;
}

.cw-loader-dossier-card::before,
.cw-loader-dossier-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.cw-loader-dossier-card::before {
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 44%, rgba(255, 255, 255, 0.16) 48%, transparent 53%),
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(78, 231, 255, 0.09) 13px 14px);
  opacity: 0.48;
  animation: cwLoaderDossierSweep 1.9s linear infinite;
}

.cw-loader-dossier-card::after {
  right: 9%;
  bottom: 12%;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 51, 72, 0.65), rgba(94, 8, 24, 0.5) 45%, transparent 66%);
  filter: blur(0.3px);
  opacity: 0.54;
}

.cw-loader-dossier-card.is-wide {
  grid-column: span 2;
}

.cw-loader-dossier-card.is-tall {
  min-height: 150px;
}

.cw-loader-dossier-card:nth-child(1) { animation-delay: 180ms; }
.cw-loader-dossier-card:nth-child(2) { animation-delay: 320ms; }
.cw-loader-dossier-card:nth-child(3) { animation-delay: 440ms; }
.cw-loader-dossier-card:nth-child(4) { animation-delay: 560ms; }

.cw-loader-panel {
  width: min(520px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(78, 231, 255, 0.32);
  border-radius: 8px;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 51, 72, 0.18), transparent 31%),
    linear-gradient(135deg, rgba(8, 13, 20, 0.96), rgba(17, 24, 39, 0.9)),
    linear-gradient(90deg, rgba(78, 231, 255, 0.14), transparent 44%, rgba(255, 51, 72, 0.15));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 -18px 42px rgba(89, 8, 20, 0.2),
    0 24px 60px rgba(0, 0, 0, 0.46),
    0 0 34px rgba(78, 231, 255, 0.1);
  backdrop-filter: blur(14px);
  transform: translateY(14px);
  opacity: 0;
  animation: cwLoaderPanelIn 780ms cubic-bezier(.16, .9, .22, 1) 160ms forwards;
}

.cw-loader-panel::before,
.cw-loader-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.cw-loader-panel::before {
  background:
    radial-gradient(circle at 96% 0%, rgba(255, 51, 72, 0.34), transparent 19%),
    linear-gradient(115deg, transparent 0 27%, rgba(103, 248, 255, 0.13) 30%, transparent 35% 68%, rgba(255, 255, 255, 0.055) 72%, transparent 78%);
  mix-blend-mode: screen;
  opacity: 0.86;
}

.cw-loader-panel::after {
  left: auto;
  width: 38%;
  background:
    radial-gradient(circle at 42% 20%, rgba(255, 138, 138, 0.2), transparent 9%),
    radial-gradient(circle at 56% 34%, rgba(177, 18, 38, 0.35), transparent 18%),
    radial-gradient(circle at 78% 78%, rgba(80, 7, 19, 0.42), transparent 28%);
  opacity: 0.76;
}

.cw-loader-panel > * {
  position: relative;
  z-index: 1;
}

.cw-loader-kicker,
.cw-loader-title,
.cw-loader-stage,
.cw-loader-steps {
  letter-spacing: 0;
}

.cw-loader-kicker {
  color: #9df6ff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 0 12px rgba(78, 231, 255, 0.44),
    0 0 18px rgba(255, 51, 72, 0.18);
}

.cw-loader-title {
  color: #fff7ed;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.04;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(255, 51, 72, 0.18),
    0 2px 18px rgba(0, 0, 0, 0.52);
}

.cw-loader-stage {
  min-height: 20px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(78, 231, 255, 0.12);
}

.cw-loader-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(117, 255, 151, 0.36);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(12, 28, 19, 0.98), rgba(2, 12, 9, 0.98)),
    rgba(2, 6, 12, 0.96);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.1),
    inset 0 -7px 12px rgba(0, 0, 0, 0.58),
    0 0 16px rgba(34, 197, 94, 0.14);
}

.cw-loader-track::before,
.cw-loader-track::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.cw-loader-track::before {
  display: none;
}

.cw-loader-track::after {
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 38%, rgba(0, 0, 0, 0.34) 100%);
  opacity: 0.78;
}

.cw-loader-fill {
  position: relative;
  z-index: 1;
  display: block;
  width: 4%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(221, 255, 190, 0.9) 0%, rgba(88, 255, 106, 0.98) 32%, rgba(13, 187, 82, 1) 72%, rgba(4, 98, 54, 1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -6px 9px rgba(0, 64, 41, 0.5),
    0 0 14px rgba(81, 255, 104, 0.38);
  transition: width 120ms linear;
}

.cw-loader-fill::before,
.cw-loader-fill::after,
.cw-loader-fill-veins,
.cw-loader-fill-hot {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

.cw-loader-fill::before {
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 42%, rgba(0, 0, 0, 0.2));
  opacity: 0.7;
}

.cw-loader-fill::after {
  content: "";
  left: auto;
  right: 0;
  width: 22px;
  background:
    radial-gradient(circle at 78% 50%, rgba(255, 255, 245, 0.98), rgba(191, 255, 86, 0.82) 24%, rgba(34, 255, 133, 0.32) 58%, transparent 78%);
  filter:
    drop-shadow(0 0 8px rgba(210, 255, 86, 0.7))
    drop-shadow(0 0 15px rgba(34, 255, 133, 0.42));
  animation: cwLoaderFillEdge 860ms ease-in-out infinite;
}

.cw-loader-fill-veins {
  display: none;
}

.cw-loader-fill-hot {
  display: none;
}

.cw-loader-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.cw-loader-steps span {
  min-width: 0;
  overflow: hidden;
  padding: 7px 8px;
  border: 1px solid rgba(93, 113, 128, 0.34);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(14, 21, 31, 0.78), rgba(5, 10, 18, 0.88));
  color: #8292a5;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.cw-loader-steps span.is-loading {
  border-color: rgba(134, 239, 172, 0.72);
  color: #ecfccb;
  background:
    radial-gradient(circle at 18% 50%, rgba(134, 239, 172, 0.18), transparent 52%),
    linear-gradient(180deg, rgba(13, 36, 23, 0.9), rgba(5, 14, 11, 0.92));
  box-shadow:
    0 0 16px rgba(34, 197, 94, 0.22),
    inset 0 0 12px rgba(134, 239, 172, 0.08);
}

.cw-loader-steps span.is-complete {
  border-color: rgba(34, 197, 94, 0.58);
  color: #bbf7d0;
  box-shadow:
    0 0 12px rgba(34, 197, 94, 0.14),
    inset 0 0 10px rgba(34, 197, 94, 0.05);
}

.cw-loader-console {
  display: grid;
  gap: 4px;
  max-height: 128px;
  overflow: hidden;
  padding: 9px 10px;
  border: 1px solid rgba(78, 231, 255, 0.14);
  border-radius: 7px;
  background: rgba(2, 7, 13, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    inset 0 0 22px rgba(0, 0, 0, 0.18);
  font-family: Consolas, "Liberation Mono", "Courier New", monospace;
}

.cw-loader-console-line {
  --row-progress: 0%;
  display: grid;
  grid-template-columns: 18px 68px minmax(88px, 1fr) 38px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #64748b;
  font-size: 10px;
  line-height: 1;
}

.cw-loader-console-status {
  color: #475569;
  text-align: center;
}

.cw-loader-console-name {
  overflow: hidden;
  color: #94a3b8;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-loader-console-bar {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow:
    inset 0 0 0 1px rgba(148, 163, 184, 0.12),
    inset 0 -4px 7px rgba(0, 0, 0, 0.34);
}

.cw-loader-console-bar i {
  display: block;
  width: var(--row-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a, #84cc16);
  box-shadow: 0 0 8px rgba(132, 204, 22, 0.28);
  transition: width 140ms linear;
}

.cw-loader-console-percent {
  color: #6b7c91;
  text-align: right;
}

.cw-loader-console-line.is-loading {
  color: #d9f99d;
}

.cw-loader-console-line.is-loading .cw-loader-console-status,
.cw-loader-console-line.is-loading .cw-loader-console-name,
.cw-loader-console-line.is-loading .cw-loader-console-percent {
  color: #d9f99d;
}

.cw-loader-console-line.is-loading .cw-loader-console-status {
  animation: cwLoaderConsoleBlink 780ms steps(2, end) infinite;
}

.cw-loader-console-line.is-complete .cw-loader-console-status,
.cw-loader-console-line.is-complete .cw-loader-console-name,
.cw-loader-console-line.is-complete .cw-loader-console-percent {
  color: #86efac;
}

.cw-page-loader.is-dismissing {
  pointer-events: none;
  animation: cwLoaderExit 860ms cubic-bezier(.16, .9, .22, 1) forwards;
}

.cw-page-loader.is-dismissing .cw-loader-panel {
  animation: cwLoaderPanelOut 620ms cubic-bezier(.16, .9, .22, 1) forwards;
}

html.cw-app-ready #join-form.cw-shell {
  animation: cwHubShellReveal 760ms cubic-bezier(.16, .9, .22, 1) both;
}

html.cw-app-ready #join-form.cw-shell .cw-shell-heading,
html.cw-app-ready #join-form.cw-shell #main-menu-tabs,
html.cw-app-ready #join-form.cw-shell .menu-panel.active > * {
  animation: cwHubPieceReveal 680ms cubic-bezier(.16, .9, .22, 1) both;
}

html.cw-app-ready #join-form.cw-shell .cw-shell-heading { animation-delay: 80ms; }
html.cw-app-ready #join-form.cw-shell #main-menu-tabs { animation-delay: 150ms; }
html.cw-app-ready #join-form.cw-shell .menu-panel.active > *:nth-child(1) { animation-delay: 220ms; }
html.cw-app-ready #join-form.cw-shell .menu-panel.active > *:nth-child(2) { animation-delay: 290ms; }
html.cw-app-ready #join-form.cw-shell .menu-panel.active > *:nth-child(3) { animation-delay: 360ms; }
html.cw-app-ready #join-form.cw-shell .menu-panel.active > *:nth-child(n + 4) { animation-delay: 430ms; }

.cw-shell .menu-panel.is-menu-panel-reveal > * {
  animation: cwHubPieceReveal 520ms cubic-bezier(.16, .9, .22, 1) both;
}

.cw-shell .menu-panel.is-menu-panel-reveal > *:nth-child(2) { animation-delay: 70ms; }
.cw-shell .menu-panel.is-menu-panel-reveal > *:nth-child(3) { animation-delay: 120ms; }
.cw-shell .menu-panel.is-menu-panel-reveal > *:nth-child(n + 4) { animation-delay: 170ms; }

@keyframes cwLoaderScreenStatic {
  0% { transform: translateY(0); opacity: 0.46; }
  50% { transform: translateY(1px); opacity: 0.56; }
  100% { transform: translateY(0); opacity: 0.5; }
}

@keyframes cwLoaderWorldFlash {
  0%, 60%, 74%, 100% { opacity: 0.86; }
  61%, 66% { opacity: 1; }
  75%, 78% { opacity: 0.98; }
}

@keyframes cwLoaderBackbeat {
  0%, 100% {
    filter: saturate(1) brightness(1);
  }

  46% {
    filter: saturate(1.18) brightness(1.06);
  }

  52% {
    filter: saturate(1.44) brightness(1.12);
  }
}

@keyframes cwLoaderElectricScreenHit {
  0%, 100% { opacity: 0; }
  8% { opacity: 0.92; }
  16% { opacity: 0.12; }
  24% { opacity: 0.76; }
  38% { opacity: 0; }
}

@keyframes cwLoaderBloodScreenHit {
  0%, 100% { opacity: 0; }
  12% { opacity: 0.72; }
  28% { opacity: 0.34; }
  46% { opacity: 0; }
}

@keyframes cwLoaderMuzzleScreenHit {
  0%, 100% { opacity: 0; }
  7% { opacity: 0.88; }
  14% { opacity: 0.16; }
  23% { opacity: 0.54; }
  36% { opacity: 0; }
}

@keyframes cwLoaderBloodImpact {
  0%, 8% {
    opacity: 0;
    filter: blur(2.6px) saturate(1.05);
    transform: translate(-50%, -50%) translate(var(--blood-from-x), var(--blood-from-y)) rotate(var(--blood-angle)) scale(0.08, 0.18);
  }

  19% {
    opacity: 0.82;
    filter: blur(0.9px) saturate(1.2);
    transform: translate(-50%, -50%) translate(var(--blood-mid-x), var(--blood-mid-y)) rotate(var(--blood-angle)) scale(0.22, 0.48);
  }

  31% {
    opacity: 0.98;
    filter:
      blur(0)
      saturate(1.48)
      contrast(1.22)
      drop-shadow(0 0 12px rgba(255, 51, 72, 0.28));
    transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(0.68);
  }

  43% {
    opacity: 0.88;
    filter:
      blur(0.1px)
      saturate(1.42)
      contrast(1.2)
      drop-shadow(0 0 16px rgba(255, 51, 72, 0.24));
    transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(0.98);
  }

  72% {
    opacity: 0.42;
    transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1.02);
  }

  100% {
    opacity: 0;
    filter: blur(1.1px) saturate(1);
    transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1.06);
  }
}

@keyframes cwLoaderBloodDropTrail {
  0%, 7% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--blood-angle)) scale(0.44, 1.9);
  }

  16% {
    opacity: 0.8;
    transform: translate(-50%, -50%) rotate(var(--blood-angle)) scale(0.72, 2.2);
  }

  27% {
    opacity: 0.3;
    transform: translate(-50%, -50%) rotate(var(--blood-angle)) scale(0.98, 1.18);
  }

  34%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--blood-angle)) scale(1.28, 0.62);
  }
}

@keyframes cwLoaderBloodSpray {
  0%, 28%, 100% {
    opacity: 0;
    transform: scale(0.18);
  }

  36% {
    opacity: 1;
    transform: scale(0.92);
  }

  54% {
    opacity: 0.82;
    transform: scale(1.12);
  }

  78% {
    opacity: 0.24;
    transform: scale(1.28);
  }
}

@keyframes cwLoaderBoltSetFlash {
  0%, 32%, 100% {
    opacity: 0.14;
    transform: translate3d(0, 0, 0) scale(1);
  }

  34% {
    opacity: 0.28;
    transform: translate3d(-0.2%, 0.1%, 0) scale(1.006);
  }

  36%, 41% {
    opacity: 1;
    transform: translate3d(0.15%, -0.12%, 0) scale(1.012);
  }

  43% {
    opacity: 0.16;
  }

  45%, 50% {
    opacity: 0.78;
  }

  55% {
    opacity: 0.1;
  }
}

@keyframes cwLoaderBoltTravel {
  0% {
    stroke-dashoffset: 1000;
    opacity: 0;
  }

  18% {
    opacity: 1;
  }

  58% {
    stroke-dashoffset: 0;
    opacity: 0.92;
  }

  100% {
    stroke-dashoffset: -260;
    opacity: 0;
  }
}

@keyframes cwLoaderBoltBranchTravel {
  0%, 18% {
    stroke-dashoffset: 300;
    opacity: 0;
  }

  32% {
    opacity: 0.92;
  }

  70% {
    stroke-dashoffset: 0;
    opacity: 0.58;
  }

  100% {
    stroke-dashoffset: -120;
    opacity: 0;
  }
}

@keyframes cwLoaderMuzzlePop {
  0%, 38%, 100% {
    opacity: 0;
    filter:
      blur(0.2px)
      drop-shadow(0 0 5px rgba(103, 248, 255, 0.18))
      drop-shadow(0 0 10px rgba(244, 63, 94, 0.1));
  }

  42% {
    opacity: 0.92;
    filter:
      brightness(1.34)
      saturate(1.24)
      drop-shadow(0 0 10px rgba(255, 255, 255, 0.72))
      drop-shadow(0 0 24px rgba(103, 248, 255, 0.44));
  }

  52% {
    opacity: 0.58;
    filter:
      brightness(1.1)
      saturate(1.18)
      drop-shadow(0 0 12px rgba(103, 248, 255, 0.3))
      drop-shadow(0 0 20px rgba(244, 63, 94, 0.2));
  }

  68% {
    opacity: 0.08;
    filter:
      blur(0.8px)
      drop-shadow(0 0 8px rgba(103, 248, 255, 0.14));
  }

  74% {
    opacity: 0;
    filter:
      blur(1px)
      drop-shadow(0 0 5px rgba(103, 248, 255, 0.12));
  }
}

@keyframes cwLoaderImpactRing {
  0%, 38%, 100% {
    opacity: 0;
    transform: scale(0.18) rotate(0deg);
  }

  42% {
    opacity: 0.9;
    transform: scale(0.42) rotate(18deg);
  }

  54% {
    opacity: 0.62;
    transform: scale(1.18) rotate(76deg);
  }

  70% {
    opacity: 0;
    transform: scale(1.82) rotate(128deg);
  }
}

@keyframes cwLoaderImpactParticles {
  0%, 39%, 100% {
    opacity: 0;
    transform: scale(0.34) rotate(0deg);
  }

  43% {
    opacity: 0.98;
    transform: scale(0.7) rotate(12deg);
  }

  56% {
    opacity: 0.9;
    transform: scale(1.28) rotate(58deg);
  }

  74% {
    opacity: 0;
    transform: scale(1.92) rotate(118deg);
  }
}

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

@keyframes cwLoaderProgressTip {
  0%, 100% {
    opacity: 0.56;
    transform: scale(0.82);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes cwLoaderTrackFlicker {
  0%, 100% { opacity: 0.46; }
  50% { opacity: 0.7; }
}

@keyframes cwLoaderFillFlow {
  0% { background-position: 0 0, 0 0, 0 0; }
  100% { background-position: 220px 0, 0 0, 220% 0; }
}

@keyframes cwLoaderBloodCells {
  0% { background-position: 0 0; }
  100% { background-position: 102px 0; }
}

@keyframes cwLoaderFillEdge {
  0%, 100% { opacity: 0.66; transform: scaleX(0.86); }
  50% { opacity: 1; transform: scaleX(1.14); }
}

@keyframes cwLoaderConsoleBlink {
  0%, 100% { opacity: 0.62; }
  50% { opacity: 1; }
}

@keyframes cwLoaderVeinsDrift {
  0% { transform: translateX(-18px); }
  100% { transform: translateX(18px); }
}

@keyframes cwLoaderElectricFlow {
  0% { transform: translateX(-24px); }
  100% { transform: translateX(24px); }
}

@keyframes cwLoaderGridDrift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 56px, 56px 0; }
}

@keyframes cwLoaderScan {
  0% { opacity: 0; transform: translateX(-115%) skewX(-12deg); }
  16% { opacity: 0.76; }
  82% { opacity: 0.64; }
  100% { opacity: 0; transform: translateX(310%) skewX(-12deg); }
}

@keyframes cwLoaderRigBuild {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes cwLoaderDossierBuild {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.94);
  }
  68% {
    opacity: 1;
    transform: translateY(-3px) scale(1.02);
  }
  100% {
    opacity: 0.92;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes cwLoaderPanelOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-16px) scale(0.98);
  }
}

@keyframes cwLoaderExit {
  0% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 0;
    filter: blur(9px);
  }
}

@keyframes cwHubShellReveal {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(16px) scale(0.985);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes cwHubPieceReveal {
  0% {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .cw-page-loader {
    padding: 14px;
  }

  .cw-loader-dossier {
    grid-template-columns: minmax(64px, 96px) minmax(80px, 128px);
    grid-auto-rows: 58px;
  }

  .cw-loader-dossier-card.is-tall {
    min-height: 126px;
  }

  .cw-loader-panel {
    width: min(420px, calc(100vw - 28px));
    padding: 14px;
  }

  .cw-loader-title {
    font-size: 21px;
  }

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

  .cw-loader-console-line {
    grid-template-columns: 18px 58px minmax(72px, 1fr) 34px;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cw-page-loader,
  .cw-page-loader::before,
  .cw-page-loader::after,
  .cw-loader-backdrop,
  .cw-loader-grid,
  .cw-loader-scan,
  .cw-loader-hit-flash,
  .cw-loader-blood span,
  .cw-loader-blood span::before,
  .cw-loader-blood span::after,
  .cw-loader-bolt-set,
  .cw-loader-bolt-halo,
  .cw-loader-bolt-line,
  .cw-loader-bolt-core,
  .cw-loader-bolt-branch,
  .cw-loader-muzzle span,
  .cw-loader-rig span,
  .cw-loader-dossier-card,
  .cw-loader-dossier-card::before,
  .cw-loader-panel,
  .cw-loader-panel::before,
  .cw-loader-panel::after,
  .cw-loader-track::before,
  .cw-loader-track::after,
  .cw-loader-fill,
  .cw-loader-fill::before,
  .cw-loader-fill::after,
  .cw-loader-fill-veins,
  .cw-loader-fill-hot,
  .cw-loader-console-line.is-loading .cw-loader-console-status,
  .cw-page-loader.is-dismissing,
  .cw-page-loader.is-dismissing .cw-loader-panel,
  html.cw-app-ready #join-form.cw-shell,
  html.cw-app-ready #join-form.cw-shell .cw-shell-heading,
  html.cw-app-ready #join-form.cw-shell #main-menu-tabs,
  html.cw-app-ready #join-form.cw-shell .menu-panel.active > *,
  .cw-shell .menu-panel.is-menu-panel-reveal > * {
    animation: none !important;
    transition: none !important;
  }

  .cw-loader-rig span,
  .cw-loader-dossier-card,
  .cw-loader-panel {
    opacity: 1;
    transform: none;
  }

  .cw-loader-hit-flash,
  .cw-loader-bolt-set,
  .cw-loader-muzzle span {
    opacity: 0;
  }

  .cw-loader-blood span,
  .cw-loader-blood span::before,
  .cw-loader-blood span::after {
    opacity: 0;
  }
}
/* TON premium cosmetics */
.ton-shop-root {
  min-height: 320px;
}

.ton-shop-shell {
  display: grid;
  gap: 18px;
}

.ton-shop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(103, 232, 249, 0.26);
  background:
    linear-gradient(135deg, rgba(8, 14, 24, 0.94), rgba(28, 9, 18, 0.88)),
    radial-gradient(circle at 14% 0%, rgba(34, 211, 238, 0.2), transparent 34%);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.ton-shop-head strong {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
  font-size: 1.2rem;
}

.ton-shop-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: rgba(226, 232, 240, 0.78);
}

.ton-wallet-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 220px;
}

.ton-connect-button {
  min-height: 40px;
}

.ton-shop-feedback,
.ton-shop-warning {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.8);
}

.ton-shop-feedback.ok,
.ton-shop-warning.ok {
  border-color: rgba(34, 197, 94, 0.42);
  color: #bbf7d0;
}

.ton-shop-feedback.warn,
.ton-shop-warning {
  border-color: rgba(250, 204, 21, 0.36);
  color: #fde68a;
}

.ton-shop-feedback.err {
  border-color: rgba(248, 113, 113, 0.44);
  color: #fecaca;
}

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

.ton-product-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-height: 360px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.92), rgba(8, 12, 20, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 16px 34px rgba(0, 0, 0, 0.28);
}

.ton-product-card.is-featured {
  border-color: rgba(239, 68, 68, 0.48);
  background:
    linear-gradient(180deg, rgba(48, 16, 23, 0.92), rgba(8, 12, 20, 0.95)),
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(239, 68, 68, 0.16));
}

.ton-product-art {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  background: #050913;
}

.ton-product-art img,
.ton-wardrobe-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ton-product-copy {
  display: grid;
  gap: 6px;
}

.ton-product-kicker {
  color: #67e8f9;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.ton-product-copy strong {
  color: #f8fafc;
  font-size: 1rem;
}

.ton-product-copy p {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.35;
}

.ton-product-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.ton-buy-btn,
.ton-manual-btn,
.ton-wardrobe-card button {
  min-height: 38px;
  border: 1px solid rgba(103, 232, 249, 0.34);
  border-radius: 8px;
  color: #ecfeff;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.95), rgba(185, 28, 28, 0.88));
  font-weight: 800;
  cursor: pointer;
}

.ton-manual-btn {
  min-width: 82px;
  color: #bae6fd;
  background: rgba(15, 23, 42, 0.82);
}

.ton-buy-btn:disabled,
.ton-manual-btn:disabled,
.ton-wardrobe-card button:disabled {
  cursor: default;
  opacity: 0.56;
  color: rgba(226, 232, 240, 0.72);
  background: rgba(30, 41, 59, 0.74);
}

.ton-manual-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(103, 232, 249, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 47, 73, 0.82), rgba(15, 23, 42, 0.92)),
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(239, 68, 68, 0.1));
}

.ton-manual-panel strong {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
  font-size: 1.04rem;
}

.ton-manual-panel p {
  max-width: 860px;
  margin: 8px 0 0;
  color: rgba(226, 232, 240, 0.76);
}

.ton-manual-panel dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.ton-manual-panel dl > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.ton-manual-panel dt {
  color: rgba(226, 232, 240, 0.72);
}

.ton-manual-panel dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.ton-manual-panel code {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 8px 10px;
  border-radius: 8px;
  color: #ecfeff;
  background: rgba(2, 6, 23, 0.58);
}

.ton-manual-panel button,
.ton-manual-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 8px;
  color: #ecfeff;
  background: rgba(14, 116, 144, 0.82);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.ton-manual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ton-wardrobe {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ton-wardrobe-column {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ton-wardrobe-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
  color: #f8fafc;
}

.ton-wardrobe-title span {
  color: #67e8f9;
}

.ton-wardrobe-list {
  display: grid;
  gap: 10px;
}

.ton-wardrobe-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.78);
}

.ton-wardrobe-card.selected {
  border-color: rgba(34, 211, 238, 0.54);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.18);
}

.ton-wardrobe-card.locked {
  filter: saturate(0.68);
}

.ton-wardrobe-card img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1px solid rgba(103, 232, 249, 0.18);
}

.ton-wardrobe-card b {
  display: block;
  color: #f8fafc;
}

.ton-wardrobe-card span {
  display: block;
  margin-top: 4px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.82rem;
}

@media (max-width: 860px) {
  .ton-shop-head,
  .ton-wardrobe {
    grid-template-columns: 1fr;
  }

  .ton-shop-head {
    display: grid;
  }

  .ton-wallet-panel {
    justify-content: flex-start;
  }

  .ton-wardrobe {
    display: grid;
  }

  .ton-wardrobe-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .ton-wardrobe-card button {
    grid-column: 1 / -1;
    width: 100%;
  }
}
