/* ══════════════════════════════════════════════════════════════════════
   PIXEL STUDIO - SEASONAL EVENTS
   ──────────────────────────────────────────────────────────────────────
   Loaded by head.twig ONLY while an event runs, so none of this exists
   for the normal store. Everything is scoped to html[data-event] anyway.

     1  event colours           the only per-event block most edits need
     2  splash
     3  menu item (the wheel)
     4  decorations             webs, spider, embers / lights, snow
     5  event page              hero, lock, calendar, loot, prize board
     6  motion, responsiveness

   Adding an event: copy one block in section 1, give it its own
   decorations in section 4 if it needs any, and add its entry in
   store-config.js -> events.
   ══════════════════════════════════════════════════════════════════════ */


/* ── 1  EVENT COLOURS ─────────────────────────────────────────────────
   --color-primary is the store's own accent - buttons, links, glows and
   the page atmosphere all read it, so overriding it here re-themes the
   whole store at once. The selector outranks the :root block in
   head.twig, so the order the two load in does not matter.             */

html[data-event="halloween"] {
  --color-primary: #ff7a1a;
  --color-primary-hover: #ff9a3d;
  --ev-a: #ff7a1a;          /* pumpkin orange */
  --ev-b: #ffb547;          /* amber */
  --ev-c: #ffd25e;          /* candle yellow */
  --ev-rgb: 255, 122, 26;
  --ev-pill: linear-gradient(180deg, #2a180a 0%, #170d05 100%);
  --ev-emoji: "🎃";
}

html[data-event="christmas"] {
  --color-primary: #ff4d5a;
  --color-primary-hover: #ff6b76;
  --ev-a: #ff4d5a;          /* berry red */
  --ev-b: #2fbf71;          /* pine green */
  --ev-c: #f6c453;          /* gold */
  --ev-rgb: 255, 77, 90;
  --ev-pill: linear-gradient(180deg, #2a0f13 0%, #16080a 100%);
  --ev-emoji: "🎁";
}

html[data-event] {
  --ev-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ev-common: #9aa4b2;
  --ev-rare: #4fa3ff;
  --ev-epic: #b46bff;
  --ev-legendary: #ffb547;
}

/* the rotating conic gradients turn a custom property; browsers without
   @property simply keep them still, which is a fine fallback */
@property --ev-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes evSpin { to { transform: rotate(360deg); } }
@keyframes evAngle { to { --ev-angle: 360deg; } }


/* ── 2  SPLASH ──────────────────────────────────────────────────────── */

.ev-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #09080b;
  pointer-events: none;
  /* failsafe: gone on its own even if events.js never runs */
  animation: evSplashFailsafe 0.6s ease 4.6s forwards;
  transition: opacity 0.6s ease, transform 0.8s var(--ev-ease), filter 0.6s ease;
}

.ev-splash.is-leaving {
  opacity: 0;
  transform: scale(1.03);
  filter: blur(4px);
}

@keyframes evSplashFailsafe {
  to { opacity: 0; visibility: hidden; }
}

.ev-splash-atmos {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(42% 38% at 50% 54%, rgba(var(--ev-rgb), 0.26) 0%, transparent 70%),
    radial-gradient(80% 60% at 50% 120%, rgba(var(--ev-rgb), 0.16) 0%, transparent 70%),
    radial-gradient(60% 50% at 50% -10%, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
}

.ev-splash-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: evRise 0.9s var(--ev-ease) both;
}

@keyframes evRise {
  from { opacity: 0; transform: translateY(14px); }
}

.ev-splash-art {
  position: relative;
  width: 132px;
  height: 132px;
  margin-bottom: 6px;
  animation: evFloat 3.2s ease-in-out infinite;
}

.ev-splash-art img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 26px rgba(var(--ev-rgb), 0.45));
}

/* a pool of light under the item */
.ev-splash-art::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 150%;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--ev-rgb), 0.5), transparent);
  filter: blur(4px);
}

/* the image has not been uploaded yet - a glyph stands in */
.ev-splash-art.is-missing::after {
  content: var(--ev-emoji);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 92px;
  line-height: 1;
}

@keyframes evFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.ev-splash-brand { transform: scale(1.35); margin: 8px 0 4px; }

.ev-splash-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ev-b);
  text-shadow: 0 0 18px rgba(var(--ev-rgb), 0.6);
}

.ev-splash-bar {
  position: relative;
  width: 120px;
  height: 2px;
  margin-top: 10px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.ev-splash-bar i {
  position: absolute;
  inset: 0;
  transform-origin: left;
  background: linear-gradient(90deg, var(--ev-a), var(--ev-c));
  animation: evLoad 1.6s var(--ev-ease) both;
}

@keyframes evLoad { from { transform: scaleX(0); } }

/* the splash spider lowers itself on a thread from the top edge */
/* A black spider on a black screen is invisible, so it is backlit - a
   warm rim of light, the way a spider looks in torchlight. */
.ev-splash-spider {
  position: absolute;
  top: 0;
  left: 66%;
  width: 38px;
  color: #3b2c1f;
  filter:
    drop-shadow(0 0 1px rgba(255, 190, 120, 0.9))
    drop-shadow(0 0 10px rgba(var(--ev-rgb), 0.55));
  animation: evSpiderDrop 2.6s cubic-bezier(0.45, 0, 0.25, 1) 0.15s both;
}

.ev-splash-spider .ev-thread { background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 220, 180, 0.45)); }

@keyframes evSpiderDrop {
  0%   { transform: translateY(-60px); }
  55%  { transform: translateY(150px); }
  70%  { transform: translateY(138px); }
  100% { transform: translateY(150px); }
}

/* Christmas splash: a string of lights and a little snow */
.ev-splash-lights {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  padding: 0 4%;
}

.ev-splash-lights::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.ev-splash-lights i {
  position: relative;
  width: 9px;
  height: 13px;
  margin-top: 4px;
  border-radius: 50% 50% 45% 45%;
  --bulb: var(--ev-a);
  background: radial-gradient(circle at 50% 35%, #fff 0%, var(--bulb) 45%);
  box-shadow: 0 0 12px var(--bulb);
  animation: evTwinkle 1.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.23s);
}

.ev-splash-lights i:nth-child(4n + 2) { --bulb: var(--ev-c); }
.ev-splash-lights i:nth-child(4n + 3) { --bulb: var(--ev-b); }
.ev-splash-lights i:nth-child(4n + 4) { --bulb: #9fd4ff; }

.ev-splash-snow i {
  position: absolute;
  top: -10px;
  left: calc(var(--i) * 5.4%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.7;
  animation: evSnow 5s linear infinite;
  animation-delay: calc(var(--i) * -0.37s);
}

.ev-splash-snow i:nth-child(3n) { width: 3px; height: 3px; animation-duration: 6.5s; }
.ev-splash-snow i:nth-child(4n) { width: 5px; height: 5px; opacity: 0.5; }


/* ── 3  MENU ITEM - the wheel ───────────────────────────────────────── */

.ev-nav-item { list-style: none; }

.ev-nav-link {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px 0 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.3s var(--ev-ease), filter 0.3s ease;
}

.ev-nav-link:hover { transform: translateY(-1px); filter: brightness(1.08); }

.ev-nav-link:focus-visible {
  outline: 2px solid var(--ev-c);
  outline-offset: 3px;
}

/* The ring: a segmented wheel - alternating candle-yellow and orange
   slices - turning behind the pill. Only a 2px rim of it shows, because
   the solid inner pill (::after) covers the rest. */
.ev-nav-ring {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  overflow: hidden;
}

.ev-nav-ring::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 260%;
  aspect-ratio: 1;
  margin: -130% 0 0 -130%;
  background: repeating-conic-gradient(var(--ev-c) 0deg 11.25deg, var(--ev-a) 11.25deg 22.5deg);
  animation: evSpin 9s linear infinite;
}

.ev-nav-ring::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: var(--ev-pill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* the glow: the same wheel, blurred, breathing out around the pill */
.ev-nav-glow {
  position: absolute;
  inset: -6px -8px;
  z-index: -2;
  border-radius: inherit;
  background: conic-gradient(
    from var(--ev-angle),
    var(--ev-c), var(--ev-a) 25%, transparent 40%,
    var(--ev-c) 55%, var(--ev-a) 75%, transparent 90%, var(--ev-c)
  );
  filter: blur(11px);
  opacity: 0.5;
  animation: evAngle 9s linear infinite, evGlow 3.6s ease-in-out infinite;
}

@keyframes evGlow {
  0%, 100% { opacity: 0.38; }
  50%      { opacity: 0.62; }
}

.ev-nav-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 14px rgba(var(--ev-rgb), 0.45);
}

/* a little sunburst turning behind the emoji - the "prize wheel" */
.ev-nav-emoji {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 16px;
  line-height: 1;
}

.ev-nav-rays {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 210, 94, 0.9) 0deg 7deg, transparent 7deg 22.5deg);
  -webkit-mask: radial-gradient(circle, transparent 34%, #000 38%, #000 58%, transparent 70%);
  mask: radial-gradient(circle, transparent 34%, #000 38%, #000 58%, transparent 70%);
  animation: evSpin 6s linear infinite;
  opacity: 0.85;
  z-index: -1;
}

html[data-event="christmas"] .ev-nav-rays {
  background: repeating-conic-gradient(rgba(246, 196, 83, 0.9) 0deg 7deg, transparent 7deg 22.5deg);
}

/* mobile menu: a full-width row, still with the ring */
.ev-nav-item--mobile { margin: 4px 0 6px; }

.ev-nav-item--mobile .ev-nav-link {
  display: flex;
  width: 100%;
  height: 48px;
  padding-left: 12px;
  border-radius: 12px;
}


/* ── 4  DECORATIONS ─────────────────────────────────────────────────
   Built by events.js after the page has loaded. All pointer-events:none,
   so nothing here can ever sit between a visitor and a button.         */

.ev-decor {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  z-index: 5;
  pointer-events: none;
}

.ev-decor * { pointer-events: none; }

/* corner webs, anchored to the top of the page - they scroll away with it
   instead of hanging over the content all the way down */
.ev-web {
  position: absolute;
  top: 0;
  width: clamp(96px, calc((100vw - 1240px) / 2 + 70px), 230px);
  height: auto;
  aspect-ratio: 1;
  color: rgba(255, 255, 255, 0.13);
}

.ev-web path { stroke-width: 1px; vector-effect: non-scaling-stroke; }
.ev-web .ev-web-spiral { opacity: 0.75; }
.ev-web--tl { left: 0; }
.ev-web--tr { right: 0; transform: scaleX(-1); }

.ev-splash .ev-web { color: rgba(255, 255, 255, 0.2); width: 230px; }

/* things that sit on the corner of a section - pumpkins, gifts */
.ev-sit {
  position: absolute;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  transform: translate(var(--tx, 0), var(--ty, 0));
}

/* a fixed square box, so the group has its final size before the image
   arrives - events.js measures it to place it on its corner */
.ev-sit img,
.ev-sit svg {
  display: block;
  width: var(--w, 58px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.55));
}

.ev-sit img + img,
.ev-sit svg + svg { --w: 38px; margin-left: -10px; }

/* a candle-glow puddle under the group */
.ev-sit::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 140%;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--ev-rgb), 0.35), transparent);
  filter: blur(3px);
  animation: evFlicker 3.4s ease-in-out infinite;
}

@keyframes evFlicker {
  0%, 100% { opacity: 0.75; }
  40%      { opacity: 1; }
  60%      { opacity: 0.6; }
}

/* hanging decorations - only on screens wide enough to have empty
   gutters beside the content, so they never hang over anything */
.ev-hang {
  position: absolute;
  top: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  transform-origin: 50% 0;
  animation: evSway 5.5s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.ev-hang::before {
  content: "";
  width: 1px;
  height: var(--len, 120px);
  background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.28));
}

.ev-hang img,
.ev-hang svg { width: var(--w, 34px); height: auto; }

@keyframes evSway {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

@media (min-width: 1720px) {
  .ev-hang { display: flex; }
}

.ev-bat {
  color: #2e2219;
  filter:
    drop-shadow(0 0 1px rgba(255, 190, 120, 0.75))
    drop-shadow(0 0 8px rgba(var(--ev-rgb), 0.4));
}

.ev-hang-spider {
  display: block;
  width: var(--w, 24px);
  color: #2b221b;
  filter: drop-shadow(0 0 6px rgba(var(--ev-rgb), 0.35));
}

/* Christmas: glass baubles, a highlight and a little cap */
.ev-bauble {
  position: relative;
  display: block;
  width: var(--w, 28px);
  aspect-ratio: 1;
  margin-top: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.85) 0 8%, transparent 22%), radial-gradient(circle at 50% 50%, var(--c), color-mix(in srgb, var(--c) 45%, #000) 100%);
  box-shadow: 0 0 16px color-mix(in srgb, var(--c) 55%, transparent);
}

.ev-bauble::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 30%;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(#d9c27a, #8c7434);
}

/* the wandering spider - fixed to the viewport so it is seen wherever the
   visitor is on the page, and hidden between its appearances */
.ev-spider-walk {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 26px;
  color: #3b2c1f;
  opacity: 0;
  pointer-events: none;
  /* backlit, or it disappears against the dark page */
  filter:
    drop-shadow(0 0 1px rgba(255, 190, 120, 0.85))
    drop-shadow(0 0 8px rgba(var(--ev-rgb), 0.45));
}

.ev-spider { display: block; width: 100%; height: auto; }
.ev-spider-eye { fill: var(--ev-c); filter: drop-shadow(0 0 2px var(--ev-a)); }

.ev-spider-legs path:first-child {
  transform-origin: 16px 18px;
  animation: evLegsL 0.36s ease-in-out infinite alternate;
}

.ev-spider-legs path:last-child {
  transform-origin: 24px 18px;
  animation: evLegsR 0.36s ease-in-out infinite alternate;
}

@keyframes evLegsL { to { transform: rotate(-5deg); } }
@keyframes evLegsR { to { transform: rotate(5deg); } }

/* the silk it hangs from, reaching up past the top of the screen */
.ev-thread {
  position: absolute;
  left: 50%;
  bottom: 62%;
  width: 1px;
  height: 100vh;
  background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.35));
}

/* drop: down from the top edge, a pause, back up */
.ev-spider-walk.is-drop { left: var(--x, 10vw); }
.ev-spider-walk.is-drop.is-on { animation: evSpiderVisit 7s cubic-bezier(0.45, 0, 0.3, 1) both; }

@keyframes evSpiderVisit {
  0%   { opacity: 1; transform: translateY(-40px); }
  30%  { transform: translateY(var(--drop, 120px)); }
  36%  { transform: translateY(calc(var(--drop, 120px) - 10px)); }
  42%  { transform: translateY(var(--drop, 120px)); }
  70%  { transform: translateY(var(--drop, 120px)); }
  99%  { opacity: 1; transform: translateY(-40px); }
  100% { opacity: 0; transform: translateY(-40px); }
}

/* crawl: along the very top of the screen, no thread */
.ev-spider-walk.is-crawl .ev-thread { display: none; }
.ev-spider-walk.is-crawl { top: var(--y, 10px); width: 20px; }
.ev-spider-walk.is-crawl.is-on { animation: evSpiderCrawl 15s linear both; }
.ev-spider-walk.is-crawl.is-reverse.is-on { animation-name: evSpiderCrawlBack; }

@keyframes evSpiderCrawl {
  0%   { opacity: 1; transform: translateX(-40px) rotate(90deg); }
  45%  { transform: translateX(46vw) translateY(6px) rotate(96deg); }
  52%  { transform: translateX(50vw) translateY(6px) rotate(90deg); }
  99%  { opacity: 1; transform: translateX(calc(100vw + 40px)) rotate(84deg); }
  100% { opacity: 0; transform: translateX(calc(100vw + 40px)) rotate(84deg); }
}

@keyframes evSpiderCrawlBack {
  0%   { opacity: 1; transform: translateX(calc(100vw + 40px)) rotate(-90deg); }
  50%  { transform: translateX(50vw) translateY(5px) rotate(-94deg); }
  99%  { opacity: 1; transform: translateX(-40px) rotate(-88deg); }
  100% { opacity: 0; transform: translateX(-40px) rotate(-88deg); }
}

/* drifting particles - embers rise, snow falls. Behind the content
   (z-index -1), so they show in the gaps and through the glass panels,
   never over text. Pure CSS: no script runs while they move. */
.ev-particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ev-particles i {
  position: absolute;
  left: var(--x);
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
  animation-duration: var(--d, 18s);
  animation-delay: var(--delay, 0s);
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

.ev-particles--ember i {
  bottom: -10px;
  background: radial-gradient(circle, #ffe2a8 0%, var(--ev-a) 60%, transparent 100%);
  box-shadow: 0 0 8px rgba(var(--ev-rgb), 0.8);
  animation-name: evEmber;
}

@keyframes evEmber {
  0%   { opacity: 0; transform: translate(0, 0); }
  12%  { opacity: var(--o, 0.6); }
  80%  { opacity: calc(var(--o, 0.6) * 0.6); }
  100% { opacity: 0; transform: translate(var(--drift, 30px), -105vh); }
}

.ev-particles--snow i {
  top: -10px;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  animation-name: evSnow;
}

@keyframes evSnow {
  0%   { opacity: 0; transform: translate(0, 0); }
  8%   { opacity: var(--o, 0.7); }
  100% { opacity: var(--o, 0.7); transform: translate(var(--drift, 30px), 105vh); }
}

/* Christmas lights strung across the top of the page */
.ev-lights {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
}

.ev-lights-wire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 40px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
}

.ev-bulb {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: 9px;
  height: 13px;
  margin-left: -4.5px;
  border-radius: 50% 50% 45% 45%;
  --bulb: var(--ev-a);
  background: radial-gradient(circle at 50% 35%, #fff 0%, var(--bulb) 48%);
  box-shadow: 0 0 10px var(--bulb), 0 0 22px rgba(255, 255, 255, 0.05);
}

.ev-bulb::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 2.5px;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: #3b3b42;
}

.ev-lights.is-compact { height: 26px; }
.ev-lights.is-compact .ev-lights-wire { height: 26px; }
.ev-lights.is-compact .ev-bulb { width: 6px; height: 9px; margin-left: -3px; }
.ev-lights.is-compact .ev-bulb::before { left: 1.5px; width: 3px; height: 3px; top: -2px; }

.ev-bulb:nth-child(4n + 2) { --bulb: var(--ev-c); }
.ev-bulb:nth-child(4n + 3) { --bulb: var(--ev-b); }
.ev-bulb:nth-child(4n + 4) { --bulb: #9fd4ff; }

.ev-lights.is-twinkling .ev-bulb {
  animation: evTwinkle 2.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.31s);
}

@keyframes evTwinkle {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50%      { opacity: 0.55; filter: brightness(0.75); }
}

/* tab in the background: stop every decoration animation */
html.ev-paused .ev-particles i,
html.ev-paused .ev-spider-walk,
html.ev-paused .ev-hang,
html.ev-paused .ev-bulb,
html.ev-paused .ev-sit::before { animation-play-state: paused; }


/* ── 5  EVENT PAGE ──────────────────────────────────────────────────── */

.evp {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 40px;
  padding-bottom: 20px;
}

@media (min-width: 768px) {
  .evp { gap: 28px; margin-top: 56px; }
}

.evp-h2 {
  margin: 0;
  font-family: "Montserrat", "Poppins", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1 !important;
}

.evp-h2 span { color: var(--ev-a); }

@media (min-width: 768px) { .evp-h2 { font-size: 28px; } }

.evp-panel {
  position: relative;
  border-radius: 22px;
  background: var(--glass-bg, rgba(22, 22, 26, 0.8));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.075));
  box-shadow: var(--glass-shadow, none);
}

/* preview banner - only with ?event-preview */
.evp-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(var(--ev-rgb), 0.5);
  background: rgba(var(--ev-rgb), 0.08);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
}

.evp-preview b { color: var(--ev-b); letter-spacing: 0.12em; text-transform: uppercase; font-size: 11px; }
.evp-preview a { margin-left: auto; color: #fff; font-weight: 600; }

/* ── hero ── */

.evp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  padding: 28px 22px;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(var(--ev-rgb), 0.14) 0%, transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(var(--ev-rgb), 0.08) 0%, transparent 70%),
    var(--glass-bg, rgba(22, 22, 26, 0.8));
}

@media (min-width: 900px) {
  .evp-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    gap: 30px;
    padding: 44px 44px;
  }
}

.evp-hero .ev-web {
  width: 170px;
  color: rgba(255, 255, 255, 0.08);
  z-index: 0;
}

.evp-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.evp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.evp-eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ev-a);
  box-shadow: 0 0 12px var(--ev-a);
}

.evp-title {
  margin: 0;
  font-family: "Montserrat", "Poppins", system-ui, sans-serif;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #fff;
  line-height: 0.98 !important;
}

.evp-title span {
  display: block;
  color: var(--ev-a);
  text-shadow: 0 0 34px rgba(var(--ev-rgb), 0.45);
}

@media (min-width: 768px)  { .evp-title { font-size: 50px; } }
@media (min-width: 1200px) { .evp-title { font-size: 60px; } }

.evp-sub {
  margin: 0;
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.65 !important;
  color: rgba(255, 255, 255, 0.6);
}

@media (min-width: 768px) { .evp-sub { font-size: 15px; } }

.evp-meta { display: flex; flex-wrap: wrap; gap: 7px; }

.evp-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.evp-chip--live {
  color: var(--ev-b);
  border-color: rgba(var(--ev-rgb), 0.4);
  background: rgba(var(--ev-rgb), 0.1);
}

.evp-chip--live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ev-a);
  animation: evPing 2s ease-out infinite;
}

@keyframes evPing {
  0%   { box-shadow: 0 0 0 0 rgba(var(--ev-rgb), 0.7); }
  80%, 100% { box-shadow: 0 0 0 7px rgba(var(--ev-rgb), 0); }
}

.evp-clock {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.evp-clock-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.evp-clock-time {
  font-family: "Montserrat", "Poppins", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1 !important;
}

.evp-clock-time small {
  margin: 0 3px;
  font-size: 0.5em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  vertical-align: 0.4em;
}

/* the stage: today's item, large */
.evp-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 18px 0 4px;
  text-align: center;
}

@media (min-width: 900px) { .evp-stage { margin-top: 0; } }

/* slow light rays behind the item */
.evp-stage-rays {
  position: absolute;
  top: 0;
  left: 50%;
  width: 380px;
  height: 380px;
  margin-left: -190px;
  margin-top: -36px;
  border-radius: 50%;
  background: repeating-conic-gradient(from var(--ev-angle), rgba(var(--ev-rgb), 0.11) 0deg 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%);
  mask: radial-gradient(circle, #000 18%, transparent 68%);
  animation: evAngle 40s linear infinite;
  pointer-events: none;
}

.evp-stage-day {
  position: relative;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ev-b);
}

.evp-item {
  position: relative;
  display: grid;
  place-items: center;
  width: 210px;
  height: 210px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.evp-item:disabled { cursor: default; }

.evp-item img,
.evp-item svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 34px rgba(var(--ev-rgb), 0.4));
  transition: transform 0.4s var(--ev-ease), filter 0.4s ease;
}

.evp-item::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 80%;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--ev-rgb), 0.55), transparent);
  filter: blur(6px);
}

.evp-stage.is-ready .evp-item,
.evp-stage.is-gated .evp-item { animation: evFloat 3.4s ease-in-out infinite; }
.evp-stage.is-ready .evp-item:hover img,
.evp-stage.is-ready .evp-item:hover svg { transform: scale(1.05) rotate(-2deg); }

.evp-stage.is-locked .evp-item img,
.evp-stage.is-locked .evp-item svg { filter: grayscale(0.4) brightness(0.62) drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6)); }

.evp-stage.is-done .evp-item img,
.evp-stage.is-done .evp-item svg { filter: brightness(0.45) saturate(0.6); }

/* opening: a shake while the server answers, then it bursts */
.evp-stage.is-cracking .evp-item { animation: evShake 0.5s ease-in-out infinite; }

@keyframes evShake {
  0%, 100% { transform: rotate(0) translateY(0); }
  20%      { transform: rotate(-7deg) translateY(-2px); }
  40%      { transform: rotate(6deg); }
  60%      { transform: rotate(-4deg) translateY(-3px); }
  80%      { transform: rotate(3deg); }
}

.evp-stage.is-open .evp-item img,
.evp-stage.is-open .evp-item svg {
  animation: evPop 0.6s var(--ev-ease) forwards;
}

@keyframes evPop {
  50%  { transform: scale(1.18); filter: brightness(1.6) drop-shadow(0 0 40px rgba(var(--ev-rgb), 0.9)); }
  100% { transform: scale(0.4); opacity: 0; }
}

.evp-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 8px;
  height: 8px;
  margin: -4px;
  border-radius: 50%;
  background: var(--ev-c);
  box-shadow: 0 0 10px var(--ev-a);
  animation: evBurst 0.9s var(--ev-ease) forwards;
  pointer-events: none;
}

@keyframes evBurst {
  to {
    transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) scale(0.2);
    opacity: 0;
  }
}

.evp-stage-cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.evp-stage-note {
  margin: 0;
  max-width: 34ch;
  font-size: 12.5px;
  line-height: 1.5 !important;
  color: rgba(255, 255, 255, 0.45);
}

.evp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 13px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ev-ease), filter 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.evp-btn svg { width: 18px; height: 18px; }
.evp-btn:disabled { cursor: default; opacity: 0.55; }

.evp-btn--primary {
  color: #1a0d03;
  background: linear-gradient(180deg, var(--ev-b) 0%, var(--ev-a) 100%);
  box-shadow: 0 14px 32px -14px rgba(var(--ev-rgb), 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

html[data-event="christmas"] .evp-btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #ff6b76 0%, var(--ev-a) 100%);
}

.evp-btn--primary:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.07); }

.evp-btn--discord {
  color: #fff;
  background: #5865f2;
  box-shadow: 0 14px 30px -14px rgba(88, 101, 242, 0.9);
}

.evp-btn--discord:hover { transform: translateY(-2px); filter: brightness(1.08); }

.evp-btn--ghost {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.evp-btn--ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.evp-btn:focus-visible,
.evp-day:focus-visible,
.evp-tab:focus-visible {
  outline: 2px solid var(--ev-c);
  outline-offset: 3px;
}

/* the reward, revealed where the item was */
.evp-reward {
  position: relative;
  width: min(100%, 360px);
  padding: 22px 20px 18px;
  border-radius: 18px;
  text-align: center;
  --tier: var(--ev-common);
  background:
    radial-gradient(90% 70% at 50% 0%, color-mix(in srgb, var(--tier) 26%, transparent) 0%, transparent 70%),
    rgba(12, 12, 15, 0.85);
  border: 1px solid color-mix(in srgb, var(--tier) 45%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tier) 12%, transparent), 0 24px 50px -24px color-mix(in srgb, var(--tier) 70%, transparent);
  animation: evReveal 0.6s var(--ev-ease) both;
}

@keyframes evReveal {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
}

.evp-reward[data-rarity="rare"]      { --tier: var(--ev-rare); }
.evp-reward[data-rarity="epic"]      { --tier: var(--ev-epic); }
.evp-reward[data-rarity="legendary"] { --tier: var(--ev-legendary); }

.evp-rarity {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  --tier: var(--ev-common);
  background: color-mix(in srgb, var(--tier) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--tier) 45%, transparent);
  color: var(--tier);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.evp-rarity[data-rarity="rare"]      { --tier: var(--ev-rare); }
.evp-rarity[data-rarity="epic"]      { --tier: var(--ev-epic); }
.evp-rarity[data-rarity="legendary"] { --tier: var(--ev-legendary); }

.evp-reward-title {
  display: block;
  margin-top: 12px;
  font-family: "Montserrat", "Poppins", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1 !important;
}

.evp-reward-sub {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.evp-code {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 6px 6px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.18);
}

.evp-code code {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evp-copy {
  flex: none;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.evp-reward-note {
  margin: 12px 0 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.4);
}

.evp-reward-note a { color: var(--ev-b); }

/* ── lock ── */

.evp-lock {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  background:
    radial-gradient(70% 100% at 0% 50%, rgba(88, 101, 242, 0.14) 0%, transparent 60%),
    var(--glass-bg, rgba(22, 22, 26, 0.8));
}

@media (min-width: 900px) {
  .evp-lock { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; }
}

.evp-lock-art {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 22px;
}

.evp-lock-art img {
  width: 100%;
  max-width: 440px;
  height: auto;
  border-radius: 16px;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.6));
}

/* the eventlock image has not been uploaded yet: a composed stand-in */
.evp-lock-art.is-missing::before {
  content: "";
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, #7983f5 0%, #5865f2 70%);
  box-shadow: 0 0 0 10px rgba(88, 101, 242, 0.12), 0 0 0 22px rgba(88, 101, 242, 0.06), 0 30px 60px -20px rgba(88, 101, 242, 0.8);
}

.evp-lock-art.is-missing::after {
  content: var(--ev-emoji);
  position: absolute;
  font-size: 54px;
  line-height: 1;
}

.evp-lock-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 24px 28px;
}

@media (min-width: 900px) { .evp-lock-copy { padding: 36px 44px 36px 8px; } }

.evp-lock-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8f98ff;
}

.evp-lock-eyebrow svg { width: 14px; height: 14px; }

.evp-lock-title {
  margin: 0;
  font-family: "Montserrat", "Poppins", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.05 !important;
}

@media (min-width: 768px) { .evp-lock-title { font-size: 32px; } }

.evp-lock-text {
  margin: 0;
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.65 !important;
  color: rgba(255, 255, 255, 0.58);
}

.evp-lock-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.evp-lock-note {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
}

.evp-lock.is-nudged { animation: evNudge 0.6s var(--ev-ease); }

@keyframes evNudge {
  30% { box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.6), 0 0 40px rgba(88, 101, 242, 0.35); }
}

/* ── calendar ── */

.evp-cal { padding: 26px 18px 22px; }

@media (min-width: 768px) { .evp-cal { padding: 34px 32px 30px; } }

.evp-cal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: 22px;
}

.evp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.evp-legend li { display: inline-flex; align-items: center; gap: 7px; }

.evp-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.evp-legend .is-today i   { background: var(--ev-a); box-shadow: 0 0 8px var(--ev-a); }
.evp-legend .is-claimed i { background: #3ec98a; }
.evp-legend .is-missed i  { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); }

/* Six across: the regular days always fill whole rows (30 = 5 x 6 for
   Halloween, 24 = 4 x 6 for Christmas), and the finale gets the full
   width at the end. Three across on a phone - the same arithmetic. */
.evp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

@media (min-width: 640px)  { .evp-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; } }
@media (min-width: 1100px) { .evp-grid { gap: 14px; } }

.evp-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 132px;
  padding: 12px 6px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.012) 100%);
  color: #fff;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s var(--ev-ease), border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 1100px) { .evp-day { min-height: 168px; padding-top: 14px; } }

.evp-day-no {
  font-family: "Montserrat", "Poppins", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.evp-day-date {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
}

.evp-day-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 2px 0;
}

@media (min-width: 1100px) { .evp-day-art { width: 82px; height: 82px; } }

.evp-day-art img,
.evp-day-art svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s var(--ev-ease), filter 0.35s ease;
}

.evp-day-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evp-day-state svg { width: 11px; height: 11px; flex: none; }

/* LOCKED - not yet: darkened, desaturated, a small lock */
.evp-day.is-locked .evp-day-art img,
.evp-day.is-locked .evp-day-art svg { filter: grayscale(0.9) brightness(0.38); }
.evp-day.is-locked:hover { transform: translateY(-1px); }

/* PAST - gone, and we do not know (visitor not signed in) */
.evp-day.is-past .evp-day-art img,
.evp-day.is-past .evp-day-art svg { filter: grayscale(0.6) brightness(0.55); }

/* MISSED - signed in, gone, never opened */
.evp-day.is-missed { background: rgba(255, 255, 255, 0.012); border-style: dashed; }
.evp-day.is-missed .evp-day-art img,
.evp-day.is-missed .evp-day-art svg { filter: grayscale(1) brightness(0.3); opacity: 0.7; }

/* CLAIMED - opened: dimmed, with a check and what was inside */
.evp-day.is-claimed .evp-day-art img,
.evp-day.is-claimed .evp-day-art svg { filter: brightness(0.5) saturate(0.6); }

.evp-day.is-claimed .evp-day-state { color: #57d99b; background: rgba(62, 201, 138, 0.12); }

.evp-day-check {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3ec98a;
  color: #06140d;
  box-shadow: 0 0 0 3px rgba(12, 12, 15, 0.9), 0 6px 14px -4px rgba(62, 201, 138, 0.8);
}

.evp-day-check svg { width: 13px; height: 13px; }

/* TODAY - the strongest thing on the page */
.evp-day.is-today {
  border-color: rgba(var(--ev-rgb), 0.65);
  background:
    radial-gradient(90% 70% at 50% 30%, rgba(var(--ev-rgb), 0.22) 0%, transparent 75%),
    rgba(var(--ev-rgb), 0.05);
  box-shadow: 0 0 0 1px rgba(var(--ev-rgb), 0.25), 0 18px 40px -18px rgba(var(--ev-rgb), 0.9);
}

.evp-day.is-today .evp-day-no { color: var(--ev-b); }
.evp-day.is-today .evp-day-state { color: #1a0d03; background: linear-gradient(180deg, var(--ev-b), var(--ev-a)); }
html[data-event="christmas"] .evp-day.is-today .evp-day-state { color: #fff; }

.evp-day.is-today .evp-day-art img,
.evp-day.is-today .evp-day-art svg {
  filter: drop-shadow(0 8px 16px rgba(var(--ev-rgb), 0.6));
  animation: evFloat 2.8s ease-in-out infinite;
}

.evp-day.is-today:hover { transform: translateY(-3px); }
.evp-day.is-today:hover .evp-day-art img,
.evp-day.is-today:hover .evp-day-art svg { transform: scale(1.08) rotate(-3deg); }

/* a soft ring that keeps pulsing out of today's cell */
.evp-day.is-today::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(var(--ev-rgb), 0.6);
  animation: evRing 2.6s ease-out infinite;
  pointer-events: none;
}

@keyframes evRing {
  0%   { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}

.evp-day.is-nudged { animation: evNo 0.4s ease; }

@keyframes evNo {
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* the finale: the full last row */
.evp-day--finale {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: flex-start;
  gap: 16px;
  min-height: 0;
  padding: 16px 18px;
  text-align: left;
  background:
    radial-gradient(60% 140% at 0% 50%, rgba(var(--ev-rgb), 0.14) 0%, transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.012) 100%);
}

.evp-day--finale .evp-day-art { width: 84px; height: 84px; flex: none; }

/* the finale stays special even while it is locked: a warm edge, and its
   item only half in shadow so there is something to look forward to */
.evp-day--finale.is-locked {
  border-color: rgba(var(--ev-rgb), 0.28);
  box-shadow: inset 0 0 0 1px rgba(var(--ev-rgb), 0.08), 0 18px 40px -26px rgba(var(--ev-rgb), 0.7);
}

.evp-day--finale.is-locked .evp-day-art img,
.evp-day--finale.is-locked .evp-day-art svg {
  filter: grayscale(0.35) brightness(0.62) drop-shadow(0 0 18px rgba(var(--ev-rgb), 0.35));
}

.evp-day--finale.is-locked .evp-day-no { color: var(--ev-b); }

@media (min-width: 1100px) {
  .evp-day--finale { min-height: 0; padding: 18px 26px; }
  .evp-day--finale .evp-day-art { width: 108px; height: 108px; }
}

.evp-finale-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}

.evp-finale-title {
  font-family: "Montserrat", "Poppins", system-ui, sans-serif;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1 !important;
}

.evp-finale-text {
  font-size: 12.5px;
  line-height: 1.5 !important;
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) { .evp-finale-title { font-size: 24px; } }

.evp-day-teaser {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ev-c);
  box-shadow: 0 0 8px var(--ev-c);
}

/* ── loot ── */

.evp-loot { padding: 26px 18px; }

@media (min-width: 768px) { .evp-loot { padding: 34px 32px; } }

.evp-tiers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

@media (min-width: 900px) { .evp-tiers { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }

.evp-tier {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 15px;
  border-radius: 15px;
  --tier: var(--ev-common);
  border: 1px solid color-mix(in srgb, var(--tier) 26%, transparent);
  background:
    radial-gradient(100% 80% at 0% 0%, color-mix(in srgb, var(--tier) 14%, transparent) 0%, transparent 70%),
    rgba(255, 255, 255, 0.02);
  transition: transform 0.3s var(--ev-ease), border-color 0.3s ease;
}

.evp-tier:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tier) 50%, transparent); }
.evp-tier[data-rarity="rare"]      { --tier: var(--ev-rare); }
.evp-tier[data-rarity="epic"]      { --tier: var(--ev-epic); }
.evp-tier[data-rarity="legendary"] { --tier: var(--ev-legendary); }

.evp-tier ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.evp-tier li {
  font-size: 12.5px;
  line-height: 1.4 !important;
  color: rgba(255, 255, 255, 0.72);
}

.evp-tier[data-rarity="legendary"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 220, 140, 0.12) 48%, transparent 66%);
  background-size: 250% 100%;
  animation: evShine 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes evShine {
  0%   { background-position: 140% 0; }
  60%, 100% { background-position: -60% 0; }
}

/* ── prize board ── */

.evp-board { padding: 26px 18px 22px; }

@media (min-width: 768px) { .evp-board { padding: 34px 32px 30px; } }

.evp-board-sub {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.evp-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.evp-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.evp-tab b {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
}

.evp-tab[aria-selected="true"] {
  color: #1a0d03;
  background: linear-gradient(180deg, var(--ev-b), var(--ev-a));
}

html[data-event="christmas"] .evp-tab[aria-selected="true"] { color: #fff; }
.evp-tab[aria-selected="true"] b { color: rgba(26, 13, 3, 0.6); }
html[data-event="christmas"] .evp-tab[aria-selected="true"] b { color: rgba(255, 255, 255, 0.7); }

.evp-board-list {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

@media (min-width: 640px)  { .evp-board-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .evp-board-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }

.evp-win {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  border-radius: 15px;
  --tier: var(--ev-common);
  border: 1px solid color-mix(in srgb, var(--tier) 26%, transparent);
  background:
    radial-gradient(100% 90% at 100% 100%, color-mix(in srgb, var(--tier) 12%, transparent) 0%, transparent 70%),
    rgba(255, 255, 255, 0.02);
  animation: evReveal 0.5s var(--ev-ease) both;
}

.evp-win[data-rarity="rare"]      { --tier: var(--ev-rare); }
.evp-win[data-rarity="epic"]      { --tier: var(--ev-epic); }
.evp-win[data-rarity="legendary"] { --tier: var(--ev-legendary); }

.evp-win-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.evp-win-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--tier);
  background: color-mix(in srgb, var(--tier) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tier) 28%, transparent);
}

.evp-win-icon svg { width: 18px; height: 18px; }

.evp-win-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25 !important;
}

.evp-win-meta {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.4);
}

.evp-empty {
  grid-column: 1 / -1;
  padding: 22px 18px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.evp-rules {
  margin: 0;
  padding: 0 4px;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

.evp-alert {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 77, 79, 0.1);
  border: 1px solid rgba(255, 77, 79, 0.3);
  font-size: 12.5px;
  color: #ffb3b4;
}


/* ── 6  MOTION, RESPONSIVENESS ─────────────────────────────────────── */

@media (max-width: 767px) {
  /* nothing in the corners that could crowd the menu button */
  .ev-decor .ev-web { width: 92px; opacity: 0.8; }
  .ev-sit { display: none; }
  .evp-item { width: 170px; height: 170px; }
  .evp-stage-rays { width: 300px; height: 300px; margin-left: -150px; }
  .evp-clock-time { font-size: 26px; }
  .evp-day-state { font-size: 8.5px; letter-spacing: 0.06em; padding: 2px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  /* the splash's own failsafe fade is NOT listed here - it is what takes
     the splash down if events.js never runs, motion or no motion */
  .ev-splash *,
  .ev-nav-ring::before,
  .ev-nav-glow,
  .ev-nav-rays,
  .ev-hang,
  .ev-sit::before,
  .ev-lights .ev-bulb,
  .evp-stage-rays,
  .evp-chip--live i,
  .evp-day.is-today .evp-day-art img,
  .evp-day.is-today .evp-day-art svg,
  .evp-day.is-today::after,
  .evp-stage.is-ready .evp-item,
  .evp-tier::after {
    animation: none !important;
  }
  .ev-splash { transition: opacity 0.2s ease; }
  /* moving decorations are not built at all - see events.js */
}
