/* ============================================================
   ZOMBIVAL — Game Interface aligned with the Home aesthetic
   ============================================================ */

:root {
  --zv-toxic: #39ff5c;
  --zv-toxic-2: #b9ff25;
  --zv-blood: #ff315f;
  --zv-purple: #7d2cff;
  --zv-core: #05070d;
  --zv-ink: #090d18;
  --zv-panel: rgba(10, 14, 26, 0.86);
  --zv-panel-solid: #0a0e1a;
  --zv-line: rgba(243, 239, 224, 0.14);
  --zv-text: #f3efe0;
  --zv-muted: #9aa6b7;
  --zv-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
  --zv-radius: 22px;
  --zv-font-display: "Bungee", system-ui, sans-serif;
  --zv-font-terminal: "VT323", monospace;
  --zv-font-body: "Special Elite", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--zv-font-body);
  color: var(--zv-text);
  background:
    radial-gradient(circle at 50% 0%, rgba(57, 255, 92, 0.18), transparent 28rem),
    radial-gradient(circle at 12% 42%, rgba(255, 49, 95, 0.13), transparent 24rem),
    radial-gradient(circle at 90% 38%, rgba(125, 44, 255, 0.16), transparent 24rem),
    linear-gradient(180deg, #111827 0%, var(--zv-core) 42%, #030408 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.zv-noise,
.zv-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.zv-noise {
  opacity: 0.13;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mix-blend-mode: screen;
}

.zv-scanlines {
  opacity: 0.12;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.06) 0,
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px,
    transparent 4px
  );
}

.zv-game-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: min(calc(100% - 28px), 1360px);
  margin: 0 auto;
  padding: 18px 0 24px;
}

.zv-game-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid var(--zv-line);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.74);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.44);
}

.zv-game-brand img {
  width: 118px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(57, 255, 92, 0.35));
}

.zv-game-header-copy {
  min-width: 0;
}

.zv-kicker {
  margin: 0 0 4px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--zv-font-terminal);
  font-size: 19px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zv-toxic);
  text-shadow: 0 0 16px rgba(57, 255, 92, 0.36);
}

.zv-kicker i {
  color: var(--zv-blood);
}

.zv-game-header h1 {
  margin: 0;
  font-family: var(--zv-font-display);
  font-size: clamp(18px, 2.5vw, 34px);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.zv-header-link,
.zv-btn-exit,
.zv-btn-arcade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  border: 1px solid rgba(57, 255, 92, 0.32);
  background: rgba(57, 255, 92, 0.08);
  color: var(--zv-toxic);
  font-family: var(--zv-font-display);
  font-size: 12px;
  line-height: 1;
  padding: 13px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.zv-header-link:hover,
.zv-btn-exit:hover,
.zv-btn-arcade:hover {
  transform: translateY(-2px);
  background: var(--zv-toxic);
  color: var(--zv-core);
  box-shadow: 0 0 24px rgba(57, 255, 92, 0.24);
}

.zv-game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: stretch;
}

.zv-play-area,
.zv-sidebar-area {
  min-width: 0;
}

.zv-stage-panel,
.zv-sidebar-area {
  border: 1px solid var(--zv-line);
  border-radius: var(--zv-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--zv-panel);
  box-shadow: var(--zv-shadow);
  backdrop-filter: blur(14px);
}

.zv-stage-panel {
  padding: clamp(12px, 2vw, 18px);
}

.zv-stage-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.zv-stage-title {
  display: grid;
  gap: 3px;
}

.zv-stage-label {
  font-family: var(--zv-font-terminal);
  color: var(--zv-blood);
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zv-stage-title strong {
  font-family: var(--zv-font-display);
  font-size: clamp(16px, 2vw, 24px);
  letter-spacing: -0.05em;
}

.zv-hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  font-family: var(--zv-font-terminal);
}

.zv-hud-metric {
  min-width: 82px;
  padding: 8px 10px;
  border: 1px solid rgba(243, 239, 224, 0.1);
  border-radius: 16px;
  background: rgba(5, 7, 13, 0.56);
  text-align: center;
}

.zv-hud-metric span,
.zv-hud-metric em {
  display: block;
  color: var(--zv-muted);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.zv-hud-metric strong {
  display: block;
  color: var(--zv-toxic);
  font-size: 25px;
  line-height: 1;
  text-shadow: 0 0 15px rgba(57, 255, 92, 0.28);
}

.zv-meter-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--zv-muted);
  font-family: var(--zv-font-terminal);
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zv-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(243, 239, 224, 0.12);
  background: rgba(5, 7, 13, 0.8);
}

.zv-meter span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--zv-blood), var(--zv-toxic));
  box-shadow: 0 0 18px rgba(57, 255, 92, 0.25);
  transform-origin: left center;
  transition: width 0.2s ease;
}

.zv-canvas-frame {
  position: relative;
  overflow: visible;
  isolation: isolate;
  aspect-ratio: 16 / 10;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid rgba(57, 255, 92, 0.26);
  border-radius: 18px;
  background: #05070d;
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.72),
    0 0 0 8px rgba(5, 7, 13, 0.45),
    0 0 36px rgba(57, 255, 92, 0.08);
}

.zv-canvas-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(57, 255, 92, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(57, 255, 92, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  mix-blend-mode: screen;
  opacity: 0.35;
  border-radius: inherit;
}

#zombivalCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  border-radius: 17px;
}

.zv-sidebar-area {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-height: calc(100vh - 118px);
  padding: 20px;
  overflow-y: auto;
}

.zv-sidebar-inner {
  min-height: 0;
}

.zv-sidebar-block {
  margin-bottom: 22px;
}

.zv-sidebar-heading {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--zv-line);
  color: var(--zv-blood);
  font-family: var(--zv-font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.zv-sidebar-copy,
.zv-guide-list,
.zv-buff-empty {
  color: var(--zv-muted);
  font-size: 13px;
  line-height: 1.62;
}

.zv-sidebar-copy {
  margin: 0;
}

.zv-sidebar-copy strong {
  color: var(--zv-toxic);
}

.zv-meta-card,
.zv-game-leaderboard-card,
.zv-buff-node {
  border: 1px solid rgba(243, 239, 224, 0.12);
  border-radius: 18px;
  background: rgba(5, 7, 13, 0.54);
}

.zv-meta-card {
  padding: 16px;
}

.zv-meta-name {
  margin-bottom: 3px;
  color: var(--zv-toxic);
  font-family: var(--zv-font-terminal);
  font-size: 30px;
  line-height: 1;
  text-shadow: 0 0 16px rgba(57, 255, 92, 0.25);
}

.zv-meta-sub {
  color: var(--zv-muted);
  font-size: 12px;
}

.zv-guide-list {
  padding-left: 17px;
  margin: 0;
}

.zv-guide-list li {
  margin-bottom: 10px;
}

.zv-kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid rgba(185, 255, 37, 0.28);
  border-radius: 7px;
  background: rgba(57, 255, 92, 0.08);
  color: #fff47a;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.zv-buffs-container {
  display: grid;
  gap: 10px;
}

.zv-buff-node {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-color: rgba(57, 255, 92, 0.4);
  box-shadow: 0 0 20px rgba(57, 255, 92, 0.08);
  font-size: 13px;
  color: var(--zv-muted);
}

.zv-buff-node i {
  color: var(--zv-toxic);
  font-size: 20px;
}

.zv-btn-exit {
  width: 100%;
  margin-top: 4px;
  border-color: rgba(255, 49, 95, 0.46);
  background: rgba(255, 49, 95, 0.06);
  color: var(--zv-blood);
}

.zv-btn-exit:hover {
  background: var(--zv-blood);
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 49, 95, 0.22);
}

.zv-game-highscore {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(243, 239, 224, 0.1);
}

.zv-game-highscore span {
  color: var(--zv-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.zv-game-highscore strong {
  color: var(--zv-toxic);
  font-family: var(--zv-font-terminal);
  font-size: 27px;
}

.zv-game-score-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--zv-font-terminal);
  font-size: 17px;
}

.zv-game-score-table th,
.zv-game-score-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(243, 239, 224, 0.08);
  text-align: center;
}

.zv-game-score-table th {
  color: var(--zv-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.zv-game-score-table td:last-child,
.zv-game-score-table th:last-child {
  text-align: right;
}

.zv-game-score-table tr:last-child td {
  border-bottom: 0;
}

.zv-screen-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 26px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(57, 255, 92, 0.11), transparent 18rem),
    rgba(5, 7, 13, 0.9);
  backdrop-filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.zv-screen-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.zv-overlay-kicker {
  margin: 0 0 8px;
  color: var(--zv-toxic);
  font-family: var(--zv-font-terminal);
  font-size: 22px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.zv-overlay-title {
  margin: 0 0 10px;
  font-family: var(--zv-font-display);
  font-size: clamp(34px, 7vw, 64px);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.zv-overlay-title--dead {
  color: var(--zv-blood);
  text-shadow: 0 0 28px rgba(255, 49, 95, 0.34);
}

.zv-overlay-title--win {
  color: var(--zv-toxic);
  text-shadow: 0 0 28px rgba(57, 255, 92, 0.34);
}

.zv-overlay-msg,
.zv-overlay-score {
  max-width: 520px;
  margin: 0 0 16px;
  color: var(--zv-muted);
  line-height: 1.5;
}

.zv-overlay-score span {
  color: var(--zv-toxic);
  font-family: var(--zv-font-terminal);
  font-size: 26px;
}

.zv-overlay-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.zv-btn-arcade {
  border-radius: 16px;
  background: var(--zv-toxic);
  color: var(--zv-core);
  border-color: transparent;
}

.zv-btn-arcade--ghost {
  background: transparent;
  color: var(--zv-muted);
  border-color: var(--zv-line);
}

.zv-btn-arcade--ghost:hover {
  background: rgba(255, 49, 95, 0.12);
  color: var(--zv-blood);
  border-color: rgba(255, 49, 95, 0.46);
}

@media (max-width: 1120px) {
  .zv-game-layout {
    grid-template-columns: 1fr;
  }

  .zv-sidebar-area {
    max-height: none;
  }
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .zv-game-shell {
    width: min(calc(100% - 20px), 1360px);
    padding-top: 10px;
  }

  .zv-game-header {
    grid-template-columns: 1fr auto;
    border-radius: 24px;
  }

  .zv-game-brand {
    grid-column: 1 / -1;
  }

  .zv-game-brand img {
    width: 104px;
  }

  .zv-game-header-copy {
    grid-column: 1 / 2;
  }

  .zv-header-link {
    grid-column: 2 / 3;
    grid-row: 2;
    padding: 11px 14px;
  }

  .zv-stage-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .zv-hud {
    justify-content: flex-start;
    width: 100%;
  }

  .zv-hud-metric {
    flex: 1 1 84px;
  }

  .zv-meter-row {
    grid-template-columns: 1fr;
  }
}


.zv-btn-arcade i {
  pointer-events: none;
}

.zv-overlay-actions .zv-btn-arcade {
  min-width: 210px;
}


.zv-btn-arcade.is-loading,
.zv-btn-arcade:disabled {
  opacity: 0.72;
  cursor: wait;
  pointer-events: none;
}


/* ---------- SIDEBAR TABS ---------- */
.zv-sidebar-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 16px;
  padding: 6px;
  border: 1px solid rgba(243, 239, 224, 0.11);
  border-radius: 16px;
  background: rgba(5, 7, 13, 0.55);
}

.zv-tab-button {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 8px;
  background: transparent;
  color: var(--zv-muted);
  font-family: var(--zv-font-display);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.zv-tab-button:hover {
  color: var(--zv-toxic);
  border-color: rgba(57, 255, 92, 0.26);
  background: rgba(57, 255, 92, 0.06);
}

.zv-tab-button.is-active {
  color: var(--zv-core);
  border-color: transparent;
  background: linear-gradient(135deg, var(--zv-toxic), var(--zv-toxic-2));
  box-shadow: 0 0 22px rgba(57, 255, 92, 0.22);
}

.zv-sidebar-tab-panel[hidden] {
  display: none !important;
}

.zv-sidebar-tab-panel.is-active {
  display: block;
}

/* ---------- TOUCH CONTROLS ---------- */
.zv-touch-controls {
  display: none;
}

.zv-touch-controls button {
  width: 54px;
  height: 42px;
  border: 1px solid rgba(57, 255, 92, 0.32);
  border-radius: 12px;
  background: rgba(5, 7, 13, 0.76);
  color: var(--zv-toxic);
  box-shadow: 0 0 18px rgba(57, 255, 92, 0.10);
}

.zv-touch-controls button:active {
  background: var(--zv-toxic);
  color: var(--zv-core);
}

/* ---------- MULTI-STAGE / COUNTDOWN PATCH ---------- */
.zv-hud-metric--danger strong {
  color: var(--zv-blood);
  text-shadow: 0 0 16px rgba(255, 49, 95, 0.35);
}

.zv-stage-difficulty {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(243, 239, 224, 0.1);
  color: var(--zv-toxic);
}

.zv-sidebar-actions {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

@media (min-width: 1121px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .zv-game-shell {
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px 0 14px;
  }

  .zv-game-header {
    flex: 0 0 auto;
    margin-bottom: 10px;
  }

  .zv-game-layout {
    flex: 1 1 auto;
    min-height: 0;
  }

  .zv-stage-panel {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .zv-canvas-frame {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 218px);
    width: min(100%, calc((100vh - 218px) * 1.6));
  }

  .zv-sidebar-area {
    max-height: calc(100vh - 98px);
    overflow: hidden;
  }

  .zv-sidebar-inner {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .zv-sidebar-tab-panel {
    min-height: 0;
    overflow: auto;
    scrollbar-width: thin;
  }
}


@media (max-width: 760px) {
  .zv-touch-controls {
    display: grid;
    grid-template-columns: repeat(3, 54px);
    grid-template-areas:
      ". up ."
      "left down right";
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
  }

  .zv-touch-controls [data-touch-dir="ArrowUp"] { grid-area: up; }
  .zv-touch-controls [data-touch-dir="ArrowLeft"] { grid-area: left; }
  .zv-touch-controls [data-touch-dir="ArrowDown"] { grid-area: down; }
  .zv-touch-controls [data-touch-dir="ArrowRight"] { grid-area: right; }
}


/* ---------- SURVIVOR REGISTRY IN GAME PANEL ---------- */
.zv-survivor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zv-survivor-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(57, 255, 92, 0.22);
  border-radius: 999px;
  background: rgba(57, 255, 92, 0.06);
  color: var(--g-text);
  font-family: var(--g-font-mono);
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.zv-survivor-chip i {
  color: var(--g-toxic);
}


/* ---------- FULLSCREEN + PAGE SCROLL FIX ---------- */
.zv-header-button {
  appearance: none;
  -webkit-appearance: none;
}

.zv-game-shell:fullscreen {
  width: 100vw;
  max-width: none;
  min-height: 100vh;
  padding: 12px 18px 22px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 0%, rgba(57, 255, 92, 0.18), transparent 28rem),
    radial-gradient(circle at 12% 42%, rgba(255, 49, 95, 0.13), transparent 24rem),
    radial-gradient(circle at 90% 38%, rgba(125, 44, 255, 0.16), transparent 24rem),
    linear-gradient(180deg, #111827 0%, var(--zv-core) 42%, #030408 100%);
}

.zv-game-shell:fullscreen .zv-game-header {
  margin-inline: auto;
}

.zv-game-shell:fullscreen .zv-game-layout {
  max-width: 1480px;
  margin-inline: auto;
}

@media (min-width: 1121px) {
  html,
  body {
    height: auto !important;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .zv-game-shell {
    height: auto !important;
    min-height: 100dvh;
    display: block !important;
    padding: 14px 0 24px;
  }

  .zv-game-layout {
    align-items: start;
  }

  .zv-stage-panel {
    height: auto !important;
    display: block !important;
  }

  .zv-canvas-frame {
    flex: none !important;
    max-height: none !important;
    width: 100%;
    max-width: 940px;
  }

  .zv-sidebar-area {
    position: sticky;
    top: 14px;
    align-self: start;
    max-height: none !important;
    overflow: visible !important;
  }

  .zv-sidebar-inner {
    display: block !important;
    min-height: auto !important;
  }

  .zv-sidebar-tab-panel {
    max-height: none !important;
    overflow: visible !important;
  }
}

@media (max-height: 820px) and (min-width: 1121px) {
  .zv-game-header {
    padding-block: 8px;
    margin-bottom: 10px;
  }

  .zv-game-brand img {
    width: 102px;
  }

  .zv-stage-panel,
  .zv-sidebar-area {
    padding: 14px;
  }

  .zv-sidebar-block {
    margin-bottom: 16px;
  }

  .zv-meta-card {
    padding: 12px;
  }

  .zv-meta-name {
    font-size: 26px;
  }
}


/* ---------- FIXED POWER UPS ---------- */
.zv-powerup-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

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

.zv-powerup-group > span {
  display: block;
  color: var(--zv-muted, #a8b0c3);
  font-family: var(--zv-font-display, monospace);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .85;
}

.zv-powerup-node,
.zv-powerup-empty {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--pu-color, #39ff5c) 42%, rgba(255,255,255,.12));
  border-radius: 14px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--pu-color, #39ff5c) 14%, transparent), transparent 48%),
    rgba(5, 7, 13, .62);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 0 18px color-mix(in srgb, var(--pu-glow, #39ff5c) 14%, transparent);
}

.zv-powerup-node__icon,
.zv-powerup-empty > i {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: var(--pu-color, #39ff5c);
  background: rgba(0, 0, 0, .35);
  box-shadow: 0 0 14px color-mix(in srgb, var(--pu-glow, #39ff5c) 38%, transparent);
}

.zv-powerup-node b,
.zv-powerup-empty b {
  display: block;
  color: var(--pu-color, #39ff5c);
  font-family: var(--zv-font-display, monospace);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.zv-powerup-node small,
.zv-powerup-empty span {
  display: block;
  margin-top: 3px;
  color: var(--zv-text, #dce3ef);
  font-size: 12px;
  line-height: 1.35;
  opacity: .86;
}

.zv-powerup-node.is-active {
  animation: zv-powerup-pulse 1.1s ease-in-out infinite alternate;
}

.zv-powerup-node.is-used {
  opacity: .42;
  filter: grayscale(.65);
  box-shadow: none;
}

.zv-powerup-node.is-used b {
  color: var(--zv-muted, #a8b0c3);
}

.zv-powerup-empty {
  --pu-color: #ff315f;
  --pu-glow: #ff315f;
}

@keyframes zv-powerup-pulse {
  from { transform: translateY(0); }
  to { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 0 24px color-mix(in srgb, var(--pu-glow, #39ff5c) 28%, transparent); }
}

/* ---------- GAME FEEL ESSENTIAL PACK ---------- */
.zv-gamefeel-layer,
.zv-gamefeel-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.zv-gamefeel-layer {
  z-index: 12;
  overflow: visible;
}

.zv-gamefeel-flash {
  z-index: 4;
  opacity: 0;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 50% 50%, var(--zv-flash-color, rgba(57,255,92,.55)), transparent 54%),
    linear-gradient(90deg, transparent, var(--zv-flash-color, rgba(57,255,92,.32)), transparent);
}

.zv-gamefeel-flash.is-active {
  animation: zv-screen-flash var(--zv-flash-duration, 220ms) ease-out forwards;
}

.zv-feedback-float {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #39ff5c;
  font-family: var(--zv-font-display, monospace);
  font-size: clamp(13px, 1.8vw, 22px);
  letter-spacing: .11em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow:
    0 0 4px rgba(0, 0, 0, .95),
    0 0 10px currentColor,
    0 0 22px currentColor;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.95));
  animation: zv-feedback-float 1.05s cubic-bezier(.18,.89,.32,1.28) forwards;
  pointer-events: none;
}

.zv-feedback-float--danger {
  color: #ff315f;
  text-shadow:
    0 0 4px rgba(0, 0, 0, .95),
    0 0 12px rgba(255,49,95,.95),
    0 0 26px rgba(255,49,95,.7);
}

.zv-feedback-float--warning {
  color: #fff47a;
  text-shadow:
    0 0 4px rgba(0, 0, 0, .95),
    0 0 12px rgba(255,244,122,.9),
    0 0 24px rgba(255,244,122,.62);
}

.zv-feedback-float--powerup {
  color: #b9ff25;
  text-shadow:
    0 0 4px rgba(0, 0, 0, .95),
    0 0 12px rgba(185,255,37,.95),
    0 0 28px rgba(185,255,37,.7);
}

.zv-feedback-float--shield {
  color: #d7b6ff;
  text-shadow:
    0 0 4px rgba(0, 0, 0, .95),
    0 0 12px rgba(168,85,247,.95),
    0 0 28px rgba(168,85,247,.72);
}

.zv-feedback-float--impact {
  z-index: 16;
  font-size: clamp(22px, 3.4vw, 44px);
  letter-spacing: .14em;
  -webkit-text-stroke: 1px rgba(5, 7, 13, .92);
  text-shadow:
    0 3px 0 rgba(5, 7, 13, .95),
    0 0 10px currentColor,
    0 0 28px currentColor,
    0 0 52px rgba(57, 255, 92, .32);
  animation: zv-feedback-impact 1.28s cubic-bezier(.16,.92,.26,1) forwards;
}

.zv-feedback-float--impact.zv-feedback-float--danger {
  text-shadow:
    0 3px 0 rgba(5, 7, 13, .95),
    0 0 12px rgba(255,49,95,.95),
    0 0 34px rgba(255,49,95,.76),
    0 0 64px rgba(255,49,95,.36);
}

.zv-feedback-slash {
  position: absolute;
  z-index: 14;
  width: clamp(112px, 17vw, 240px);
  height: 12px;
  transform: translate(-50%, -50%) rotate(-16deg) scaleX(.25);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.92), currentColor 52%, transparent),
    linear-gradient(90deg, transparent, currentColor, transparent);
  color: #39ff5c;
  box-shadow:
    0 0 14px currentColor,
    0 0 34px currentColor;
  mix-blend-mode: screen;
  animation: zv-feedback-slash 680ms ease-out forwards;
}

.zv-feedback-slash--danger {
  color: #ff315f;
}


.zv-shake-soft {
  animation: zv-shake-soft 150ms linear both;
}

.zv-shake-medium {
  animation: zv-shake-medium 190ms linear both;
}

.zv-shake-heavy {
  animation: zv-shake-heavy 260ms linear both;
}

.zv-shake-win {
  animation: zv-shake-win 320ms ease-out both;
}

.zv-hud-pop {
  animation: zv-hud-pop 340ms ease-out both;
}

.zv-hud-pop--success {
  color: #39ff5c !important;
  text-shadow: 0 0 18px rgba(57,255,92,.65) !important;
}

.zv-hud-pop--danger {
  color: #ff315f !important;
  text-shadow: 0 0 18px rgba(255,49,95,.75) !important;
}

#hud-infection-countdown.is-warning {
  color: #fff47a;
  text-shadow: 0 0 14px rgba(255,244,122,.45);
  animation: zv-countdown-warning 1.2s ease-in-out infinite alternate;
}

#hud-infection-countdown.is-critical {
  color: #ff315f;
  text-shadow: 0 0 16px rgba(255,49,95,.75);
  animation: zv-countdown-critical .42s steps(2, end) infinite;
}

@keyframes zv-screen-flash {
  0% { opacity: 0; }
  18% { opacity: .78; }
  100% { opacity: 0; }
}

@keyframes zv-feedback-float {
  0% { opacity: 0; transform: translate(-50%, -38%) scale(.82); filter: blur(2px); }
  16% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); filter: blur(0); }
  74% { opacity: 1; transform: translate(-50%, -86%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -122%) scale(.92); }
}

@keyframes zv-feedback-impact {
  0% { opacity: 0; transform: translate(-50%, -22%) scale(.72) rotate(-2deg); filter: blur(3px); }
  12% { opacity: 1; transform: translate(-50%, -62%) scale(1.18) rotate(1deg); filter: blur(0); }
  42% { opacity: 1; transform: translate(-50%, -88%) scale(1.02) rotate(0deg); }
  78% { opacity: .92; transform: translate(-50%, -118%) scale(.98) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -154%) scale(.88) rotate(1deg); filter: blur(1px); }
}

@keyframes zv-feedback-slash {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-16deg) scaleX(.16); }
  18% { opacity: .95; transform: translate(-50%, -50%) rotate(-16deg) scaleX(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-16deg) scaleX(1.18) translateX(18px); }
}

@keyframes zv-shake-soft {
  0%,100% { transform: translate3d(0,0,0); }
  25% { transform: translate3d(1px,-1px,0); }
  50% { transform: translate3d(-1px,1px,0); }
  75% { transform: translate3d(1px,1px,0); }
}

@keyframes zv-shake-medium {
  0%,100% { transform: translate3d(0,0,0); }
  15% { transform: translate3d(-2px,1px,0); }
  30% { transform: translate3d(3px,-2px,0); }
  45% { transform: translate3d(-3px,2px,0); }
  60% { transform: translate3d(2px,2px,0); }
  80% { transform: translate3d(-1px,-1px,0); }
}

@keyframes zv-shake-heavy {
  0%,100% { transform: translate3d(0,0,0); }
  10% { transform: translate3d(-6px,2px,0); }
  22% { transform: translate3d(7px,-3px,0); }
  34% { transform: translate3d(-8px,4px,0); }
  48% { transform: translate3d(6px,4px,0); }
  62% { transform: translate3d(-4px,-3px,0); }
  78% { transform: translate3d(3px,2px,0); }
}

@keyframes zv-shake-win {
  0% { transform: translate3d(0,0,0) scale(1); }
  18% { transform: translate3d(-4px,2px,0) scale(1.004); }
  36% { transform: translate3d(4px,-2px,0) scale(1.006); }
  58% { transform: translate3d(-2px,1px,0) scale(1.003); }
  100% { transform: translate3d(0,0,0) scale(1); }
}

@keyframes zv-hud-pop {
  0% { transform: scale(1); }
  42% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

@keyframes zv-countdown-warning {
  from { filter: brightness(1); }
  to { filter: brightness(1.4); }
}

@keyframes zv-countdown-critical {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(1px); }
}

@media (prefers-reduced-motion: reduce) {
  .zv-gamefeel-flash.is-active,
  .zv-feedback-float,
  .zv-shake-soft,
  .zv-shake-medium,
  .zv-shake-heavy,
  .zv-shake-win,
  .zv-hud-pop,
  #hud-infection-countdown.is-warning,
  #hud-infection-countdown.is-critical {
    animation: none !important;
  }
}


/* ---------- AUDIO TOGGLE ---------- */
.zv-audio-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2200;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(57, 255, 92, .42);
  border-radius: 999px;
  background:
    radial-gradient(circle at top left, rgba(57,255,92,.18), transparent 38%),
    rgba(5, 7, 13, .88);
  color: var(--g-toxic, #39ff5c);
  font-family: var(--g-font-mono, monospace);
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(57,255,92,.12), 0 10px 28px rgba(0,0,0,.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.zv-audio-toggle:hover {
  border-color: rgba(57, 255, 92, .72);
  box-shadow: 0 0 24px rgba(57,255,92,.22), 0 10px 28px rgba(0,0,0,.5);
  transform: translateY(-1px);
}

.zv-audio-toggle.is-muted {
  color: var(--g-blood, #ff315f);
  border-color: rgba(255,49,95,.42);
  box-shadow: 0 0 18px rgba(255,49,95,.12), 0 10px 28px rgba(0,0,0,.42);
}

@media (max-width: 760px) {
  .zv-audio-toggle {
    right: 12px;
    bottom: 12px;
    padding: 9px 10px;
  }

  .zv-audio-toggle span {
    display: none;
  }
}


/* ============================================================
   Character Gameplay Integration v0.1
   ============================================================ */

.zv-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.zv-meta-card--character {
  display: grid;
  gap: 12px;
}

.zv-active-character {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(57, 255, 92, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 24% 30%, rgba(57, 255, 92, 0.12), transparent 48%),
    rgba(3, 5, 12, 0.48);
}

.zv-active-character img {
  width: 78px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(243, 239, 224, 0.12);
  filter: saturate(1.08) contrast(1.04);
}

.zv-active-character__copy span,
.zv-character-change-link {
  font-family: var(--zv-font-terminal);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zv-active-character__copy span {
  display: block;
  margin-bottom: 4px;
  color: var(--zv-blood);
  font-size: 13px;
}

.zv-active-character__copy strong {
  display: block;
  color: var(--zv-toxic);
  font-family: var(--zv-font-display);
  font-size: 15px;
  line-height: 1;
}

.zv-active-character__copy em {
  display: block;
  margin-top: 5px;
  color: var(--zv-muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.zv-character-change-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 49, 95, 0.28);
  border-radius: 999px;
  background: rgba(255, 49, 95, 0.08);
  color: var(--zv-blood);
  font-size: 14px;
}

.zv-character-change-link:hover {
  border-color: rgba(57, 255, 92, 0.34);
  background: rgba(57, 255, 92, 0.10);
  color: var(--zv-toxic);
}

.zv-character-score-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(57, 255, 92, 0.24);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 24%, rgba(57, 255, 92, 0.14), transparent 48%),
    rgba(5, 7, 13, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 0 18px rgba(57, 255, 92, 0.06);
}

.zv-character-score-card span,
.zv-character-score-card small {
  font-family: var(--zv-font-terminal);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zv-character-score-card span {
  color: var(--zv-muted);
  font-size: 13px;
}

.zv-character-score-card strong {
  color: var(--zv-toxic);
  font-family: var(--zv-font-display);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1;
  text-shadow: 0 0 14px rgba(57, 255, 92, 0.28);
}

.zv-character-score-card small {
  color: var(--zv-muted);
  font-size: 12px;
  line-height: 1.25;
}

@media (max-width: 760px) {
  .zv-header-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .zv-header-actions .zv-header-link {
    grid-column: auto;
    grid-row: auto;
  }
}


/* ============================================================
   Zombival themed scrollbars
   ============================================================ */

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(57, 255, 92, .72) rgba(5, 7, 13, .86);
}

body,
.zv-sidebar-area,
.zv-sidebar-tab-panel,
.zv-start-character-grid,
.zv-character-grid,
.zv-modal,
.zv-powerup-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(57, 255, 92, .72) rgba(5, 7, 13, .86);
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background:
    linear-gradient(180deg, rgba(57, 255, 92, .04), rgba(255, 49, 95, .04)),
    rgba(5, 7, 13, .92);
  border-left: 1px solid rgba(243, 239, 224, .08);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background:
    linear-gradient(180deg, rgba(57, 255, 92, .92), rgba(185, 255, 37, .70) 48%, rgba(255, 49, 95, .78));
  border: 3px solid rgba(5, 7, 13, .92);
  border-radius: 999px;
  box-shadow:
    0 0 12px rgba(57, 255, 92, .35),
    inset 0 0 0 1px rgba(243, 239, 224, .18);
}

*::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, #39ff5c, #b9ff25 46%, #ff315f);
  box-shadow:
    0 0 18px rgba(57, 255, 92, .52),
    0 0 10px rgba(255, 49, 95, .28);
}

*::-webkit-scrollbar-corner {
  background: rgba(5, 7, 13, .92);
}

/* Nerd inventory states */
.zv-powerup-group--nerd {
  padding: 10px;
  border: 1px solid rgba(56, 189, 248, .18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, .10), transparent 48%),
    rgba(5, 7, 13, .38);
}

.zv-powerup-node--slot.is-empty {
  opacity: .62;
  border-style: dashed;
}

.zv-powerup-node.is-stored {
  opacity: 1;
  filter: none;
  border-color: color-mix(in srgb, var(--pu-color, #38bdf8) 62%, rgba(255,255,255,.16));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.04),
    0 0 20px color-mix(in srgb, var(--pu-glow, #38bdf8) 20%, transparent);
}


/* ============================================================
   Game HUD item slots v0.1
   Replaces Mission / Controls / Records sidebar tabs with
   three persistent item slots.
   ============================================================ */

.zv-sidebar-tabs,
.zv-sidebar-tab-panel {
  display: none !important;
}

.zv-sidebar-block--items {
  margin-top: 18px;
  border-color: rgba(57, 255, 92, 0.20);
  background:
    radial-gradient(circle at 50% 0%, rgba(57, 255, 92, 0.08), transparent 42%),
    rgba(5, 7, 13, 0.62);
}

.zv-items-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.zv-items-help {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--zv-muted);
}

.zv-item-keycap {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(57, 255, 92, 0.35);
  border-radius: 13px;
  background: rgba(57, 255, 92, 0.10);
  color: var(--zv-toxic);
  font-family: var(--zv-font-display);
  box-shadow: 0 0 18px rgba(57, 255, 92, 0.12);
}

.zv-item-slots-container {
  margin-top: 8px;
}

.zv-inventory-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.zv-inventory-slot {
  width: 100%;
  min-height: 142px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "icon"
    "title"
    "sub";
  justify-items: center;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  border: 1px solid rgba(243, 239, 224, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(5, 7, 13, 0.72);
  color: var(--zv-text);
  text-align: center;
  font: inherit;
  position: relative;
  overflow: hidden;
}

.zv-inventory-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(57, 255, 92, 0.035) 0 1px, transparent 1px 7px);
  opacity: 0.45;
  pointer-events: none;
}

.zv-inventory-slot__icon {
  grid-area: icon;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--slot-color, var(--zv-toxic));
  border: 1px solid color-mix(in srgb, var(--slot-color, var(--zv-toxic)) 42%, transparent);
  background: color-mix(in srgb, var(--slot-color, var(--zv-toxic)) 10%, rgba(5, 7, 13, 0.9));
  box-shadow: 0 0 18px color-mix(in srgb, var(--slot-glow, var(--zv-toxic)) 18%, transparent);
  position: relative;
  z-index: 1;
}

.zv-inventory-slot__media {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.12));
}

.zv-inventory-slot strong {
  grid-area: title;
  position: relative;
  z-index: 1;
  display: block;
  color: var(--zv-text);
  font-family: var(--zv-font-display);
  font-size: clamp(12px, 1.1vw, 16px);
  line-height: 1;
  letter-spacing: 0.02em;
}

.zv-inventory-slot small {
  grid-area: sub;
  position: relative;
  z-index: 1;
  color: var(--zv-muted);
  font-family: var(--zv-font-terminal);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.zv-inventory-slot.is-stored {
  cursor: pointer;
  border-color: color-mix(in srgb, var(--slot-color, var(--zv-toxic)) 48%, rgba(243, 239, 224, 0.14));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--slot-color, var(--zv-toxic)) 18%, transparent),
    0 0 26px color-mix(in srgb, var(--slot-glow, var(--zv-toxic)) 20%, transparent);
}

.zv-inventory-slot.is-stored:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--slot-color, var(--zv-toxic)) 72%, rgba(243, 239, 224, 0.18));
}

.zv-inventory-slot.is-empty {
  border-style: dashed;
  opacity: 0.72;
}

.zv-inventory-slot.is-locked {
  opacity: 0.66;
  filter: grayscale(0.7);
}

.zv-inventory-slot.is-locked .zv-inventory-slot__icon {
  color: var(--zv-blood);
  border-color: rgba(255, 49, 95, 0.28);
  background: rgba(255, 49, 95, 0.08);
}

.zv-inventory-help {
  margin: 12px 0 0;
  color: var(--zv-muted);
  line-height: 1.45;
  font-size: 0.88rem;
}

.zv-inventory-active-row {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.zv-inventory-active {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--slot-color, var(--zv-toxic)) 40%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--slot-color, var(--zv-toxic)) 9%, rgba(5, 7, 13, 0.9));
}

.zv-inventory-active i {
  color: var(--slot-color, var(--zv-toxic));
}

.zv-inventory-active span {
  color: var(--zv-text);
  font-family: var(--zv-font-display);
  font-size: 12px;
}

.zv-inventory-active small {
  margin-left: auto;
  color: var(--zv-muted);
  font-family: var(--zv-font-terminal);
  font-size: 16px;
}

@media (max-width: 760px) {
  .zv-inventory-slots {
    grid-template-columns: 1fr;
  }

  .zv-inventory-slot {
    min-height: 92px;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-areas:
      "icon title"
      "icon sub";
    justify-items: start;
    text-align: left;
  }
}

/* ============================================================
   FIX — Nerd HUD inventory: 3 square item slots in one row
   ============================================================ */
.zv-inventory-slots,
.zv-inventory-slots.is-nerd-active,
.zv-inventory-slots.is-locked {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.zv-inventory-slot {
  min-height: 0;
  aspect-ratio: 1 / 1;
  grid-template-columns: 1fr;
  grid-template-areas:
    "icon"
    "title";
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 10px;
  text-align: center;
}

.zv-inventory-slot__icon {
  width: clamp(44px, 4.2vw, 58px);
  height: clamp(44px, 4.2vw, 58px);
  border-radius: 15px;
}

.zv-inventory-slot__media {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.zv-inventory-slot strong {
  font-size: clamp(10px, 0.9vw, 13px);
  line-height: 1.05;
  text-align: center;
}

.zv-inventory-slot small {
  display: none;
}

@media (max-width: 760px) {
  .zv-inventory-slots,
  .zv-inventory-slots.is-nerd-active,
  .zv-inventory-slots.is-locked {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .zv-inventory-slot {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-areas:
      "icon"
      "title";
    justify-items: center;
    text-align: center;
  }
}


/* ============================================================
   FIX — Nerd item HUD compact 3-square row
   ============================================================ */
.zv-sidebar-block--items .zv-items-help {
  display: none;
}

.zv-sidebar-block--items .zv-item-keycap {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 0.9rem;
}

.zv-sidebar-block--items .zv-item-slots-container {
  margin-top: 10px;
}

.zv-sidebar-block--items .zv-powerup-list {
  width: 100%;
}

.zv-sidebar-block--items .zv-inventory-slots,
.zv-sidebar-block--items .zv-inventory-slots.is-nerd-active,
.zv-sidebar-block--items .zv-inventory-slots.is-locked {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px;
  width: 100%;
}

.zv-sidebar-block--items .zv-inventory-slot {
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "icon";
  place-items: center;
  padding: 8px;
  border-radius: 18px;
  text-align: center;
}

.zv-sidebar-block--items .zv-inventory-slot__icon {
  width: min(66%, 62px);
  height: min(66%, 62px);
  border-radius: 15px;
  font-size: clamp(18px, 2.1vw, 24px);
}

.zv-sidebar-block--items .zv-inventory-slot__media {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.zv-sidebar-block--items .zv-inventory-slot strong,
.zv-sidebar-block--items .zv-inventory-slot small,
.zv-sidebar-block--items .zv-inventory-help {
  display: none !important;
}

.zv-sidebar-block--items .zv-inventory-slot.is-empty {
  opacity: 0.72;
}

.zv-sidebar-block--items .zv-inventory-slot.is-stored {
  opacity: 1;
  transform: none;
}

.zv-sidebar-block--items .zv-inventory-slot.is-stored:hover {
  transform: translateY(-2px);
}

@media (max-width: 760px) {
  .zv-sidebar-block--items .zv-inventory-slots,
  .zv-sidebar-block--items .zv-inventory-slots.is-nerd-active,
  .zv-sidebar-block--items .zv-inventory-slots.is-locked {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .zv-sidebar-block--items .zv-inventory-slot {
    grid-template-columns: 1fr;
    grid-template-areas: "icon";
    justify-items: center;
    text-align: center;
  }
}

/* ============================================================
   FIX — Nerd inventory item visual: larger item, clean box
   ============================================================ */
.zv-sidebar-block--items .zv-inventory-slot::before {
  display: none;
}

.zv-sidebar-block--items .zv-inventory-slot {
  padding: 8px;
  background: rgba(5, 7, 13, 0.76);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 18px rgba(56, 189, 248, 0.10);
}

.zv-sidebar-block--items .zv-inventory-slot__icon {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
}

.zv-sidebar-block--items .zv-inventory-slot__media {
  width: 92%;
  height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--slot-glow, var(--zv-toxic)) 42%, transparent));
}

.zv-sidebar-block--items .zv-inventory-slot.is-empty .zv-inventory-slot__icon {
  width: 38%;
  height: 38%;
  border: 1px solid rgba(56, 189, 248, 0.46);
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.06);
}

.zv-sidebar-block--items .zv-inventory-slot.is-empty .zv-inventory-slot__media {
  display: none;
}

.zv-sidebar-block--items .zv-inventory-slot.is-empty i {
  color: rgba(56, 189, 248, 0.78);
  font-size: clamp(16px, 2vw, 22px);
}

/* ============================================================
   FIX — Nerd item key prompt: PULSE + F
   Keeps the F keycap unchanged and adds a pulsing action hint.
   ============================================================ */
.zv-sidebar-block--items .zv-item-keycap {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

.zv-sidebar-block--items .zv-item-keycap::before {
  content: "PULSE +";
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  color: var(--zv-toxic);
  font-family: var(--zv-font-display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 0 10px rgba(57, 255, 92, 0.46);
  animation: zvPulseKeyHint 1.15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes zvPulseKeyHint {
  0%, 100% {
    opacity: 0.58;
    filter: drop-shadow(0 0 2px rgba(57, 255, 92, 0.24));
  }

  50% {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(57, 255, 92, 0.68));
  }
}

@media (max-width: 760px) {
  .zv-sidebar-block--items .zv-item-keycap::before {
    right: calc(100% + 8px);
    font-size: 0.64rem;
  }
}


/* ---------- UNLOCK GAMEFEEL POP-UP ---------- */
.zv-unlock-pop {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(18px) scale(.96);
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(.16,.92,.26,1);
}

.zv-unlock-pop.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.zv-unlock-pop__card {
  width: min(92vw, 560px);
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 18px;
  padding: 22px 20px;
  border: 2px solid rgba(57, 255, 92, .86);
  border-radius: 28px;
  overflow: hidden;
  pointer-events: auto;
  background:
    radial-gradient(circle at 15% 20%, rgba(57, 255, 92, .22), transparent 190px),
    linear-gradient(145deg, rgba(8, 14, 24, .98), rgba(2, 5, 10, .96));
  box-shadow:
    0 0 0 1px rgba(185, 255, 37, .16),
    0 0 38px rgba(57, 255, 92, .28),
    0 24px 80px rgba(0, 0, 0, .78);
}

.zv-unlock-pop__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(57, 255, 92, .18), transparent),
    repeating-linear-gradient(90deg, rgba(57,255,92,.045) 0 1px, transparent 1px 9px);
  transform: translateX(-120%);
  animation: zv-unlock-scan 1.15s ease-out 1 forwards;
  pointer-events: none;
}

.zv-unlock-pop__flare {
  position: absolute;
  inset: auto -40px -70px auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 255, 92, .34), transparent 70%);
  filter: blur(1px);
  pointer-events: none;
}

.zv-unlock-pop__icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(57, 255, 92, .65);
  border-radius: 24px;
  color: var(--zv-toxic, #39ff5c);
  background: rgba(57, 255, 92, .08);
  font-family: var(--zv-font-display, system-ui, sans-serif);
  font-size: 34px;
  text-shadow: 0 0 18px rgba(57, 255, 92, .72);
  box-shadow:
    inset 0 0 22px rgba(57, 255, 92, .12),
    0 0 24px rgba(57, 255, 92, .22);
  animation: zv-unlock-pulse 1.1s ease-in-out infinite alternate;
}

.zv-unlock-pop__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.zv-unlock-pop__copy span,
.zv-unlock-pop__copy em {
  display: block;
  color: var(--zv-toxic, #39ff5c);
  font-family: var(--zv-font-terminal, monospace);
  font-style: normal;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: 0 0 13px rgba(57, 255, 92, .55);
}

.zv-unlock-pop__copy span {
  margin-bottom: 5px;
  font-size: 17px;
}

.zv-unlock-pop__copy strong {
  display: block;
  color: var(--zv-blood, #ff315f);
  font-family: var(--zv-font-display, system-ui, sans-serif);
  font-size: clamp(24px, 4.1vw, 42px);
  line-height: .94;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(255, 49, 95, .3),
    3px 3px 0 rgba(57, 255, 92, .12);
}

.zv-unlock-pop__copy p {
  margin: 9px 0 0;
  color: var(--zv-text, #f3efe0);
  font-size: 17px;
  line-height: 1.45;
}

.zv-unlock-pop__copy em {
  margin-top: 9px;
  color: #b9ff25;
  font-size: 15px;
}

.zv-unlock-pop__close {
  width: 34px;
  height: 34px;
  align-self: start;
  border: 1px solid rgba(243, 239, 224, .18);
  border-radius: 50%;
  color: var(--zv-muted, #9aa6b7);
  background: rgba(5, 7, 13, .68);
  cursor: pointer;
  font: 24px/1 var(--zv-font-terminal, monospace);
  transition: color .18s ease, border-color .18s ease, transform .18s ease, background .18s ease;
  position: relative;
  z-index: 2;
}

.zv-unlock-pop__close:hover {
  color: var(--zv-toxic, #39ff5c);
  border-color: rgba(57, 255, 92, .56);
  background: rgba(57, 255, 92, .08);
  transform: rotate(8deg) scale(1.04);
}

.zv-unlock-pop--character .zv-unlock-pop__card {
  border-color: rgba(255, 49, 95, .92);
  box-shadow:
    0 0 0 1px rgba(255, 49, 95, .14),
    0 0 42px rgba(255, 49, 95, .2),
    0 24px 80px rgba(0, 0, 0, .78);
}

.zv-unlock-pop--character .zv-unlock-pop__icon {
  color: var(--zv-blood, #ff315f);
  border-color: rgba(255, 49, 95, .62);
  background: rgba(255, 49, 95, .09);
  text-shadow: 0 0 18px rgba(255, 49, 95, .72);
}

@keyframes zv-unlock-scan {
  0% { transform: translateX(-120%); opacity: .1; }
  55% { opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

@keyframes zv-unlock-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.055); }
}

@media (max-width: 640px) {
  .zv-unlock-pop {
    place-items: end center;
    padding: 14px;
  }

  .zv-unlock-pop__card {
    grid-template-columns: 58px minmax(0, 1fr) 30px;
    gap: 12px;
    padding: 16px 14px;
    border-radius: 22px;
  }

  .zv-unlock-pop__icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 26px;
  }

  .zv-unlock-pop__copy strong {
    font-size: clamp(22px, 8vw, 32px);
  }

  .zv-unlock-pop__copy p {
    font-size: 15px;
  }
}


/* ---------- DRAMA KID — ENCORE DECOY HUD ---------- */
.zv-sidebar-block--items:has(.zv-drama-ability) .zv-item-keycap::before {
  content: "PULSE +";
}

.zv-drama-ability {
  display: grid;
  gap: 12px;
}

.zv-drama-decoy-button {
  width: 100%;
  min-height: 88px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 49, 95, 0.34);
  border-radius: 20px;
  background:
    radial-gradient(circle at 85% 20%, rgba(168, 85, 247, 0.2), transparent 120px),
    linear-gradient(135deg, rgba(255, 49, 95, 0.12), rgba(5, 7, 13, 0.88));
  color: var(--zv-text);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 0 24px rgba(255, 49, 95, 0.12);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.zv-drama-decoy-button:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: rgba(57, 255, 92, 0.52);
  box-shadow: 0 0 30px rgba(57, 255, 92, 0.16), 0 0 24px rgba(255, 49, 95, 0.16);
}

.zv-drama-decoy-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.zv-drama-decoy-button__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ff315f;
  border: 1px solid rgba(255, 49, 95, 0.44);
  background: rgba(255, 49, 95, 0.1);
  box-shadow: inset 0 0 18px rgba(255, 49, 95, 0.08), 0 0 18px rgba(255, 49, 95, 0.18);
  font-size: 24px;
}

.zv-drama-ability.is-ready .zv-drama-decoy-button__icon {
  color: var(--zv-toxic);
  border-color: rgba(57, 255, 92, 0.45);
  background: rgba(57, 255, 92, 0.1);
  box-shadow: 0 0 22px rgba(57, 255, 92, 0.24);
}

.zv-drama-decoy-button__copy strong,
.zv-drama-decoy-button__copy small {
  display: block;
}

.zv-drama-decoy-button__copy strong {
  color: var(--zv-text);
  font-family: var(--zv-font-display);
  font-size: clamp(14px, 1.35vw, 18px);
  line-height: 1;
  letter-spacing: 0.04em;
}

.zv-drama-decoy-button__copy small {
  margin-top: 8px;
  color: var(--zv-toxic);
  font-family: var(--zv-font-terminal);
  font-size: 20px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.zv-drama-ability.is-active .zv-drama-decoy-button__copy small {
  color: #ff315f;
}

.zv-drama-ability__meter {
  display: block;
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(243, 239, 224, 0.12);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.76);
}

.zv-drama-ability__meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff315f, #a855f7, var(--zv-toxic));
  box-shadow: 0 0 16px rgba(255, 49, 95, 0.3);
  transition: width 0.16s linear;
}

@media (max-width: 760px) {
  .zv-drama-decoy-button {
    min-height: 78px;
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .zv-drama-decoy-button__icon {
    width: 50px;
    height: 50px;
  }
}

/* ---------- DRAMA KID — THROWN CLONE PILL HUD ---------- */
.zv-sidebar-block--items:has(.zv-drama-ability) .zv-sidebar-copy {
  display: none;
}

.zv-drama-ability {
  --drama-pill-bg: rgba(5, 7, 13, 0.76);
  --drama-pill-border: rgba(243, 239, 224, 0.14);
  --drama-pill-accent: var(--zv-toxic);
}

.zv-drama-ability.is-active,
.zv-drama-ability.is-cooling {
  --drama-pill-bg: rgba(74, 81, 96, 0.28);
  --drama-pill-border: rgba(148, 163, 184, 0.24);
  --drama-pill-accent: #9aa6b7;
}

.zv-drama-decoy-pill {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 7px;
  border: 1px solid var(--drama-pill-border);
  border-radius: 999px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--drama-pill-accent) 16%, transparent) var(--drama-progress), transparent var(--drama-progress)),
    var(--drama-pill-bg);
  color: var(--zv-text);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), 0 0 18px color-mix(in srgb, var(--drama-pill-accent) 16%, transparent);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease, opacity .18s ease;
}

.zv-drama-decoy-pill:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(57, 255, 92, 0.56);
  box-shadow: 0 0 24px rgba(57, 255, 92, 0.18), 0 0 18px rgba(255, 49, 95, 0.12);
}

.zv-drama-decoy-pill:disabled {
  cursor: not-allowed;
  filter: grayscale(.72) saturate(.75);
  opacity: .82;
}

.zv-drama-decoy-pill__clock {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--drama-pill-accent);
  background:
    conic-gradient(var(--drama-pill-accent) var(--drama-deg), rgba(243, 239, 224, 0.10) 0),
    rgba(5, 7, 13, 0.92);
  box-shadow: 0 0 18px color-mix(in srgb, var(--drama-pill-accent) 22%, transparent);
  position: relative;
  isolation: isolate;
}

.zv-drama-decoy-pill__clock::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: rgba(5, 7, 13, 0.92);
  z-index: -1;
}

.zv-drama-decoy-pill__label {
  min-width: 0;
  color: var(--zv-text);
  font-family: var(--zv-font-display);
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 1;
  letter-spacing: .05em;
  text-align: left;
}

.zv-drama-decoy-pill__status {
  color: var(--drama-pill-accent);
  font-family: var(--zv-font-terminal);
  font-size: 20px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.zv-drama-ability.is-ready .zv-drama-decoy-pill {
  border-color: rgba(57, 255, 92, 0.42);
}

.zv-drama-ability.is-ready .zv-drama-decoy-pill__clock {
  animation: zvDramaReadyPulse 1.15s ease-in-out infinite alternate;
}

@keyframes zvDramaReadyPulse {
  from { transform: scale(1); box-shadow: 0 0 12px rgba(57, 255, 92, .18); }
  to { transform: scale(1.045); box-shadow: 0 0 24px rgba(57, 255, 92, .34); }
}

@media (max-width: 760px) {
  .zv-drama-decoy-pill {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    min-height: 50px;
  }

  .zv-drama-decoy-pill__clock {
    width: 38px;
    height: 38px;
  }

  .zv-drama-decoy-pill__status {
    font-size: 18px;
  }
}


/* ---------- DRAMA KID — ICON-ONLY DECOY HUD ---------- */
.zv-sidebar-block--items:has(.zv-drama-ability) .zv-powerup-list {
  display: block;
}

.zv-sidebar-block--items:has(.zv-drama-ability) .zv-sidebar-copy {
  display: none;
}

.zv-drama-ability {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.zv-drama-decoy-pill {
  width: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 0;
  border: 1px solid var(--drama-pill-border);
  border-radius: 22px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--drama-pill-accent) 18%, transparent) var(--drama-progress), transparent var(--drama-progress)),
    rgba(5, 7, 13, 0.72);
  color: var(--drama-pill-accent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 22px color-mix(in srgb, var(--drama-pill-accent) 18%, transparent);
}

.zv-drama-decoy-pill__label,
.zv-drama-decoy-pill__status {
  display: none !important;
}

.zv-drama-decoy-pill__clock {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--drama-pill-accent);
  background:
    conic-gradient(var(--drama-pill-accent) var(--drama-deg), rgba(243, 239, 224, 0.10) 0),
    rgba(5, 7, 13, 0.94);
  box-shadow: 0 0 22px color-mix(in srgb, var(--drama-pill-accent) 26%, transparent);
}

.zv-drama-decoy-pill__clock::after {
  inset: 7px;
}

.zv-drama-decoy-pill__clock i {
  position: relative;
  z-index: 1;
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--drama-pill-accent) 46%, transparent));
}

.zv-drama-ability.is-ready .zv-drama-decoy-pill {
  border-color: rgba(57, 255, 92, 0.48);
}

.zv-drama-ability.is-active .zv-drama-decoy-pill,
.zv-drama-ability.is-cooling .zv-drama-decoy-pill {
  background:
    linear-gradient(90deg, rgba(154, 166, 183, 0.18) var(--drama-progress), transparent var(--drama-progress)),
    rgba(20, 24, 34, 0.76);
}

.zv-drama-decoy-pill:disabled {
  filter: grayscale(.78) saturate(.72);
  opacity: .86;
}

@media (max-width: 760px) {
  .zv-drama-ability {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .zv-drama-decoy-pill__clock {
    width: 58px;
    height: 58px;
  }

  .zv-drama-decoy-pill__clock i {
    font-size: 28px;
  }
}


/* ---------- DRAMA KID — PIXEL MASK ICON ONLY HUD ---------- */
.zv-sidebar-block--items:has(.zv-drama-ability) .zv-powerup-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.zv-sidebar-block--items:has(.zv-drama-ability) .zv-sidebar-copy {
  display: none !important;
}

.zv-drama-ability {
  grid-column: 1 / 2;
  display: block;
  width: 100%;
  min-width: 0;
}

.zv-drama-decoy-pill {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--zv-toxic);
  cursor: pointer;
  overflow: visible;
}

.zv-drama-decoy-pill:disabled {
  cursor: not-allowed;
  filter: none !important;
  opacity: 1 !important;
}

.zv-drama-mask-pixel {
  --drama-icon-grey: #717b8d;
  --drama-icon-color-a: #39ff5c;
  --drama-icon-color-b: #ff315f;
  width: clamp(72px, 7.2vw, 98px);
  height: clamp(58px, 5.8vw, 80px);
  position: relative;
  display: block;
  image-rendering: pixelated;
  transform-origin: center;
}

.zv-drama-mask-pixel__layer {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.zv-drama-mask-pixel__layer--base {
  color: var(--drama-icon-grey);
  opacity: .68;
  filter: grayscale(1) saturate(.2) brightness(.78);
}

.zv-drama-mask-pixel__layer--fill {
  width: 100%;
  clip-path: inset(0 calc(100% - var(--drama-progress, 0%)) 0 0);
  filter:
    drop-shadow(0 0 7px rgba(57, 255, 92, .35))
    drop-shadow(0 0 13px rgba(255, 49, 95, .16));
}

.zv-drama-mask-pixel__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
}

.zv-drama-ability.is-active .zv-drama-mask-pixel__layer--fill,
.zv-drama-ability.is-cooling .zv-drama-mask-pixel__layer--fill {
  filter:
    drop-shadow(0 0 5px rgba(57, 255, 92, .22))
    drop-shadow(0 0 8px rgba(255, 49, 95, .10));
}

.zv-drama-ability.is-ready .zv-drama-mask-pixel {
  animation: zvDramaPixelMaskReady 1.15s ease-in-out infinite;
}

.zv-drama-ability.is-ready .zv-drama-mask-pixel__layer--fill {
  filter:
    drop-shadow(0 0 10px rgba(57, 255, 92, .62))
    drop-shadow(0 0 22px rgba(57, 255, 92, .34))
    drop-shadow(0 0 18px rgba(255, 49, 95, .22));
}

@keyframes zvDramaPixelMaskReady {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  45% {
    transform: scale(1.12);
    opacity: .92;
  }
  70% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .zv-drama-mask-pixel {
    width: 72px;
    height: 58px;
  }
}


/* Drama Kid HUD icon integration */
.zv-sidebar-block--items:has(.zv-drama-ability) .zv-powerup-list {
  display: flex;
  justify-content: center;
  align-items: center;
}

.zv-drama-ability {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  --drama-slot-size: 132px;
  --drama-slot-radius: 24px;
}

.zv-drama-decoy-pill {
  width: var(--drama-slot-size);
  min-width: var(--drama-slot-size);
  max-width: var(--drama-slot-size);
  min-height: var(--drama-slot-size);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: var(--drama-slot-radius);
  border: 1px solid rgba(56, 189, 248, 0.48);
  background:
    linear-gradient(180deg, rgba(7, 12, 22, 0.94), rgba(4, 8, 16, 0.98)),
    linear-gradient(90deg, color-mix(in srgb, var(--drama-pill-accent) 16%, transparent) var(--drama-progress), transparent var(--drama-progress));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    0 0 0 1px rgba(56, 189, 248, 0.12),
    0 16px 36px rgba(0,0,0,0.34),
    0 0 26px color-mix(in srgb, var(--drama-pill-accent) 16%, transparent);
  overflow: hidden;
  position: relative;
}

.zv-drama-decoy-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), transparent 38%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--drama-pill-accent) 10%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

.zv-drama-decoy-pill:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: rgba(57, 255, 92, 0.56);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.36),
    0 0 30px rgba(57, 255, 92, 0.18),
    0 0 20px rgba(255, 49, 95, 0.14);
}

.zv-drama-mask-pixel {
  width: clamp(92px, 9vw, 118px);
  height: clamp(76px, 7vw, 98px);
  margin: 0 auto;
}

.zv-drama-mask-pixel__layer--base {
  opacity: .72;
  filter: grayscale(1) saturate(.18) brightness(.68);
}

.zv-drama-ability.is-active .zv-drama-decoy-pill,
.zv-drama-ability.is-cooling .zv-drama-decoy-pill {
  border-color: rgba(148, 163, 184, 0.26);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.025),
    0 0 0 1px rgba(148, 163, 184, 0.10),
    0 12px 26px rgba(0,0,0,0.32);
}

.zv-drama-ability.is-ready .zv-drama-decoy-pill {
  border-color: rgba(57, 255, 92, 0.42);
}

@media (max-width: 760px) {
  .zv-drama-ability {
    --drama-slot-size: 112px;
    --drama-slot-radius: 22px;
  }

  .zv-drama-mask-pixel {
    width: 88px;
    height: 72px;
  }
}


/* Drama Kid mask icon: clean ability state, no prop-like glow */
.zv-drama-decoy-pill {
  background:
    linear-gradient(90deg, rgba(57, 255, 92, 0.10) var(--drama-progress), transparent var(--drama-progress)),
    linear-gradient(180deg, rgba(7, 12, 22, 0.96), rgba(4, 8, 16, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.025),
    0 0 0 1px rgba(56, 189, 248, 0.10),
    0 12px 26px rgba(0,0,0,0.34);
}

.zv-drama-decoy-pill::before {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), transparent 42%);
}

.zv-drama-decoy-pill:not(:disabled):hover {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    0 14px 30px rgba(0,0,0,0.38),
    0 0 0 1px rgba(57, 255, 92, 0.22);
}

.zv-drama-mask-pixel__layer--base {
  opacity: .78;
  filter: grayscale(1) saturate(.16) brightness(.64) contrast(1.04);
}

.zv-drama-mask-pixel__layer--fill,
.zv-drama-ability.is-active .zv-drama-mask-pixel__layer--fill,
.zv-drama-ability.is-cooling .zv-drama-mask-pixel__layer--fill,
.zv-drama-ability.is-ready .zv-drama-mask-pixel__layer--fill {
  filter: none;
}

.zv-drama-ability.is-ready .zv-drama-decoy-pill {
  border-color: rgba(57, 255, 92, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(57, 255, 92, 0.08),
    0 14px 30px rgba(0,0,0,0.36),
    0 0 0 1px rgba(57, 255, 92, 0.22);
}

.zv-drama-ability.is-ready .zv-drama-mask-pixel {
  animation: zvDramaAbilityReadyClean 1.2s ease-in-out infinite;
}

@keyframes zvDramaAbilityReadyClean {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.075);
    opacity: .96;
  }
}


/* Last life danger state */
body.zv-last-life::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  box-shadow:
    inset 0 0 0 2px rgba(255, 62, 88, 0.55),
    inset 0 0 42px rgba(255, 46, 46, 0.22),
    inset 0 0 96px rgba(140, 0, 0, 0.28),
    inset 0 0 160px rgba(255, 35, 72, 0.18);
  animation: zv-last-life-border 1.65s ease-in-out infinite;
}

body.zv-last-life::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255, 40, 40, 0.055), transparent 24%, transparent 76%, rgba(255, 40, 40, 0.055)),
    linear-gradient(90deg, rgba(255, 40, 40, 0.075), transparent 12%, transparent 88%, rgba(255, 40, 40, 0.075));
  opacity: .9;
  animation: zv-last-life-veil 1.8s ease-in-out infinite;
}

body.zv-last-life .zv-game-shell {
  animation: zv-last-life-hud-pulse 1.7s ease-in-out infinite;
}

body.zv-last-life .zv-stage-panel,
body.zv-last-life .zv-sidebar-area,
body.zv-last-life .zv-game-header {
  border-color: rgba(255, 76, 95, 0.38);
  box-shadow:
    0 0 0 1px rgba(255, 76, 95, 0.08),
    0 14px 36px rgba(0, 0, 0, 0.42),
    0 0 34px rgba(255, 46, 99, 0.12);
}

body.zv-last-life .zv-canvas-frame {
  border-color: rgba(255, 74, 74, 0.56);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.72),
    0 0 0 8px rgba(52, 6, 12, 0.36),
    0 0 46px rgba(255, 42, 66, 0.26),
    inset 0 0 30px rgba(255, 38, 58, 0.06);
}

body.zv-last-life .zv-canvas-frame::before {
  background:
    linear-gradient(90deg, rgba(255, 98, 110, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(255, 74, 74, 0.06) 1px, transparent 1px);
  opacity: .42;
}

body.zv-last-life .zv-hud,
body.zv-last-life .zv-meter-row,
body.zv-last-life .zv-sidebar-block {
  animation: zv-last-life-hud-pulse 1.6s ease-in-out infinite;
}

body.zv-last-life .zv-hud-metric {
  border-color: rgba(255, 84, 84, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 46, 99, 0.04), inset 0 0 18px rgba(255, 46, 99, 0.045);
}

body.zv-last-life .zv-hud-metric strong,
body.zv-last-life .zv-meter-row {
  text-shadow: 0 0 14px rgba(255, 68, 82, 0.34);
}

body.zv-last-life .zv-hud-metric.is-last-life {
  border-color: rgba(255, 82, 82, 0.45);
  background: rgba(32, 4, 10, 0.76);
  box-shadow:
    0 0 0 1px rgba(255, 82, 82, 0.09),
    inset 0 0 24px rgba(255, 38, 58, 0.08),
    0 0 22px rgba(255, 38, 58, 0.12);
}

body.zv-last-life .zv-hud-metric.is-last-life strong {
  color: #ff6b7b;
  text-shadow: 0 0 18px rgba(255, 76, 92, 0.52);
}

@keyframes zv-last-life-border {
  0%, 100% {
    box-shadow:
      inset 0 0 0 2px rgba(255, 62, 88, 0.42),
      inset 0 0 28px rgba(255, 46, 46, 0.16),
      inset 0 0 80px rgba(140, 0, 0, 0.18),
      inset 0 0 140px rgba(255, 35, 72, 0.10);
  }
  50% {
    box-shadow:
      inset 0 0 0 2px rgba(255, 72, 108, 0.72),
      inset 0 0 48px rgba(255, 46, 46, 0.28),
      inset 0 0 112px rgba(140, 0, 0, 0.34),
      inset 0 0 184px rgba(255, 35, 72, 0.22);
  }
}

@keyframes zv-last-life-veil {
  0%, 100% { opacity: .72; }
  50% { opacity: 1; }
}

@keyframes zv-last-life-hud-pulse {
  0%, 100% { transform: translateZ(0) scale(1); }
  50% { transform: translateZ(0) scale(1.006); }
}

@media (prefers-reduced-motion: reduce) {
  body.zv-last-life::before,
  body.zv-last-life::after,
  body.zv-last-life .zv-game-shell,
  body.zv-last-life .zv-hud,
  body.zv-last-life .zv-meter-row,
  body.zv-last-life .zv-sidebar-block {
    animation: none !important;
  }
}

/* ===== Dungeon Objective Tracker ===== */
.zv-objective-tracker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 10px;
  padding: 8px 14px;
  border: 1px solid rgba(57, 255, 92, 0.18);
  border-radius: 12px;
  background: rgba(5, 7, 13, 0.72);
  font-family: "VT323", monospace;
  font-size: 1.02rem;
  letter-spacing: 0.03em;
}

.zv-objective {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(243, 239, 224, 0.42);
  transition: color 180ms ease;
}

.zv-objective i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-style: normal;
  font-size: 0.78em;
}

.zv-objective b { color: inherit; }

.zv-objective.is-active {
  color: #b9ff25;
  text-shadow: 0 0 10px rgba(185, 255, 37, 0.35);
}

.zv-objective.is-done {
  color: rgba(57, 255, 92, 0.85);
}

.zv-objective.is-done i { font-size: 0; }
.zv-objective.is-done i::before { content: "✓"; font-size: 11px; }
.zv-objective.is-done { text-decoration: line-through; text-decoration-color: rgba(57,255,92,0.5); }

.zv-objective-sep { color: rgba(57, 255, 92, 0.35); }

@media (max-width: 760px) {
  .zv-objective-tracker { font-size: 0.92rem; gap: 6px 8px; }
  .zv-objective-sep { display: none; }
}

/* ===== Descent Map (dungeon floor progression) ===== */
.zv-sidebar-block--map .zv-sidebar-copy { margin-bottom: 8px; }

.zv-descent-map {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(57, 255, 92, 0.16);
  border-radius: 10px;
  background: rgba(5, 7, 13, 0.82);
  scrollbar-width: thin;
}

.zv-floor {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px;
  border-radius: 7px;
  font-family: "VT323", monospace;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  color: rgba(243, 239, 224, 0.35);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.zv-floor__num {
  flex: 0 0 auto;
  min-width: 32px;
  color: rgba(57, 255, 92, 0.4);
}

.zv-floor__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zv-floor.is-unlocked { color: rgba(243, 239, 224, 0.78); }
.zv-floor.is-unlocked .zv-floor__num { color: rgba(57, 255, 92, 0.75); }

a.zv-floor.is-unlocked:hover {
  background: rgba(57, 255, 92, 0.1);
  color: #b9ff25;
}

.zv-floor.is-current {
  background: rgba(185, 255, 37, 0.12);
  color: #b9ff25;
  text-shadow: 0 0 9px rgba(185, 255, 37, 0.4);
  animation: zvFloorPulse 1.8s ease-in-out infinite;
}

.zv-floor.is-current .zv-floor__num { color: #b9ff25; }

.zv-floor.is-locked .zv-floor__name { letter-spacing: 0.14em; }

@keyframes zvFloorPulse {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(185, 255, 37, 0.35); }
  50% { box-shadow: inset 0 0 0 1px rgba(185, 255, 37, 0.75); }
}
