/* ---------- Victory screen ---------- */
#victory-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: "Georgia", serif;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(255, 230, 242, 0.85) 0%,
    rgba(120, 30, 90, 0.7) 100%
  );
}
#victory-screen.open {
  display: flex;
  animation: story-fade 0.6s ease;
}
#confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.victory-card {
  position: relative;
  text-align: center;
  width: min(540px, 92vw);
  box-sizing: border-box;
  max-height: calc(100dvh - 24px);
  padding: 36px 40px;
  overflow-y: auto;
  background: linear-gradient(180deg, #fff7fb 0%, #ffe6f2 100%);
  border: 5px solid #ffd86b;
  border-radius: 30px;
  color: #5a1c3a;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.4),
    0 0 120px rgba(255, 216, 107, 0.7);
  animation: story-pop 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.victory-crown {
  font-size: 80px;
  margin-bottom: 8px;
  filter: drop-shadow(0 6px 14px rgba(255, 216, 107, 0.7));
  animation: crown-spin 2s ease-in-out infinite;
}
.victory-card h1 {
  margin: 0 0 12px;
  font-size: 36px;
  color: #b03579;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.6);
}
.victory-text {
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 20px;
}
.victory-text em {
  color: #b03579;
  font-style: italic;
  font-weight: 700;
}
.victory-evidence {
  margin: -8px auto 18px;
  max-width: 34rem;
  color: #71345a;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}
.victory-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 24px;
  padding: 14px;
  background: rgba(255, 216, 107, 0.25);
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: #6b2247;
}
.victory-stats span {
  display: block;
  margin-bottom: 2px;
  color: #b03579;
  font-size: 20px;
  line-height: 1.1;
}
@media (max-width: 560px) {
  .victory-card {
    width: calc(100vw - 20px);
    padding: 22px 16px 18px;
    border-radius: 18px;
  }
  .victory-crown {
    font-size: 58px;
    margin-bottom: 4px;
  }
  .victory-card h1 {
    font-size: 27px;
    line-height: 1.05;
  }
  .victory-text {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 12px;
  }
  .victory-evidence {
    margin: -4px auto 12px;
    font-size: 13px;
  }
  .victory-stats {
    gap: 8px;
    margin: 12px 0 16px;
    padding: 10px;
    font-size: 13px;
  }
  .victory-stats span {
    font-size: 16px;
  }
}
