/* Seasonal events: palette lives on html[style]. Overlays sit above the UI, below modals. */

.fx-event {
  position: fixed; inset: 0; pointer-events: none; z-index: 24; overflow: hidden;
}
html:not([data-event]) .fx-event { display: none; }
.fx-event .fx-atm,
.fx-event .fx-props,
.fx-event .fx-cv {
  position: absolute; inset: 0; pointer-events: none;
}
.fx-event .fx-cv { width: 100%; height: 100%; display: block; }

.event-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 8px; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink, #0A2114); background: var(--lime);
  max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.land-nav .event-chip { margin-left: 0; }

.brand-logo {
  position: relative; display: inline-grid; place-items: center;
  width: max-content; flex: 0 0 auto; line-height: 0;
}
.brand-logo img { border-radius: 10px; display: block; position: relative; z-index: 1; }
html[data-event] .brand-logo img {
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--event-glow, var(--lime)) 70%, transparent));
}
.brand-logo-fx {
  position: absolute; inset: -18% -10% -6%; pointer-events: none; z-index: 2;
}
.brand-logo-fx::before, .brand-logo-fx::after {
  content: ""; position: absolute; pointer-events: none;
}

html[data-event] .brand em {
  background: linear-gradient(90deg, var(--lime), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Logo accessories */
.brand-logo.is-witch .brand-logo-fx::before {
  left: 18%; top: -8%; width: 64%; height: 38%;
  background: #1a0c10;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 2px 0 var(--lime));
}
.brand-logo.is-witch .brand-logo-fx::after {
  left: 8%; top: 22%; width: 84%; height: 10%; background: #2a1014; border-radius: 4px;
}
.brand-logo.is-snowcap .brand-logo-fx::before {
  left: 10%; top: -4%; width: 80%; height: 34%;
  background: #f4f8ff; border-radius: 70% 70% 40% 40%;
  box-shadow: 10px 8px 0 -4px #fff, inset 0 -6px 0 #d7e7ff;
}
.brand-logo.is-hearts .brand-logo-fx::before,
.brand-logo.is-hearts .brand-logo-fx::after {
  width: 28%; height: 28%; top: -6%;
  background: var(--lime);
  clip-path: path("M12 21s-7-4.35-7-9a4 4 0 0 1 7-2 4 4 0 0 1 7 2c0 4.65-7 9-7 9z");
}
.brand-logo.is-hearts .brand-logo-fx::before { left: 6%; transform: rotate(-18deg); }
.brand-logo.is-hearts .brand-logo-fx::after { right: 6%; left: auto; transform: rotate(16deg) scale(.85); background: var(--accent2); }
.brand-logo.is-tulip .brand-logo-fx::before {
  left: 38%; top: -10%; width: 24%; height: 32%;
  background: var(--lime); border-radius: 50% 50% 40% 40%;
}
.brand-logo.is-tulip .brand-logo-fx::after {
  left: 48%; top: 16%; width: 4%; height: 22%; background: #6fe09a; border-radius: 4px;
}
.brand-logo.is-star .brand-logo-fx::before {
  right: -4%; top: -8%; width: 34%; height: 34%;
  background: var(--lime);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 6px var(--lime));
}
.brand-logo.is-spark .brand-logo-fx::before {
  right: 4%; top: -6%; width: 18%; height: 18%; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 12px var(--lime), 12px 10px 0 -2px var(--accent2);
}
.brand-logo.is-leaf .brand-logo-fx::before {
  right: -2%; top: -4%; width: 36%; height: 28%;
  background: var(--lime); border-radius: 80% 0 70% 0; transform: rotate(-20deg);
}
.brand-logo.is-sun .brand-logo-fx::before {
  right: -6%; top: -10%; width: 40%; height: 40%; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff6c8, var(--lime));
  box-shadow: 0 0 16px var(--lime);
}
.brand-logo.is-orbit .brand-logo-fx::before {
  inset: -10%; border: 2px solid var(--accent2); border-radius: 50%;
  border-left-color: transparent; animation: ev-spin 8s linear infinite;
}
.brand-logo.is-orbit .brand-logo-fx::after {
  right: -4%; top: 18%; width: 12%; height: 12%; border-radius: 50%; background: var(--lime);
}
.brand-logo.is-clover .brand-logo-fx::before {
  left: 32%; top: -8%; width: 36%; height: 28%;
  background: var(--lime);
  clip-path: circle(36% at 30% 50%), circle(36% at 70% 50%), circle(36% at 50% 18%);
}
.brand-logo.is-sakura .brand-logo-fx::before {
  left: 8%; top: -8%; width: 26%; height: 26%; border-radius: 50% 0 50% 50%;
  background: var(--lime); transform: rotate(20deg);
}
.brand-logo.is-sakura .brand-logo-fx::after {
  right: 6%; top: 0; width: 22%; height: 22%; border-radius: 50% 0 50% 50%;
  background: var(--accent2); transform: rotate(-30deg);
}
.brand-logo.is-wave .brand-logo-fx::before {
  left: 8%; bottom: -6%; right: 8%; height: 28%;
  background: radial-gradient(120% 80% at 20% 120%, var(--lime) 40%, transparent 42%),
    radial-gradient(120% 80% at 70% 120%, var(--accent2) 40%, transparent 42%);
}
.brand-logo.is-bolt .brand-logo-fx::before {
  right: 6%; top: -8%; width: 22%; height: 42%;
  background: var(--lime);
  clip-path: polygon(70% 0, 20% 55%, 48% 55%, 30% 100%, 80% 45%, 52% 45%);
  filter: drop-shadow(0 0 8px var(--lime));
}
.brand-logo.is-moon .brand-logo-fx::before {
  right: -4%; top: -8%; width: 34%; height: 34%; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--lime));
  box-shadow: 8px 0 0 -2px var(--bg);
}
.brand-logo.is-coin .brand-logo-fx::before {
  right: -6%; top: -6%; width: 38%; height: 38%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6d2, var(--lime) 55%, #b8860b);
  box-shadow: 0 0 10px var(--lime);
}
.brand-logo.is-ribbon .brand-logo-fx::before {
  left: 8%; top: -4%; width: 28%; height: 36%;
  background: linear-gradient(180deg, #c45c5c, #8a2a2a); clip-path: polygon(0 0, 100% 0, 70% 100%, 30% 100%);
}
.brand-logo.is-jester .brand-logo-fx::before {
  left: 12%; top: -10%; width: 76%; height: 32%;
  background: linear-gradient(90deg, var(--lime), var(--accent2));
  clip-path: polygon(0 100%, 18% 0, 50% 70%, 82% 0, 100% 100%);
}
.brand-logo.is-aurora .brand-logo-fx::before {
  inset: -14% -8% auto; height: 40%;
  background: linear-gradient(90deg, transparent, var(--lime), var(--accent2), transparent);
  opacity: .75; filter: blur(6px);
}
.brand-logo.is-flame .brand-logo-fx::before {
  left: 36%; top: -12%; width: 28%; height: 40%;
  background: radial-gradient(circle at 50% 80%, #fff 0, var(--lime) 40%, transparent 70%);
  border-radius: 50% 50% 40% 40%;
}

@keyframes ev-spin { to { transform: rotate(360deg); } }

/* Atmosphere washes */
.fx-atm-fog {
  position: absolute; left: -12%; right: -12%; bottom: -10%; height: 38%;
  background:
    radial-gradient(42% 90% at 18% 80%, rgba(90, 42, 18, .42), transparent 70%),
    radial-gradient(50% 90% at 78% 92%, rgba(48, 18, 54, .38), transparent 72%),
    radial-gradient(60% 80% at 50% 100%, rgba(20, 8, 10, .35), transparent 70%);
  filter: blur(18px);
  animation: fx-drift 18s ease-in-out infinite alternate;
}
.fx-atm-aurora {
  position: absolute; left: -8%; right: -8%; top: -6%; height: 48%;
  background:
    radial-gradient(42% 80% at 18% 8%, rgba(92, 255, 200, .28), transparent 72%),
    radial-gradient(38% 70% at 68% 0%, rgba(167, 139, 250, .24), transparent 70%),
    radial-gradient(50% 60% at 48% 0%, rgba(126, 203, 255, .16), transparent 68%);
  filter: blur(10px);
  animation: fx-aurora 14s ease-in-out infinite alternate;
}
.fx-atm-heat {
  position: absolute; left: -10%; right: -10%; bottom: -8%; height: 42%;
  background: radial-gradient(70% 90% at 50% 100%, rgba(255, 122, 61, .28), transparent 72%);
  filter: blur(16px);
  animation: fx-heat 3.2s ease-in-out infinite alternate;
}
.fx-atm-caustic {
  position: absolute; inset: 0;
  background:
    radial-gradient(28% 18% at 22% 28%, rgba(61, 214, 198, .16), transparent 70%),
    radial-gradient(24% 16% at 74% 62%, rgba(126, 203, 255, .14), transparent 70%),
    radial-gradient(32% 20% at 48% 80%, rgba(61, 214, 198, .1), transparent 72%);
  animation: fx-caustic 9s ease-in-out infinite alternate;
}
.fx-atm-nebula {
  position: absolute; inset: -10%;
  background:
    radial-gradient(40% 36% at 20% 30%, rgba(185, 166, 255, .16), transparent 70%),
    radial-gradient(34% 30% at 78% 18%, rgba(126, 203, 255, .12), transparent 70%),
    radial-gradient(30% 28% at 60% 78%, rgba(255, 93, 154, .08), transparent 70%);
  animation: fx-drift 22s ease-in-out infinite alternate;
}
.fx-atm-scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .07) 2px 3px);
  opacity: .4;
}
.fx-atm-glow {
  position: absolute; inset: 0;
  background: radial-gradient(50% 40% at 50% 0%, color-mix(in srgb, var(--lime) 18%, transparent), transparent 70%);
}
.fx-atm-love {
  position: absolute; inset: 0;
  background: radial-gradient(55% 50% at 50% 110%, rgba(255, 122, 168, .16), transparent 70%);
}

@keyframes fx-drift { to { transform: translate3d(4%, -3%, 0) scale(1.04); } }
@keyframes fx-aurora { from { transform: translateX(-4%) skewX(-4deg); } to { transform: translateX(5%) skewX(5deg); } }
@keyframes fx-heat { from { opacity: .7; transform: scaleY(1); } to { opacity: 1; transform: scaleY(1.08); } }
@keyframes fx-caustic { from { transform: translate3d(-3%, 2%, 0); } to { transform: translate3d(4%, -3%, 0); } }
@keyframes fx-sway {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(8deg); }
}
@keyframes fx-crawl {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(14px); }
}
@keyframes fx-bulb {
  0%, 100% { filter: brightness(1); opacity: .85; }
  50% { filter: brightness(1.8); opacity: 1; }
}

/* Corner props */
.fx-web {
  position: absolute; width: min(280px, 38vw); height: min(280px, 38vw);
  opacity: .72; filter: drop-shadow(0 0 8px rgba(232, 220, 200, .18));
}
.fx-web.tl { top: -8px; left: -8px; }
.fx-web.tr { top: -8px; right: -8px; transform: scaleX(-1); }
.fx-web.bl { bottom: -8px; left: -8px; transform: scaleY(-1); }
.fx-web.br { bottom: -8px; right: -8px; transform: scale(-1); }
.fx-web svg { width: 100%; height: 100%; display: block; }

.fx-spider {
  position: absolute; top: 0; width: 46px; height: 108px;
  transform-origin: 50% 0;
  animation: fx-sway 4.6s ease-in-out infinite, fx-crawl 7s ease-in-out infinite;
}
.fx-spider svg { width: 100%; height: 100%; display: block; }

.fx-frost {
  position: absolute; width: min(220px, 32vw); height: min(220px, 32vw); opacity: .7;
}
.fx-frost.tl { top: -6px; left: -6px; }
.fx-frost.tr { top: -6px; right: -6px; transform: scaleX(-1); }
.fx-frost.bl { bottom: -6px; left: -6px; transform: scaleY(-1); }
.fx-frost svg { width: 100%; height: 100%; display: block; }

.fx-lights {
  position: absolute; top: 0; left: -2%; right: -2%; height: 64px;
}
.fx-lights svg { width: 100%; height: 100%; display: block; overflow: visible; }
.fx-lights .bulb { animation: fx-bulb 1.8s ease-in-out infinite; }
.fx-lights .bulb:nth-child(3n) { animation-duration: 2.4s; }
.fx-lights .bulb:nth-child(3n+1) { animation-duration: 1.5s; animation-delay: -.4s; }
.fx-lights .bulb:nth-child(3n+2) { animation-delay: -.9s; }

.fx-pumpkin {
  position: absolute; bottom: 8px; width: 72px; height: 64px; opacity: .92;
  filter: drop-shadow(0 0 12px rgba(255, 154, 61, .45));
}
.fx-pumpkin.l { left: 12px; }
.fx-pumpkin.r { right: 12px; transform: scaleX(-1); }
.fx-pumpkin svg { width: 100%; height: 100%; display: block; }

.fx-ribbon {
  position: absolute; width: 56px; height: 88px; opacity: .9;
}
.fx-ribbon.l { left: 10px; top: 8px; }
.fx-ribbon.r { right: 10px; top: 8px; transform: scaleX(-1); }

@media (max-width: 720px) {
  .event-chip { display: none; }
  .fx-web, .fx-frost { width: min(160px, 46vw); height: min(160px, 46vw); }
  .fx-pumpkin { width: 52px; height: 46px; }
  .fx-spider { width: 34px; height: 84px; }
  .event-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-event, .brand-logo.is-orbit .brand-logo-fx::before { animation: none !important; }
  .fx-event { display: none; }
}

/* Surfaces follow event */
html[data-event] .cblock { background: color-mix(in srgb, var(--card) 92%, transparent); }
html[data-event] .port { border-color: var(--bg); }
html[data-event] .palette-item:hover { border-color: rgba(var(--lime-rgb), .4); }
html[data-event] .land-progress i { background: linear-gradient(90deg, var(--lime), var(--accent2)); }
html[data-event="halloween"] .cblock { box-shadow: 0 0 0 1px rgba(255, 154, 61, .12); }
html[data-event="winter"] .cblock,
html[data-event="new_year"] .cblock,
html[data-event="old_new_year"] .cblock,
html[data-event="christmas"] .cblock {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px rgba(185, 212, 255, .08);
}

/* Admin events grid */
.event-admin-head {
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end;
  justify-content: space-between; margin-bottom: 18px;
}
.event-admin-now {
  display: flex; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 18px;
  border: 1px solid rgba(var(--lime-rgb), .28);
  background: rgba(var(--lime-rgb), .08);
  min-width: min(100%, 420px);
}
.event-admin-now .swatch {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--lime), var(--accent2));
}
.event-admin-now strong { display: block; font-size: 16px; }
.event-admin-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.event-admin-modes button.is-on { background: var(--lime); color: var(--ink, #0A2114); }
.event-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 16px; }
.event-toolbar input[type="search"] {
  flex: 1; min-width: 180px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--text); padding: 10px 12px; font: inherit;
}
.event-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.event-chips button {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; font: 650 13px/1 var(--font);
}
.event-chips button.is-on { color: var(--lime); border-color: rgba(var(--lime-rgb), .45); background: rgba(var(--lime-rgb), .08); }
.event-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px;
}
.event-card {
  text-align: left; cursor: pointer; border-radius: 18px; padding: 14px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  color: inherit; font: inherit; display: grid; gap: 8px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.event-card:hover { transform: translateY(-2px); border-color: rgba(var(--lime-rgb), .35); }
.event-card.is-on {
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(var(--lime-rgb), .12);
}
.event-card-top { display: flex; gap: 10px; align-items: center; }
.event-card .mini-logo { width: 42px; height: 42px; }
.event-card .mini-logo img { width: 42px; height: 42px; border-radius: 12px; }
.event-card h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.event-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.event-swatches { display: flex; gap: 4px; }
.event-swatches i { width: 14px; height: 14px; border-radius: 99px; display: block; }
.event-card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); }
.event-card .badge-soon { color: var(--accent2); }
.event-card .badge-live { color: var(--lime); }
