:root {
  --void: #000000;
  --gold: #ffd700;
  --gold-dim: #c9a227;
  --gold-bright: #fff4b8;
  --silver: #c8c8d8;
  --enchant: #9b59ff;
  --energy: #ff9100;
  --health: #00e676;
  --font-ui: "Segoe UI", system-ui, -apple-system, sans-serif;
  --tidal-btn-top: #1e1e1e;
  --tidal-btn-mid: #111111;
  --tidal-btn-bot: #070707;
  --tidal-glow-soft: 0 0 14px rgba(255, 215, 0, 0.5), 0 0 32px rgba(255, 215, 0, 0.2);
  --tidal-glow-strong: 0 0 22px rgba(255, 215, 0, 0.75), 0 0 52px rgba(255, 215, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--void);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--void);
  color: var(--gold);
  font-family: var(--font-ui);
  overflow: hidden;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
  cursor: url("../assets/kurzor_icon_48.png") 6 3, auto !important;
}

button,
a,
input,
select,
textarea,
label,
[role="button"] {
  cursor: url("../assets/kurzor_icon_48.png") 6 3, pointer !important;
}

.btn-tidal,
.map-card-btn,
.shop-buy,
.character-loadout-pick,
.character-loadout-clear,
.loadout-picker-item,
.map-picker-item,
.side-btn {
  cursor: url("../assets/kurzor_icon_48.png") 6 3, pointer !important;
}

#app {
  position: relative;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  min-height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
}

/* ——— Boot / betöltő képernyő (splash kép később: .loading-art) ——— */
.loading-screen {
  position: absolute;
  inset: 0;
  z-index: 10000;
  overflow: hidden;
  background: #000;
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.55s step-end;
}

.loading-screen__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 70% at 50% 38%, transparent 0%, rgba(0, 0, 0, 0.5) 55%, #000 100%);
  z-index: 1;
}

.loading-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #f4f6fb;
  background-image: url("../assets/feher.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.loading-bar-zone {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 2;
  width: min(560px, 88vw);
  padding: 0 clamp(20px, 5vw, 40px) calc(28px + env(safe-area-inset-bottom, 0px));
}

.loading-bar-label {
  font-size: clamp(9px, 0.65vw + 0.35rem, 11px);
  font-weight: 900;
  letter-spacing: 0.42em;
  color: rgba(255, 255, 255, 0.98);
  text-align: center;
  margin-bottom: 14px;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.8),
    0 0 12px rgba(0, 0, 0, 0.6);
}

.loading-bar-chassis {
  position: relative;
  height: clamp(10px, 1.2vh, 14px);
  border-radius: 999px;
  padding: 3px;
  background: linear-gradient(
    180deg,
    rgba(60, 55, 45, 0.5) 0%,
    rgba(20, 18, 14, 0.95) 40%,
    rgba(8, 8, 6, 1) 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.12),
    0 0 24px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.loading-bar-track {
  position: relative;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: #050505;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.9);
}

.loading-bar-track-inner {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.35;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 7px,
    rgba(255, 255, 255, 0.03) 7px,
    rgba(255, 255, 255, 0.03) 8px
  );
  pointer-events: none;
}

.loading-bar-fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    #6b4a00 0%,
    #c9a227 18%,
    #fff4b8 42%,
    #ffd700 52%,
    #ff9f1a 72%,
    #c9a227 100%
  );
  background-size: 200% 100%;
  box-shadow:
    0 0 20px rgba(255, 200, 80, 0.55),
    0 0 40px rgba(255, 145, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: width 0.08s linear;
  animation: loading-bar-flow 2.2s linear infinite;
}

@keyframes loading-bar-flow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.loading-bar-sheen {
  position: absolute;
  inset: 0 auto 0 0;
  width: 55%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 45%,
    rgba(255, 255, 255, 0.12) 55%,
    transparent 100%
  );
  mix-blend-mode: overlay;
  animation: loading-sheen-sweep 1.25s ease-in-out infinite;
  pointer-events: none;
}

@keyframes loading-sheen-sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(220%);
  }
}

.loading-bar-edge {
  position: absolute;
  top: 50%;
  width: 5px;
  height: 140%;
  transform: translateY(-50%);
  border-radius: 1px;
  background: linear-gradient(180deg, rgba(255, 230, 150, 0.9), rgba(255, 180, 60, 0.35));
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
  pointer-events: none;
}

.loading-bar-edge--left {
  left: -2px;
}

.loading-bar-edge--right {
  right: -2px;
  opacity: 0.35;
}

.loading-bar-glow {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 72%;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 200, 80, 0.45) 0%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  animation: loading-glow-pulse 1.8s ease-in-out infinite;
}

@keyframes loading-glow-pulse {
  0%,
  100% {
    opacity: 0.65;
    transform: translateX(-50%) scaleX(1);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scaleX(1.06);
  }
}

.loading-screen.loading-screen--exit {
  opacity: 0;
  visibility: hidden;
}

.loading-screen.loading-screen--hidden {
  display: none;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .loading-bar-fill {
    animation: none;
  }

  .loading-bar-sheen {
    animation: none;
    opacity: 0;
  }

  .loading-bar-glow {
    animation: none;
    opacity: 0.5;
  }

  .loading-screen {
    transition-duration: 0.2s;
  }
}

.screen {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  min-height: 0;
  min-height: 100%;
}

.screen.active {
  display: flex;
}

/* ——— Lobby ——— */
#screen-lobby.screen.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#screen-lobby {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
}

.lobby-layer {
  position: relative;
  z-index: 1;
}

.lobby-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.lobby-aurora {
  position: absolute;
  inset: -20%;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(255, 215, 0, 0.07) 0deg,
    transparent 60deg,
    rgba(155, 89, 255, 0.06) 120deg,
    transparent 200deg,
    rgba(255, 215, 0, 0.05) 280deg,
    transparent 360deg
  );
  animation: lobby-aurora-spin 28s linear infinite;
  opacity: 0.9;
}

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

.lobby-oil-ripples {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(255, 215, 0, 0.08) 0%, transparent 55%);
  animation: lobby-ripple 6s ease-in-out infinite;
}

@keyframes lobby-ripple {
  0%,
  100% {
    transform: scaleY(1) translateY(0);
    opacity: 0.7;
  }
  50% {
    transform: scaleY(1.08) translateY(-2%);
    opacity: 1;
  }
}

.lobby-gold-drift {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(1px 1px at 10% 20%, rgba(255, 240, 180, 0.4), transparent),
    radial-gradient(1px 1px at 33% 70%, rgba(255, 215, 0, 0.35), transparent),
    radial-gradient(2px 2px at 78% 40%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 55% 88%, rgba(255, 215, 0, 0.3), transparent),
    radial-gradient(1px 1px at 90% 15%, rgba(200, 180, 255, 0.35), transparent);
  background-size: 100% 100%;
  animation: lobby-drift 18s ease-in-out infinite alternate;
}

@keyframes lobby-drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-2%, -1.5%);
  }
}

.lobby-hex-grid {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath fill='%23ffd700' d='M14 0l14 8.5v17L14 34 0 25.5v-17z'/%3E%3C/svg%3E");
  background-size: 28px 49px;
  animation: lobby-grid-pan 40s linear infinite;
}

@keyframes lobby-grid-pan {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 280px 490px;
  }
}

.lobby-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 65% at 50% 45%, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
}

.top-bar {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: clamp(8px, 2vw, 16px);
  padding: max(6px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 10px
    max(14px, env(safe-area-inset-left, 0px));
  flex-shrink: 0;
  width: 100%;
  animation: lobby-ui-enter 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Rekordtábla a lobby fejlécben, jobbra zárva */
#screen-lobby .top-bar {
  flex-wrap: wrap;
  align-items: flex-start;
  row-gap: 10px;
}

#screen-lobby .top-bar .lobby-records--top {
  margin-top: 0;
  margin-left: auto;
  margin-right: 0;
  margin-bottom: 0;
  max-width: min(560px, calc(100% - 120px));
  width: min(520px, 64vw);
  min-width: 300px;
  flex-shrink: 1;
  padding: 16px 20px 18px;
  align-self: flex-start;
  z-index: 4;
}

.lobby-records-stack {
  margin-left: auto;
  margin-right: 0;
  width: min(520px, 64vw);
  min-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

#screen-lobby .top-bar .lobby-records--top .lobby-records-title {
  font-size: 15px;
  letter-spacing: 0.34em;
  margin-bottom: 0;
}

#screen-lobby .top-bar .lobby-records--top .lobby-records-sub {
  font-size: 11px;
  margin-bottom: 12px;
  margin-top: 2px;
}

#screen-lobby .top-bar .lobby-records--top .lobby-records-grid {
  gap: 10px;
}

#screen-lobby .top-bar .lobby-records--top .lobby-records-cell {
  padding: 10px 8px;
  gap: 4px;
}

#screen-lobby .top-bar .lobby-records--top .lobby-records-icon {
  font-size: 20px;
}

#screen-lobby .top-bar .lobby-records--top .lobby-records-label {
  font-size: 9px;
}

#screen-lobby .top-bar .lobby-records--top .lobby-records-value {
  font-size: clamp(20px, 3.6vw, 28px);
}

#screen-lobby .top-bar .lobby-records--top .lobby-records-flames {
  height: 28px;
}

@keyframes lobby-ui-enter {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wallet {
  justify-self: start;
  align-self: start;
  display: flex;
  gap: clamp(8px, 1.5vw, 14px);
  flex-wrap: wrap;
  align-items: center;
}

.pill {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 10px);
  padding: clamp(8px, 1.4vh, 12px) clamp(12px, 2vw, 18px) clamp(8px, 1.4vh, 12px) clamp(10px, 1.6vw, 14px);
  border-radius: 999px;
  border: 2px solid rgba(255, 215, 0, 0.45);
  background: linear-gradient(180deg, #1a1400 0%, #0a0800 100%);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.12), inset 0 1px 0 rgba(255, 244, 184, 0.15);
  font-weight: 800;
  font-size: clamp(14px, 1.35vw + 0.65rem, 19px);
  color: var(--gold-bright);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
  white-space: nowrap;
}

.pill .icon {
  font-size: clamp(13px, 1.2vw + 0.5rem, 17px);
  opacity: 0.9;
  flex-shrink: 0;
}

.ui-icon-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ui-icon-img--pill {
  width: clamp(14px, 1.2vw + 0.55rem, 20px);
  height: clamp(14px, 1.2vw + 0.55rem, 20px);
  filter: drop-shadow(0 0 7px rgba(255, 205, 80, 0.45));
}

.ui-icon-img--coin {
  filter: drop-shadow(0 0 7px rgba(255, 190, 95, 0.4));
}

.pill .label {
  font-size: clamp(9px, 0.75vw + 0.45rem, 11px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold-dim);
  margin-left: 2px;
}

.top-center {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.2vh, 10px);
  width: min(100%, 300px);
  max-width: 92vw;
}

.top-bar-right {
  min-width: 0;
}

.level-badge {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 16px;
  border-radius: 12px;
  border: 2px solid var(--gold);
  background: rgba(0, 0, 0, 0.65);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.lvl-label {
  font-size: clamp(9px, 0.8vw + 0.4rem, 12px);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--silver);
}

.lvl-num {
  font-size: clamp(18px, 2vw + 0.6rem, 28px);
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.energy-bar-wrap {
  width: 100%;
}

.energy-bar-bg {
  height: clamp(11px, 1.4vh, 14px);
  border-radius: 8px;
  background: #111;
  border: 2px solid #333;
  overflow: hidden;
}

.energy-bar-fill {
  height: 100%;
  width: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #ff6d00, var(--energy), var(--gold-bright));
  box-shadow: 0 0 12px rgba(255, 145, 0, 0.5);
  transition: width 0.35s ease;
}

.energy-caption {
  display: block;
  text-align: center;
  font-size: clamp(8px, 0.7vw + 0.35rem, 11px);
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--gold-dim);
  margin-top: 4px;
}

.lobby-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(8px, 1.5vw, 20px);
  padding: 0 max(10px, env(safe-area-inset-right, 0px)) 0 max(10px, env(safe-area-inset-left, 0px));
  width: 100%;
  position: relative;
}

/* ——— TIDAL gombok: matt fekete, besüppedt, arany neon szöveg ——— */
.btn-tidal {
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  cursor: pointer;
  font-family: var(--font-ui);
  border: none;
  border-radius: 9999px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: var(--tidal-glow-soft);
  background: linear-gradient(180deg, var(--tidal-btn-top) 0%, var(--tidal-btn-mid) 45%, var(--tidal-btn-bot) 100%);
  box-shadow:
    inset 0 4px 14px rgba(0, 0, 0, 0.92),
    inset 0 -3px 8px rgba(255, 255, 255, 0.045),
    inset 0 0 0 1px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 6px 20px rgba(0, 0, 0, 0.55);
  transition:
    transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.28s ease,
    text-shadow 0.28s ease,
    filter 0.22s ease;
}

.btn-tidal:hover {
  transform: scale(1.045);
  text-shadow: var(--tidal-glow-strong);
  box-shadow:
    inset 0 3px 12px rgba(0, 0, 0, 0.88),
    inset 0 -2px 6px rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 215, 0, 0.18),
    0 10px 28px rgba(0, 0, 0, 0.5);
}

.btn-tidal:active {
  transform: scale(1.02);
  box-shadow:
    inset 0 6px 18px rgba(0, 0, 0, 0.95),
    inset 0 1px 3px rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.btn-tidal:focus-visible {
  outline: 2px solid rgba(255, 215, 0, 0.45);
  outline-offset: 3px;
}

.btn-tidal:focus:not(:focus-visible) {
  outline: none;
}

/* Lobby gombok: kisebb lekerekites, teglalap forma */
#screen-lobby .btn-tidal {
  border-radius: 16px;
}

#screen-lobby .btn-theme-toggle {
  border-radius: 14px;
}

.top-bar-theme-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  z-index: 7;
}

#screen-lobby .btn-jump-tank.btn-tidal--hero {
  border-radius: 18px;
}

.sidebar {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(8px, 1.2vh, 14px);
  flex: 0 0 auto;
  width: clamp(106px, 11.5vw + 72px, 164px);
  padding: 2px 0 0;
  z-index: 6;
  align-self: flex-start;
  margin-top: clamp(-160px, -16vh, -72px);
}

.btn-tidal--side.side-btn {
  width: 100%;
  min-height: clamp(76px, 8.4vh + 26px, 116px);
  max-height: 128px;
  padding: clamp(8px, 1.25vh, 13px) clamp(8px, 1.2vw, 12px);
  font-size: clamp(9px, 0.65vw + 0.45rem, 12px);
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1vh, 10px);
}

.side-btn .side-label {
  display: block;
  line-height: 1.2;
}

.side-btn:hover .side-glyph {
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.55));
  transform: scale(1.08);
  transition: transform 0.22s ease, filter 0.22s ease;
}

.side-glyph {
  font-size: clamp(26px, 3.5vw + 0.75rem, 40px);
  line-height: 1;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.35));
  transition: transform 0.22s ease, filter 0.22s ease;
}

.side-glyph--icon {
  width: clamp(30px, 3.6vw + 0.8rem, 44px);
  height: clamp(30px, 3.6vw + 0.8rem, 44px);
  object-fit: contain;
}

.side-btn-shop {
  animation: tidal-shop-nudge 3.2s ease-in-out infinite;
}

.side-btn-news {
  border-color: rgba(149, 92, 255, 0.7) !important;
  background:
    radial-gradient(circle at 16% 16%, rgba(192, 125, 255, 0.28), transparent 52%),
    linear-gradient(165deg, #1f1235 0%, #0a0617 100%) !important;
  color: #f4e8ff !important;
  box-shadow:
    0 0 0 1px rgba(201, 146, 255, 0.22),
    0 0 26px rgba(155, 89, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

.side-btn-news .side-label {
  letter-spacing: 0.11em;
}

@keyframes tidal-shop-nudge {
  0%,
  100% {
    text-shadow: var(--tidal-glow-soft);
  }
  50% {
    text-shadow: 0 0 18px rgba(255, 215, 0, 0.62), 0 0 40px rgba(255, 215, 0, 0.28);
  }
}

.lobby-stage {
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0 clamp(12px, 3vw, 24px) clamp(6px, 1vh, 14px);
  pointer-events: none;
}

.lobby-stage-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(8px, 1.4vh, 18px);
  pointer-events: none;
  transform: translateY(clamp(-120px, -14vh, -56px));
}

.lobby-stage-content .lobby-level-above-diver,
.lobby-stage-content .lobby-diver-stack {
  pointer-events: auto;
}

.lobby-stage-content.lobby-party-stage {
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: clamp(6px, 1.8vw, 24px);
  max-width: min(1180px, 99vw);
  width: 100%;
}

.lobby-party-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: clamp(64px, 12vw, 110px);
  pointer-events: auto;
  align-self: stretch;
}

.lobby-party-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(8px, 1.4vh, 18px);
  pointer-events: none;
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(92vw, 560px);
}

.lobby-party-center .lobby-level-above-diver,
.lobby-party-center .lobby-diver-stack {
  pointer-events: auto;
}

/* Régi .tagline (11px szöveg) magasságának megfelelő helykitöltő — eltávolított szöveg nélkül is stabil a layout */
.lobby-tagline-spacer {
  width: 100%;
  min-height: clamp(14px, 2vh, 22px);
  flex-shrink: 0;
  pointer-events: none;
}

.lobby-player-name-above {
  margin: 0;
  font-size: clamp(13px, 2.2vw, 17px);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: rgba(255, 240, 210, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-party-plus {
  width: clamp(52px, 11vmin, 72px);
  height: clamp(52px, 11vmin, 72px);
  padding: 0;
  border-radius: 50%;
  font-size: clamp(28px, 6vmin, 40px);
  font-weight: 300;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.lobby-party-guest {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 215, 0, 0.22);
  background: linear-gradient(165deg, rgba(18, 16, 12, 0.92), rgba(6, 5, 4, 0.95));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  max-width: 140px;
}

/* A böngésző [hidden] display:none-ját a fenti display:flex felülírja — ezért kell erősített rejtés */
.lobby-party-guest[hidden],
.lobby-party-plus[hidden] {
  display: none !important;
}

.lobby-party-kick {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 10px;
  font-size: 1.1rem;
  line-height: 1;
  z-index: 2;
}

.lobby-party-guest-name {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(255, 248, 230, 0.95);
  text-align: center;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-party-guest-level {
  transform: scale(0.88);
  transform-origin: center top;
}

.lobby-party-ready-summary {
  margin: 2px 0 8px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: rgba(200, 235, 255, 0.92);
  text-align: center;
  max-width: min(92vw, 440px);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.lobby-party-guest-portrait-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 0;
}

.lobby-party-ready-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.15;
  color: #062c16;
  background: linear-gradient(180deg, #9ff5c8, #52e096);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.lobby-party-ready-badge[hidden] {
  display: none !important;
}

.lobby-party-guest-img {
  display: block;
  width: clamp(72px, 16vw, 120px);
  height: auto;
  object-fit: cover;
}

.lobby-party-code-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
  width: 100%;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.12);
  background: linear-gradient(180deg, rgba(18, 14, 8, 0.55), rgba(8, 6, 4, 0.35));
}

/* A flex-wrap fejlécben saját sorban, a legtetején (világos téma: ne „lovagolja” a karaktert) */
.lobby-party-code-strip--topbar {
  flex-basis: 100%;
  width: 100%;
  order: -1;
  padding: 6px 14px;
  z-index: 5;
}

.lobby-party-code-strip[hidden] {
  display: none !important;
}

.lobby-party-code-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(220, 200, 160, 0.65);
}

.lobby-party-code-value {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #ffe8a8;
  text-shadow: 0 0 12px rgba(255, 200, 80, 0.35);
}

.lobby-party-code-copy {
  min-height: 34px;
  padding: 0 14px;
  font-size: 11px;
}

.lobby-online-match-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(110, 255, 160, 0.35);
  background: rgba(12, 40, 22, 0.55);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #c8ffd8;
}

.lobby-online-match-badge[hidden] {
  display: none !important;
}

.lobby-online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4cff7a;
  box-shadow: 0 0 10px rgba(80, 255, 140, 0.75);
}

.lobby-party-leave-btn {
  min-height: clamp(52px, 10vmin, 64px);
  padding: 0 16px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffecec;
  background: linear-gradient(180deg, #8b2a2a 0%, #5a1518 100%);
  border: 1px solid rgba(255, 120, 120, 0.45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.lobby-party-leave-btn[hidden] {
  display: none !important;
}

.overlay.party-invite-overlay {
  z-index: 220;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 14, 0.42);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.overlay.party-invite-overlay.active {
  pointer-events: auto;
}

.party-invite-panel {
  width: min(420px, 92vw);
  padding: 26px 24px 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 220, 140, 0.32);
  background:
    linear-gradient(
      155deg,
      rgba(255, 245, 200, 0.18) 0%,
      rgba(255, 255, 255, 0.06) 40%,
      rgba(60, 40, 120, 0.05) 100%
    ),
    linear-gradient(165deg, rgba(38, 32, 58, 0.78) 0%, rgba(12, 10, 28, 0.74) 100%);
  backdrop-filter: blur(22px) saturate(1.65);
  -webkit-backdrop-filter: blur(22px) saturate(1.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 28px 70px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 200, 90, 0.2),
    0 0 42px rgba(255, 190, 70, 0.12);
  text-align: center;
  overflow: hidden;
}

.party-invite-title {
  margin: 0 0 12px;
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ffd875;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.45),
    0 0 24px rgba(255, 190, 80, 0.35);
}

.party-invite-body {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(245, 242, 255, 0.94);
}

.party-invite-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.party-invite-accept {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  color: #efffef !important;
  font-weight: 800;
  border: 1px solid rgba(140, 255, 185, 0.55) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 100%),
    linear-gradient(155deg, rgba(55, 235, 145, 0.88) 0%, rgba(12, 135, 68, 0.92) 100%) !important;
  backdrop-filter: blur(12px) saturate(1.65);
  -webkit-backdrop-filter: blur(12px) saturate(1.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -1px 0 rgba(0, 55, 28, 0.42),
    0 4px 0 rgba(0, 0, 0, 0.24),
    0 12px 32px rgba(0, 140, 70, 0.55),
    0 0 28px rgba(40, 220, 120, 0.28);
}

.party-invite-accept:hover {
  filter: brightness(1.06) saturate(1.08);
}

.party-invite-accept:focus-visible {
  outline: 2px solid rgba(160, 255, 200, 0.85);
  outline-offset: 2px;
}

.party-invite-decline {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  color: #fff6f6 !important;
  font-weight: 800;
  opacity: 1;
  border: 1px solid rgba(255, 130, 140, 0.55) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 220, 220, 0.06) 100%),
    linear-gradient(155deg, rgba(245, 72, 88, 0.92) 0%, rgba(155, 22, 42, 0.94) 100%) !important;
  backdrop-filter: blur(12px) saturate(1.58);
  -webkit-backdrop-filter: blur(12px) saturate(1.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 210, 210, 0.42),
    inset 0 -1px 0 rgba(50, 0, 12, 0.48),
    0 3px 0 rgba(0, 0, 0, 0.26),
    0 10px 30px rgba(140, 28, 42, 0.52),
    0 0 26px rgba(255, 80, 100, 0.22);
}

.party-invite-decline:hover {
  filter: brightness(1.06) saturate(1.06);
}

.party-invite-decline:focus-visible {
  outline: 2px solid rgba(255, 170, 170, 0.92);
  outline-offset: 2px;
}

#screen-lobby.lobby-party--self-ready .sidebar,
#screen-lobby.lobby-party--self-ready .lobby-records-stack,
#screen-lobby.lobby-party--self-ready .player-code-panel,
#screen-lobby.lobby-party--self-ready .top-bar-theme-stack,
#screen-lobby.lobby-party--self-ready .lobby-party-plus,
#screen-lobby.lobby-party--self-ready .lobby-party-kick,
#screen-lobby.lobby-party--self-ready .lobby-party-code-copy,
#screen-lobby.lobby-party--self-ready #btn-friends,
#screen-lobby.lobby-party--self-ready #btn-map-picker,
#screen-lobby.lobby-party--self-ready #lobby-party-leave-btn,
#screen-lobby.lobby-party--self-ready #lobby-diver-wrap {
  pointer-events: none;
  opacity: 0.42;
  filter: grayscale(0.25);
}

#screen-lobby.lobby-party--self-ready #btn-jump-tank {
  opacity: 1;
  filter: none;
  pointer-events: auto;
}

.lobby-level-above-diver {
  flex-shrink: 0;
}

.diver-glow {
  position: absolute;
  width: min(96vw, 620px);
  height: min(96vw, 620px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.18) 0%, transparent 68%);
  pointer-events: none;
}

.diver-glow-pulse {
  animation: pulse-glow 3.2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.diver-wrap {
  position: relative;
  z-index: 2;
  animation: diver-float 3.8s ease-in-out infinite;
  filter: drop-shadow(0 12px 40px rgba(255, 215, 0, 0.25));
}

@keyframes diver-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-14px) rotate(1deg);
  }
}

.golden-diver {
  display: block;
  width: auto;
  /* Ne a teljes nézetmagassághoz igazodjon — különben rácsúszik a láblécre és kitakarja a „Ugrás” gomb */
  max-width: min(88vw, 480px, 36vmin, 42vh);
  max-height: min(36vmin, 42vh, 400px);
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.tagline {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(200, 200, 220, 0.55);
  text-align: center;
}

.lobby-footer {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  padding: clamp(12px, 2.5vh, 24px) clamp(16px, 4vw, 32px) max(16px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.92) 45%, transparent 100%);
}

.lobby-play-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 18px);
  width: 100%;
  max-width: min(96vw, 980px);
}

.map-picker-trigger {
  box-sizing: border-box;
  min-width: clamp(72px, 14vmin, 94px);
  width: auto;
  height: clamp(58px, 11vmin, 72px);
  min-height: 0;
  padding: 0 clamp(8px, 2vmin, 12px);
  border-radius: 16px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1vmin, 8px);
  font-size: clamp(1.2rem, 3.8vmin, 1.7rem);
}

.map-picker-trigger-map {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: clamp(1.05rem, 3.2vmin, 1.45rem);
  opacity: 0.98;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.map-picker-trigger-icon {
  display: inline-block;
  line-height: 1;
  transform: translateY(-1px);
  pointer-events: none;
}

.map-picker-trigger:hover .map-picker-trigger-icon {
  animation: map-picker-arrow-nudge 0.75s ease-in-out infinite;
}

@keyframes map-picker-arrow-nudge {
  0%,
  100% {
    transform: translateY(-1px);
  }
  50% {
    transform: translateY(-5px);
  }
}

.lobby-map-chip {
  box-sizing: border-box;
  width: clamp(48px, 12vmin, 58px);
  height: clamp(48px, 12vmin, 58px);
  padding: 0;
  margin: 0;
  border-radius: 14px;
  border: 2px solid rgba(255, 215, 0, 0.28);
  background: linear-gradient(165deg, rgba(28, 22, 12, 0.95) 0%, rgba(8, 6, 2, 0.98) 100%);
  font-size: clamp(22px, 5vmin, 28px);
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.lobby-map-chip:hover {
  transform: scale(1.06);
  border-color: rgba(255, 215, 0, 0.55);
}

.lobby-map-chip--active {
  border-color: rgba(255, 230, 120, 0.85);
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.25),
    0 0 22px rgba(255, 215, 0, 0.22);
}

.btn-jump-tank.btn-tidal--hero {
  position: relative;
  flex: 1 1 280px;
  width: auto;
  min-width: min(280px, 88vw);
  max-width: 920px;
  min-height: clamp(72px, 15vh, 132px);
  padding: clamp(20px, 3.5vh, 36px) clamp(28px, 7vw, 72px);
  font-size: clamp(1.05rem, 4.2vmin, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  overflow: hidden;
}

.btn-jump-tank::before,
.btn-jump-tank::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.btn-jump-tank.btn-jump-tank--oil::before {
  background:
    radial-gradient(circle at 12% 78%, rgba(18, 18, 18, 0.9) 0 6px, transparent 7px),
    radial-gradient(circle at 26% 30%, rgba(24, 24, 24, 0.95) 0 5px, transparent 6px),
    radial-gradient(circle at 44% 64%, rgba(16, 16, 16, 0.9) 0 7px, transparent 8px),
    radial-gradient(circle at 61% 24%, rgba(30, 30, 30, 0.95) 0 5px, transparent 6px),
    radial-gradient(circle at 78% 72%, rgba(20, 20, 20, 0.92) 0 6px, transparent 7px),
    radial-gradient(circle at 92% 34%, rgba(26, 26, 26, 0.9) 0 5px, transparent 6px);
  transform: translateY(-12%);
}

.btn-jump-tank.btn-jump-tank--oil::after {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.18), rgba(20, 20, 20, 0.42));
  mix-blend-mode: screen;
}

.btn-jump-tank.btn-jump-tank--oil:hover::before,
.btn-jump-tank.btn-jump-tank--oil:hover::after,
.btn-jump-tank.btn-jump-tank--desert:hover::before,
.btn-jump-tank.btn-jump-tank--desert:hover::after {
  opacity: 1;
}

.btn-jump-tank.btn-jump-tank--oil:hover::before {
  animation: jump-oil-drips 1.05s ease-in-out infinite;
}

.btn-jump-tank.btn-jump-tank--oil:hover::after {
  animation: jump-oil-sheen 1.45s ease-in-out infinite;
}

@keyframes jump-oil-drips {
  0% {
    transform: translateY(-16%);
  }
  100% {
    transform: translateY(10%);
  }
}

@keyframes jump-oil-sheen {
  0%,
  100% {
    filter: brightness(0.95);
  }
  50% {
    filter: brightness(1.16);
  }
}

.btn-jump-tank:hover {
  transform: scale(1.055);
  filter: brightness(1.06);
}

.btn-jump-tank:active {
  transform: scale(1.02);
  filter: brightness(0.98);
}

.btn-jump-tank.btn-jump-tank--locked {
  opacity: 0.45;
  filter: grayscale(0.35) brightness(0.88);
  cursor: not-allowed;
  transform: none;
}

.btn-jump-tank.btn-jump-tank--locked:hover {
  transform: none;
  filter: grayscale(0.35) brightness(0.88);
}

.btn-jump-tank.btn-jump-tank--locked::before,
.btn-jump-tank.btn-jump-tank--locked::after {
  opacity: 0 !important;
  animation: none !important;
}

.btn-jump-tank.btn-jump-tank--party-wait {
  opacity: 0.52;
  cursor: not-allowed;
}

.btn-jump-tank.btn-jump-tank--party-ready:not(.btn-jump-tank--locked) {
  box-shadow:
    0 0 0 2px rgba(110, 255, 160, 0.35),
    0 12px 36px rgba(0, 0, 0, 0.45);
}

.btn-label {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

/* AAA map-based hover FX for jump button */
.btn-jump-tank {
  overflow: visible;
  isolation: isolate;
}

.btn-jump-tank::before,
.btn-jump-tank::after {
  content: none;
}

.btn-jump-tank .jump-fx {
  position: absolute;
  left: -10%;
  right: -10%;
  top: -22%;
  bottom: -22%;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.22s ease;
}

.btn-jump-tank:hover .btn-label {
  text-shadow:
    0 0 20px rgba(255, 215, 0, 0.9),
    0 0 42px rgba(255, 215, 0, 0.5),
    0 0 72px rgba(255, 170, 0, 0.25);
}

.btn-jump-tank.btn-jump-tank--oil .jump-fx--oil {
  background:
    radial-gradient(circle at 12% 70%, rgba(24, 24, 24, 0.95) 0 12px, transparent 13px),
    radial-gradient(circle at 26% 30%, rgba(14, 14, 14, 0.98) 0 9px, transparent 10px),
    radial-gradient(circle at 42% 80%, rgba(30, 30, 30, 0.92) 0 14px, transparent 15px),
    radial-gradient(circle at 58% 26%, rgba(20, 20, 20, 0.95) 0 10px, transparent 11px),
    radial-gradient(circle at 74% 74%, rgba(16, 16, 16, 0.94) 0 12px, transparent 13px),
    radial-gradient(circle at 90% 34%, rgba(24, 24, 24, 0.92) 0 9px, transparent 10px),
    linear-gradient(
      180deg,
      rgba(255, 220, 140, 0.24) 0%,
      rgba(45, 42, 35, 0.36) 40%,
      rgba(10, 10, 10, 0.58) 100%
    );
  filter: blur(0.4px) drop-shadow(0 0 28px rgba(255, 190, 70, 0.35));
  border-radius: 22px;
}

.btn-jump-tank.btn-jump-tank--oil .jump-fx--oil::before,
.btn-jump-tank.btn-jump-tank--oil .jump-fx--oil::after {
  content: "";
  position: absolute;
  inset: -8%;
  border-radius: 26px;
  pointer-events: none;
}

.btn-jump-tank.btn-jump-tank--oil .jump-fx--oil::before {
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 230, 160, 0.4), transparent 32%),
    radial-gradient(circle at 78% 88%, rgba(255, 190, 70, 0.22), transparent 36%);
  mix-blend-mode: screen;
}

.btn-jump-tank.btn-jump-tank--oil .jump-fx--oil::after {
  background:
    linear-gradient(120deg, transparent 0 32%, rgba(255, 230, 140, 0.2) 45%, transparent 60%),
    linear-gradient(-120deg, transparent 0 25%, rgba(255, 210, 120, 0.12) 50%, transparent 75%);
  transform: translateX(-28%);
}

.btn-jump-tank.btn-jump-tank--oil:hover .jump-fx--oil {
  opacity: 1;
  animation: jump-aaa-oil-drift 1s ease-in-out infinite;
}

.btn-jump-tank.btn-jump-tank--oil:hover .jump-fx--oil::before {
  animation: jump-aaa-oil-bloom 1.25s ease-in-out infinite;
}

.btn-jump-tank.btn-jump-tank--oil:hover .jump-fx--oil::after {
  animation: jump-aaa-oil-sweep 1.15s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes jump-aaa-oil-drift {
  0%,
  100% {
    transform: translateY(-6%) scale(0.995);
  }
  50% {
    transform: translateY(6%) scale(1.01);
  }
}

@keyframes jump-aaa-oil-bloom {
  0%,
  100% {
    opacity: 0.62;
    filter: blur(1px);
  }
  50% {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes jump-aaa-oil-sweep {
  from {
    transform: translateX(-36%);
  }
  to {
    transform: translateX(36%);
  }
}

.btn-jump-tank.btn-jump-tank--desert .jump-fx--desert {
  border-radius: 24px;
  filter: drop-shadow(0 0 28px rgba(231, 162, 74, 0.35));
}

.btn-jump-tank.btn-jump-tank--desert .jump-desert-sand {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    repeating-linear-gradient(
      -13deg,
      rgba(244, 193, 105, 0.18) 0 10px,
      rgba(215, 160, 82, 0.13) 10px 20px,
      rgba(165, 112, 56, 0.1) 20px 30px
    ),
    radial-gradient(ellipse at 14% 34%, rgba(255, 232, 172, 0.2), transparent 44%),
    radial-gradient(ellipse at 76% 72%, rgba(238, 170, 86, 0.2), transparent 46%),
    linear-gradient(180deg, rgba(255, 236, 185, 0.12) 0%, rgba(142, 87, 38, 0.24) 56%, rgba(82, 49, 24, 0.4) 100%);
}

.btn-jump-tank.btn-jump-tank--desert .jump-desert-cactus {
  position: absolute;
  bottom: 1%;
  width: clamp(28px, 4.6vmin, 42px);
  height: auto;
  opacity: 0.95;
  overflow: visible;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.46));
}

.btn-jump-tank.btn-jump-tank--desert .jump-desert-cactus path,
.btn-jump-tank.btn-jump-tank--desert .jump-desert-cactus rect {
  fill: #2f7c46;
}

.btn-jump-tank.btn-jump-tank--desert .jump-desert-cactus--left {
  left: 10%;
  transform-origin: 50% 100%;
}

.btn-jump-tank.btn-jump-tank--desert .jump-desert-cactus--right {
  right: 11%;
  transform-origin: 50% 100%;
}

.btn-jump-tank.btn-jump-tank--desert .jump-desert-tumbleweed {
  position: absolute;
  width: clamp(54px, 8.6vmin, 76px);
  height: clamp(54px, 8.6vmin, 76px);
  left: -22%;
  bottom: 9%;
  opacity: 0.94;
  overflow: visible;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.42));
}

.btn-jump-tank.btn-jump-tank--desert .jump-desert-tumbleweed circle,
.btn-jump-tank.btn-jump-tank--desert .jump-desert-tumbleweed path {
  fill: none;
  stroke: rgba(108, 73, 36, 0.98);
  stroke-width: 6;
  stroke-linecap: round;
}

.btn-jump-tank.btn-jump-tank--desert:hover .jump-fx--desert {
  opacity: 1;
}

.btn-jump-tank.btn-jump-tank--desert:hover .jump-desert-sand {
  animation:
    jump-aaa-desert-sand 1.25s linear infinite,
    jump-aaa-desert-gust 1.8s ease-in-out infinite;
}

.btn-jump-tank.btn-jump-tank--desert:hover .jump-desert-cactus--left {
  animation: jump-aaa-cactus-sway-left 1.55s ease-in-out infinite;
}

.btn-jump-tank.btn-jump-tank--desert:hover .jump-desert-cactus--right {
  animation: jump-aaa-cactus-sway-right 1.4s ease-in-out infinite;
}

.btn-jump-tank.btn-jump-tank--desert:hover .jump-desert-tumbleweed {
  animation:
    jump-aaa-tumbleweed-rush 2.2s linear infinite,
    jump-aaa-tumbleweed-spin 0.7s linear infinite;
}

@keyframes jump-aaa-desert-sand {
  from {
    background-position:
      0 0,
      0 0,
      0 0,
      0 0;
  }
  to {
    background-position:
      0 120px,
      0 36px,
      0 52px,
      0 0;
  }
}

@keyframes jump-aaa-desert-gust {
  0%,
  100% {
    filter: brightness(0.95);
    opacity: 0.9;
  }
  50% {
    filter: brightness(1.15);
    opacity: 1;
  }
}

@keyframes jump-aaa-cactus-sway-left {
  0%,
  100% {
    transform: rotate(0deg);
  }
  40% {
    transform: rotate(-2deg) translateY(-1px);
  }
  75% {
    transform: rotate(1.5deg);
  }
}

@keyframes jump-aaa-cactus-sway-right {
  0%,
  100% {
    transform: rotate(0deg);
  }
  35% {
    transform: rotate(1.8deg) translateY(-1px);
  }
  70% {
    transform: rotate(-1.4deg);
  }
}

@keyframes jump-aaa-tumbleweed-rush {
  0% {
    left: -22%;
    bottom: 10%;
  }
  100% {
    left: 108%;
    bottom: 2%;
  }
}

@keyframes jump-aaa-tumbleweed-spin {
  from {
    transform: rotate(0deg) scale(0.96);
  }
  to {
    transform: rotate(360deg) scale(1.02);
  }
}

.btn-jump-tank.btn-jump-tank--ice .jump-fx--ice {
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 24%, rgba(230, 248, 255, 0.42), transparent 34%),
    radial-gradient(circle at 82% 70%, rgba(165, 222, 255, 0.36), transparent 38%),
    linear-gradient(170deg, rgba(190, 236, 255, 0.2) 0%, rgba(80, 150, 205, 0.2) 58%, rgba(28, 62, 96, 0.32) 100%);
  box-shadow:
    inset 0 0 24px rgba(200, 240, 255, 0.28),
    0 0 36px rgba(110, 196, 245, 0.26);
  overflow: hidden;
}

.btn-jump-tank.btn-jump-tank--ice .jump-fx--ice::before,
.btn-jump-tank.btn-jump-tank--ice .jump-fx--ice::after {
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: 26px;
  pointer-events: none;
}

.btn-jump-tank.btn-jump-tank--ice .jump-fx--ice::before {
  background:
    radial-gradient(circle at 8% 10%, rgba(255, 255, 255, 0.65) 0 2px, transparent 3px),
    radial-gradient(circle at 21% 34%, rgba(225, 246, 255, 0.7) 0 2px, transparent 3px),
    radial-gradient(circle at 34% 18%, rgba(255, 255, 255, 0.72) 0 2px, transparent 3px),
    radial-gradient(circle at 47% 28%, rgba(205, 236, 255, 0.68) 0 2px, transparent 3px),
    radial-gradient(circle at 59% 14%, rgba(255, 255, 255, 0.72) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 36%, rgba(214, 241, 255, 0.66) 0 2px, transparent 3px),
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.74) 0 2px, transparent 3px);
  filter: drop-shadow(0 0 8px rgba(170, 235, 255, 0.48));
}

.btn-jump-tank.btn-jump-tank--ice .jump-fx--ice::after {
  background:
    linear-gradient(125deg, transparent 0 30%, rgba(230, 250, 255, 0.36) 48%, transparent 62%),
    linear-gradient(-125deg, transparent 0 22%, rgba(150, 220, 255, 0.22) 50%, transparent 74%);
  transform: translateX(-34%);
}

.btn-jump-tank.btn-jump-tank--ice:hover .jump-fx--ice {
  opacity: 1;
  animation: jump-aaa-ice-frost 1.12s ease-in-out infinite;
}

.btn-jump-tank.btn-jump-tank--ice:hover .jump-fx--ice::before {
  animation: jump-aaa-ice-snow 1.6s linear infinite;
}

.btn-jump-tank.btn-jump-tank--ice:hover .jump-fx--ice::after {
  animation: jump-aaa-ice-sweep 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes jump-aaa-ice-frost {
  0%,
  100% {
    transform: translateY(-4%) scale(0.995);
    filter: brightness(0.96);
  }
  50% {
    transform: translateY(4%) scale(1.015);
    filter: brightness(1.1);
  }
}

@keyframes jump-aaa-ice-snow {
  from {
    transform: translateY(-12%);
  }
  to {
    transform: translateY(12%);
  }
}

@keyframes jump-aaa-ice-sweep {
  from {
    transform: translateX(-38%);
  }
  to {
    transform: translateX(38%);
  }
}

.btn-jump-tank.btn-jump-tank--locked .jump-fx {
  opacity: 0 !important;
  animation: none !important;
}

.btn-jump-tank.btn-jump-tank--locked .jump-fx::before,
.btn-jump-tank.btn-jump-tank--locked .jump-fx::after {
  animation: none !important;
}

.btn-jump-tank.btn-jump-tank--locked .jump-fx * {
  animation: none !important;
}

/* ——— Dive transition ——— */
.transition-dive {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  background: radial-gradient(circle at 50% 50%, #0a0810 0%, #000 70%);
}

.transition-dive.active {
  visibility: visible;
  animation: dive-run 1.55s ease-in-out forwards;
}

/* Karakter szó szerint belezuhan a tartályba (az animáció elején) */
.dive-character-wrap {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(48vmin, min(320px, 38vh));
  max-width: 92vw;
  transform: translateX(-50%);
  z-index: 26;
  pointer-events: none;
  opacity: 0;
}

.transition-dive.active .dive-character-wrap {
  animation: dive-char-wrap-fade 1.55s linear forwards;
}

@keyframes dive-char-wrap-fade {
  0%,
  4% {
    opacity: 1;
  }
  58% {
    opacity: 1;
  }
  72% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.dive-character {
  display: block;
  width: 100%;
  height: auto;
  will-change: transform, opacity, filter;
  transform: translateY(-22vh) scale(1.08) rotate(-12deg);
  opacity: 1;
  filter: drop-shadow(0 16px 36px rgba(255, 215, 0, 0.45));
}

.transition-dive.active .dive-character {
  animation: dive-character-plunge 1.12s cubic-bezier(0.38, 0.02, 0.28, 1) 0.04s both;
}

@keyframes dive-character-plunge {
  0% {
    transform: translateY(-22vh) translateX(-8%) scale(1.1) rotate(-14deg);
    opacity: 1;
    filter: drop-shadow(0 20px 50px rgba(255, 215, 0, 0.55));
  }
  22% {
    transform: translateY(8vh) translateX(6%) scale(1.02) rotate(10deg);
  }
  42% {
    transform: translateY(32vh) translateX(-4%) scale(0.82) rotate(6deg);
  }
  62% {
    transform: translateY(54vh) translateX(2%) scale(0.48) rotate(2deg);
    opacity: 1;
    filter: drop-shadow(0 8px 24px rgba(155, 89, 255, 0.4));
  }
  82% {
    transform: translateY(78vh) scale(0.22) rotate(0deg);
    opacity: 0.45;
  }
  100% {
    transform: translateY(102vh) scale(0.1) rotate(0deg);
    opacity: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  }
}

.dive-character-trail {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 45%;
  height: 120%;
  margin-left: -22%;
  margin-top: -30%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 215, 0, 0.12) 30%,
    rgba(155, 89, 255, 0.15) 70%,
    transparent 100%
  );
  filter: blur(16px);
  border-radius: 40%;
  opacity: 0;
  pointer-events: none;
}

.transition-dive.active .dive-character-trail {
  animation: dive-trail-follow 1.05s ease-out 0.06s both;
}

@keyframes dive-trail-follow {
  0% {
    opacity: 0;
    transform: translateY(-10vh) scaleY(0.4);
  }
  15% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: translateY(55vh) scaleY(1.6);
  }
}

@keyframes dive-run {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.dive-vortex {
  position: absolute;
  width: 180%;
  height: 180%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(255, 215, 0, 0.06),
    transparent,
    rgba(155, 89, 255, 0.05),
    transparent
  );
  opacity: 0;
}

.transition-dive.active .dive-vortex {
  animation: dive-vortex-spin 1.4s cubic-bezier(0.45, 0, 0.2, 1) forwards;
}

@keyframes dive-vortex-spin {
  0% {
    opacity: 0;
    transform: rotate(0deg) scale(0.4);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(200deg) scale(1.2);
  }
}

.dive-bubbles {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image: radial-gradient(circle at 15% 85%, rgba(255, 215, 0, 0.2) 0%, transparent 3px),
    radial-gradient(circle at 42% 92%, rgba(255, 240, 200, 0.15) 0%, transparent 2px),
    radial-gradient(circle at 68% 88%, rgba(200, 180, 255, 0.12) 0%, transparent 2px),
    radial-gradient(circle at 85% 78%, rgba(255, 215, 0, 0.18) 0%, transparent 3px),
    radial-gradient(circle at 25% 70%, rgba(255, 215, 0, 0.12) 0%, transparent 2px);
  background-size: 100% 120%;
  background-position: 50% 100%;
}

.transition-dive.active .dive-bubbles {
  animation: dive-bubbles-rise 1.45s ease-out forwards;
}

@keyframes dive-bubbles-rise {
  0% {
    opacity: 0;
    transform: translateY(25%) scale(0.8);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-35%) scale(1.1);
  }
}

.dive-streak {
  position: absolute;
  width: 8px;
  height: 40%;
  top: -10%;
  left: 50%;
  margin-left: -4px;
  border-radius: 4px;
  background: linear-gradient(180deg, transparent, var(--gold-bright), var(--gold), transparent);
  box-shadow: 0 0 24px var(--gold);
  opacity: 0;
  transform: translateY(-100%);
}

.transition-dive.active .dive-streak {
  animation: dive-streak-fall 0.85s cubic-bezier(0.34, 1.2, 0.64, 1) 0.12s forwards;
}

@keyframes dive-streak-fall {
  0% {
    opacity: 0;
    transform: translateY(-120%);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
    transform: translateY(180%);
  }
}

.dive-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(140vmin, 900px);
  height: min(140vmin, 900px);
  margin: 0;
  border-radius: 50%;
  border: 6px solid var(--gold);
  box-shadow: 0 0 80px var(--enchant), inset 0 0 60px rgba(255, 215, 0, 0.3);
  transform: translate(-50%, -50%) scale(0.12);
  opacity: 0;
}

.transition-dive.active .dive-ring {
  animation: ring-shrink 1.35s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}

@keyframes ring-shrink {
  0% {
    transform: translate(-50%, -50%) scale(0.12);
    opacity: 0.95;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.02);
    opacity: 0;
  }
}

.dive-splash {
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, rgba(155, 89, 255, 0.12) 35%, transparent 50%);
  opacity: 0;
  transform: scale(0.3);
}

.transition-dive.active .dive-splash {
  animation: splash 1.2s ease-out 0.08s forwards;
}

@keyframes splash {
  0% {
    opacity: 0;
    transform: scale(0.25);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.05);
  }
}

.dive-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
}

.transition-dive.active .dive-flash {
  animation: dive-flash-pop 0.35s ease-out 0.55s forwards;
}

@keyframes dive-flash-pop {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 0.15;
  }
  100% {
    opacity: 0;
  }
}

/* ——— Shop overlay ——— */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.shop-panel {
  width: min(440px, 100%);
  max-height: min(82vh, 640px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 2px solid rgba(255, 215, 0, 0.5);
  background: linear-gradient(165deg, #141008 0%, #060400 45%, #0d0a04 100%);
  box-shadow: 0 0 0 1px rgba(255, 240, 180, 0.12), 0 24px 80px rgba(0, 0, 0, 0.85), 0 0 60px rgba(255, 215, 0, 0.08);
  padding: 20px max(20px, env(safe-area-inset-right, 0px) + clamp(52px, 12vmin, 76px)) 24px
    max(20px, env(safe-area-inset-left, 0px));
  position: relative;
  transform: scale(0.88) translateY(24px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.35s ease;
}

.shop-panel--wide {
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
}

/* Csak a lista görget — az X (shop-close) mindig elérhető marad a panel tetején */
.shop-panel .shop-header {
  flex-shrink: 0;
}

.overlay.active .shop-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ——— MAP overlay ——— */
.map-panel.map-panel-tidal {
  width: min(440px, 100%);
  max-height: min(78vh, 560px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 2px solid rgba(255, 215, 0, 0.45);
  background: linear-gradient(165deg, #141008 0%, #060400 45%, #0c0a06 100%);
  box-shadow: 0 0 0 1px rgba(255, 240, 180, 0.1), 0 24px 80px rgba(0, 0, 0, 0.85), 0 0 48px rgba(255, 215, 0, 0.06);
  padding: 22px max(22px, env(safe-area-inset-right, 0px) + clamp(48px, 12vmin, 72px)) 26px
    max(22px, env(safe-area-inset-left, 0px));
  position: relative;
  transform: scale(0.88) translateY(24px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.35s ease;
}

.map-panel.map-panel-tidal .map-panel-title,
.map-panel.map-panel-tidal .map-unlock-desc,
.map-panel.map-panel-tidal .map-frag-bar-wrap,
.map-panel.map-panel-tidal .map-panel-hint {
  flex-shrink: 0;
}

.map-panel.map-panel-tidal.map-panel--maxed {
  border-color: rgba(198, 120, 255, 0.62);
  box-shadow:
    0 0 0 1px rgba(226, 175, 255, 0.24),
    0 24px 80px rgba(0, 0, 0, 0.85),
    0 0 56px rgba(190, 90, 255, 0.24),
    0 0 110px rgba(146, 60, 255, 0.2);
}

.map-panel.map-panel-tidal.map-panel--maxed::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 70% at 18% 22%, rgba(208, 120, 255, 0.28), transparent 48%),
    radial-gradient(ellipse 80% 65% at 82% 28%, rgba(132, 72, 255, 0.26), transparent 46%),
    radial-gradient(ellipse 95% 55% at 50% 92%, rgba(238, 170, 255, 0.14), transparent 50%);
  mix-blend-mode: screen;
  animation: map-maxed-purple-pulse 2.4s ease-in-out infinite;
}

.map-panel.map-panel-tidal.map-panel--maxed::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(230, 175, 255, 0.36);
  box-shadow: inset 0 0 26px rgba(183, 92, 255, 0.16);
}

@keyframes map-maxed-purple-pulse {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 0.95;
  }
}

.overlay.active .map-panel-tidal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.map-panel-title {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  text-shadow: var(--tidal-glow-soft);
}

.map-unlock-desc {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(230, 225, 210, 0.82);
}

.map-frag-bar-wrap {
  height: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 215, 0, 0.2);
  margin-bottom: 14px;
}

.map-frag-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 7px;
  background: linear-gradient(90deg, #1a5c40 0%, #3ecf8e 55%, #ffd54a 100%);
  box-shadow: 0 0 14px rgba(100, 255, 180, 0.25);
  transition: width 0.35s ease;
}

.map-panel-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(200, 195, 180, 0.55);
}

.map-picker-overlay {
  z-index: 209;
}

.map-picker-panel {
  width: min(460px, 100%);
  max-height: min(82vh, 640px);
  overflow: auto;
  border-radius: 22px;
  border: 2px solid rgba(255, 215, 0, 0.46);
  background: linear-gradient(165deg, #141008 0%, #060400 45%, #0c0a06 100%);
  box-shadow:
    0 0 0 1px rgba(255, 240, 180, 0.1),
    0 24px 80px rgba(0, 0, 0, 0.85);
  padding: 20px 20px 24px;
  padding-right: max(20px, env(safe-area-inset-right, 0px) + clamp(50px, 12vmin, 72px));
  transform: scale(0.9) translateY(18px);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.34, 1.3, 0.64, 1),
    opacity 0.34s ease;
}

.overlay.active .map-picker-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.map-picker-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}

.map-picker-sub {
  margin: 0 0 14px;
  text-align: center;
  font-size: 12px;
  color: rgba(215, 208, 190, 0.66);
}

.map-picker-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-picker-item {
  width: 100%;
  border-radius: 14px;
  border: 2px solid rgba(255, 215, 0, 0.24);
  background: linear-gradient(150deg, rgba(30, 24, 12, 0.95), rgba(10, 8, 4, 0.98));
  padding: 12px 14px;
  color: var(--gold-bright);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.map-picker-item--active {
  border-color: rgba(255, 226, 124, 0.82);
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.3),
    0 0 20px rgba(255, 190, 90, 0.22);
}

.map-picker-item-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.map-picker-item-icon {
  font-size: 1.4rem;
}

.map-picker-item-name {
  font-size: 14px;
  font-weight: 800;
}

.map-picker-item-state {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 220, 145, 0.82);
  white-space: nowrap;
}

.map-cards {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.map-card {
  border: 1px solid rgba(255, 215, 0, 0.24);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.36);
  padding: 10px;
}

.map-card-btn {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

.map-card-btn[disabled] {
  cursor: default;
}

.map-card-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.18);
  background: var(--map-art, linear-gradient(145deg, #2a2010 0%, #0d0b08 100%));
}

.map-card-poster-color,
.map-card-poster-gray {
  position: absolute;
  inset: 0;
  background: inherit;
}

.map-card-poster-gray {
  filter: grayscale(1) saturate(0.55) brightness(0.68);
}

.map-card-poster-color {
  width: var(--reveal, 0%);
  transition: width 0.35s ease;
}

.map-card-poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
}

.map-card-title-row {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 2;
}

.map-card-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff4d5;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.map-card-state {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff0c0;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 999px;
  padding: 3px 8px;
}

.map-card-progress {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-card-progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.map-card-progress-fill {
  height: 100%;
  width: var(--p, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #1d6848 0%, #49d39b 55%, #ffd54a 100%);
  transition: width 0.35s ease;
}

.map-card-progress-text {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 232, 188, 0.86);
  min-width: 44px;
  text-align: right;
}

.map-card-blurb {
  margin: 8px 2px 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(222, 216, 202, 0.76);
}

.shop-panel.shop-enter {
  animation: shop-panel-slam 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes shop-panel-slam {
  from {
    transform: scale(0.82) translateY(40px);
    filter: brightness(1.4);
  }
  to {
    transform: scale(1) translateY(0);
    filter: brightness(1);
  }
}

.shop-panel.shop-purchase-flash,
.character-panel.shop-purchase-flash {
  animation: shop-buy-flash 0.55s ease-out;
}

@keyframes shop-buy-flash {
  0% {
    box-shadow: 0 0 0 1px rgba(255, 240, 180, 0.12), 0 24px 80px rgba(0, 0, 0, 0.85);
  }
  40% {
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.6), 0 0 80px rgba(255, 215, 0, 0.25);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(255, 240, 180, 0.12), 0 24px 80px rgba(0, 0, 0, 0.85);
  }
}

.shop-close.btn-tidal--icon {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 6;
  width: clamp(52px, 12vmin, 72px);
  height: clamp(52px, 12vmin, 72px);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.5rem, 5vmin, 2rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.shop-close:hover {
  transform: scale(1.07) rotate(90deg);
}

.shop-header {
  text-align: center;
  margin-bottom: 18px;
  padding-top: 8px;
}

.shop-title {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.12em;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.35));
  animation: shop-title-shine 4s ease-in-out infinite;
}

@keyframes shop-title-shine {
  0%,
  100% {
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.35));
  }
  50% {
    filter: drop-shadow(0 2px 16px rgba(255, 215, 0, 0.55));
  }
}

.shop-sub {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(200, 200, 220, 0.45);
}

.shop-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.shop-tier-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 6px;
}

.shop-tier-head:first-child {
  margin-top: 4px;
}

.shop-tier-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.35), transparent);
}

.shop-tier-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: rgba(255, 215, 0, 0.55);
  white-space: nowrap;
}

.shop-subsection-head {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200, 200, 215, 0.55);
  margin: 16px 0 8px;
  padding-left: 2px;
}

.shop-item--locked {
  border-color: rgba(120, 100, 160, 0.35);
  opacity: 0.5;
  filter: saturate(0.65) grayscale(0.2);
}

.shop-item--owned {
  border-color: rgba(255, 215, 0, 0.38);
}

.shop-owned-badge {
  flex-shrink: 0;
  min-height: clamp(52px, 11vmin, 76px);
  padding: 0 clamp(18px, 4vw, 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(11px, 2.2vmin, 13px);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(0, 230, 118, 0.92);
  border: 2px solid rgba(0, 230, 118, 0.35);
  border-radius: 14px;
  background: rgba(0, 40, 24, 0.35);
}

.shop-item-codename {
  font-weight: 600;
  font-size: 12px;
  color: rgba(200, 200, 215, 0.45);
}

.shop-type {
  color: rgba(155, 200, 255, 0.75);
  font-weight: 800;
}

.shop-buy.shop-buy--equip:not(:disabled) {
  background: linear-gradient(180deg, rgba(40, 55, 48, 0.95), rgba(18, 28, 22, 0.98));
  border-color: rgba(0, 230, 118, 0.35);
}

.shop-empty {
  text-align: center;
  padding: 32px 20px 40px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 215, 0, 0.22);
  background: rgba(0, 0, 0, 0.35);
}

.shop-empty-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-shadow: var(--tidal-glow-soft);
}

.shop-empty-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(200, 200, 215, 0.55);
}

.shop-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid rgba(255, 215, 0, 0.2);
  background: linear-gradient(135deg, rgba(30, 24, 8, 0.9) 0%, rgba(8, 6, 0, 0.95) 100%);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-item:hover {
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.06);
}

.shop-item-poor {
  opacity: 0.58;
  filter: saturate(0.72);
}

.shop-item-icon {
  font-size: 32px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.2), rgba(0, 0, 0, 0.5));
  border: 1px solid rgba(255, 215, 0, 0.25);
  flex-shrink: 0;
}

.shop-item-body {
  flex: 1;
  min-width: 0;
}

.shop-item-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--gold-bright);
  margin-bottom: 4px;
}

.shop-item-desc {
  font-size: 12px;
  color: rgba(200, 200, 210, 0.55);
  line-height: 1.35;
}

.shop-item-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 800;
}

.shop-price {
  color: var(--gold);
}

.currency-inline-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: -2px;
  margin-right: 6px;
}

.currency-inline-icon--coin {
  filter: drop-shadow(0 0 5px rgba(255, 182, 92, 0.45));
}

.currency-inline-icon--gem {
  filter: drop-shadow(0 0 5px rgba(255, 204, 99, 0.45));
}

.shop-lvl {
  color: rgba(155, 89, 255, 0.85);
}

.btn-tidal--shop.shop-buy {
  flex-shrink: 0;
  min-height: clamp(52px, 11vmin, 76px);
  padding: clamp(12px, 2.4vh, 18px) clamp(22px, 5vw, 40px);
  font-size: clamp(12px, 2.4vmin, 15px);
  font-weight: 700;
}

.shop-buy:hover:not(:disabled) {
  transform: scale(1.06);
}

.shop-buy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.35);
  text-shadow: none;
  box-shadow:
    inset 0 4px 14px rgba(0, 0, 0, 0.92),
    inset 0 -3px 8px rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.shop-buy:disabled:hover {
  transform: none;
}

.shop-item.purchase-pop {
  animation: purchase-pop 0.65s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes purchase-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.04);
    border-color: var(--gold);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.35);
  }
  100% {
    transform: scale(1);
  }
}

/* ——— Level up — AAA celebration ——— */
.levelup-overlay {
  position: fixed;
  inset: 0;
  z-index: 232;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  filter: none;
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.55s,
    filter 0.45s ease;
}

.levelup-overlay.active:not(.fx-exit) {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s ease, visibility 0s, filter 0.3s ease;
}

.levelup-overlay.active.fx-exit {
  opacity: 0;
  visibility: visible;
  filter: blur(5px) brightness(0.92);
  pointer-events: none;
  transition:
    opacity 0.58s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.5s ease,
    visibility 0s linear 0.58s;
}

.cele-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%, transparent 0%, transparent 35%, rgba(0, 0, 0, 0.75) 100%);
  opacity: 0;
}

.levelup-overlay.active .cele-vignette {
  animation: cele-vig-in 0.5s ease-out forwards;
}

@keyframes cele-vig-in {
  to {
    opacity: 1;
  }
}

.levelup-burst {
  position: absolute;
  width: 200vmax;
  height: 200vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.32) 0%, rgba(255, 180, 40, 0.12) 28%, transparent 48%);
  opacity: 0;
}

.levelup-burst--core {
  width: 140vmax;
  height: 140vmax;
  background: radial-gradient(circle, rgba(255, 252, 220, 0.65) 0%, rgba(255, 215, 0, 0.35) 18%, transparent 50%);
}

.levelup-overlay.active .levelup-burst {
  animation: levelup-burst 2.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.levelup-overlay.active .levelup-burst--core {
  animation: levelup-burst-core 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes levelup-burst {
  0% {
    opacity: 0;
    transform: scale(0.08);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes levelup-burst-core {
  0% {
    opacity: 0;
    transform: scale(0.15);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.05);
  }
}

.levelup-rays {
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0deg 7deg,
    rgba(255, 215, 0, 0.09) 7deg 9deg,
    transparent 9deg 16deg,
    rgba(255, 240, 180, 0.05) 16deg 17deg
  );
  animation: levelup-rays-spin 2.8s linear infinite;
  opacity: 0;
}

.levelup-overlay.active .levelup-rays {
  opacity: 1;
}

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

.levelup-orbital {
  position: absolute;
  width: min(72vmin, 420px);
  height: min(72vmin, 420px);
  border-radius: 50%;
  border: 2px dashed rgba(255, 215, 0, 0.45);
  box-shadow:
    0 0 0 1px rgba(255, 200, 80, 0.15),
    0 0 60px rgba(255, 215, 0, 0.12);
  opacity: 0;
  transform: scale(0.6) rotate(0deg);
}

.levelup-overlay.active .levelup-orbital {
  animation: levelup-orbit-cycle 5s linear infinite;
}

@keyframes levelup-orbit-cycle {
  0% {
    opacity: 0;
    transform: scale(0.6) rotate(0deg);
  }
  12% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(360deg);
  }
}

.levelup-shock {
  position: absolute;
  width: min(100vmin, 560px);
  height: min(100vmin, 560px);
  border-radius: 50%;
  border: 3px solid rgba(255, 230, 150, 0.9);
  opacity: 0;
  transform: scale(0.4);
}

.levelup-overlay.active .levelup-shock {
  animation: levelup-shock-wave 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

/* Arany konfetti — karakter szintlépés */
.levelup-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}

.levelup-confetti-piece {
  position: absolute;
  top: -10vh;
  left: calc(var(--c-x) * 1%);
  width: var(--c-w, 9px);
  height: var(--c-h, 11px);
  margin-left: -6px;
  border-radius: var(--c-br, 2px);
  background: var(--c-bg, linear-gradient(135deg, #fff4b8 0%, #ffd700 45%, #b8860b 100%));
  opacity: 0;
  box-shadow:
    0 0 14px rgba(255, 215, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  will-change: transform, opacity;
}

.levelup-overlay.active:not(.fx-exit) .levelup-confetti-piece {
  animation: levelup-confetti-fall var(--c-dur, 2.55s) cubic-bezier(0.28, 0.7, 0.36, 1) var(--c-delay, 0s)
    forwards;
}

@keyframes levelup-confetti-fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--c-dx, 0px), 115vh, 0) rotate(var(--c-rot, 540deg)) scale(0.55);
    opacity: 0.15;
  }
}

@keyframes levelup-shock-wave {
  0% {
    opacity: 0.95;
    transform: scale(0.4);
    border-color: rgba(255, 255, 220, 0.95);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
    border-color: rgba(255, 215, 0, 0);
  }
}

.levelup-kicker {
  position: relative;
  z-index: 8;
  margin: 0 0 6px;
  font-size: clamp(10px, 2vw, 12px);
  font-weight: 800;
  letter-spacing: 0.55em;
  color: rgba(255, 230, 160, 0.85);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  opacity: 0;
  transform: translateY(-18px);
}

.levelup-overlay.active .levelup-kicker {
  animation: levelup-kicker-drop 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) 0.05s forwards;
}

@keyframes levelup-kicker-drop {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.levelup-num {
  position: relative;
  z-index: 8;
  margin: 0;
  font-size: clamp(56px, 22vw, 120px);
  font-weight: 900;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: rgba(10, 8, 4, 0.92);
  -webkit-text-stroke: 2px rgba(255, 215, 0, 0.95);
  text-shadow:
    0 0 48px rgba(255, 215, 0, 0.9),
    0 0 100px rgba(255, 180, 40, 0.45),
    0 4px 0 rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: scale(0.3) rotate(-8deg);
}

.levelup-overlay.active .levelup-num {
  animation: levelup-num-slam 0.7s cubic-bezier(0.34, 1.45, 0.64, 1) 0.12s forwards;
}

@keyframes levelup-num-slam {
  70% {
    transform: scale(1.08) rotate(2deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.levelup-text {
  position: relative;
  z-index: 8;
  margin: 4px 0 0;
  font-size: clamp(28px, 8vw, 52px);
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--gold-bright);
  text-shadow:
    0 0 40px rgba(255, 215, 0, 0.85),
    0 0 90px rgba(255, 215, 0, 0.35),
    0 2px 0 rgba(0, 0, 0, 0.4);
  animation: levelup-text-pop 0.65s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
  transform: scale(0.5);
  opacity: 0;
}

.levelup-overlay.active .levelup-text {
  animation: levelup-text-pop 0.65s cubic-bezier(0.34, 1.4, 0.64, 1) 0.18s forwards;
}

@keyframes levelup-text-pop {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.levelup-sub {
  position: relative;
  z-index: 8;
  margin: 14px 0 0;
  max-width: min(92vw, 420px);
  padding: 0 16px;
  font-size: clamp(11px, 2.4vw, 13px);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-align: center;
  line-height: 1.45;
  color: rgba(255, 245, 220, 0.62);
  animation: levelup-sub-fade 1s ease 0.35s forwards;
  opacity: 0;
}

.levelup-overlay.active .levelup-sub {
  animation: levelup-sub-fade 1s ease 0.35s forwards;
}

@keyframes levelup-sub-fade {
  to {
    opacity: 1;
  }
}

/* ——— Map unlock celebration ——— */
.map-unlock-cele {
  position: fixed;
  inset: 0;
  z-index: 233;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  filter: none;
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.55s,
    filter 0.45s ease;
}

.map-unlock-cele.active:not(.fx-exit) {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s ease, visibility 0s, filter 0.3s ease;
}

.map-unlock-cele.active.fx-exit {
  opacity: 0;
  visibility: visible;
  filter: blur(6px) saturate(0.85);
  pointer-events: none;
  transition:
    opacity 0.58s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.5s ease,
    visibility 0s linear 0.58s;
}

.map-unlock-vig {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 80% at 50% 100%, rgba(200, 160, 90, 0.35) 0%, rgba(40, 28, 14, 0.92) 45%, #0a0604 100%);
  opacity: 0;
}

.map-unlock-cele.active .map-unlock-vig {
  animation: map-vig-in 0.6s ease-out forwards;
}

@keyframes map-vig-in {
  to {
    opacity: 1;
  }
}

.map-unlock-horizon {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 38%;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 220, 140, 0.5) 20%,
    rgba(255, 240, 200, 0.95) 50%,
    rgba(255, 200, 100, 0.5) 80%,
    transparent
  );
  box-shadow: 0 0 40px rgba(255, 200, 100, 0.6);
  opacity: 0;
  transform: scaleX(0.3);
}

.map-unlock-cele.active .map-unlock-horizon {
  animation: map-horizon-sweep 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

@keyframes map-horizon-sweep {
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

.map-unlock-dust {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(1.5px 1.5px at 20% 70%, rgba(255, 220, 160, 0.5), transparent),
    radial-gradient(1px 1px at 60% 65%, rgba(255, 200, 120, 0.45), transparent),
    radial-gradient(2px 2px at 80% 72%, rgba(255, 230, 180, 0.4), transparent),
    radial-gradient(1px 1px at 40% 68%, rgba(220, 180, 100, 0.35), transparent);
  background-size: 100% 100%;
  opacity: 0;
}

.map-unlock-cele.active .map-unlock-dust {
  animation: map-dust-drift 4s linear infinite, map-dust-in 1s ease 0.2s forwards;
}

@keyframes map-dust-in {
  to {
    opacity: 0.85;
  }
}

@keyframes map-dust-drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-2%, -1%);
  }
}

.map-unlock-ring {
  position: absolute;
  width: min(100vmin, 520px);
  height: min(100vmin, 520px);
  border-radius: 50%;
  background: conic-gradient(from 210deg, transparent, rgba(255, 200, 80, 0.15), transparent 40%, rgba(255, 215, 0, 0.12), transparent);
  opacity: 0;
  transform: scale(0.5) rotate(-30deg);
}

.map-unlock-cele.active .map-unlock-ring {
  animation: map-ring-cycle 9s linear infinite;
}

@keyframes map-ring-cycle {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-30deg);
  }
  14% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(360deg);
  }
}

.map-unlock-icon {
  position: relative;
  font-size: clamp(64px, 18vw, 110px);
  line-height: 1;
  filter: drop-shadow(0 0 28px rgba(255, 200, 100, 0.85)) drop-shadow(0 12px 40px rgba(0, 0, 0, 0.5));
  opacity: 0;
  transform: translateY(40px) scale(0.5);
}

.map-unlock-cele.active .map-unlock-icon {
  animation: map-icon-rise 0.9s cubic-bezier(0.34, 1.35, 0.64, 1) 0.15s forwards;
}

@keyframes map-icon-rise {
  60% {
    transform: translateY(-8px) scale(1.12);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.map-unlock-kicker {
  position: relative;
  margin: 20px 0 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5em;
  color: rgba(255, 210, 140, 0.75);
  opacity: 0;
}

.map-unlock-cele.active .map-unlock-kicker {
  animation: levelup-sub-fade 0.8s ease 0.45s forwards;
}

.map-unlock-title {
  position: relative;
  margin: 10px 0 0;
  font-size: clamp(26px, 7vw, 44px);
  font-weight: 900;
  letter-spacing: 0.28em;
  color: #fff8e8;
  text-shadow:
    0 0 50px rgba(255, 190, 80, 0.7),
    0 4px 20px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.85);
}

.map-unlock-cele.active .map-unlock-title {
  animation: map-title-pop 0.65s cubic-bezier(0.34, 1.4, 0.64, 1) 0.35s forwards;
}

@keyframes map-title-pop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.map-unlock-name {
  position: relative;
  margin: 14px 0 0;
  max-width: min(90vw, 400px);
  padding: 0 20px;
  font-size: clamp(15px, 3.5vw, 20px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  color: rgba(255, 230, 200, 0.88);
  opacity: 0;
}

.map-unlock-cele.active .map-unlock-name {
  animation: levelup-sub-fade 1s ease 0.55s forwards;
}

/* ——— Ability shop / loadout celebration ——— */
.ability-cele {
  position: fixed;
  inset: 0;
  z-index: 232;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  filter: none;
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.55s,
    filter 0.45s ease;
}

.ability-cele.active:not(.fx-exit) {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, visibility 0s, filter 0.28s ease;
}

.ability-cele.active.fx-exit {
  opacity: 0;
  visibility: visible;
  filter: blur(5px) brightness(0.9);
  pointer-events: none;
  transition:
    opacity 0.58s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.5s ease,
    visibility 0s linear 0.58s;
}

.levelup-overlay.active.fx-exit.fx-quick-exit,
.map-unlock-cele.active.fx-exit.fx-quick-exit,
.ability-cele.active.fx-exit.fx-quick-exit {
  transition:
    opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.18s ease,
    visibility 0s linear 0.2s;
  filter: blur(3px) brightness(0.95);
}

.ability-cele-vig {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(30, 40, 70, 0.5) 0%, rgba(4, 6, 14, 0.94) 62%, #020308 100%);
  opacity: 0;
}

.ability-cele.active .ability-cele-vig {
  animation: cele-vig-in 0.45s ease-out forwards;
}

.ability-cele-grid {
  position: absolute;
  inset: -1px;
  background-image: linear-gradient(rgba(255, 215, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 70%);
}

.ability-cele.active .ability-cele-grid {
  animation: ab-grid-pulse 2.5s ease-in-out infinite, cele-vig-in 0.6s ease forwards;
}

@keyframes ab-grid-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.6;
  }
}

.ability-cele-beam {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 140%;
  height: 140%;
  margin-left: -70%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 215, 0, 0.03) 35%,
    rgba(255, 230, 150, 0.12) 50%,
    rgba(255, 215, 0, 0.03) 65%,
    transparent 100%
  );
  transform: translateY(-100%) rotate(12deg);
  opacity: 0;
}

.ability-cele.active .ability-cele-beam {
  animation: ab-beam-scan 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}

@keyframes ab-beam-scan {
  0% {
    opacity: 0;
    transform: translateY(-100%) rotate(12deg);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(20%) rotate(12deg);
  }
}

.ability-cele-frame {
  position: absolute;
  width: min(38vmin, 200px);
  height: min(38vmin, 200px);
  border-radius: 22px;
  border: 2px solid rgba(255, 215, 0, 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(255, 215, 0, 0.2),
    inset 0 0 40px rgba(255, 215, 0, 0.08);
  opacity: 0;
  transform: scale(0.7) rotate(-6deg);
}

.ability-cele.active .ability-cele-frame {
  animation: ab-frame-in 0.7s cubic-bezier(0.34, 1.35, 0.64, 1) forwards;
}

@keyframes ab-frame-in {
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.ability-cele-icon {
  position: relative;
  z-index: 2;
  font-size: clamp(52px, 14vmin, 88px);
  line-height: 1;
  filter: drop-shadow(0 0 24px rgba(255, 215, 0, 0.75));
  opacity: 0;
  transform: scale(0.2) rotate(-25deg);
}

.ability-cele.active .ability-cele-icon {
  animation: ab-icon-pop 0.75s cubic-bezier(0.34, 1.5, 0.64, 1) 0.08s forwards;
}

@keyframes ab-icon-pop {
  55% {
    transform: scale(1.15) rotate(6deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.ability-cele-kicker {
  position: relative;
  z-index: 2;
  margin: 22px 0 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.45em;
  color: rgba(255, 215, 0, 0.8);
  opacity: 0;
}

.ability-cele.active .ability-cele-kicker {
  animation: levelup-sub-fade 0.6s ease 0.25s forwards;
}

.ability-cele-tag {
  position: relative;
  z-index: 2;
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: rgba(200, 210, 230, 0.55);
  opacity: 0;
}

.ability-cele.active .ability-cele-tag {
  animation: levelup-sub-fade 0.7s ease 0.35s forwards;
}

.ability-cele-name {
  position: relative;
  z-index: 2;
  margin: 14px 0 0;
  max-width: min(90vw, 440px);
  padding: 0 20px;
  font-size: clamp(20px, 5vw, 32px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--gold-bright);
  text-shadow: 0 0 36px rgba(255, 215, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(12px);
}

.ability-cele.active .ability-cele-name {
  animation: ab-name-up 0.65s cubic-bezier(0.34, 1.35, 0.64, 1) 0.2s forwards;
}

@keyframes ab-name-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ability-cele-code {
  position: relative;
  z-index: 2;
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(180, 195, 220, 0.5);
  opacity: 0;
}

.ability-cele.active .ability-cele-code {
  animation: levelup-sub-fade 0.8s ease 0.45s forwards;
}

.levelup-overlay.active.fx-exit *,
.map-unlock-cele.active.fx-exit *,
.ability-cele.active.fx-exit * {
  animation: none !important;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    filter 0.35s ease !important;
  opacity: 0 !important;
  transform: scale(0.96) translateY(8px) !important;
}

.levelup-overlay.active.fx-exit.fx-quick-exit *,
.map-unlock-cele.active.fx-exit.fx-quick-exit *,
.ability-cele.active.fx-exit.fx-quick-exit * {
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    filter 0.16s ease !important;
  transform: scale(0.98) translateY(4px) !important;
}

@media (prefers-reduced-motion: reduce) {
  .levelup-overlay.active *,
  .map-unlock-cele.active *,
  .ability-cele.active * {
    animation-duration: 0.2s !important;
    animation-iteration-count: 1 !important;
  }

  .levelup-overlay.active .levelup-confetti-piece {
    animation: none !important;
    opacity: 0 !important;
  }

  .levelup-rays,
  .map-unlock-dust,
  .map-unlock-ring,
  .levelup-orbital,
  .ability-cele-grid {
    animation: none !important;
  }

  .levelup-overlay.active .levelup-rays,
  .map-unlock-cele.active .map-unlock-dust {
    opacity: 0.35;
  }

  .levelup-overlay.active.fx-exit,
  .map-unlock-cele.active.fx-exit,
  .ability-cele.active.fx-exit {
    transition-duration: 0.18s !important;
    filter: none !important;
  }
}

/* ——— Power surge (in-match milestone) ——— */
.power-surge-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  filter: none;
}

.power-surge-overlay.active {
  animation: power-surge-show 2.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes power-surge-show {
  0% {
    opacity: 0;
    visibility: visible;
    filter: blur(4px);
  }
  12% {
    opacity: 1;
    filter: blur(0);
  }
  68% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 0;
    visibility: hidden;
    filter: blur(3px);
  }
}

.power-surge-ring {
  position: absolute;
  width: min(90vw, 400px);
  height: min(90vw, 400px);
  border-radius: 50%;
  border: 3px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.2), inset 0 0 40px rgba(155, 89, 255, 0.15);
  transform: scale(0.3);
  opacity: 0;
}

.power-surge-overlay.active .power-surge-ring {
  animation: power-ring-pulse 2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes power-ring-pulse {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  28% {
    opacity: 1;
  }
  72% {
    opacity: 0.55;
    transform: scale(1.25);
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

.power-surge-text {
  position: relative;
  margin: 0;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: clamp(22px, 6vw, 36px);
  font-weight: 900;
  letter-spacing: 0.17em;
  color: #ffdf38;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.86);
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.8),
    0 0 24px rgba(255, 215, 0, 0.65),
    0 0 56px rgba(255, 200, 70, 0.35);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.14) 100%);
  backdrop-filter: blur(1.5px);
  opacity: 0;
}

.power-surge-overlay.active .power-surge-text {
  animation: power-surge-text-fade 2s ease-out forwards;
}

@keyframes power-surge-text-fade {
  0%,
  10% {
    opacity: 0;
    transform: scale(0.85) translateY(12px);
  }
  22% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  65% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.92) translateY(-8px);
  }
}

.power-surge-sub {
  margin: 10px 0 0;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255, 248, 225, 0.96);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
  background: rgba(0, 0, 0, 0.3);
  letter-spacing: 0.06em;
  opacity: 0;
}

.power-surge-overlay.active .power-surge-sub {
  animation: power-surge-sub-fade 2s ease-out forwards;
}

@keyframes power-surge-sub-fade {
  0%,
  14% {
    opacity: 0;
    transform: translateY(8px);
  }
  26% {
    opacity: 1;
    transform: translateY(0);
  }
  62% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes power-surge-show-rm {
  0% {
    opacity: 0;
    visibility: visible;
  }
  18% {
    opacity: 1;
  }
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .power-surge-overlay.active {
    animation-name: power-surge-show-rm;
    animation-duration: 0.88s;
    animation-timing-function: ease-out;
    filter: none;
  }

  .power-surge-overlay.active .power-surge-ring,
  .power-surge-overlay.active .power-surge-text,
  .power-surge-overlay.active .power-surge-sub {
    animation-duration: 0.85s !important;
    animation-timing-function: ease-out !important;
  }
}

/* ——— Game ——— */
.game-screen {
  background: #000;
  z-index: 1;
}

.game-screen.active {
  flex-direction: column;
}

#game-canvas {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: auto;
  max-height: 100%;
  touch-action: none;
}

.game-run-hud-row {
  position: absolute;
  top: max(12px, env(safe-area-inset-top, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: clamp(8px, 1.5vw, 14px);
  pointer-events: none;
}

.game-run-gems-hud {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.8vw, 12px);
  padding: clamp(10px, 1.8vh, 14px) clamp(14px, 3vw, 20px);
  border-radius: 16px;
  border: 2px solid rgba(255, 215, 0, 0.42);
  background: linear-gradient(165deg, rgba(28, 24, 12, 0.92) 0%, rgba(6, 5, 2, 0.94) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 4px 24px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(255, 215, 0, 0.12),
    inset 0 1px 0 rgba(255, 244, 200, 0.1);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.game-run-gems-icon {
  width: clamp(24px, 4.6vmin, 33px);
  height: clamp(24px, 4.6vmin, 33px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 6px rgba(255, 200, 80, 0.4));
}

.ui-icon-img--hud {
  width: 100%;
  height: 100%;
}

.game-run-gems-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.game-run-gems-caption {
  font-size: clamp(8px, 1.1vmin + 0.35rem, 10px);
  font-weight: 800;
  letter-spacing: 0.2em;
  color: rgba(200, 195, 210, 0.55);
}

.game-run-gems-value {
  font-size: clamp(18px, 4vmin, 26px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.45);
}

.game-run-coins-hud {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.8vw, 12px);
  padding: clamp(10px, 1.8vh, 14px) clamp(14px, 3vw, 20px);
  border-radius: 16px;
  border: 2px solid rgba(232, 180, 90, 0.42);
  background: linear-gradient(165deg, rgba(36, 28, 14, 0.92) 0%, rgba(12, 8, 4, 0.94) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 4px 24px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(255, 160, 60, 0.1),
    inset 0 1px 0 rgba(255, 220, 160, 0.08);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.game-run-coins-icon {
  width: clamp(24px, 4.6vmin, 33px);
  height: clamp(24px, 4.6vmin, 33px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 5px rgba(255, 150, 50, 0.35));
}

.game-run-coins-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.game-run-coins-caption {
  font-size: clamp(8px, 1.1vmin + 0.35rem, 10px);
  font-weight: 800;
  letter-spacing: 0.2em;
  color: rgba(220, 200, 175, 0.55);
}

.game-run-coins-value {
  font-size: clamp(18px, 4vmin, 26px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  color: #ffb74d;
  text-shadow: 0 0 10px rgba(255, 160, 60, 0.4);
}

.game-run-map-hud {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.8vw, 12px);
  padding: clamp(10px, 1.8vh, 14px) clamp(14px, 3vw, 20px);
  border-radius: 16px;
  border: 2px solid rgba(120, 200, 160, 0.38);
  background: linear-gradient(165deg, rgba(18, 32, 28, 0.92) 0%, rgba(4, 14, 12, 0.94) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 4px 24px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(80, 200, 140, 0.1),
    inset 0 1px 0 rgba(200, 255, 220, 0.08);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.game-run-map-icon {
  width: clamp(20px, 4vmin, 26px);
  height: clamp(20px, 4vmin, 26px);
  line-height: 0;
  filter: drop-shadow(0 0 6px rgba(100, 220, 160, 0.35));
}

.game-run-map-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.game-run-map-caption {
  font-size: clamp(8px, 1.1vmin + 0.35rem, 10px);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(160, 210, 190, 0.55);
}

.game-run-map-value {
  font-size: clamp(16px, 3.4vmin, 22px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  color: #7fe8c0;
  text-shadow: 0 0 10px rgba(100, 255, 180, 0.35);
}

.game-chrome {
  position: absolute;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-pause,
.btn-game-quests,
.btn-game-music,
.btn-exit {
  min-width: 168px;
  justify-content: center;
}

.btn-game-music {
  letter-spacing: 0.09em;
}

.pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 74;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px) + 8px) max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.pause-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease, visibility 0s;
}

.pause-panel {
  width: min(440px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(255, 215, 0, 0.45);
  background: linear-gradient(165deg, rgba(30, 25, 12, 0.96), rgba(8, 7, 3, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.85), 0 0 26px rgba(255, 215, 0, 0.16);
  text-align: center;
  padding: 22px 20px;
}

.pause-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(255, 215, 0, 0.58);
}

.pause-title {
  margin: 8px 0 10px;
}

.pause-hint {
  margin: 0 0 14px;
  color: rgba(220, 218, 230, 0.72);
  font-size: 13px;
}

.pause-music-card {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(248, 224, 170, 0.45);
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 255, 255, 0.2), transparent 42%),
    radial-gradient(circle at 86% 22%, rgba(255, 200, 72, 0.2), transparent 46%),
    linear-gradient(164deg, rgba(46, 38, 24, 0.9), rgba(12, 10, 6, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 206, 0.35),
    inset 0 -2px 8px rgba(0, 0, 0, 0.38),
    0 8px 24px rgba(0, 0, 0, 0.42);
}

.pause-music-art {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 229, 178, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 6px 14px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.pause-music-body {
  min-width: 0;
  flex: 1;
}

.pause-music-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 900;
  color: #fff6e0;
  text-align: left;
}

.pause-music-time {
  margin: 0 0 6px;
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 245, 220, 0.88);
}

.pause-music-progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 230, 180, 0.26);
  overflow: hidden;
}

.pause-music-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe2a2, #fff5cf 55%, #ffd277);
  transition: width 0.18s linear;
}

.pause-music-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.pause-music-btn {
  min-width: 40px;
  min-height: 40px;
  border-radius: 12px !important;
  padding: 7px 9px;
  font-size: 18px;
  line-height: 1;
}

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

.pause-btn {
  min-height: 50px;
}

.pause-btn--warn {
  border-color: rgba(255, 130, 120, 0.45);
}

/* ——— COIN hiány — profil fejlesztés ——— */
.coin-short-overlay {
  z-index: 208;
}

.coin-short-panel {
  position: relative;
  width: min(400px, 100%);
  border-radius: 22px;
  border: 2px solid rgba(232, 200, 102, 0.45);
  background: linear-gradient(165deg, #1a1610 0%, #080604 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.88), 0 0 48px rgba(255, 215, 0, 0.08);
  /* Nagy abszolút X gomb (shop-close) — elég hely jobbra, ne takarja a szöveget */
  padding-top: max(16px, env(safe-area-inset-top, 0px) + 6px);
  padding-right: max(20px, env(safe-area-inset-right, 0px) + clamp(56px, 15vmin, 80px));
  padding-bottom: 26px;
  padding-left: max(22px, env(safe-area-inset-left, 0px));
}

.coin-short-panel .shop-close.btn-tidal--icon {
  top: max(8px, env(safe-area-inset-top, 0px));
  right: max(8px, env(safe-area-inset-right, 0px));
  width: clamp(44px, 10vmin, 56px);
  height: clamp(44px, 10vmin, 56px);
  font-size: clamp(1.25rem, 4vmin, 1.65rem);
}

.coin-short-title {
  margin: 0 0 12px;
  padding-right: 0;
  max-width: 100%;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #e8c866;
  text-shadow: 0 0 20px rgba(232, 200, 102, 0.35);
}

.coin-short-body {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(210, 210, 220, 0.78);
}

.coin-short-math {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 215, 0, 0.22);
  background: rgba(0, 0, 0, 0.45);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  line-height: 1.45;
}

.coin-short-ok {
  width: 100%;
  min-height: 52px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

/* ——— Tartály briefing — meccs eleje ——— */
.tank-briefing-overlay {
  position: absolute;
  inset: 0;
  z-index: 78;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px) + 8px) max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.45s,
    backdrop-filter 0.4s ease;
}

.tank-briefing-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.35s ease,
    visibility 0s,
    backdrop-filter 0.3s ease;
}

.tank-briefing-panel {
  width: min(520px, 100%);
  max-height: min(85vh, 640px);
  overflow: auto;
  border-radius: 26px;
  border: 2px solid rgba(255, 215, 0, 0.55);
  background: linear-gradient(165deg, rgba(36, 30, 12, 0.98) 0%, rgba(6, 5, 2, 0.99) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 240, 180, 0.12),
    0 28px 90px rgba(0, 0, 0, 0.92),
    0 0 80px rgba(255, 215, 0, 0.12);
  padding: clamp(24px, 5vw, 36px) clamp(22px, 5vw, 40px) clamp(26px, 5vw, 38px);
  text-align: center;
  transform: scale(0.93) translateY(18px);
  opacity: 0;
  transition:
    transform 0.48s cubic-bezier(0.34, 1.25, 0.64, 1),
    opacity 0.4s ease;
}

.tank-briefing-overlay.active .tank-briefing-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.tank-briefing-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.28em;
  color: rgba(255, 215, 0, 0.5);
}

.tank-briefing-title {
  margin: 0 0 22px;
  font-size: clamp(1.35rem, 5vmin, 2rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.2;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 16px rgba(255, 215, 0, 0.35));
}

.tank-briefing-list {
  margin: 0 0 22px;
  padding: 0 0 0 1.1em;
  text-align: left;
  list-style: disc;
  color: rgba(220, 218, 230, 0.88);
  font-size: clamp(13px, 2.8vmin, 15px);
  line-height: 1.55;
}

.tank-briefing-list li {
  margin-bottom: 12px;
}

.tank-briefing-list li:last-child {
  margin-bottom: 0;
}

.tank-briefing-countdown {
  margin: 0 0 14px;
  font-size: clamp(15px, 3.5vmin, 18px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: rgba(255, 236, 160, 0.95);
  text-shadow:
    0 0 20px rgba(255, 215, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .tank-briefing-countdown {
  color: rgba(120, 85, 10, 0.95);
  text-shadow: none;
}

.tank-briefing-hint {
  margin: 0 0 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(180, 185, 200, 0.55);
}

.tank-briefing-dismiss {
  width: 100%;
  min-height: clamp(56px, 12vmin, 76px);
  font-size: clamp(13px, 2.8vmin, 16px);
  font-weight: 800;
  letter-spacing: 0.14em;
}

[data-theme="light"] .coin-short-panel {
  background: linear-gradient(165deg, #faf9f6 0%, #eef0f5 100%);
  border-color: rgba(138, 106, 10, 0.4);
}

[data-theme="light"] .coin-short-body {
  color: rgba(55, 60, 72, 0.88);
}

[data-theme="light"] .tank-briefing-panel {
  background: linear-gradient(165deg, #fafbfd 0%, #e8ecf4 100%);
  border-color: rgba(138, 106, 10, 0.42);
}

[data-theme="light"] .tank-briefing-list {
  color: rgba(45, 52, 65, 0.9);
}

/* ——— Meccs vége: GEM + COIN összegző ——— */
.game-over-overlay {
  position: absolute;
  inset: 0;
  z-index: 75;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px) + 8px) max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.5s,
    backdrop-filter 0.45s ease;
}

.game-over-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s,
    backdrop-filter 0.35s ease;
}

.game-over-overlay.game-over-overlay--quick {
  transition:
    opacity 0.16s ease,
    visibility 0s,
    backdrop-filter 0.16s ease;
}

.game-over-panel {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 3vh, 22px);
  text-align: center;
  transform: scale(0.92) translateY(22px);
  opacity: 0;
  filter: blur(2px);
  transition:
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s ease,
    filter 0.4s ease;
}

.game-over-overlay.active .game-over-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
  filter: blur(0);
}

.game-over-heading {
  margin: 0;
  font-size: clamp(1.35rem, 4.5vmin, 1.85rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-shadow: 0 0 24px rgba(255, 215, 0, 0.35);
}

.game-over-kills {
  margin: -6px 0 0;
  font-size: clamp(12px, 2.8vmin, 14px);
  font-weight: 700;
  color: rgba(200, 200, 215, 0.55);
  letter-spacing: 0.06em;
}

.game-over-kills:empty {
  display: none;
}

.game-over-countdown {
  margin: -2px 0 0;
  font-size: clamp(11px, 2.4vmin, 13px);
  font-weight: 700;
  color: rgba(186, 192, 204, 0.75);
  letter-spacing: 0.04em;
}

.game-over-countdown:empty {
  display: none;
}

.game-over-card {
  width: 100%;
  padding: clamp(22px, 4vh, 32px) clamp(20px, 5vw, 36px);
  border-radius: 28px;
  border: 2px solid rgba(255, 215, 0, 0.42);
  background: linear-gradient(165deg, rgba(32, 28, 14, 0.96) 0%, rgba(8, 6, 2, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 12px 48px rgba(0, 0, 0, 0.65),
    0 0 40px rgba(255, 215, 0, 0.1),
    inset 0 1px 0 rgba(255, 244, 200, 0.08);
}

.game-over-stat {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3.5vw, 20px);
  text-align: left;
}

.game-over-stat-icon {
  flex-shrink: 0;
  width: clamp(30px, 7vmin, 42px);
  height: clamp(30px, 7vmin, 42px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px rgba(255, 200, 80, 0.35));
}

.ui-icon-img--game-over {
  width: 100%;
  height: 100%;
}

.game-over-stat-icon--coin {
  color: #e8c866;
  text-shadow: 0 0 16px rgba(232, 200, 102, 0.4);
}

.game-over-stat-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.game-over-stat-label {
  font-size: clamp(10px, 2.2vmin, 12px);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(200, 195, 210, 0.55);
}

.game-over-stat-value {
  font-size: clamp(28px, 8vmin, 44px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
}

.game-over-card-divider {
  height: 1px;
  margin: clamp(16px, 2.5vh, 22px) 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 215, 0, 0.22) 20%,
    rgba(255, 215, 0, 0.22) 80%,
    transparent
  );
}

.game-over-arrow-btn {
  width: clamp(64px, 14vmin, 88px);
  height: clamp(64px, 14vmin, 88px);
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
}

.game-over-arrow {
  display: block;
  font-size: clamp(28px, 7vmin, 38px);
  font-weight: 900;
  line-height: 1;
  transform: translateY(-2px);
  text-shadow: var(--tidal-glow-soft);
}

.game-over-arrow-btn:hover .game-over-arrow {
  text-shadow: var(--tidal-glow-strong);
}

.btn-tidal--chrome.btn-exit {
  padding: clamp(14px, 2.8vh, 22px) clamp(22px, 5vw, 40px);
  font-size: clamp(13px, 2.8vmin, 18px);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: none;
}

.btn-exit:hover {
  transform: scale(1.05);
}

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(16px) scale(0.96);
  padding: 10px 20px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.88);
  border: 2px solid var(--gold);
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  z-index: 90;
  transition:
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.35s ease;
  max-width: 90vw;
  text-align: center;
  filter: blur(0);
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.toast.visible.toast--out {
  opacity: 0;
  transform: translateX(-50%) translateY(20px) scale(0.94);
  filter: blur(2px);
}

.music-widget {
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: max(14px, env(safe-area-inset-bottom, 0px));
  width: min(420px, 92vw);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 22px;
  border: 1px solid rgba(248, 224, 170, 0.62);
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 255, 255, 0.34), transparent 42%),
    radial-gradient(circle at 86% 22%, rgba(255, 200, 72, 0.26), transparent 46%),
    linear-gradient(164deg, rgba(46, 38, 24, 0.96), rgba(12, 10, 6, 0.97));
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 206, 0.62),
    inset 0 -2px 8px rgba(0, 0, 0, 0.52),
    0 16px 38px rgba(0, 0, 0, 0.54),
    0 4px 0 rgba(32, 24, 10, 0.75),
    0 0 28px rgba(255, 204, 86, 0.24);
  backdrop-filter: blur(8px);
  z-index: 160;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
  pointer-events: none;
}

.music-widget::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.music-widget.music-widget--active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.music-widget.music-widget--faded {
  opacity: 0.16;
  filter: saturate(0.75);
}

.music-widget.music-widget--hidden {
  opacity: 0 !important;
  transform: translateY(12px) scale(0.96);
  visibility: hidden;
  pointer-events: none !important;
}

.music-widget:hover,
.music-widget:focus-within {
  opacity: 1 !important;
  filter: none;
}

.music-widget-art {
  width: 92px;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 229, 178, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52), 0 8px 18px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.music-widget-body {
  min-width: 0;
  flex: 1;
}

.music-widget-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: #fff6e0;
  text-shadow: 0 1px 0 rgba(22, 16, 7, 0.72), 0 0 12px rgba(255, 212, 128, 0.3);
}

.music-widget-time {
  margin: 0 0 8px;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 245, 220, 0.88);
}

.music-widget-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 230, 180, 0.26);
  overflow: hidden;
}

.music-widget-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe2a2, #fff5cf 55%, #ffd277);
  transition: width 0.18s linear;
}

.music-widget-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.music-widget-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px !important;
  padding: 8px 10px;
  font-size: 20px;
  line-height: 1;
  border: 1px solid rgba(255, 230, 172, 0.44);
  background: linear-gradient(180deg, rgba(68, 52, 28, 0.96), rgba(26, 20, 12, 0.98)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 245, 210, 0.45), inset 0 -2px 5px rgba(0, 0, 0, 0.4), 0 8px 18px rgba(0, 0, 0, 0.42) !important;
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition-duration: 0.16s;
  }

  .toast.visible.toast--out {
    filter: none;
  }

  .music-widget {
    transition-duration: 0.15s;
  }
}

@media (max-width: 520px) {
  .music-widget {
    width: min(96vw, 430px);
    padding: 10px 12px;
    gap: 10px;
  }

  .music-widget-art {
    width: 72px;
    height: 72px;
  }

  .music-widget-title {
    font-size: 16px;
  }

  .music-widget-btn {
    min-width: 40px;
    min-height: 40px;
    font-size: 18px;
  }

  .top-bar {
    justify-content: center;
    text-align: center;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  #screen-lobby .top-bar {
    justify-content: flex-start;
    text-align: left;
  }

  #screen-lobby .top-bar .lobby-records--top {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .lobby-records-stack,
  .lobby-records-actions {
    width: min(520px, 100%);
    max-width: 100%;
    margin-left: auto;
    margin-right: 0;
  }

  .wallet {
    justify-content: center;
  }

  #screen-lobby .top-bar .wallet {
    justify-content: flex-start;
  }

  .lobby-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    padding-left: max(8px, env(safe-area-inset-left, 0px));
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }

  .sidebar {
    grid-column: 1;
    grid-row: 1;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 4px 0 0;
    align-self: stretch;
    margin-top: 0;
  }

  .lobby-stage {
    grid-column: 1;
    grid-row: 2;
  }

  .btn-tidal--side.side-btn {
    flex: 1 1 calc(33.33% - 8px);
    min-width: 0;
    max-width: none;
    min-height: clamp(72px, 18vw, 100px);
    max-height: none;
    padding: 10px 6px;
    font-size: clamp(8px, 2.2vw, 11px);
  }

  .side-glyph {
    font-size: clamp(22px, 7vw, 32px);
  }

  .golden-diver {
    max-width: min(88vw, 400px, 38vh);
    max-height: min(38vh, 360px);
  }

  .diver-glow {
    width: min(100vw, 480px);
    height: min(100vw, 480px);
  }

  .btn-jump-tank.btn-tidal--hero {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    min-height: clamp(64px, 13vh, 100px);
    font-size: clamp(0.85rem, 3.8vw, 1.35rem);
    padding: clamp(16px, 2.8vh, 24px) clamp(18px, 5vw, 32px);
  }

  .lobby-play-row {
    flex-direction: column;
  }

  .lobby-map-switch {
    order: -1;
  }
}

@media (min-width: 1400px) {
  .btn-jump-tank.btn-tidal--hero {
    font-size: clamp(2rem, 2.2vw, 2.5rem);
  }
}

/* ——— Lobby: kattintható diver + max szint ——— */
.lobby-diver-stack {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  border-radius: 20px;
  padding: 8px 16px 4px;
  outline: none;
  transition: transform 0.2s ease, filter 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.lobby-diver-stack:hover {
  transform: scale(1.02);
  filter: brightness(1.06);
}

.lobby-diver-stack:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.45);
}

.lobby-diver-stack--max .diver-glow {
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.38) 0%,
    rgba(155, 89, 255, 0.22) 38%,
    transparent 68%
  );
  animation: pulse-glow-elit 2.4s ease-in-out infinite;
}

.lobby-diver-stack--max .diver-wrap {
  filter: drop-shadow(0 12px 48px rgba(255, 215, 0, 0.45)) drop-shadow(0 0 28px rgba(155, 89, 255, 0.35));
}

.lobby-diver-stack--max .golden-diver {
  animation: diver-elit-shine 3s ease-in-out infinite;
}

@keyframes pulse-glow-elit {
  0%,
  100% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@keyframes diver-elit-shine {
  0%,
  100% {
    filter: saturate(1.05) brightness(1.02);
  }
  50% {
    filter: saturate(1.25) brightness(1.12) drop-shadow(0 0 12px rgba(255, 248, 200, 0.5));
  }
}

.diver-max-tag {
  margin: 6px 0 0;
  font-size: clamp(10px, 1.8vw + 0.35rem, 13px);
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-shadow:
    0 0 16px rgba(255, 215, 0, 0.85),
    0 0 32px rgba(155, 89, 255, 0.45);
  animation: elit-tag-pulse 2s ease-in-out infinite;
}

@keyframes elit-tag-pulse {
  0%,
  100% {
    opacity: 0.92;
  }
  50% {
    opacity: 1;
  }
}

.level-badge.level-badge--max {
  border-color: var(--enchant);
  box-shadow:
    0 0 24px rgba(255, 215, 0, 0.35),
    0 0 40px rgba(155, 89, 255, 0.25);
  background: linear-gradient(135deg, rgba(40, 20, 60, 0.75), rgba(0, 0, 0, 0.72));
}

.level-badge.level-badge--max .lvl-num {
  background: linear-gradient(180deg, #fff4b8, var(--gold), var(--enchant));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

/* ——— Karakter modal ——— */
.character-overlay {
  z-index: 205;
}

/* Karakter fejlesztés: panel max. képernyőmagasság; a képességlista görget a panelen belül */
.overlay.character-overlay {
  align-items: flex-start;
  justify-content: center;
  padding: max(8px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px))
    max(8px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.settings-overlay {
  z-index: 212;
}

.settings-panel {
  width: min(440px, 100%);
  border-radius: 22px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(165deg, #121212 0%, #040404 100%);
  color: #f2f2f2;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9);
  padding: 20px 20px 24px;
  position: relative;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.3s ease;
}

.overlay.active .settings-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.news-overlay {
  z-index: 213;
}

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

.overlay.active .news-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.settings-title {
  margin: 6px 0 4px;
  text-align: center;
  font-size: 24px;
  letter-spacing: 0.14em;
}

.settings-sub {
  margin: 0 0 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.settings-section {
  margin-bottom: 14px;
}

.settings-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.82);
}

.settings-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: #0a0a0a;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.settings-save-btn {
  width: 100%;
  min-height: 48px;
}

.settings-range {
  width: 100%;
  accent-color: #d9b54a;
  cursor: pointer;
  touch-action: pan-x;
}

.settings-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.4));
}

.settings-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 245, 205, 0.95);
  background: radial-gradient(circle at 30% 30%, #fff8de, #e5ba58 70%, #8a6116 100%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
}

.settings-range::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.4));
}

.settings-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 245, 205, 0.95);
  background: radial-gradient(circle at 30% 30%, #fff8de, #e5ba58 70%, #8a6116 100%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
}

.news-list {
  margin: 10px 0 4px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.news-list li {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  line-height: 1.4;
}

.news-launch-hero {
  position: relative;
  margin: 6px 0 14px;
  padding: 20px 18px 22px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid transparent;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.07) 0%, rgba(14, 16, 22, 0.92) 58%, rgba(8, 9, 14, 0.96) 100%) padding-box,
    linear-gradient(
        125deg,
        rgba(255, 120, 40, 0.92) 0%,
        rgba(255, 215, 130, 0.55) 42%,
        rgba(130, 110, 255, 0.75) 88%
      )
      border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 190, 0.12),
    0 16px 42px rgba(0, 0, 0, 0.42),
    0 0 48px rgba(255, 140, 60, 0.14);
}

.news-launch-hero::before {
  content: "";
  position: absolute;
  inset: -55%;
  background:
    radial-gradient(circle at 26% 24%, rgba(255, 170, 90, 0.38), transparent 52%),
    radial-gradient(circle at 84% 72%, rgba(120, 95, 255, 0.26), transparent 46%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

.news-launch-badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 5px 11px;
  margin: 0 0 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.28em;
  color: rgba(20, 14, 8, 0.94);
  background: linear-gradient(180deg, #ffe8c4 0%, #ffb347 52%, #e87320 100%);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.news-launch-title {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 4.2vmin, 1.55rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 2px 18px rgba(255, 110, 40, 0.35);
}

.news-launch-lead {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(13px, 3.5vmin, 14px);
  font-weight: 680;
  line-height: 1.55;
  letter-spacing: 0.03em;
  color: rgba(252, 248, 242, 0.9);
}

.settings-divider {
  height: 1px;
  margin: 18px 0 14px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.settings-warn {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 220, 220, 0.86);
}

.settings-reset-btn {
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  background: linear-gradient(180deg, #5a0000 0%, #2c0000 100%);
  color: #ffdede;
  text-shadow: none;
  box-shadow:
    inset 0 3px 10px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 70, 70, 0.35);
}

.settings-reset-btn.settings-reset-btn--armed {
  background: linear-gradient(180deg, #8a0000 0%, #3a0000 100%);
}

.username-overlay {
  z-index: 350;
  background: rgba(0, 0, 0, 0.9);
}

.username-panel {
  width: min(420px, 100%);
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, #101010 0%, #060606 100%);
  color: #fff;
  box-shadow: 0 28px 88px rgba(0, 0, 0, 0.95);
  padding: 22px 20px 20px;
}

.username-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: clamp(1.2rem, 4.2vw, 1.5rem);
  letter-spacing: 0.08em;
}

.username-sub {
  margin: 0 0 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}

.username-input {
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: #0b0b0b;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.username-save-btn {
  width: 100%;
  min-height: 52px;
}

.username-error {
  margin: 10px 0 0;
  min-height: 1.2em;
  text-align: center;
  font-size: 12px;
  color: #ff8b8b;
}

.cloud-save-overlay {
  z-index: 360;
}

.cloud-save-panel {
  position: relative;
  max-width: min(440px, 100%);
}

.cloud-save-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.cloud-save-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.72);
  margin: 8px 0 4px;
}

.cloud-save-mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}

.cloud-save-secondary {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.cloud-save-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.cloud-save-upload-btn {
  background: linear-gradient(180deg, #1a3d2a 0%, #0d2218 100%);
  border-color: rgba(120, 220, 160, 0.45);
}

@media (max-width: 520px) {
  .cloud-save-actions {
    grid-template-columns: 1fr;
  }
}

.character-panel {
  width: min(1720px, calc(100vw - 16px));
  max-width: 100%;
  max-height: min(calc(100dvh - 20px), 1120px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, #222228 0%, #121214 48%, #0c0c10 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 32px 100px rgba(0, 0, 0, 0.75),
    0 0 80px rgba(255, 200, 80, 0.06);
  padding: clamp(18px, 2.5vw, 28px) clamp(18px, 2.5vw, 32px) clamp(20px, 2.8vw, 32px);
  position: relative;
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.35s ease;
  color: rgba(245, 245, 250, 0.92);
}

.overlay.active .character-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.character-panel.character-panel--elit {
  border-color: rgba(155, 89, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(155, 89, 255, 0.2),
    0 32px 100px rgba(0, 0, 0, 0.82),
    0 0 72px rgba(155, 89, 255, 0.14);
}

.character-panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 8;
}

.character-panel-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(440px, 1.22fr) minmax(380px, 1fr);
  gap: clamp(22px, 2.5vw, 40px);
  align-items: stretch;
  padding-top: 8px;
}

.character-panel-main {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vh, 18px);
  min-width: 0;
  min-height: 0;
  height: 100%;
  /* Ne vágjuk le a ritkaság pill box-shadow / animáció fényét */
  overflow: visible;
}

.character-panel-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  /* Tér a mythic / epic fény köré, hogy a szöveg alá ne „nyomuljon” csúnyán */
  padding: 4px 6px 10px 4px;
}

.character-rarity-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(200, 200, 215, 0.55);
}

.character-rarity-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 10px;
  font: 900 11px/1 var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1a1a1e;
  background: #f2f2f6;
  border: none;
  box-shadow: none;
}

/* Ugyanaz a megjelenés, mint a karakterválasztó listában (.character-row-rarity) */
.character-rarity-pill[data-rarity="common"] {
  color: #e0e1e7;
  background: rgba(140, 140, 154, 0.34);
}

.character-rarity-pill[data-rarity="legendary"] {
  color: #241109;
  background: linear-gradient(
    110deg,
    #ffe7a0 0%,
    #fff4ca 18%,
    #ffd76b 36%,
    #ffb050 50%,
    #ffe9aa 66%,
    #ffd06a 82%,
    #fff4cf 100%
  );
  background-size: 280% 100%;
  animation: rarityShimmer 2.6s ease-in-out infinite;
  border: 1px solid rgba(255, 221, 150, 0.68);
  box-shadow:
    0 0 16px rgba(255, 196, 82, 0.42),
    inset 0 1px 0 rgba(255, 249, 221, 0.35);
}

/* EPIC: mélylila, lassan vándorló „auróra” + bolyhos lila fény */
.character-rarity-pill[data-rarity="epic"] {
  color: #f4eeff;
  background: linear-gradient(
    125deg,
    #2e1064 0%,
    #5b21b6 18%,
    #7c3aed 38%,
    #c4b5fd 50%,
    #a855f7 62%,
    #6d28d9 82%,
    #3b0764 100%
  );
  background-size: 260% 260%;
  animation: rarityEpicAurora 2.35s ease-in-out infinite;
  border: 1px solid rgba(196, 181, 253, 0.55);
  box-shadow:
    0 0 12px rgba(139, 92, 246, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 0 10px rgba(196, 181, 253, 0.75);
}

.character-rarity-pill[data-rarity="mythic"] {
  color: #fff3f3;
  background: linear-gradient(
    125deg,
    #2f0505 0%,
    #6b0a0a 16%,
    #a60f12 36%,
    #ff7b55 50%,
    #c1121f 66%,
    #7f1d1d 84%,
    #320606 100%
  );
  background-size: 280% 280%;
  border: 1px solid rgba(255, 173, 150, 0.65);
  animation: rarityMythicInferno 2.1s ease-in-out infinite;
  box-shadow:
    0 0 14px rgba(255, 82, 67, 0.62),
    0 0 26px rgba(190, 21, 35, 0.38),
    inset 0 1px 0 rgba(255, 237, 237, 0.22);
  text-shadow: 0 0 14px rgba(255, 182, 173, 0.72);
}

.character-panel-head .character-title {
  margin: 4px 0 0;
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.15;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.character-panel-head .character-sub {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(200, 200, 215, 0.55);
}

.character-panel-stats {
  padding: 12px 0 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.character-panel-visual {
  position: relative;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(255, 210, 120, 0.12), transparent 62%),
    linear-gradient(165deg, rgba(36, 36, 44, 0.95) 0%, rgba(10, 10, 14, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  min-height: 0;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2.5vw, 28px);
  overflow: hidden;
}

.character-panel-visual .character-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
}

.character-panel-visual .character-hero-glow {
  position: absolute;
  width: min(92%, 420px);
  height: min(92%, 420px);
  max-width: 100%;
  max-height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.18) 0%, transparent 68%);
  pointer-events: none;
}

.character-panel-visual .character-modal-diver {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(58vh, 520px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.55));
}

.character-modal-diver--elit {
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.45)) drop-shadow(0 0 36px rgba(155, 89, 255, 0.35));
  animation: diver-elit-shine 2.8s ease-in-out infinite;
}

.character-panel-visual .character-elit-badge {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  margin-top: 0;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--gold-bright);
  background: linear-gradient(90deg, rgba(155, 89, 255, 0.45), rgba(255, 215, 0, 0.25), rgba(155, 89, 255, 0.45));
  border: 1px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .character-panel-layout {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .character-panel-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
  }

  .character-panel-visual {
    order: -1;
    flex: 0 0 auto;
    min-height: 0;
    max-height: min(42vh, 320px);
  }

  .character-panel-visual .character-hero {
    min-height: 0;
    max-height: 100%;
  }

  .character-panel-visual .character-modal-diver {
    max-height: min(36vh, 300px);
  }
}

.character-level-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}

.character-lvl-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--silver);
}

.character-lvl-num {
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.45);
}

.character-lvl-max {
  font-size: 16px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.35);
}

.character-xp-bar-wrap {
  height: 10px;
  border-radius: 6px;
  background: #111;
  border: 1px solid #333;
  overflow: hidden;
  margin-bottom: 10px;
}

.character-xp-fill {
  height: 100%;
  width: 0%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--enchant), var(--gold), var(--gold-bright));
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.45);
  transition: width 0.45s ease;
}

.character-level-desc {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(220, 220, 235, 0.65);
}

.character-hp-row {
  margin: 0 0 10px;
}

.character-hp-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(110, 255, 160, 0.55);
  background: linear-gradient(165deg, rgba(18, 76, 44, 0.95) 0%, rgba(8, 42, 24, 0.98) 100%);
  color: #d9ffd7;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px rgba(120, 255, 170, 0.35);
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(215, 255, 220, 0.2);
}

.character-next-gift {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 244, 200, 0.88);
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.22);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.level-grant-dupe-overlay {
  z-index: 250;
}

.character-upgrade-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
  padding-bottom: 16px;
  flex-shrink: 0;
}

.character-cost {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.character-cost-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(200, 200, 220, 0.45);
}

.character-cost-val {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 900;
  color: var(--gold-bright);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
}

.character-upgrade-btn {
  width: 100%;
  padding: 16px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #141418;
  background: linear-gradient(180deg, #f4f4f8 0%, #dcdce4 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  /* Rövid, lágy árnyék: a panel overflow:hidden nem vágja durván le */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 2px 6px rgba(0, 0, 0, 0.18),
    0 6px 16px rgba(0, 0, 0, 0.14);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.character-upgrade-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 3px 8px rgba(0, 0, 0, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.16);
}

.character-upgrade-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.character-upgrade-btn.character-upgrade-btn--cant-afford {
  opacity: 0.78;
  cursor: pointer;
  filter: saturate(0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.16),
    0 6px 14px rgba(0, 0, 0, 0.12),
    0 0 0 2px rgba(255, 100, 80, 0.28);
}

.character-upgrade-btn.character-upgrade-btn--cant-afford:hover {
  transform: scale(1.01);
  filter: saturate(0.9);
}

.character-abilities {
  flex: 0 0 auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
}

.character-abilities-title {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: rgba(220, 220, 235, 0.55);
  flex-shrink: 0;
}

.character-abilities-hint {
  margin: 0 0 2px;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(200, 200, 215, 0.45);
  flex-shrink: 0;
}

.character-passive-block {
  flex-shrink: 0;
  align-self: stretch;
  margin-bottom: 0;
  padding: 10px 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(168, 120, 255, 0.38);
  background:
    linear-gradient(135deg, rgba(130, 80, 220, 0.14) 0%, transparent 46%),
    linear-gradient(205deg, rgba(38, 18, 62, 0.55) 0%, rgba(0, 0, 0, 0.38) 100%);
  box-shadow:
    0 0 0 1px rgba(200, 160, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 4px 18px rgba(60, 20, 120, 0.18);
  position: relative;
  overflow-x: visible;
  overflow-y: visible;
}

.character-passive-block::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.5;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(160, 110, 255, 0.1) 38%,
    rgba(220, 190, 255, 0.14) 50%,
    rgba(140, 90, 240, 0.1) 62%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: character-passive-shimmer 4.5s ease-in-out infinite;
}

@keyframes character-passive-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.character-passive-callout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 8px;
  padding: 7px 8px 7px 9px;
  border-radius: 10px;
  border: 1px dashed rgba(190, 150, 255, 0.45);
  background: rgba(22, 12, 38, 0.62);
  box-shadow: inset 0 0 16px rgba(120, 70, 200, 0.08);
}

.character-passive-callout-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 248, 255, 0.96);
  background: linear-gradient(165deg, #b794f6, #7c3aed);
  border: 1px solid rgba(216, 180, 255, 0.55);
  box-shadow: 0 2px 10px rgba(120, 60, 220, 0.32);
}

.character-passive-callout-text {
  margin: 0;
  font: 600 11px/1.38 var(--font-ui);
  color: rgba(232, 220, 255, 0.9);
}

.character-passive-title {
  position: relative;
  z-index: 1;
  font: 800 10px/1.2 var(--font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(210, 180, 255, 0.82);
  margin: 0 0 6px;
}

.character-passive-chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.character-passive-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 9px;
  background: linear-gradient(165deg, rgba(110, 60, 180, 0.35), rgba(40, 22, 72, 0.5));
  border: 1px solid rgba(180, 140, 255, 0.42);
  font: 600 11px/1.2 var(--font-ui);
  color: rgba(248, 242, 255, 0.92);
  cursor: pointer;
  font-family: inherit;
  margin: 0;
  box-shadow: 0 2px 8px rgba(40, 10, 80, 0.22);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.character-passive-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(210, 175, 255, 0.65);
  box-shadow: 0 4px 16px rgba(100, 50, 180, 0.3);
}

.character-passive-chip:focus-visible {
  outline: 2px solid rgba(190, 150, 255, 0.75);
  outline-offset: 2px;
}

.character-passive-chip--off {
  opacity: 0.62;
  background: rgba(55, 52, 68, 0.55);
  border-color: rgba(120, 118, 138, 0.45);
  color: rgba(195, 192, 215, 0.88);
  box-shadow: none;
}

.character-passive-chip--off:hover {
  border-color: rgba(150, 148, 170, 0.55);
}

.character-passive-chip--empty {
  background: transparent;
  border-style: dashed;
  color: rgba(200, 200, 215, 0.45);
  font-weight: 500;
}

.character-loadout-inline {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.character-loadout-summary {
  margin: 0;
  padding: 0 2px 0 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font: 600 12px/1.35 var(--font-ui);
  color: rgba(235, 235, 245, 0.88);
}

.character-loadout-summary-li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.character-loadout-summary-slot {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #ffc94a;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.45);
  min-width: 1.25rem;
}

.character-loadout-summary-empty {
  font-weight: 600;
  font-style: italic;
  color: rgba(180, 180, 200, 0.45);
}

.character-loadout-summary-key {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #e8a51a;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.35);
}

.character-active-loadout-open-btn {
  align-self: flex-start;
  width: auto;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 14px;
  text-transform: none;
  letter-spacing: 0.03em;
  font-weight: 800;
  font-size: 11px;
  line-height: 1.2;
  border-radius: 10px;
}

.character-active-loadout-overlay {
  position: fixed;
  inset: 0;
  z-index: 214;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.32s ease,
    visibility 0s linear 0.32s,
    backdrop-filter 0.28s ease;
}

.character-active-loadout-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.3s ease,
    visibility 0s,
    backdrop-filter 0.26s ease;
}

.character-active-loadout-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  border: 2px solid rgba(255, 215, 0, 0.42);
  background: linear-gradient(165deg, #18140c 0%, #080602 48%, #0f0c08 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.88);
  padding: 18px 16px 16px;
  transform: scale(0.92) translateY(14px);
  opacity: 0;
  transition:
    transform 0.38s cubic-bezier(0.34, 1.3, 0.64, 1),
    opacity 0.32s ease;
}

.character-active-loadout-overlay.active .character-active-loadout-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.character-active-loadout-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.character-active-loadout-title {
  margin: 0 36px 6px 0;
  font-size: clamp(1rem, 3.2vw, 1.15rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 248, 230, 0.95);
  text-shadow: 0 1px 12px rgba(255, 200, 80, 0.2);
}

.character-active-loadout-sub {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(210, 205, 195, 0.72);
  flex-shrink: 0;
}

.character-loadout-rows {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  margin-right: -2px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
}

.character-active-loadout-modal-rows {
  flex: 1 1 auto;
  min-height: min(36vh, 280px);
  max-height: min(58vh, 520px);
}

.character-loadout-row {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}

.character-loadout-row-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.character-loadout-thumb {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.35);
}

.character-loadout-head-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.character-loadout-slot-heading {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}

.character-loadout-row-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.character-loadout-slot-num {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: rgba(255, 215, 0, 0.45);
  min-width: 1.5rem;
}

.character-loadout-pick {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 10px 14px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 245, 250, 0.95);
}

.character-loadout-pick:hover {
  border-color: rgba(255, 215, 0, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

.character-loadout-clear {
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 12px;
}

.character-loadout-pick.btn-tidal {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 700;
  text-shadow: none;
  color: rgba(245, 245, 250, 0.95);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  filter: none;
}

.character-loadout-pick.btn-tidal:hover {
  transform: none;
  text-shadow: none;
  color: #fff;
  border-color: rgba(255, 215, 0, 0.35);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.character-loadout-clear.btn-tidal {
  text-transform: none;
  letter-spacing: 0;
  border-radius: 12px;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.character-loadout-clear.btn-tidal:hover {
  transform: scale(1.04);
}

.character-loadout-meta {
  margin: 6px 0 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(200, 200, 220, 0.4);
}

.character-loadout-desc {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(220, 220, 235, 0.7);
}

.character-loadout-key-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.character-loadout-key-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(255, 215, 0, 0.55);
}

.character-loadout-key {
  flex: 1;
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 2px solid rgba(255, 215, 0, 0.25);
  background: rgba(0, 0, 0, 0.5);
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
}

.character-loadout-passive-note {
  margin: 8px 0 0;
  font-size: 10px;
  color: rgba(155, 200, 255, 0.55);
  letter-spacing: 0.06em;
}

.loadout-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 215;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.38s,
    backdrop-filter 0.32s ease;
}

.loadout-picker-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.35s ease,
    visibility 0s,
    backdrop-filter 0.3s ease;
}

.loadout-picker-panel {
  position: relative;
  width: min(420px, 100%);
  max-height: min(78vh, 560px);
  overflow: auto;
  border-radius: 20px;
  border: 2px solid rgba(255, 215, 0, 0.48);
  background: linear-gradient(165deg, #141008 0%, #060400 45%, #0d0a04 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.88);
  padding: 20px 18px 22px;
  transform: scale(0.9) translateY(16px);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.34, 1.3, 0.64, 1),
    opacity 0.36s ease;
}

.loadout-picker-overlay.active .loadout-picker-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.loadout-picker-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  text-align: center;
  padding-right: 40px;
}

.loadout-picker-sub {
  margin: 0 0 16px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(200, 200, 220, 0.45);
}

.loadout-picker-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loadout-picker-cat-title {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: rgba(155, 89, 255, 0.85);
}

.loadout-picker-cat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.loadout-picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  font-size: 13px;
}

.loadout-picker-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.loadout-picker-item-icon {
  font-size: 24px;
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.loadout-picker-item-text {
  flex: 1;
  min-width: 0;
  font-weight: 800;
  color: var(--gold-bright);
}

.loadout-picker-item-code {
  font-weight: 600;
  font-size: 11px;
  color: rgba(200, 200, 220, 0.45);
}

.loadout-picker-empty {
  margin: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(200, 200, 220, 0.55);
  padding: 20px 8px;
}

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

@media (max-width: 480px) {
  .character-ability-slots {
    grid-template-columns: 1fr;
  }
}

.character-ability-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border-radius: 14px;
  border: 2px dashed rgba(255, 215, 0, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(200, 200, 220, 0.45);
  font-family: var(--font-ui);
  cursor: default;
  opacity: 0.85;
}

.character-ability-slot:disabled {
  pointer-events: none;
}

.character-ability-slot--filled {
  border-style: solid;
  border-color: rgba(255, 215, 0, 0.42);
  color: rgba(255, 245, 210, 0.92);
  opacity: 1;
}

.character-ability-slot--filled .ability-slot-sub {
  color: rgba(255, 215, 0, 0.5);
}

.ability-slot-icon {
  font-size: 22px;
  opacity: 0.5;
}

.ability-slot-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ability-slot-sub {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255, 215, 0, 0.25);
}

/* ——— Téma kapcsoló (lobby) ——— */
.btn-theme-toggle {
  flex-shrink: 0;
  width: clamp(44px, 10vmin, 52px);
  height: clamp(44px, 10vmin, 52px);
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  font-size: clamp(1.1rem, 3.2vmin, 1.45rem);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ——— Világos téma ——— */
html[data-theme="light"] {
  --void: #dce3ee;
  --gold: #8a6a0a;
  --gold-dim: #6b5210;
  --gold-bright: #3d3208;
  --silver: #4a5568;
  --enchant: #6b3db8;
  --tidal-glow-soft: 0 0 12px rgba(255, 200, 60, 0.35), 0 0 28px rgba(200, 150, 40, 0.15);
  --tidal-glow-strong: 0 0 18px rgba(255, 180, 40, 0.55), 0 0 40px rgba(180, 130, 30, 0.22);
}

html[data-theme="light"] body {
  background: linear-gradient(180deg, #e8edf5 0%, #d8e0ed 45%, #ccd6e6 100%);
  color: var(--gold-bright);
}

[data-theme="light"] #screen-lobby {
  background: linear-gradient(165deg, #eef2f9 0%, #dfe7f2 40%, #d2dce8 100%);
}

[data-theme="light"] .lobby-aurora {
  opacity: 0.35;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(255, 200, 80, 0.12) 0deg,
    transparent 60deg,
    rgba(155, 120, 220, 0.08) 120deg,
    transparent 200deg,
    rgba(255, 190, 60, 0.1) 280deg,
    transparent 360deg
  );
}

[data-theme="light"] .lobby-oil-ripples {
  background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(200, 160, 60, 0.12) 0%, transparent 55%);
}

[data-theme="light"] .lobby-gold-drift {
  opacity: 0.85;
}

[data-theme="light"] .lobby-hex-grid {
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath fill='%238a6914' d='M14 0l14 8.5v17L14 34 0 25.5v-17z'/%3E%3C/svg%3E");
}

[data-theme="light"] .lobby-vignette {
  background: radial-gradient(ellipse 75% 70% at 50% 42%, transparent 0%, rgba(255, 255, 255, 0.25) 55%, rgba(200, 210, 228, 0.45) 100%);
}

[data-theme="light"] .pill {
  border-color: rgba(138, 106, 10, 0.4);
  background: linear-gradient(180deg, #fffef8 0%, #f0ebe0 100%);
  box-shadow:
    0 2px 14px rgba(80, 90, 110, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--gold-bright);
  text-shadow: none;
}

[data-theme="light"] .pill .label {
  color: var(--gold-dim);
}

[data-theme="light"] .level-badge {
  border-color: rgba(138, 106, 10, 0.55);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 20px rgba(70, 85, 110, 0.12);
}

[data-theme="light"] .lvl-label {
  color: var(--silver);
}

[data-theme="light"] .lvl-num {
  color: var(--gold);
  text-shadow: none;
}

[data-theme="light"] .level-badge.level-badge--max {
  border-color: rgba(107, 61, 184, 0.42);
  background: linear-gradient(135deg, rgba(252, 248, 255, 0.96), rgba(255, 255, 255, 0.9));
  box-shadow:
    0 0 28px rgba(155, 89, 255, 0.12),
    0 6px 22px rgba(70, 85, 110, 0.08);
}

[data-theme="light"] .diver-glow {
  background: radial-gradient(circle, rgba(255, 200, 80, 0.22) 0%, transparent 68%);
}

[data-theme="light"] .diver-wrap {
  filter: drop-shadow(0 10px 32px rgba(100, 90, 60, 0.2));
}

[data-theme="light"] .tagline {
  color: rgba(60, 70, 85, 0.55);
}

[data-theme="light"] .lobby-player-name-above {
  color: rgba(42, 32, 12, 0.95);
  text-shadow: none;
}

[data-theme="light"] .lobby-party-guest {
  border-color: rgba(160, 130, 70, 0.35);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(244, 236, 220, 0.96));
  box-shadow: 0 8px 22px rgba(70, 55, 30, 0.12);
}

[data-theme="light"] .lobby-party-guest-name {
  color: rgba(42, 32, 12, 0.95);
}

[data-theme="light"] .lobby-party-ready-summary {
  color: rgba(35, 55, 88, 0.92);
  text-shadow: none;
}

[data-theme="light"] .lobby-party-ready-badge {
  color: #06351a;
  border-color: rgba(255, 255, 255, 0.75);
}

[data-theme="light"] .lobby-party-code-strip {
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.92), rgba(245, 238, 226, 0.75));
  border-bottom-color: rgba(170, 140, 80, 0.25);
}

[data-theme="light"] .lobby-party-code-label {
  color: rgba(38, 48, 62, 0.78);
}

[data-theme="light"] .lobby-party-code-value {
  color: #7a5200;
  text-shadow: none;
}

[data-theme="light"] .overlay.party-invite-overlay {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
}

[data-theme="light"] .party-invite-panel {
  border-color: rgba(210, 155, 55, 0.42);
  background:
    linear-gradient(
      155deg,
      rgba(255, 248, 230, 0.92) 0%,
      rgba(255, 255, 255, 0.72) 42%,
      rgba(215, 228, 250, 0.62) 100%
    ),
    linear-gradient(165deg, rgba(252, 253, 255, 0.72) 0%, rgba(210, 222, 245, 0.68) 100%);
  backdrop-filter: blur(20px) saturate(1.55);
  -webkit-backdrop-filter: blur(20px) saturate(1.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(100, 130, 170, 0.22),
    0 22px 55px rgba(35, 55, 100, 0.22),
    0 0 0 1px rgba(200, 145, 55, 0.22),
    0 0 36px rgba(255, 185, 70, 0.14);
}

[data-theme="light"] .party-invite-title {
  color: #a06200;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .party-invite-body {
  color: rgba(35, 42, 58, 0.95);
}

[data-theme="light"] .party-invite-accept {
  color: #ffffff !important;
  border-color: rgba(55, 185, 115, 0.85) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.12) 100%),
    linear-gradient(155deg, rgba(35, 205, 125, 0.95) 0%, rgba(16, 145, 82, 0.98) 100%) !important;
  backdrop-filter: blur(10px) saturate(1.55);
  -webkit-backdrop-filter: blur(10px) saturate(1.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -1px 0 rgba(0, 95, 48, 0.22),
    0 3px 0 rgba(20, 110, 65, 0.18),
    0 10px 26px rgba(25, 150, 90, 0.38),
    0 0 22px rgba(60, 210, 130, 0.22);
}

[data-theme="light"] .party-invite-decline {
  color: #ffffff !important;
  border-color: rgba(230, 85, 95, 0.88) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 230, 230, 0.1) 100%),
    linear-gradient(155deg, rgba(245, 68, 82, 0.96) 0%, rgba(190, 32, 48, 0.98) 100%) !important;
  backdrop-filter: blur(10px) saturate(1.52);
  -webkit-backdrop-filter: blur(10px) saturate(1.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 230, 0.55),
    inset 0 -1px 0 rgba(130, 25, 38, 0.28),
    0 3px 0 rgba(160, 45, 55, 0.16),
    0 10px 26px rgba(200, 50, 65, 0.38),
    0 0 22px rgba(255, 110, 125, 0.2);
}

[data-theme="light"] .lobby-footer {
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.75) 50%, transparent 100%);
}

[data-theme="light"] .game-screen {
  background: linear-gradient(180deg, #d5deec 0%, #c5d2e4 100%);
}

[data-theme="light"] .game-run-gems-hud {
  border-color: rgba(138, 106, 10, 0.38);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.94) 0%, rgba(240, 244, 250, 0.96) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8),
    0 6px 22px rgba(60, 75, 100, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .game-run-gems-caption {
  color: rgba(70, 80, 95, 0.65);
}

[data-theme="light"] .game-run-gems-value {
  color: var(--gold);
  text-shadow: none;
}

[data-theme="light"] .game-run-gems-icon {
  color: #a67c00;
  text-shadow: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

[data-theme="light"] .game-run-coins-hud {
  border-color: rgba(180, 120, 40, 0.38);
  background: linear-gradient(165deg, rgba(255, 252, 248, 0.94) 0%, rgba(255, 245, 230, 0.96) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8),
    0 6px 22px rgba(60, 75, 100, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .game-run-coins-caption {
  color: rgba(90, 75, 55, 0.65);
}

[data-theme="light"] .game-run-coins-value {
  color: #c67d00;
  text-shadow: none;
}

[data-theme="light"] .game-run-coins-icon {
  color: #d4941a;
  text-shadow: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.06));
}

[data-theme="light"] .game-run-map-hud {
  border-color: rgba(60, 120, 90, 0.35);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.94) 0%, rgba(236, 248, 242, 0.96) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85),
    0 6px 22px rgba(60, 75, 100, 0.1);
}

[data-theme="light"] .game-run-map-caption {
  color: rgba(60, 90, 75, 0.6);
}

[data-theme="light"] .game-run-map-value {
  color: #0d7a52;
  text-shadow: none;
}

[data-theme="light"] .lobby-map-chip {
  border-color: rgba(120, 100, 40, 0.35);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 244, 248, 0.98) 100%);
  box-shadow: 0 2px 12px rgba(60, 75, 100, 0.12);
}

[data-theme="light"] .lobby-map-chip--active {
  border-color: rgba(180, 140, 40, 0.75);
  box-shadow: 0 0 18px rgba(255, 200, 80, 0.2);
}

[data-theme="light"] .map-panel.map-panel-tidal {
  border-color: rgba(180, 150, 60, 0.45);
  background: linear-gradient(165deg, #faf8f4 0%, #ece8e0 100%);
  box-shadow: 0 24px 60px rgba(60, 75, 100, 0.18);
}

[data-theme="light"] .map-panel.map-panel-tidal.map-panel--maxed {
  border-color: rgba(160, 92, 230, 0.58);
  box-shadow:
    0 24px 60px rgba(60, 75, 100, 0.2),
    0 0 44px rgba(151, 67, 234, 0.22);
}

[data-theme="light"] .map-picker-trigger {
  border-color: rgba(138, 106, 10, 0.42);
}

[data-theme="light"] .map-picker-panel {
  border-color: rgba(180, 150, 60, 0.45);
  background: linear-gradient(165deg, #faf8f4 0%, #ece8e0 100%);
  box-shadow: 0 24px 60px rgba(60, 75, 100, 0.18);
}

[data-theme="light"] .map-picker-sub {
  color: rgba(60, 70, 85, 0.66);
}

[data-theme="light"] .map-picker-item {
  border-color: rgba(140, 110, 30, 0.26);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(239, 243, 250, 0.98));
  color: rgba(58, 47, 16, 0.92);
}

[data-theme="light"] .map-unlock-desc {
  color: rgba(55, 65, 80, 0.88);
}

[data-theme="light"] .map-panel-hint {
  color: rgba(70, 80, 95, 0.6);
}

[data-theme="light"] .map-frag-bar-wrap {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(100, 120, 140, 0.2);
}

[data-theme="light"] .map-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(138, 106, 10, 0.26);
}

[data-theme="light"] .map-card-name {
  color: #fff9eb;
}

[data-theme="light"] .map-card-progress-text {
  color: rgba(72, 54, 18, 0.78);
}

[data-theme="light"] .map-card-blurb {
  color: rgba(55, 65, 80, 0.82);
}

[data-theme="light"] .game-over-overlay {
  background: rgba(240, 244, 250, 0.72);
}

[data-theme="light"] .game-over-heading {
  color: var(--gold-bright);
  text-shadow: none;
}

[data-theme="light"] .game-over-kills {
  color: rgba(70, 80, 95, 0.65);
}

[data-theme="light"] .game-over-card {
  border-color: rgba(138, 106, 10, 0.38);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.97) 0%, rgba(245, 248, 252, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 10px 36px rgba(60, 80, 110, 0.1);
}

[data-theme="light"] .game-over-stat-label {
  color: rgba(70, 80, 95, 0.6);
}

[data-theme="light"] .game-over-stat-value {
  color: var(--gold);
  text-shadow: none;
}

[data-theme="light"] .game-over-stat-icon {
  color: #a67c00;
  text-shadow: none;
}

[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(138, 106, 10, 0.45);
  color: var(--gold-bright);
}

[data-theme="light"] .overlay {
  background: rgba(55, 65, 80, 0.35);
}

[data-theme="light"] .shop-panel,
[data-theme="light"] .character-panel {
  border-color: rgba(138, 106, 10, 0.42);
  background: linear-gradient(165deg, #fafbfd 0%, #eef2f8 100%);
  color: var(--gold-bright);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 20px 50px rgba(50, 65, 90, 0.15);
}

[data-theme="light"] .character-upgrade-btn {
  color: #1a1d26;
  background: linear-gradient(180deg, #f9fafd 0%, #e4eaf2 100%);
  border: 1px solid rgba(95, 110, 135, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(45, 55, 80, 0.06),
    0 4px 14px rgba(45, 55, 80, 0.09);
}

[data-theme="light"] .character-upgrade-btn:not(:disabled):hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 2px 4px rgba(45, 55, 80, 0.07),
    0 6px 18px rgba(45, 55, 80, 0.11);
}

[data-theme="light"] .character-upgrade-btn.character-upgrade-btn--cant-afford {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 1px 2px rgba(45, 55, 80, 0.05),
    0 4px 12px rgba(45, 55, 80, 0.08),
    0 0 0 2px rgba(210, 85, 65, 0.32);
}

[data-theme="light"] .shop-title,
[data-theme="light"] .character-title {
  color: var(--gold-bright);
  text-shadow: none;
}

[data-theme="light"] .shop-sub {
  color: rgba(70, 80, 95, 0.65);
}

[data-theme="light"] .character-level-pill {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(138, 106, 10, 0.35);
}

[data-theme="light"] .character-next-gift {
  color: rgba(90, 66, 10, 0.92);
  background: rgba(255, 250, 230, 0.95);
  border-color: rgba(200, 170, 80, 0.35);
  box-shadow: none;
}

[data-theme="light"] .character-stat-row {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(120, 130, 150, 0.2);
}

[data-theme="light"] .character-ability-slot {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(138, 106, 10, 0.2);
  color: rgba(70, 80, 95, 0.55);
}

[data-theme="light"] .loading-screen {
  background: #e8edf5;
}

[data-theme="light"] .loading-screen__vignette {
  background: radial-gradient(ellipse 85% 70% at 50% 38%, transparent 0%, rgba(255, 255, 255, 0.35) 55%, rgba(210, 220, 235, 0.6) 100%);
}

[data-theme="light"] .loading-bar-label {
  color: rgba(255, 255, 255, 0.98);
  font-weight: 900;
}

[data-theme="light"] .power-surge-overlay {
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, 0.15) 0%, rgba(220, 228, 240, 0.85) 100%);
}

[data-theme="light"] .power-surge-text {
  color: #9b6d00;
  -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.9);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 14px rgba(200, 160, 60, 0.42);
  background: rgba(255, 255, 255, 0.66);
}

[data-theme="light"] .power-surge-sub {
  color: rgba(55, 47, 20, 0.96);
  text-shadow: none;
  background: rgba(255, 255, 255, 0.72);
}

[data-theme="light"] .btn-tidal {
  color: #6f4d00;
  text-shadow: none;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 55%, #e4eaf4 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -2px 6px rgba(120, 140, 165, 0.14),
    0 0 0 1px rgba(125, 140, 160, 0.25),
    0 6px 16px rgba(60, 80, 110, 0.12);
}

[data-theme="light"] .btn-tidal:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -2px 6px rgba(120, 140, 165, 0.18),
    0 0 0 1px rgba(180, 140, 40, 0.4),
    0 8px 20px rgba(60, 80, 110, 0.14);
}

[data-theme="light"] .shop-panel,
[data-theme="light"] .character-panel,
[data-theme="light"] .settings-panel,
[data-theme="light"] .quests-panel,
[data-theme="light"] .pause-panel,
[data-theme="light"] .coin-short-panel,
[data-theme="light"] .map-panel.map-panel-tidal,
[data-theme="light"] .map-picker-panel {
  color: #384457;
}

[data-theme="light"] .shop-title,
[data-theme="light"] .character-title,
[data-theme="light"] .quests-title,
[data-theme="light"] .pause-title,
[data-theme="light"] .settings-title,
[data-theme="light"] .coin-short-title,
[data-theme="light"] .map-panel-title,
[data-theme="light"] .map-picker-title {
  color: #9b6d00;
}

[data-theme="light"] .character-panel-head .character-title {
  color: #1a1d26;
  text-shadow: none;
}

[data-theme="light"] .character-panel-head .character-sub,
[data-theme="light"] .character-rarity-label {
  color: rgba(55, 65, 82, 0.62);
}

[data-theme="light"] .character-panel-visual {
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(255, 220, 140, 0.2), transparent 62%),
    linear-gradient(165deg, #fbfcff 0%, #e8ecf5 100%);
  border-color: rgba(120, 130, 150, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

[data-theme="light"] .character-panel-stats {
  border-color: rgba(120, 130, 150, 0.18);
}

[data-theme="light"] .character-abilities {
  border-color: rgba(120, 130, 150, 0.18);
}

[data-theme="light"] .character-abilities-title,
[data-theme="light"] .character-abilities-hint {
  color: rgba(55, 65, 82, 0.55);
}

[data-theme="light"] .character-passive-block {
  border-color: rgba(140, 100, 200, 0.42);
  background:
    linear-gradient(135deg, rgba(160, 130, 220, 0.14) 0%, transparent 46%),
    linear-gradient(205deg, rgba(252, 250, 255, 0.98) 0%, rgba(232, 228, 242, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(160, 140, 200, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 6px 22px rgba(80, 60, 120, 0.1);
}

[data-theme="light"] .character-passive-callout {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(140, 110, 200, 0.42);
  box-shadow: inset 0 0 16px rgba(160, 130, 220, 0.06);
}

[data-theme="light"] .character-passive-callout-text {
  color: rgba(42, 32, 62, 0.92);
}

[data-theme="light"] .character-passive-title {
  color: rgba(95, 60, 140, 0.88);
}

[data-theme="light"] .character-passive-chip {
  background: linear-gradient(165deg, rgba(210, 190, 255, 0.55), rgba(175, 150, 240, 0.4));
  border-color: rgba(110, 80, 165, 0.4);
  color: rgba(32, 26, 52, 0.94);
  box-shadow: 0 2px 10px rgba(90, 60, 140, 0.12);
}

[data-theme="light"] .character-passive-chip--off {
  background: rgba(236, 234, 242, 0.92);
  border-color: rgba(130, 128, 145, 0.42);
  color: rgba(75, 72, 92, 0.88);
}

[data-theme="light"] .character-loadout-summary-li {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(120, 130, 150, 0.22);
  color: #2a3140;
}

[data-theme="light"] .character-loadout-summary-empty {
  color: rgba(90, 95, 110, 0.55);
}

[data-theme="light"] .character-loadout-summary-slot {
  color: #b26500;
  text-shadow: none;
}

[data-theme="light"] .character-loadout-summary-key {
  color: #9a5500;
  font-weight: 900;
  text-shadow: none;
}

[data-theme="light"] .character-active-loadout-panel {
  background: linear-gradient(165deg, #fefdfb 0%, #eceef5 48%, #e4e8f2 100%);
  border-color: rgba(180, 145, 60, 0.45);
  box-shadow: 0 24px 70px rgba(40, 50, 70, 0.2);
}

[data-theme="light"] .character-active-loadout-title {
  color: #7a5a10;
  text-shadow: none;
}

[data-theme="light"] .character-active-loadout-sub {
  color: rgba(55, 65, 82, 0.68);
}

[data-theme="light"] .character-loadout-row {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(120, 130, 150, 0.22);
}

[data-theme="light"] .character-loadout-slot-heading {
  color: #1a1d26;
}

[data-theme="light"] .character-loadout-thumb {
  background: rgba(230, 235, 245, 0.95);
  border-color: rgba(120, 130, 150, 0.22);
  color: rgba(55, 65, 82, 0.35);
}

[data-theme="light"] .character-loadout-pick {
  color: #2a3140;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(120, 130, 150, 0.28);
}

[data-theme="light"] .character-loadout-pick.btn-tidal {
  color: #2a3140;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(120, 130, 150, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .character-loadout-pick.btn-tidal:hover {
  color: #1a1d26;
  background: #fff;
}

[data-theme="light"] .shop-item-name,
[data-theme="light"] .shop-item-desc,
[data-theme="light"] .shop-item-meta,
[data-theme="light"] .settings-sub,
[data-theme="light"] .settings-label,
[data-theme="light"] .news-list li,
[data-theme="light"] .settings-warn,
[data-theme="light"] .quests-sub,
[data-theme="light"] .quests-reset,
[data-theme="light"] .quest-card-title,
[data-theme="light"] .quest-card-meta,
[data-theme="light"] .pause-kicker,
[data-theme="light"] .pause-hint {
  color: #4a5568;
  text-shadow: none;
}

[data-theme="light"] .news-list li {
  border-color: rgba(130, 145, 170, 0.28);
  background: rgba(255, 255, 255, 0.82);
}

[data-theme="light"] .news-launch-hero {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 252, 255, 0.88) 100%) padding-box,
    linear-gradient(125deg, rgba(255, 140, 50, 0.85), rgba(255, 210, 140, 0.55), rgba(120, 95, 220, 0.55))
      border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 14px 36px rgba(80, 90, 120, 0.18);
}

[data-theme="light"] .news-launch-title {
  color: #1a1f2e;
  text-shadow: none;
}

[data-theme="light"] .news-launch-lead {
  color: rgba(45, 52, 72, 0.92);
}

[data-theme="light"] .settings-input {
  color: #354052;
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(120, 130, 150, 0.34);
}

[data-theme="light"] .toast {
  color: #6f4d00;
}

[data-theme="light"] .shop-item--locked,
[data-theme="light"] .shop-item-poor {
  border-color: rgba(120, 130, 150, 0.22);
  background: linear-gradient(150deg, rgba(240, 244, 250, 0.65), rgba(230, 236, 244, 0.72));
}

[data-theme="light"] .shop-item {
  border-color: rgba(138, 106, 10, 0.24);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(240, 245, 252, 0.95));
}

[data-theme="light"] .shop-item--owned {
  border-color: rgba(26, 143, 94, 0.36);
  background: linear-gradient(150deg, rgba(245, 255, 250, 0.95), rgba(232, 248, 240, 0.98));
}

.quests-overlay {
  z-index: 8800;
}

.quests-panel {
  width: min(860px, 94vw);
  max-height: min(88vh, 860px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 215, 0, 0.32);
  background:
    radial-gradient(circle at 30% 0%, rgba(255, 215, 0, 0.12), transparent 50%),
    linear-gradient(180deg, #14100c, #070707);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 28px rgba(255, 215, 0, 0.2);
  padding: 22px;
  transform: translateY(14px) scale(0.98);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.overlay.active .quests-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.quests-title {
  margin: 0;
  letter-spacing: 0.08em;
}

.quests-sub {
  margin: 8px 0 14px;
  color: rgba(255, 232, 180, 0.84);
}

.quests-reset {
  margin: -8px 0 14px;
  color: rgba(255, 242, 208, 0.9);
  font-size: 0.92rem;
}

#quests-reset-timer {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(127, 248, 192, 0.95);
}

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

.quest-card {
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.24);
}

.quest-card--done {
  border-color: rgba(127, 248, 192, 0.55);
  background: rgba(26, 89, 60, 0.34);
}

.quest-card-title {
  font-weight: 700;
}

.quest-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  font-size: 0.9rem;
  color: rgba(255, 235, 190, 0.84);
}

.quests-unsupported {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 215, 0, 0.24);
  padding-top: 12px;
}

.quests-unsupported-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

#quests-unsupported-list {
  margin: 0;
  padding-left: 20px;
  color: rgba(255, 230, 180, 0.75);
  display: grid;
  gap: 4px;
}

.quest-done-overlay {
  position: fixed;
  inset: 0;
  z-index: 9300;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

.quest-done-overlay.active {
  display: flex;
}

.quest-done-panel {
  width: min(500px, 92vw);
  border-radius: 18px;
  border: 1px solid rgba(255, 215, 0, 0.34);
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 215, 0, 0.16), transparent 55%),
    linear-gradient(180deg, #17110b, #090909);
  text-align: center;
  padding: 18px 18px 14px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.66), 0 0 30px rgba(255, 215, 0, 0.26);
}

.quest-done-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  color: rgba(255, 230, 160, 0.84);
}

.quest-done-title {
  margin: 10px 0 8px;
}

.quest-done-reward {
  margin: 0 0 10px;
  color: rgba(255, 238, 201, 0.92);
}

/* ---- Light theme readability fixes (final overrides) ---- */
[data-theme="light"] .quests-panel {
  border-color: rgba(138, 106, 10, 0.35);
  background:
    radial-gradient(circle at 28% 0%, rgba(255, 215, 0, 0.1), transparent 52%),
    linear-gradient(165deg, #fbfcff 0%, #edf2f9 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 20px 56px rgba(55, 70, 95, 0.16);
  color: #3b475a;
}

[data-theme="light"] .settings-panel {
  border-color: rgba(138, 106, 10, 0.35);
  background: linear-gradient(165deg, #fbfcff 0%, #edf2f9 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 20px 56px rgba(55, 70, 95, 0.16);
  color: #3b475a;
}

[data-theme="light"] .quests-sub,
[data-theme="light"] .quests-reset,
[data-theme="light"] .quest-card-title,
[data-theme="light"] .quest-card-meta,
[data-theme="light"] .quests-unsupported-title,
[data-theme="light"] #quests-unsupported-list {
  color: #475366;
}

[data-theme="light"] .quest-card {
  border-color: rgba(138, 106, 10, 0.24);
  background: rgba(255, 255, 255, 0.76);
}

[data-theme="light"] .quest-card--done {
  border-color: rgba(26, 143, 94, 0.45);
  background: rgba(220, 247, 235, 0.85);
}

[data-theme="light"] .pause-panel {
  border-color: rgba(138, 106, 10, 0.38);
  background: linear-gradient(165deg, #fcfdff 0%, #eef3fa 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 20px 56px rgba(55, 70, 95, 0.16);
  color: #374356;
}

[data-theme="light"] .pause-kicker,
[data-theme="light"] .pause-hint {
  color: #536175;
}

[data-theme="light"] .shop-owned-badge {
  color: #0a8a56;
  border-color: rgba(18, 150, 93, 0.45);
  background: rgba(227, 250, 240, 0.86);
  box-shadow: inset 0 0 0 1px rgba(18, 150, 93, 0.15);
}

[data-theme="light"] .character-abilities-hint {
  color: rgba(70, 84, 104, 0.9);
}

[data-theme="light"] .character-loadout-row {
  border-color: rgba(138, 106, 10, 0.24);
  background: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] .character-loadout-meta,
[data-theme="light"] .character-loadout-slot-num,
[data-theme="light"] .character-loadout-key-label,
[data-theme="light"] .character-loadout-passive-note {
  color: rgba(72, 86, 106, 0.85);
}

[data-theme="light"] .character-loadout-desc {
  color: rgba(70, 84, 104, 0.9);
}

[data-theme="light"] .character-loadout-key {
  color: #445266;
  border-color: rgba(120, 130, 150, 0.35);
  background: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .loadout-picker-panel {
  border-color: rgba(138, 106, 10, 0.34);
  background: linear-gradient(165deg, #fbfcff 0%, #eef3fa 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 20px 56px rgba(55, 70, 95, 0.16);
}

[data-theme="light"] .loadout-picker-sub,
[data-theme="light"] .loadout-picker-item-code,
[data-theme="light"] .loadout-picker-empty {
  color: rgba(72, 86, 106, 0.84);
}

[data-theme="light"] .loadout-picker-item-text {
  color: #445266;
}

[data-theme="light"] .coin-short-math {
  color: #435064;
  border-color: rgba(138, 106, 10, 0.28);
  background: rgba(243, 247, 253, 0.95);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* Character progression readability in light mode */
[data-theme="light"] .character-title {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: #8a6200;
}

[data-theme="light"] .character-sub,
[data-theme="light"] .character-level-desc,
[data-theme="light"] .character-cost-label {
  color: #5a677b;
}

[data-theme="light"] .character-hp-pill {
  border-color: rgba(44, 162, 92, 0.46);
  background: linear-gradient(165deg, rgba(228, 255, 236, 0.97) 0%, rgba(208, 245, 219, 0.98) 100%);
  color: #1d7446;
  text-shadow: none;
  box-shadow:
    0 2px 8px rgba(64, 90, 80, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

[data-theme="light"] .character-lvl-label {
  color: #5b6780;
}

[data-theme="light"] .character-lvl-num {
  color: #8a6200;
  text-shadow: none;
}

[data-theme="light"] .character-lvl-max {
  color: rgba(86, 99, 120, 0.72);
}

[data-theme="light"] .character-xp-bar-wrap {
  background: rgba(220, 228, 240, 0.95);
  border-color: rgba(120, 130, 150, 0.35);
}

[data-theme="light"] .character-xp-fill {
  box-shadow: none;
}

/* Celebration overlays readable on light theme */
[data-theme="light"] .levelup-overlay {
  background: radial-gradient(ellipse at 50% 44%, rgba(255, 255, 255, 0.14) 0%, rgba(225, 233, 245, 0.88) 100%);
}

[data-theme="light"] .levelup-kicker,
[data-theme="light"] .levelup-text,
[data-theme="light"] .levelup-sub,
[data-theme="light"] .ability-cele-kicker,
[data-theme="light"] .ability-cele-tag,
[data-theme="light"] .ability-cele-code {
  color: rgba(70, 84, 104, 0.96);
  text-shadow: none;
}

[data-theme="light"] .levelup-num,
[data-theme="light"] .ability-cele-name {
  color: #8a6200;
  text-shadow: none;
}

[data-theme="light"] .ability-cele-vig {
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, 0.22) 0%, rgba(225, 233, 245, 0.9) 100%);
}

[data-theme="light"] .ability-cele-grid {
  background-image:
    linear-gradient(rgba(138, 106, 10, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 106, 10, 0.08) 1px, transparent 1px);
}

[data-theme="light"] .ability-cele-frame {
  border-color: rgba(138, 106, 10, 0.42);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 0 40px rgba(170, 140, 60, 0.2),
    inset 0 0 24px rgba(255, 215, 0, 0.08);
}

[data-theme="light"] .ability-cele-icon {
  filter: drop-shadow(0 0 14px rgba(170, 140, 60, 0.5));
}

[data-theme="light"] .quest-done-panel {
  border-color: rgba(138, 106, 10, 0.35);
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 215, 0, 0.12), transparent 55%),
    linear-gradient(165deg, #fbfcff 0%, #edf2f9 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 20px 56px rgba(55, 70, 95, 0.16);
}

[data-theme="light"] .quest-done-kicker {
  color: rgba(95, 78, 30, 0.82);
}

[data-theme="light"] .quest-done-title {
  color: #8a6200;
}

[data-theme="light"] .quest-done-reward {
  color: #465266;
}

/* Boss győzelem modal + lobby rekordtábla */
.boss-victory-overlay {
  position: fixed;
  inset: 0;
  z-index: 8650;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.boss-victory-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.boss-victory-overlay:focus {
  outline: none;
}

.boss-victory-panel {
  position: relative;
  z-index: 2;
  width: min(460px, 94vw);
  padding: 28px 26px 28px;
  border-radius: 20px;
  border: 1px solid rgba(255, 190, 80, 0.45);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 200, 90, 0.22), transparent 55%),
    linear-gradient(165deg, #1a1410 0%, #0a0806 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(255, 120, 40, 0.18);
  overflow: hidden;
}

.boss-victory-panel--celebrate {
  animation: boss-victory-panel-pop 0.62s cubic-bezier(0.22, 1.25, 0.36, 1);
}

.boss-victory-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.boss-victory-confetti--overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.boss-victory-confetti-piece {
  position: absolute;
  top: -18%;
  left: calc(var(--bc-x, 50) * 1%);
  width: var(--bc-w, 9px);
  height: var(--bc-h, 16px);
  border-radius: var(--bc-br, 2px);
  background: var(--bc-bg, linear-gradient(140deg, #fff6d8, #ffd65c, #b8860b));
  opacity: 0.04;
  transform: translateX(0) rotate(0deg) scale(0.92);
  will-change: transform, opacity;
  box-shadow:
    0 0 10px rgba(255, 210, 110, 0.45),
    0 0 18px rgba(255, 182, 58, 0.22);
}

.boss-victory-confetti-piece--round {
  filter: brightness(1.06) saturate(1.08);
}

.boss-victory-confetti-piece--spark {
  box-shadow:
    0 0 12px rgba(255, 230, 160, 0.72),
    0 0 24px rgba(255, 170, 40, 0.28);
}

.boss-victory-overlay.active .boss-victory-confetti-piece {
  animation:
    boss-victory-confetti-fall var(--bc-dur, 2.8s) cubic-bezier(0.22, 0.86, 0.31, 1) var(--bc-delay, 0s) both,
    boss-victory-confetti-flicker calc(var(--bc-dur, 2.8s) * 0.72) ease-in-out var(--bc-delay, 0s) infinite;
}

@keyframes boss-victory-confetti-fall {
  0% {
    opacity: 0;
    transform: translateX(0) translateY(-10%) rotate(0deg);
  }
  8% {
    opacity: 1;
  }
  52% {
    opacity: 0.88;
    transform: translateX(calc(var(--bc-dx, 0px) * 0.38)) translateY(56%) rotate(calc(var(--bc-rot, 400deg) * 0.52));
  }
  100% {
    opacity: 0.12;
    transform: translateX(var(--bc-dx, 0px)) translateY(140%) rotate(var(--bc-rot, 400deg)) scale(1.05);
  }
}

@keyframes boss-victory-confetti-flicker {
  0%,
  100% {
    filter: brightness(0.98);
  }
  50% {
    filter: brightness(1.2);
  }
}

.boss-victory-glow {
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 120deg,
    transparent,
    rgba(255, 140, 40, 0.12),
    transparent,
    rgba(255, 220, 100, 0.08),
    transparent
  );
  animation: boss-victory-spin 14s linear infinite;
  pointer-events: none;
}

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

.boss-victory-kicker {
  position: relative;
  margin: 0 0 8px;
  font: 800 13px system-ui, sans-serif;
  letter-spacing: 0.28em;
  color: #ffb74d;
  text-shadow: 0 0 18px rgba(255, 120, 40, 0.55);
}

.boss-victory-heading {
  position: relative;
  margin: 0 0 18px;
  font: 800 22px/1.2 system-ui, sans-serif;
  color: #fff4e0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.boss-victory-congrats {
  position: relative;
  margin: -6px 0 14px;
  font: 800 13px/1.35 system-ui, sans-serif;
  letter-spacing: 0.04em;
  color: #ffe6b0;
  text-shadow: 0 0 14px rgba(255, 180, 60, 0.46);
  animation: boss-victory-congrats-pulse 1.35s ease-in-out infinite;
}

.boss-victory-stats {
  position: relative;
  list-style: none;
  margin: 0 0 22px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 200, 120, 0.15);
}

.boss-victory-stats li {
  margin: 8px 0;
  font: 600 14px/1.35 system-ui, sans-serif;
  color: #e8dcc8;
}

.boss-victory-actions {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@keyframes boss-victory-panel-pop {
  0% {
    transform: scale(0.94) translateY(16px);
    filter: brightness(0.9);
  }
  55% {
    transform: scale(1.02) translateY(0);
    filter: brightness(1.06);
  }
  100% {
    transform: scale(1) translateY(0);
    filter: brightness(1);
  }
}

@keyframes boss-victory-congrats-pulse {
  0%,
  100% {
    opacity: 0.78;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

.boss-victory-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 16px 20px;
  font-size: clamp(14px, 3.6vmin, 17px);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  white-space: normal;
  text-align: center;
  border-radius: 16px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.boss-victory-btn--primary {
  box-shadow: 0 0 24px rgba(255, 180, 60, 0.25);
}

.boss-victory-btn--exit {
  border-color: rgba(255, 120, 90, 0.45) !important;
  color: #ffc9b8 !important;
}

[data-theme="light"] .boss-victory-panel {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 220, 160, 0.35), transparent 50%),
    linear-gradient(165deg, #fffdfb 0%, #f0e8dc 100%);
  border-color: rgba(180, 130, 40, 0.35);
}

[data-theme="light"] .boss-victory-heading {
  color: #5a3d00;
  text-shadow: none;
}

[data-theme="light"] .boss-victory-congrats {
  color: #9a6c00;
  text-shadow: 0 0 8px rgba(240, 170, 50, 0.2);
}

[data-theme="light"] .boss-victory-stats {
  background: rgba(255, 252, 248, 0.9);
  border-color: rgba(160, 130, 80, 0.2);
}

[data-theme="light"] .boss-victory-stats li {
  color: #3d4555;
}

.lobby-records {
  position: relative;
  margin-top: 18px;
  padding: 16px 18px 18px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 190, 80, 0.35);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 160, 60, 0.2), transparent 58%),
    linear-gradient(165deg, rgba(22, 18, 14, 0.92), rgba(8, 6, 5, 0.96));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 12px 40px rgba(0, 0, 0, 0.35),
    0 0 36px rgba(255, 100, 30, 0.12);
  overflow: hidden;
}

.lobby-records-flames {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 28px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 90, 40, 0.35),
    rgba(255, 200, 80, 0.45),
    rgba(255, 90, 40, 0.35),
    transparent
  );
  filter: blur(8px);
  opacity: 0.75;
  animation: lobby-rec-flicker 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes lobby-rec-flicker {
  0%,
  100% {
    opacity: 0.55;
    transform: scaleX(1);
  }
  50% {
    opacity: 0.9;
    transform: scaleX(1.03);
  }
}

.lobby-records-title {
  position: relative;
  margin: 0 0 2px;
  text-align: center;
  font: 900 15px system-ui, sans-serif;
  letter-spacing: 0.42em;
  color: #ffcc80;
  text-shadow: 0 0 20px rgba(255, 140, 50, 0.45);
}

.lobby-records-sub {
  position: relative;
  margin: 0 0 14px;
  text-align: center;
  font: 600 11px system-ui, sans-serif;
  color: rgba(255, 230, 200, 0.55);
}

.lobby-records-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.lobby-records-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 200, 120, 0.12);
}

.lobby-records-icon {
  font-size: 18px;
  filter: drop-shadow(0 0 8px rgba(255, 180, 60, 0.35));
}

.ui-icon-img--record {
  width: 19px;
  height: 19px;
  filter: drop-shadow(0 0 8px rgba(255, 180, 60, 0.38));
}

.lobby-records-icon--coin .ui-icon-img--record {
  width: 18px;
  height: 18px;
}

.lobby-records-label {
  font: 600 9px system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 220, 190, 0.5);
  text-align: center;
}

.lobby-records-value {
  font: 800 20px/1 system-ui, sans-serif;
  color: #ffe6b8;
  text-shadow: 0 0 14px rgba(255, 160, 60, 0.35);
}

.lobby-friends-btn {
  position: relative;
  overflow: visible;
  box-sizing: border-box;
  width: clamp(106px, 11.5vw + 72px, 164px);
  max-width: 100%;
  min-height: clamp(76px, 8.4vh + 26px, 116px);
  max-height: 128px;
  padding: clamp(8px, 1.25vh, 13px) clamp(8px, 1.2vw, 12px);
  font-size: clamp(9px, 0.65vw + 0.45rem, 12px);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.15;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 0.7vh, 9px);
  text-align: center;
}

.lobby-friends-icon {
  width: clamp(28px, 2.8vw + 0.75rem, 42px);
  height: clamp(28px, 2.8vw + 0.75rem, 42px);
  object-fit: contain;
  filter: drop-shadow(0 0 7px rgba(255, 210, 120, 0.4));
  pointer-events: none;
}

.lobby-friends-label {
  display: block;
  line-height: 1.15;
}

.lobby-friends-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  color: #fff;
  background: #e02020;
  border: 2px solid rgba(255, 250, 245, 0.95);
  box-shadow: 0 2px 8px rgba(180, 20, 20, 0.45);
  pointer-events: none;
  z-index: 2;
}

.lobby-friends-badge[hidden] {
  display: none !important;
}

.lobby-records-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  align-self: stretch;
}

.lobby-friends-disclaimer {
  margin: 0;
  max-width: min(200px, 100%);
  font: 600 9px/1.35 system-ui, sans-serif;
  letter-spacing: 0.02em;
  color: rgba(255, 230, 200, 0.52);
  text-align: right;
  text-wrap: balance;
}

.account-auth-overlay {
  z-index: 70;
}

/* A fiók modal háttere mindig sötét; a világos téma globális szabályai ne írják felül a szöveget. */
#account-auth-overlay .username-panel.account-auth-panel {
  width: min(560px, 94vw);
  color: #fff !important;
  border-color: rgba(255, 220, 140, 0.35);
  box-shadow:
    0 28px 88px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 210, 120, 0.12),
    0 0 48px rgba(255, 200, 80, 0.08);
}

#account-auth-overlay .account-auth-panel .username-title,
#account-auth-overlay .account-auth-panel .username-sub,
#account-auth-overlay .account-auth-panel .account-auth-help,
#account-auth-overlay .account-auth-panel label.cloud-save-label {
  color: #ffffff !important;
}

#account-auth-overlay .account-auth-panel .username-input {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.42);
}

#account-auth-overlay .account-auth-panel .username-input::placeholder {
  color: rgba(255, 255, 255, 0.52) !important;
  opacity: 1;
}

#account-auth-overlay .account-auth-panel .username-error {
  color: #ffc9c9 !important;
  text-shadow: 0 0 14px rgba(255, 90, 90, 0.35);
}

.account-auth-heading {
  letter-spacing: 0.1em;
}

.account-auth-lead {
  font-weight: 600;
  letter-spacing: 0.03em;
  text-shadow:
    0 0 20px rgba(255, 215, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.9);
}

.account-auth-code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}

.account-auth-code-row .username-input {
  margin-bottom: 0;
}

.account-auth-inline-btn {
  min-height: 50px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  align-self: stretch;
  white-space: nowrap;
}

.account-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.account-auth-tab {
  min-height: 38px;
}

.account-auth-tab.is-active {
  border-color: rgba(255, 219, 120, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 229, 155, 0.35), 0 0 24px rgba(255, 196, 64, 0.3);
}

.account-auth-help {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.account-auth-help--emphasis {
  border-left: 3px solid rgba(255, 205, 95, 0.95);
  padding: 9px 12px 9px 14px;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, rgba(255, 210, 120, 0.14), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 18px rgba(0, 0, 0, 0.35);
}

#account-auth-overlay .account-auth-tab:not(.is-active) {
  color: #fff8e0 !important;
  opacity: 1;
  text-shadow:
    0 0 10px rgba(255, 210, 100, 0.45),
    0 0 22px rgba(255, 200, 60, 0.2);
  box-shadow:
    inset 0 3px 12px rgba(0, 0, 0, 0.88),
    inset 0 0 0 1px rgba(255, 200, 100, 0.12);
}

/* Világos téma: a gombok háttere világos — sötét felirat kell az inaktív fülön */
[data-theme="light"] #account-auth-overlay .account-auth-tab:not(.is-active) {
  color: #4d3a08 !important;
  text-shadow: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -2px 6px rgba(120, 140, 165, 0.12),
    0 0 0 1px rgba(125, 140, 160, 0.22);
}

.friends-panel {
  width: min(660px, 95vw);
}

.friends-profile {
  display: grid;
  gap: 4px;
  margin: 6px 0 10px;
}

.friends-profile-name,
.friends-profile-code {
  font-weight: 800;
  color: rgba(244, 231, 198, 0.92);
}

.friends-profile-code {
  letter-spacing: 0.08em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.friends-room-hint {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(215, 223, 242, 0.78);
}

.friends-room-join-row {
  margin-bottom: 8px;
}

.friends-open-room-btn {
  width: 100%;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.friends-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.friends-add-input {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.friends-section-title {
  margin: 8px 0 6px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(255, 221, 140, 0.9);
}

.friends-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.friends-row {
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.25);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.friends-row-meta {
  display: grid;
  gap: 2px;
}

.friends-row-name {
  font-weight: 800;
  color: #ffecc4;
}

.friends-row-code {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(215, 223, 242, 0.72);
}

.friends-row-actions {
  display: flex;
  gap: 6px;
}

.friends-row-actions .btn-tidal {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 11px;
}

[data-theme="light"] .lobby-records {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 210, 150, 0.45), transparent 50%),
    linear-gradient(165deg, #fffdfb, #f5ebe0);
  border-color: rgba(180, 140, 60, 0.3);
  box-shadow: 0 8px 32px rgba(80, 60, 30, 0.12);
}

[data-theme="light"] .lobby-records-title {
  color: #8a5a00;
  text-shadow: none;
}

[data-theme="light"] .lobby-records-sub {
  color: rgba(80, 70, 55, 0.65);
}

[data-theme="light"] .lobby-records-cell {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(180, 150, 100, 0.2);
}

[data-theme="light"] .lobby-records-label {
  color: rgba(70, 75, 90, 0.65);
}

[data-theme="light"] .lobby-records-value {
  color: #6a4800;
  text-shadow: none;
}

[data-theme="light"] .lobby-friends-disclaimer {
  color: rgba(85, 65, 35, 0.72);
}

[data-theme="light"] .friends-profile-name,
[data-theme="light"] .friends-profile-code {
  color: rgba(56, 43, 16, 0.94);
}

[data-theme="light"] .friends-section-title {
  color: rgba(117, 77, 6, 0.9);
}

[data-theme="light"] .friends-room-hint {
  color: rgba(58, 68, 90, 0.78);
}

[data-theme="light"] .friends-row {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(143, 107, 18, 0.3);
}

[data-theme="light"] .friends-row-name {
  color: #3e2b05;
}

[data-theme="light"] .friends-row-code {
  color: rgba(58, 68, 90, 0.72);
}

.character-selector-overlay .character-selector-panel {
  width: min(1120px, 95vw);
  max-height: min(90vh, 900px);
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 200, 90, 0.35);
  background: linear-gradient(165deg, rgba(6, 6, 8, 0.96), rgba(18, 14, 8, 0.95));
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.65), 0 0 40px rgba(255, 180, 70, 0.2);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.overlay.active .character-selector-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.character-selector-header {
  padding: 18px 22px 6px;
}

.character-selector-title {
  margin: 0;
  letter-spacing: 0.1em;
  font-size: clamp(20px, 2.1vw, 30px);
}

.character-selector-sub {
  margin: 6px 0 0;
  opacity: 0.8;
  font-size: clamp(14px, 1.2vw, 18px);
}

.character-selector-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px 8px;
}

.character-selector-chest-count {
  min-width: 48px;
  font: 800 15px/1 var(--font-ui);
}

.character-selector-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 8px 24px 24px;
}

.character-card {
  border: 1px solid rgba(255, 215, 120, 0.18);
  border-radius: 16px;
  padding: 10px 10px 14px;
  background: linear-gradient(165deg, rgba(18, 20, 24, 0.95), rgba(10, 9, 6, 0.95));
}

.character-card--selected {
  border-color: rgba(255, 215, 120, 0.75);
  box-shadow: 0 0 0 1px rgba(255, 215, 120, 0.35), 0 0 26px rgba(255, 180, 60, 0.22);
}

.character-card-rarity {
  text-align: center;
  font: 900 11px/1 var(--font-ui);
  letter-spacing: 0.15em;
  padding: 6px 8px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.character-card-rarity--common {
  background: rgba(148, 148, 156, 0.3);
  color: #d6d6db;
}

.character-card-rarity--legendary {
  background: linear-gradient(
    110deg,
    #ffe7a0 0%,
    #fff4ca 18%,
    #ffd76b 36%,
    #ffb050 50%,
    #ffe9aa 66%,
    #ffd06a 82%,
    #fff4cf 100%
  );
  background-size: 280% 100%;
  color: #241109;
  animation: rarityShimmer 2.7s ease-in-out infinite;
  border: 1px solid rgba(255, 222, 150, 0.66);
  box-shadow:
    0 0 14px rgba(255, 196, 82, 0.36),
    inset 0 1px 0 rgba(255, 249, 221, 0.28);
}

.character-card-rarity--epic {
  background: linear-gradient(
    125deg,
    #2e1064 0%,
    #5b21b6 18%,
    #7c3aed 38%,
    #ddd6fe 50%,
    #a855f7 62%,
    #6d28d9 82%,
    #3b0764 100%
  );
  background-size: 260% 260%;
  color: #f8f4ff;
  animation: rarityEpicAurora 2.45s ease-in-out infinite;
  border: 1px solid rgba(196, 181, 253, 0.45);
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.45);
  text-shadow: 0 0 8px rgba(196, 181, 253, 0.65);
}

.character-card-rarity--mythic {
  color: #fff3f3;
  background: linear-gradient(
    125deg,
    #2f0505 0%,
    #6b0a0a 16%,
    #a60f12 36%,
    #ff7b55 50%,
    #c1121f 66%,
    #7f1d1d 84%,
    #320606 100%
  );
  background-size: 280% 280%;
  border: 1px solid rgba(255, 173, 150, 0.6);
  animation: rarityMythicInferno 2.1s ease-in-out infinite;
  box-shadow:
    0 0 16px rgba(255, 82, 67, 0.58),
    0 0 28px rgba(190, 21, 35, 0.34);
  text-shadow: 0 0 10px rgba(255, 182, 173, 0.62);
}

@keyframes rarityShimmer {
  0% {
    background-position: 0% 50%;
    filter: brightness(0.98) saturate(0.96);
  }
  50% {
    background-position: 100% 50%;
    filter: brightness(1.08) saturate(1.08);
  }
  100% {
    background-position: 0% 50%;
    filter: brightness(0.98) saturate(0.96);
  }
}

@keyframes rarityEpicAurora {
  0% {
    background-position: 0% 45%;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
  50% {
    background-position: 100% 55%;
    box-shadow:
      0 0 22px rgba(192, 132, 252, 0.65),
      0 0 36px rgba(91, 33, 182, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
  100% {
    background-position: 0% 45%;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
}

@keyframes rarityMythicInferno {
  0% {
    background-position: 0% 46%;
    box-shadow:
      0 0 12px rgba(255, 82, 67, 0.5),
      0 0 24px rgba(190, 21, 35, 0.28),
      inset 0 1px 0 rgba(255, 237, 237, 0.18);
  }
  50% {
    background-position: 100% 54%;
    box-shadow:
      0 0 24px rgba(255, 120, 95, 0.74),
      0 0 42px rgba(190, 21, 35, 0.48),
      inset 0 1px 0 rgba(255, 245, 245, 0.3);
  }
  100% {
    background-position: 0% 46%;
    box-shadow:
      0 0 12px rgba(255, 82, 67, 0.5),
      0 0 24px rgba(190, 21, 35, 0.28),
      inset 0 1px 0 rgba(255, 237, 237, 0.18);
  }
}

.character-card-portrait-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 150, 0.24);
  aspect-ratio: 1 / 1;
}

.character-card-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-card-lock {
  position: absolute;
  width: 56px;
  height: 56px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.7));
}

.character-card-name {
  margin: 10px 0 4px;
  text-align: center;
}

.character-card-level {
  margin: 0 0 10px;
  text-align: center;
  opacity: 0.9;
}

.character-card-select-btn {
  width: 100%;
  font-weight: 900;
  letter-spacing: 0.13em;
  background: linear-gradient(120deg, #ffd94a, #ffb300, #fff1ad);
  color: #251700;
  animation: aaaSelectPulse 1.2s ease-in-out infinite;
}

@keyframes aaaSelectPulse {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 0 0 rgba(255, 199, 64, 0); }
  50% { transform: translateY(-1px) scale(1.02); box-shadow: 0 0 22px rgba(255, 199, 64, 0.45); }
}

.character-card-select-btn--selected {
  animation: none;
  background: linear-gradient(120deg, #96ff8c, #52d463);
  color: #05290b;
}

.character-card-unlock-hint {
  width: 100%;
  opacity: 0.75;
}

.shop-chest-feature {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 14px;
  background: linear-gradient(140deg, rgba(62, 31, 6, 0.9), rgba(22, 12, 3, 0.95));
  border: 1px solid rgba(255, 200, 96, 0.35);
}

.shop-chest-feature-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.shop-chest-feature-title {
  margin: 0;
  font: 900 12px/1 var(--font-ui);
  letter-spacing: 0.1em;
}

.shop-chest-feature-sub {
  margin: 6px 0 0;
  opacity: 0.84;
}

.shop-buy-chest {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.shop-buy-chest .currency-inline-icon {
  width: 16px;
  height: 16px;
  margin-right: 0;
}

.chest-open-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: block;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: radial-gradient(circle at 30% 12%, rgba(255, 208, 122, 0.16), rgba(4, 4, 6, 0.96) 55%);
}

.chest-open-overlay > [hidden] {
  display: none !important;
}

.chest-open-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.chest-open-chest-btn {
  position: relative;
  z-index: 2;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  animation: chestBounce 1.05s ease-in-out infinite;
}

.chest-open-chest-img {
  width: min(34vw, 280px);
  height: min(34vw, 280px);
  object-fit: contain;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.58));
}

.chest-open-stage--opening .chest-open-chest-btn {
  animation: chestBurst 0.72s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  pointer-events: none;
}

.chest-open-beam {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 45%;
  width: 34px;
  height: 0;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 223, 140, 0.35), rgba(255, 200, 100, 0));
  opacity: 0;
  filter: blur(0.1px);
  pointer-events: none;
}

.chest-open-stage--opening .chest-open-beam {
  animation: chestBeam 0.82s ease-out forwards;
}

.chest-open-reward-wrap {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  pointer-events: none;
}

.chest-open-reward-icon {
  margin: 0;
  min-height: 68px;
  display: grid;
  place-items: center;
  font: 900 54px/1 var(--font-ui);
}

.chest-open-reward-icon img {
  width: 66px;
  height: 66px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(255, 210, 110, 0.48));
}

.chest-open-character-screen {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(320px, 540px) minmax(280px, 1fr);
  align-items: center;
  gap: clamp(14px, 3vw, 52px);
  padding: clamp(28px, 5vw, 70px);
  animation: chestCeremony 0.95s ease;
}

.chest-open-character-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.chest-open-character-right {
  display: grid;
  place-items: center;
}

.chest-open-character-lobby {
  width: min(42vw, 420px);
  max-width: 100%;
  border-radius: 16px;
  filter: drop-shadow(0 20px 36px rgba(0, 0, 0, 0.5));
}

.chest-open-character-portrait {
  width: min(32vw, 260px);
  height: min(32vw, 260px);
  object-fit: cover;
  border-radius: 24px;
  margin-top: 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}

.chest-open-character-rarity {
  margin: 0 0 10px;
  padding: 10px 22px;
  border-radius: 999px;
  font: 900 clamp(18px, 2vw, 28px)/1 var(--font-ui);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.95);
  color: #151515;
}

.chest-open-character-rarity--legendary {
  color: #241109;
  background: linear-gradient(90deg, #ffeaa2, #ffd873, #ffb155);
  box-shadow: 0 0 24px rgba(255, 206, 96, 0.45);
}

.chest-open-character-rarity--common {
  color: #262831;
  background: linear-gradient(90deg, #f0f2f9, #d8dce8);
}

.chest-open-character-rarity--epic {
  color: #faf7ff;
  background: linear-gradient(
    125deg,
    #2e1064 0%,
    #5b21b6 20%,
    #7c3aed 40%,
    #e9d5ff 50%,
    #a855f7 60%,
    #5b21b6 80%,
    #1e0b3d 100%
  );
  background-size: 280% 280%;
  animation: rarityEpicAurora 2.55s ease-in-out infinite;
  border: 1px solid rgba(216, 180, 254, 0.55);
  box-shadow:
    0 0 26px rgba(167, 139, 250, 0.55),
    0 0 48px rgba(76, 29, 149, 0.35);
  text-shadow: 0 0 18px rgba(196, 181, 253, 0.9);
}

.chest-open-character-rarity--mythic {
  color: #fff4f4;
  background: linear-gradient(
    125deg,
    #2f0505 0%,
    #6b0a0a 16%,
    #a60f12 36%,
    #ff7b55 50%,
    #c1121f 66%,
    #7f1d1d 84%,
    #320606 100%
  );
  background-size: 280% 280%;
  animation: rarityMythicInferno 2.15s ease-in-out infinite;
  border: 1px solid rgba(255, 173, 150, 0.62);
  box-shadow:
    0 0 28px rgba(255, 112, 93, 0.62),
    0 0 50px rgba(190, 21, 35, 0.44);
  text-shadow: 0 0 18px rgba(255, 194, 184, 0.95);
}

.chest-open-character-name {
  margin: 0;
  font: 900 clamp(44px, 6vw, 98px)/0.98 var(--font-ui);
  color: #ffffff;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.chest-open-overlay--character {
  background: radial-gradient(circle at 26% 14%, rgba(255, 217, 141, 0.18), rgba(5, 5, 7, 0.97) 52%);
}

.chest-open-reward {
  text-align: center;
}

.chest-open-reward {
  font: 900 clamp(26px, 4vw, 52px)/1.08 var(--font-ui);
  color: #ffd65c;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  margin: 0;
}

.chest-open-ok {
  position: fixed;
  left: 50%;
  bottom: clamp(22px, 4vh, 42px);
  transform: translateX(-50%);
  min-width: min(340px, 88vw);
  min-height: 88px;
  padding: 0 clamp(24px, 4vw, 44px);
  font-size: clamp(30px, 3.5vw, 48px);
  letter-spacing: 0.06em;
  border-radius: 18px;
  z-index: 3;
}

.chest-open-ok:hover {
  transform: translateX(-50%) scale(1.045);
}

.chest-open-ok:active {
  transform: translateX(-50%) scale(1.02);
}

@keyframes chestBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-9px) scale(1.03); }
}

@keyframes chestBurst {
  0% { transform: scale(1); opacity: 1; }
  55% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0; }
}

@keyframes chestBeam {
  0% { height: 0; opacity: 0; }
  25% { height: 320px; opacity: 1; }
  100% { height: 420px; opacity: 0; }
}

@keyframes chestCeremony {
  0% { transform: scale(0.94); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Character selector v2 */
.character-selector-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 22px 22px;
}

.character-row {
  display: grid;
  grid-template-columns: 196px 1fr;
  gap: 16px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 214, 132, 0.24);
  background: linear-gradient(165deg, rgba(14, 14, 18, 0.96), rgba(6, 6, 8, 0.94));
}

.character-row--selected {
  border-color: rgba(255, 220, 135, 0.78);
  box-shadow: 0 0 0 1px rgba(255, 220, 135, 0.35), 0 0 28px rgba(255, 180, 60, 0.24);
}

.character-row-left {
  position: relative;
}

.character-row-portrait-btn {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  width: 196px;
  height: 196px;
  background: #050507;
}

.character-row-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-row-level-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font: 800 18px/1 var(--font-ui);
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(7px) saturate(1.2);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.character-row-lock {
  position: absolute;
  width: 52px;
  height: 52px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.7));
}

.character-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.character-row-rarity {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 10px;
  font: 900 11px/1 var(--font-ui);
  letter-spacing: 0.14em;
}

.character-row-rarity--common {
  color: #e0e1e7;
  background: rgba(140, 140, 154, 0.34);
}

.character-row-rarity--legendary {
  color: #241109;
  background: linear-gradient(
    110deg,
    #ffe7a0 0%,
    #fff4ca 18%,
    #ffd76b 36%,
    #ffb050 50%,
    #ffe9aa 66%,
    #ffd06a 82%,
    #fff4cf 100%
  );
  background-size: 280% 100%;
  animation: rarityShimmer 2.6s ease-in-out infinite;
  border: 1px solid rgba(255, 221, 150, 0.68);
  box-shadow:
    0 0 16px rgba(255, 196, 82, 0.42),
    inset 0 1px 0 rgba(255, 249, 221, 0.35);
}

.character-row-rarity--epic {
  color: #f4eeff;
  background: linear-gradient(
    125deg,
    #2e1064 0%,
    #5b21b6 18%,
    #7c3aed 38%,
    #c4b5fd 50%,
    #a855f7 62%,
    #6d28d9 82%,
    #3b0764 100%
  );
  background-size: 260% 260%;
  animation: rarityEpicAurora 2.35s ease-in-out infinite;
  border: 1px solid rgba(196, 181, 253, 0.55);
  box-shadow:
    0 0 12px rgba(139, 92, 246, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 0 10px rgba(196, 181, 253, 0.75);
}

.character-row-rarity--mythic {
  color: #fff3f3;
  background: linear-gradient(
    125deg,
    #2f0505 0%,
    #6b0a0a 16%,
    #a60f12 36%,
    #ff7b55 50%,
    #c1121f 66%,
    #7f1d1d 84%,
    #320606 100%
  );
  background-size: 280% 280%;
  border: 1px solid rgba(255, 173, 150, 0.65);
  animation: rarityMythicInferno 2.1s ease-in-out infinite;
  box-shadow:
    0 0 14px rgba(255, 82, 67, 0.62),
    0 0 26px rgba(190, 21, 35, 0.38),
    inset 0 1px 0 rgba(255, 237, 237, 0.22);
  text-shadow: 0 0 14px rgba(255, 182, 173, 0.72);
}

.character-row-name {
  margin: 0;
  font: 800 clamp(42px, 4.4vw, 68px) / 1 var(--font-ui);
}

.character-row-blurb {
  margin: 0.35em 0 0.5em;
  max-width: 52ch;
  font: 600 clamp(13px, 2.1vw, 17px) / 1.4 var(--font-ui);
  letter-spacing: 0.01em;
  color: rgba(230, 225, 255, 0.72);
}

.character-row-select-btn {
  min-width: 300px;
  min-height: 68px;
  font: 900 clamp(36px, 3.2vw, 54px) / 1.02 var(--font-ui);
  letter-spacing: 0.02em;
  border-radius: 14px;
  background: linear-gradient(120deg, #ffd447, #ffad14, #ffe49a);
  color: #231400;
  animation: aaaSelectPulse 1.15s ease-in-out infinite;
}

.character-row-select-btn--selected {
  animation: none;
  background: linear-gradient(120deg, #8dff94, #48d061);
  color: #062b0f;
}

.character-row-select-btn--locked {
  animation: none;
  opacity: 0.72;
  background: linear-gradient(120deg, #48484f, #2f3035);
  color: #d1d1d8;
}

[data-theme="light"] .character-selector-overlay .character-selector-panel {
  border-color: rgba(162, 120, 45, 0.36);
  background: linear-gradient(165deg, #fffefc, #f6ece0);
  box-shadow: 0 22px 70px rgba(70, 52, 25, 0.2);
}

[data-theme="light"] .character-selector-title,
[data-theme="light"] .character-selector-sub {
  color: #4a3212;
}

[data-theme="light"] .character-row {
  border-color: rgba(170, 130, 60, 0.28);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(244, 233, 216, 0.95));
}

/* Világos téma: a későbbi .character-row szabály ne törölje a kijelölést — erős zöld keret + gyűrű */
[data-theme="light"] .character-row--selected {
  border-color: rgba(24, 130, 72, 0.92);
  box-shadow:
    0 0 0 2px rgba(46, 168, 102, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 10px 32px rgba(34, 150, 88, 0.28);
}

[data-theme="light"] .character-row-select-btn--selected {
  color: #043218;
  background: linear-gradient(155deg, #6af0a0 0%, #32c86a 42%, #1a9f52 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 0 0 2px rgba(22, 120, 68, 0.42),
    0 8px 24px rgba(32, 150, 86, 0.32);
  animation: none;
}

[data-theme="light"] .character-row-select-btn--selected:hover {
  color: #032a14;
  background: linear-gradient(155deg, #7ef8ae 0%, #3ad478 42%, #20ac5c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 0 0 2px rgba(18, 110, 64, 0.48),
    0 10px 28px rgba(32, 150, 86, 0.38);
}

[data-theme="light"] .character-row-name {
  color: #2e1f0e;
}

[data-theme="light"] .character-row-blurb {
  color: rgba(55, 48, 38, 0.78);
}

[data-theme="light"] .character-row-level-badge {
  color: #2a1803;
  border-color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.28));
}

[data-theme="light"] .shop-chest-feature {
  background: linear-gradient(140deg, rgba(255, 236, 201, 0.95), rgba(244, 221, 182, 0.94));
  border-color: rgba(171, 127, 56, 0.35);
}

[data-theme="light"] .shop-chest-feature-title,
[data-theme="light"] .shop-chest-feature-sub {
  color: #4a2e0d;
}

[data-theme="light"] .chest-open-overlay {
  background: radial-gradient(circle at 32% 14%, rgba(255, 208, 122, 0.26), rgba(255, 245, 231, 0.96) 58%);
}

[data-theme="light"] .chest-open-reward {
  color: #8f5606;
}

[data-theme="light"] .chest-open-character-name {
  color: #2a1a09;
  text-shadow: none;
}

[data-theme="light"] .chest-open-overlay--character {
  background: radial-gradient(circle at 30% 15%, rgba(255, 207, 115, 0.32), rgba(255, 243, 228, 0.98) 60%);
}

@media (max-width: 900px) {
  .chest-open-character-screen {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
    justify-items: center;
  }
  .chest-open-character-left {
    align-items: center;
    text-align: center;
  }
  .chest-open-character-lobby {
    width: min(74vw, 360px);
  }
  .chest-open-ok {
    min-height: 74px;
    padding: 0 clamp(18px, 6vw, 28px);
    font-size: clamp(26px, 6.3vw, 38px);
    border-radius: 16px;
  }
  .character-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .character-row-portrait-btn {
    width: 180px;
    height: 180px;
    aspect-ratio: auto;
  }
  .character-row-name {
    font-size: 38px;
  }
  .character-row-select-btn {
    min-width: 0;
    width: 100%;
    font-size: 34px;
    min-height: 64px;
  }
}

.player-code-panel {
  display: grid;
  grid-template-columns: auto auto auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 2px solid rgba(255, 215, 0, 0.42);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(29, 21, 4, 0.97) 0%, rgba(10, 8, 2, 0.96) 100%);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 241, 180, 0.2);
}

.player-code-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(247, 230, 175, 0.95);
}

.player-code-value {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ffd300;
  text-shadow: 0 0 10px rgba(255, 210, 60, 0.32);
}

.player-code-copy {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.online-status {
  font-size: 13px;
  font-weight: 700;
  color: #ff9b9b;
}

.online-status--ok {
  color: #8cf3bb;
}

.online-room-overlay {
  z-index: 72;
}

.online-room-panel {
  width: min(95vw, 920px);
  max-height: min(92vh, 920px);
  overflow: auto;
  border-radius: 24px;
  border: 2px solid rgba(255, 215, 0, 0.45);
  background: radial-gradient(circle at 22% 0%, rgba(255, 207, 86, 0.14), transparent 45%),
    linear-gradient(165deg, rgba(18, 14, 5, 0.98), rgba(7, 6, 3, 0.98));
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.52);
  padding: 22px 22px 26px;
}

.online-room-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.online-room-title {
  margin: 0;
  font-size: clamp(24px, 3.6vw, 40px);
  letter-spacing: 0.12em;
}

.online-room-sub {
  margin: 8px 0 12px;
  color: rgba(220, 215, 197, 0.72);
}

.online-room-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.online-room-label {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(232, 219, 173, 0.88);
}

.online-room-input {
  min-height: 42px;
  border-radius: 12px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  background: rgba(0, 0, 0, 0.4);
  color: #f8f2db;
  padding: 8px 10px;
  font-weight: 700;
}

.online-room-textarea {
  resize: vertical;
  min-height: 66px;
}

.online-room-submit {
  margin-top: 8px;
  min-height: 50px;
}

.online-room-meta {
  margin-top: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
}

.online-room-meta-label {
  color: rgba(220, 210, 170, 0.75);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.online-room-meta-value {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.09em;
  color: #ffe89d;
}

.online-room-code-wrap {
  display: grid;
  justify-items: end;
  gap: 1px;
}

.online-room-map-visual,
.online-room-mode-visual {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.online-room-mode-visual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.online-map-item,
.online-mode-item {
  min-height: 78px;
  border-radius: 14px;
  border: 2px solid rgba(255, 215, 0, 0.22);
  background: rgba(0, 0, 0, 0.26);
  color: #fbe9b6;
  display: grid;
  place-items: center;
  gap: 2px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.online-map-item:hover,
.online-mode-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 225, 128, 0.58);
}

.online-map-item.is-active,
.online-mode-item.is-active {
  border-color: rgba(255, 229, 123, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.28), 0 0 18px rgba(255, 215, 0, 0.25);
}

.online-map-icon {
  font-size: 26px;
}

.online-map-name,
.online-mode-sub {
  font-size: 12px;
  color: rgba(243, 231, 196, 0.78);
}

.online-mode-title {
  font-weight: 900;
  letter-spacing: 0.08em;
}

.online-room-rounds-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.online-stepper-btn {
  min-height: 42px;
  min-width: 46px;
  padding: 0;
  font-size: 24px;
}

.online-room-rounds-input {
  text-align: center;
  font-size: 20px;
}

.online-room-slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.online-room-slot {
  min-height: 168px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.22);
  background: rgba(0, 0, 0, 0.26);
  padding: 8px;
  display: grid;
  gap: 6px;
  align-content: start;
  overflow: hidden;
}

.online-room-slot-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(230, 215, 170, 0.78);
}

.online-room-slot-input {
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 0, 0.22);
  background: rgba(0, 0, 0, 0.34);
  color: #f7e7bf;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: 100%;
  box-sizing: border-box;
}

.online-room-slot-card {
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 0, 0.28);
  background: linear-gradient(165deg, rgba(18, 14, 5, 0.95), rgba(8, 7, 4, 0.95));
  padding: 8px;
  display: grid;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  min-height: 104px;
}

.online-room-slot-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-room-slot-kick {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 85, 85, 0.7);
  border-radius: 999px;
  background: rgba(70, 12, 12, 0.9);
  color: #ffd5d5;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.online-room-slot-kick:hover {
  background: rgba(110, 18, 18, 0.95);
  color: #fff2f2;
}

.online-room-slot-portrait {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.online-room-slot-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff2c5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-room-slot-level {
  font-size: 11px;
  color: rgba(245, 231, 182, 0.82);
}

.online-room-slot-relation {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 222, 120, 0.9);
}

.online-room-slot-role {
  font-size: 10px;
  color: rgba(210, 194, 148, 0.86);
}

.online-room-actions {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.online-room-actions--danger {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.online-room-danger-btn {
  border-color: rgba(255, 75, 75, 0.55);
  color: #ffb3b3;
}

.online-room-danger-btn:hover {
  border-color: rgba(255, 95, 95, 0.82);
  color: #ffd3d3;
}

.online-room-start-btn:disabled {
  opacity: 0.5;
  filter: grayscale(0.35);
  cursor: not-allowed;
}

[data-theme="light"] .player-code-panel {
  background: linear-gradient(180deg, rgba(255, 251, 238, 0.98), rgba(243, 233, 204, 0.98));
  border-color: rgba(143, 107, 18, 0.58);
}

[data-theme="light"] .player-code-label {
  color: rgba(78, 58, 15, 0.92);
}

[data-theme="light"] .player-code-value {
  color: #7e5705;
  text-shadow: none;
}

[data-theme="light"] .online-status {
  color: #b34141;
}

[data-theme="light"] .online-status--ok {
  color: #1d8f52;
}

[data-theme="light"] .online-room-panel {
  border-color: rgba(143, 107, 18, 0.48);
  background: radial-gradient(circle at 22% 0%, rgba(255, 195, 65, 0.16), transparent 45%),
    linear-gradient(165deg, #faf8f2, #ece8df);
}

[data-theme="light"] .online-room-title,
[data-theme="light"] .online-room-label {
  color: #342304;
}

[data-theme="light"] .online-room-sub,
[data-theme="light"] .online-room-meta-label {
  color: rgba(72, 58, 24, 0.75);
}

[data-theme="light"] .online-room-input {
  background: rgba(255, 255, 255, 0.82);
  color: #2b1f08;
  border-color: rgba(143, 107, 18, 0.35);
}

[data-theme="light"] .online-map-item,
[data-theme="light"] .online-mode-item,
[data-theme="light"] .online-room-slot {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(139, 107, 25, 0.3);
  color: #3b2807;
}

[data-theme="light"] .online-map-name,
[data-theme="light"] .online-mode-sub,
[data-theme="light"] .online-room-slot-label,
[data-theme="light"] .online-room-slot-level,
[data-theme="light"] .online-room-slot-role {
  color: rgba(72, 56, 22, 0.78);
}

[data-theme="light"] .online-room-slot-input {
  background: rgba(255, 255, 255, 0.86);
  color: #2b1f08;
  border-color: rgba(143, 107, 18, 0.35);
}

[data-theme="light"] .online-room-slot-card {
  background: linear-gradient(165deg, rgba(255, 252, 244, 0.95), rgba(244, 237, 219, 0.95));
  border-color: rgba(143, 107, 18, 0.42);
}

[data-theme="light"] .online-room-slot-name,
[data-theme="light"] .online-room-slot-relation,
[data-theme="light"] .online-room-meta-value {
  color: #553907;
}

[data-theme="light"] .online-room-danger-btn {
  border-color: rgba(182, 47, 47, 0.56);
  color: #8f2323;
}

.online-match-sidebar {
  position: absolute;
  top: 90px;
  right: 14px;
  width: 260px;
  max-height: calc(100% - 130px);
  overflow: auto;
  border-radius: 14px;
  border: 2px solid rgba(255, 215, 0, 0.34);
  background: linear-gradient(165deg, rgba(17, 14, 7, 0.95), rgba(6, 6, 5, 0.95));
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.36);
  padding: 10px;
  z-index: 5;
}

.online-match-sidebar-head {
  margin-bottom: 8px;
}

.online-match-mode {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffe08e;
}

.online-match-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(231, 219, 185, 0.82);
}

.online-match-players {
  display: grid;
  gap: 6px;
}

.online-match-player {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 0, 0.24);
  background: rgba(0, 0, 0, 0.26);
  padding: 6px;
}

.online-match-player-portrait {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid rgba(255, 215, 0, 0.35);
}

.online-match-player-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffefc1;
}

.online-match-player-hp {
  font-size: 11px;
  color: rgba(182, 255, 203, 0.92);
}

.online-spectator-bar {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  max-width: min(520px, calc(100% - 300px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid rgba(120, 200, 255, 0.45);
  background: linear-gradient(165deg, rgba(12, 22, 38, 0.94), rgba(6, 10, 18, 0.94));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  z-index: 6;
  pointer-events: auto;
}

.online-spectator-bar[hidden] {
  display: none !important;
}

.online-spectator-bar__icon {
  font-size: 18px;
  line-height: 1.2;
  flex-shrink: 0;
}

.online-spectator-bar__text {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  color: rgba(210, 235, 255, 0.95);
}

.online-spectator-target {
  font-size: 12px;
  font-weight: 800;
  color: rgba(232, 246, 255, 0.98);
  min-width: 130px;
  text-align: center;
}

.online-spectator-btn {
  min-width: 42px;
  min-height: 34px;
  padding: 0 8px;
  font-size: 18px;
  line-height: 1;
}

[data-theme="light"] .online-spectator-bar {
  border-color: rgba(70, 120, 180, 0.45);
  background: linear-gradient(165deg, rgba(248, 252, 255, 0.97), rgba(230, 238, 248, 0.97));
}

[data-theme="light"] .online-spectator-bar__text {
  color: rgba(35, 48, 68, 0.92);
}

[data-theme="light"] .online-spectator-target {
  color: rgba(30, 42, 62, 0.95);
}

[data-theme="light"] .online-match-sidebar {
  border-color: rgba(143, 107, 18, 0.42);
  background: linear-gradient(165deg, rgba(255, 252, 244, 0.97), rgba(241, 235, 218, 0.97));
}

[data-theme="light"] .online-match-mode {
  color: #6b4600;
}

[data-theme="light"] .online-match-sub {
  color: rgba(72, 56, 22, 0.82);
}

[data-theme="light"] .online-match-player {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(143, 107, 18, 0.35);
}

[data-theme="light"] .online-match-player-name {
  color: #3e2b05;
}

[data-theme="light"] .online-match-player-hp {
  color: #1b7b45;
}

/* ——— Online: meccs előtti roster briefing + kör végi eredmény ——— */
.online-roster-brief-overlay,
.online-series-overlay {
  position: fixed;
  inset: 0;
  z-index: 8648;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px) + 8px) max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.online-roster-brief-overlay.active,
.online-series-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s;
}

.online-series-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 96vw);
  max-height: min(90vh, 900px);
  overflow: auto;
  border-radius: 26px;
  border: 2px solid rgba(255, 215, 0, 0.55);
  background: linear-gradient(165deg, rgba(36, 30, 12, 0.98) 0%, rgba(6, 5, 2, 0.99) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 240, 180, 0.12),
    0 28px 90px rgba(0, 0, 0, 0.92),
    0 0 80px rgba(255, 215, 0, 0.12);
  padding: clamp(22px, 4vw, 34px) clamp(20px, 4vw, 36px) clamp(24px, 4vw, 34px);
  text-align: center;
  transform: scale(0.94) translateY(16px);
  opacity: 0;
  transition:
    transform 0.45s cubic-bezier(0.34, 1.25, 0.64, 1),
    opacity 0.38s ease;
}

/* Meccs előtti roster: sötét, lapos panel (vizualizáció szerint) */
.online-roster-brief-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 96vw);
  max-width: 100%;
  max-height: min(90vh, 900px);
  overflow: auto;
  box-sizing: border-box;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #2a2a2a;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  padding: clamp(20px, 3.5vw, 32px) clamp(16px, 3vw, 28px) clamp(22px, 3.5vw, 30px);
  text-align: center;
  transform: scale(0.94) translateY(16px);
  opacity: 0;
  transition:
    transform 0.45s cubic-bezier(0.34, 1.25, 0.64, 1),
    opacity 0.38s ease;
}

.online-roster-brief-overlay.active .online-roster-brief-panel,
.online-series-overlay.active .online-series-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.online-series-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.28em;
  color: rgba(255, 215, 0, 0.5);
}

.online-roster-brief-kicker {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.38);
  text-transform: uppercase;
}

.online-series-title {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 4.2vmin, 2rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.2;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 16px rgba(255, 215, 0, 0.35));
}

.online-roster-brief-title {
  margin: 0 0 clamp(14px, 2.5vw, 22px);
  font-size: clamp(1.05rem, 3vmin, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.25;
  color: #f7f7f7;
}

.online-series-sub {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(220, 218, 230, 0.82);
}

.online-roster-brief-grid {
  --roster-cols: 2;
  display: grid;
  grid-template-columns: repeat(var(--roster-cols), minmax(0, 1fr));
  gap: clamp(10px, 2vw, 18px);
  margin: 0 0 clamp(16px, 2.5vw, 22px);
  text-align: center;
  align-items: stretch;
}

.online-roster-card {
  border-radius: 18px;
  background: #222222;
  border: none;
  padding: clamp(14px, 2.2vw, 22px) clamp(10px, 1.8vw, 14px) clamp(12px, 2vw, 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.8vh, 16px);
  min-width: 0;
}

.online-roster-card-name {
  width: 100%;
  font-weight: 800;
  font-size: clamp(13px, 1.85vmin, 16px);
  line-height: 1.2;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-roster-lvl-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: #0a0a0a;
  color: #ffffff;
  font-weight: 800;
  font-size: clamp(11px, 1.55vmin, 14px);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.online-roster-card-art {
  width: 100%;
  flex: 1 1 auto;
  min-height: clamp(96px, 20vh, 200px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.online-roster-char {
  width: min(100%, 200px);
  max-width: 100%;
  height: auto;
  max-height: clamp(110px, 28vmin, 260px);
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.5));
}

.online-roster-brief-countdown,
.online-series-countdown {
  margin: 0;
  font-size: clamp(15px, 3.2vmin, 18px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: rgba(255, 236, 160, 0.95);
  text-shadow:
    0 0 20px rgba(255, 215, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.45);
}

.online-roster-brief-countdown {
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.online-series-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(10px, 2vw, 18px);
  flex-wrap: wrap;
  margin: 6px 0 18px;
  min-height: 220px;
}

.online-series-vote-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 10px 0 14px;
}

.online-series-vote-btn {
  min-height: 56px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.online-series-vote-btn.is-selected {
  box-shadow:
    0 0 0 1px rgba(255, 240, 180, 0.45),
    0 0 24px rgba(255, 215, 0, 0.28);
  border-color: rgba(255, 215, 0, 0.72);
}

.online-series-vote-btn--exit {
  border-color: rgba(255, 103, 103, 0.68);
  color: #ffd4d4;
}

.online-series-vote-btn--exit.is-selected {
  border-color: rgba(255, 103, 103, 0.9);
  box-shadow:
    0 0 0 1px rgba(255, 208, 208, 0.5),
    0 0 24px rgba(255, 80, 80, 0.3);
}

.online-series-overlay.online-series-overlay--winner::before,
.online-series-overlay.online-series-overlay--winner::after {
  content: "";
  position: absolute;
  inset: -5%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.82;
}

.online-series-overlay.online-series-overlay--winner::before {
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 229, 112, 0.2), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(255, 205, 60, 0.18), transparent 48%),
    radial-gradient(circle at 50% 80%, rgba(255, 242, 175, 0.16), transparent 42%);
  animation: online-winner-confetti-fall 12s ease-in-out infinite;
}

.online-series-overlay.online-series-overlay--winner::after {
  background:
    radial-gradient(circle at 12% 82%, rgba(255, 212, 82, 0.16), transparent 40%),
    radial-gradient(circle at 86% 74%, rgba(255, 236, 150, 0.17), transparent 40%);
  animation: online-winner-confetti-fall 16s ease-in-out infinite reverse;
}

@keyframes online-winner-confetti-fall {
  from {
    transform: translateY(-8vh);
  }
  to {
    transform: translateY(8vh);
  }
}

.online-series-step {
  position: relative;
  width: min(200px, 42vw);
  display: grid;
  justify-items: center;
  gap: 8px;
}

.online-series-plinth {
  width: 100%;
  border-radius: 14px 14px 6px 6px;
  border: 1px solid rgba(255, 215, 0, 0.28);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.12), rgba(0, 0, 0, 0.55));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.online-series-avatar {
  width: 86px;
  height: 86px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid rgba(255, 215, 0, 0.45);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.online-series-step-label {
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffecc4;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-series-step-score {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 233, 167, 0.97);
}

body.online-tiebreaker-mode {
  box-shadow:
    inset 0 0 0 10px rgba(120, 0, 0, 0.55),
    inset 0 0 120px rgba(255, 0, 0, 0.22);
}

body.online-tiebreaker-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 8640;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(255, 40, 40, 0.12), transparent 55%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 0, 0, 0.05) 0px,
      rgba(255, 0, 0, 0.05) 2px,
      transparent 2px,
      transparent 7px
    );
  mix-blend-mode: multiply;
  opacity: 0.55;
}

[data-theme="light"] .online-series-panel {
  background: linear-gradient(165deg, #fafbfd 0%, #e8ecf4 100%);
  border-color: rgba(138, 106, 10, 0.42);
}

[data-theme="light"] .online-roster-brief-panel {
  background: #ececec;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .online-roster-brief-kicker {
  color: rgba(55, 60, 72, 0.55);
}

[data-theme="light"] .online-roster-brief-title {
  color: #1a1a1a;
}

[data-theme="light"] .online-roster-card {
  background: #2a2a2a;
}

[data-theme="light"] .online-roster-card-name {
  color: #ffffff;
}

[data-theme="light"] .online-roster-lvl-pill {
  background: #0a0a0a;
  color: #ffffff;
}

[data-theme="light"] .online-series-step-label {
  color: #3e2b05;
}

[data-theme="light"] .online-roster-brief-countdown,
[data-theme="light"] .online-series-countdown {
  color: rgba(120, 85, 10, 0.95);
  text-shadow: none;
}

[data-theme="light"] .online-roster-brief-countdown {
  color: rgba(35, 40, 52, 0.92);
}

[data-theme="light"] .online-series-sub {
  color: rgba(55, 60, 72, 0.82);
}

[data-theme="light"] .online-series-vote-btn.is-selected {
  border-color: rgba(137, 94, 8, 0.7);
  box-shadow:
    0 0 0 1px rgba(120, 86, 15, 0.42),
    0 0 20px rgba(255, 192, 36, 0.28);
}

[data-theme="light"] .online-series-vote-btn--exit {
  border-color: rgba(198, 75, 75, 0.72);
  color: #7d1f1f;
}

[data-theme="light"] .online-series-overlay.online-series-overlay--winner::before,
[data-theme="light"] .online-series-overlay.online-series-overlay--winner::after {
  opacity: 0.62;
}

[data-theme="light"] .online-series-step-score {
  color: rgba(112, 74, 5, 0.95);
}


[data-theme="light"] .online-series-plinth {
  border-color: rgba(143, 107, 18, 0.35);
}

/* Online: társ kilépett — sarok értesítés */
.online-peer-quit-banner {
  position: fixed;
  z-index: 8560;
  left: max(12px, env(safe-area-inset-left, 0px));
  bottom: max(100px, env(safe-area-inset-bottom, 0px) + 72px);
  max-width: min(340px, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(12, 4, 4, 0.88);
  border: 1px solid rgba(255, 80, 80, 0.55);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

.online-peer-quit-banner.online-peer-quit-banner--visible {
  opacity: 1;
  transform: translateY(0);
}

.online-peer-quit-banner__text {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: #ff5c5c;
  text-shadow: 0 1px 12px rgba(180, 20, 20, 0.55);
}

[data-theme="light"] .online-peer-quit-banner {
  background: rgba(255, 245, 245, 0.94);
  border-color: rgba(200, 60, 60, 0.55);
}

[data-theme="light"] .online-peer-quit-banner__text {
  color: #c41e1e;
}

/* Online: mindenki más kilépett — modal */
.online-match-deserted-overlay {
  position: fixed;
  inset: 0;
  z-index: 8660;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px) + 8px) max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.online-match-deserted-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s;
}

.online-match-deserted-panel {
  width: min(480px, 94vw);
  padding: clamp(22px, 4vw, 30px);
  border-radius: 22px;
  border: 2px solid rgba(255, 120, 120, 0.45);
  background: linear-gradient(165deg, rgba(42, 12, 12, 0.98) 0%, rgba(8, 4, 4, 0.99) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 160, 160, 0.12),
    0 28px 90px rgba(0, 0, 0, 0.92);
  text-align: center;
}

.online-match-deserted-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.28em;
  color: rgba(255, 140, 140, 0.55);
}

.online-match-deserted-title {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 3.8vmin, 1.65rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ffb3b3;
}

.online-match-deserted-body {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 235, 235, 0.88);
}

.online-match-deserted-ok {
  min-width: 200px;
}

[data-theme="light"] .online-match-deserted-panel {
  background: linear-gradient(165deg, rgba(255, 250, 250, 0.98) 0%, rgba(255, 242, 242, 0.99) 100%);
  border-color: rgba(200, 90, 90, 0.45);
}

[data-theme="light"] .online-match-deserted-title {
  color: #8b2020;
}

[data-theme="light"] .online-match-deserted-body {
  color: rgba(60, 28, 28, 0.92);
}

@media (max-width: 900px) {
  .player-code-panel {
    grid-template-columns: 1fr auto;
    row-gap: 4px;
  }

  .online-room-header {
    flex-direction: column;
  }

  .online-room-code-wrap {
    justify-items: start;
  }

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

  .online-room-actions {
    grid-template-columns: 1fr;
  }

  .online-room-actions--danger {
    grid-template-columns: 1fr;
  }

  .online-match-sidebar {
    position: static;
    width: 100%;
    max-height: 220px;
    margin-top: 8px;
  }
}

/* ===== Lobby onboarding tour (non-skippable, replay from lobby) ===== */
body.onboarding-active {
  overflow: hidden;
}

.onboarding-a11y-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.onboarding-overlay:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 99997;
  display: grid !important;
  place-items: center;
  padding: clamp(10px, 2.5vmin, 20px);
  opacity: 0;
  visibility: visible;
  transition: opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.onboarding-overlay.onboarding-overlay--open:not([hidden]) {
  opacity: 1;
}

.onboarding-overlay[hidden] {
  display: none !important;
  pointer-events: none;
  visibility: hidden;
}

.onboarding-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 12, 0.82);
  backdrop-filter: blur(12px);
  transition: opacity 0.45s ease;
}

.onboarding-shell {
  position: relative;
  z-index: 1;
  width: min(1040px, 94vw);
  opacity: 0;
  transform: translateY(22px) scale(0.92);
  filter: blur(12px);
  transition:
    opacity 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.58s cubic-bezier(0.34, 1.18, 0.64, 1),
    filter 0.44s ease;
}

.onboarding-overlay.onboarding-overlay--open:not([hidden]) .onboarding-shell {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

#onboarding-root.onboarding-root--leave {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  filter: blur(8px);
}

#onboarding-root.onboarding-root--enter .onboarding-step {
  animation: onboarding-step-reveal 0.54s cubic-bezier(0.34, 1.14, 0.64, 1) both;
}

@keyframes onboarding-step-reveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
    filter: blur(7px);
  }

  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes onboarding-next-pulse {
  0% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.045);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 0 22px rgba(255, 140, 55, 0.42);
  }

  100% {
    transform: scale(1);
  }
}

.onboarding-next-btn--pulse {
  animation: onboarding-next-pulse 0.58s cubic-bezier(0.34, 1.16, 0.64, 1);
}

.onboarding-shell__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(52px, 6.5vmin, 76px);
  gap: clamp(10px, 1.8vmin, 16px);
  align-items: stretch;
}

.onboarding-root {
  background: #121214;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: clamp(12px, 2vmin, 20px) clamp(14px, 2.4vmin, 24px);
  min-height: clamp(280px, 46vmin, 400px);
  transition:
    opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.22s ease;
}

.onboarding-step {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: clamp(240px, 40vmin, 360px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(10px, 1.8vmin, 16px);
}

.onboarding-step--welcome {
  align-items: center;
  text-align: center;
}

.onboarding-step--split {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.62fr);
  align-items: center;
  gap: clamp(12px, 2.4vmin, 28px);
  min-height: min(52vh, 420px);
}

.onboarding-step--solo {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.onboarding-media--hero {
  display: flex;
  justify-content: center;
  width: 100%;
}

.onboarding-media--hero img {
  width: min(240px, 46vw);
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
}

.onboarding-col--text {
  min-width: 0;
  display: flex;
  align-items: center;
  padding-right: clamp(0px, 0.8vmin, 8px);
}

.onboarding-col--pic {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-thumb {
  box-sizing: border-box;
  width: 100%;
  max-width: min(520px, 52vw);
  margin: 0 auto;
  background: rgba(40, 43, 52, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: clamp(8px, 1.4vmin, 14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.onboarding-thumb img {
  width: 100%;
  height: auto;
  max-height: min(52vh, 440px);
  display: block;
  border-radius: 14px;
  image-rendering: pixelated;
  object-fit: contain;
}

.onboarding-text--final {
  margin: 0;
  font-weight: 800;
  line-height: 1.35;
}

.onboarding-text {
  margin: 0;
  font-size: clamp(16px, 2.4vmin, 19px);
  line-height: 1.48;
  color: rgba(250, 251, 255, 0.97);
  font-weight: 780;
  letter-spacing: 0.01em;
}

.onboarding-text--solo {
  font-size: clamp(17px, 2.75vmin, 21px);
}

.onboarding-accent {
  color: #ff8c32;
  font-weight: 900;
}

.onboarding-next-btn {
  align-self: stretch;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(48, 52, 62, 0.98) 0%, rgba(28, 31, 38, 0.98) 100%);
  color: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 120ms ease, filter 120ms ease;
}

.onboarding-next-btn:hover {
  filter: brightness(1.06);
}

.onboarding-next-btn:active {
  transform: translateY(1px);
}

.onboarding-next-btn:focus-visible {
  outline: 3px solid rgba(255, 140, 50, 0.55);
  outline-offset: 3px;
}

.onboarding-next-btn__chev {
  display: block;
  font-size: clamp(34px, 7vmin, 46px);
  line-height: 1;
  font-weight: 900;
}

.btn-onboarding-guide {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .onboarding-shell__body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .onboarding-next-btn {
    width: min(260px, 100%);
    height: 54px;
    margin: 0 auto;
    align-self: center;
  }

  .onboarding-step--split {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: clamp(14px, 3vmin, 22px);
  }

  .onboarding-thumb {
    max-width: 100%;
  }

  .onboarding-thumb img {
    max-height: min(42vh, 340px);
  }

  .onboarding-media--hero img {
    width: min(200px, 62vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-overlay:not([hidden]),
  .onboarding-shell,
  .onboarding-root {
    transition-duration: 0.01ms !important;
  }

  #onboarding-root.onboarding-root--enter .onboarding-step {
    animation: none !important;
  }

  .onboarding-next-btn--pulse {
    animation: none !important;
  }
}
