/* Easter egg styles: pumpkin-ghost. Moved verbatim out of static/app.css (egg rebuild); linked right after app.css in index.html. */
/* ================================================================
   Halloween pack — Pumpkin Ghost (khadkamhn CodePen NORvzM).
   Namespaced .chcorn-*; ghost + pumpkins + spider bottom-right vignette.
   No stars / sky wash / ground strip / pillar — transparent overlay only.
   ================================================================ */
.chcorn-wrap {
  /* Anchor point = viewport bottom-right; scene scales up-left from here */
  position: fixed;
  right: 8px;
  bottom: 8px;
  z-index: 8100;
  pointer-events: none;
  overflow: visible;
  background: transparent;
  width: 0;
  height: 0;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.chcorn-wrap.is-in { opacity: 1; }

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

.chcorn-wrap *::before,
.chcorn-wrap *::after {
  content: '';
  position: absolute;
}

.chcorn-scene {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 220px;
  height: 180px;
  /* 200% size; grow from corner into the page */
  transform: scale(1.84);
  transform-origin: bottom right;
}

.chcorn-ghost {
  width: 52px;
  height: 68px;
  position: absolute;
  right: 28px;
  bottom: 72px;
  background-color: #fee5e6;
  border-radius: 52px 52px 0 0;
  opacity: 0.9;
  animation: chcorn-ghost 5s linear infinite;
}

.chcorn-ghost::after,
.chcorn-ghost::before {
  width: 5px;
  height: 8px;
  background-color: #c29e97;
  border-radius: 50%;
}

.chcorn-ghost::after { top: 18px; left: 34px; }

.chcorn-ghost::before { top: 18px; left: 20px; }

.chcorn-ghost > i { position: absolute; }

.chcorn-ghom {
  top: 38px;
  left: 26px;
  width: 11px;
  height: 5px;
  border-radius: 5px 5px 0 0;
  background-color: #c29e97;
  transform-origin: bottom;
  animation: chcorn-ghom 5s linear infinite;
}

.chcorn-ghot {
  top: 66px;
  left: 0;
  width: 15px;
  height: 32px;
  border-radius: 0 0 15px 15px;
  background-color: #fee5e6;
  box-shadow: 18px -10px 0 #fee5e6, 36px -18px 0 #fee5e6;
}

.chcorn-ghot::before,
.chcorn-ghot::after {
  top: -1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  box-shadow: 0 3px #fee5e6 inset;
}

.chcorn-ghot::before { left: 14px; }

.chcorn-ghot::after { left: 32px; }

.chcorn-ghod {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #c29e97;
  bottom: -28px;
  left: 4px;
}

.chcorn-pumpkin {
  width: 64px;
  height: 44px;
  position: absolute;
  border-radius: 44px;
  transform-origin: bottom;
  background-color: #f36518;
  box-shadow: -2px 2px #ff820f inset;
}

.chcorn-pumpkin::before {
  width: 0;
  height: 0;
  left: 50%;
  top: -8px;
  margin-left: -4px;
  border: 4px solid transparent;
  border-top: 8px solid #ff7d10;
}

.chcorn-pumpkin::after {
  left: 50%;
  bottom: 0;
  width: 22px;
  height: 46px;
  margin-left: -11px;
  background-color: #ff7d10;
  border-radius: 22px 22px 12px 12px;
}

.chcorn-face {
  width: 0;
  top: 12px;
  height: 0;
  left: 50%;
  z-index: 1;
  margin-left: -3px;
  position: absolute;
  border: 3px solid transparent;
  border-bottom: 6px solid #ab2b2b;
}

.chcorn-face::after,
.chcorn-face::before {
  width: 9px;
  height: 4px;
  border-radius: 0 0 9px 9px;
  background-color: #ab2b2b;
}

.chcorn-face::before { left: -16px; transform: rotate(28deg); }

.chcorn-face::after { right: -16px; transform: rotate(-28deg); }

.chcorn-mouth {
  left: 50%;
  z-index: 1;
  bottom: 6px;
  width: 32px;
  height: 11px;
  margin-left: -16px;
  position: absolute;
  box-shadow: 0 4px #ab2b2b inset;
  border-radius: 11px 11px 0 0;
}

.chcorn-mouth::before {
  top: 4px;
  left: 50%;
  height: 4px;
  width: 28px;
  margin-left: -14px;
  background-color: #ab2b2b;
  border-radius: 2px 2px 0 0;
}

.chcorn-teeth {
  left: 13px;
  bottom: 3px;
  width: 5px;
  height: 3px;
  position: absolute;
  background-color: #ff820f;
}

.chcorn-teeth::after,
.chcorn-teeth::before {
  width: inherit;
  height: inherit;
  background-color: inherit;
  top: -5px;
}

.chcorn-teeth::after { right: -5px; }

.chcorn-teeth::before { right: 5px; }

.chcorn-detail::before {
  left: 2px;
  width: 4px;
  height: 4px;
  background-color: #f36518;
}

.chcorn-detail::after {
  top: 7px;
  width: 3px;
  left: 26px;
  height: 2px;
  border-radius: 1px 1px 0 0;
  background-color: #f36518;
}

.chcorn-pa {
  bottom: 8px;
  right: 118px;
  z-index: 1;
  animation: chcorn-pumpkin-pa 5s linear infinite;
}

.chcorn-pb {
  bottom: 8px;
  right: 62px;
  z-index: 2;
  animation: chcorn-pumpkin-pb 5s linear infinite;
}

.chcorn-pc {
  bottom: 8px;
  right: 8px;
  z-index: 1;
  transform: scale(1.25);
  animation: chcorn-pumpkin-pc 5s linear infinite;
}

.chcorn-spider {
  top: 8px;
  right: 96px;
  width: 8px;
  height: 8px;
  position: absolute;
  border-radius: 50%;
  background-color: #5f1f4d;
  animation: chcorn-spider 5s linear infinite;
}

.chcorn-spider::after {
  left: 50%;
  width: 5px;
  height: 5px;
  bottom: -2px;
  margin-left: -2.5px;
  border-radius: 50%;
  border: 1px solid #e3beb8;
  background-color: inherit;
}

.chcorn-spider::before {
  left: 50%;
  top: -40px;
  width: 1px;
  height: 40px;
  margin-left: -0.5px;
  background: rgba(95, 31, 77, 0.55);
}

.chcorn-spider [class*="chcorn-leg-"] {
  width: 2px;
  height: 2px;
  left: 50%;
  margin-left: -1px;
  top: 50%;
  position: absolute;
}

.chcorn-spider [class*="chcorn-leg-"]::before,
.chcorn-spider [class*="chcorn-leg-"]::after {
  border: 1px solid transparent;
  border-top: 1px solid #5f1f4d;
  border-radius: 50%;
}

.chcorn-leg-a::after,
.chcorn-leg-a::before { width: 9px; height: 9px; }

.chcorn-leg-a::after { right: -7px; transform: rotate(-20deg); }

.chcorn-leg-a::before { left: -7px; transform: rotate(20deg); }

.chcorn-leg-b::after,
.chcorn-leg-b::before { width: 14px; height: 14px; top: 3px; }

.chcorn-leg-b::after { right: -8px; transform: rotate(12deg); }

.chcorn-leg-b::before { left: -8px; transform: rotate(-12deg); }

.chcorn-leg-c::after,
.chcorn-leg-c::before { width: 16px; height: 16px; top: 5px; }

.chcorn-leg-c::after { right: -5px; transform: rotate(30deg); }

.chcorn-leg-c::before { left: -5px; transform: rotate(-30deg); }

@keyframes chcorn-ghost {
  0, 100% { transform: translate(0, 8px) scale(0.92) rotate(-8deg); opacity: 0.75; }
  25% { transform: translate(-10px, -6px) scale(1) rotate(6deg); opacity: 1; }
  50% { transform: translate(6px, -14px) scale(1) rotate(-12deg); opacity: 0.9; }
  75% { transform: translate(-4px, 2px) scale(0.96) rotate(4deg); opacity: 1; }
}

@keyframes chcorn-ghom {
  0, 40%, 100% { transform: scale(1); }
  50% { transform: scale(1.6); }
  75% { transform: scale(2.2); }
}

@keyframes chcorn-pumpkin-pa {
  0, 70%, 84%, 100% { transform: scale(1) translateY(0); }
  71% { transform: scale(1.15, 1); }
  76% { transform: scale(1) translateY(-10px); }
}

@keyframes chcorn-pumpkin-pb {
  0, 75%, 90%, 100% { transform: scale(1) translateY(0); }
  76% { transform: scale(1.15, 1); }
  81% { transform: scale(1) translateY(-16px); }
}

@keyframes chcorn-pumpkin-pc {
  0, 70%, 84%, 100% { transform: scale(1.25) translateY(0); }
  71% { transform: scale(1.45, 1.25); }
  76% { transform: scale(1.25) translateY(-10px); }
}

@keyframes chcorn-spider {
  0, 15% { transform: translateY(-8px); opacity: 0; }
  20% { transform: translateY(-8px); opacity: 1; }
  80% { transform: translateY(48px); opacity: 1; }
  100% { transform: translateY(56px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .chcorn-wrap { display: none; }
}
