/* Seasonal looks are opt-in by the Georgia calendar; default LUX styles remain untouched. */
html[data-season="halloween"] #feed-screen > header {
  position: relative; isolation: isolate; background-color: #101318;
  background-image: linear-gradient(90deg, #11151b99 0%, #11151b30 54%, #11151b08 100%), url("assets/seasons/halloween-header.webp");
  background-position: center 43%; background-size: cover;
}
html[data-season="halloween"] #feed-screen > header > * { position: relative; z-index: 1; }
html[data-season="halloween"][data-theme="light"] #feed-screen > header {
  background-image: linear-gradient(90deg, #f7f4edc2 0%, #f7f4ed70 54%, #f7f4ed2b 100%), url("assets/seasons/halloween-header.webp");
}
html[data-season="halloween"] #feed-screen > header :is(.brand, .subtitle, .icon-btn) { color: var(--ink); }

html.standalone-web[data-season="halloween"] #desktop-header::before {
  content: ""; position: absolute; z-index: 0; inset: 40px 0 0;
  background: linear-gradient(90deg, #11151b99 0%, #11151b30 54%, #11151b08 100%), url("assets/seasons/halloween-header.webp") center 43% / cover;
  pointer-events: none;
}
html.standalone-web[data-season="halloween"][data-theme="light"] #desktop-header::before {
  background-image: linear-gradient(90deg, #f7f4edc2 0%, #f7f4ed70 54%, #f7f4ed2b 100%), url("assets/seasons/halloween-header.webp");
}
html.standalone-web[data-season="halloween"] :is(.web-utility, .desktop-bar, .web-sections) { position: relative; z-index: 1; }
html.standalone-web[data-season="halloween"] .desktop-brand { color: var(--ink); text-shadow: 0 1px 8px var(--bg); }

html[data-season="halloween"] body:not(.zone-active) .market-switcher-item.active:first-child {
  background: #f2c94c; color: #29261c; border-color: #f2c94c; box-shadow: 0 0 18px #ffb52d55;
}
html[data-season="halloween"] :is(.post-submit, .fab),
html.standalone-web[data-season="halloween"] .web-primary {
  background: linear-gradient(115deg, #ff7a1a, #6b3fa0); color: #fff; box-shadow: 0 5px 18px #6b3fa055;
}
html[data-season="halloween"] .post-submit::after,
html.standalone-web[data-season="halloween"] .web-primary::after {
  content: ""; display: inline-block; width: 28px; height: 20px; margin-left: 5px; vertical-align: middle;
  background: url("assets/seasons/halloween-bat.svg?v=2") center / contain no-repeat;
  filter: drop-shadow(0 0 5px #ad4ce5);
}
/* The lower navigation keeps its transparent tab; only the plus tile is seasonal. */
html[data-season="halloween"] #tab-post { background: none !important; color: var(--ink-soft); }
html[data-season="halloween"] #tab-post svg {
  width: 42px; height: 40px; padding: 9px; margin-top: -6px; border-radius: 12px;
  background: linear-gradient(135deg, #ff8a22, #7a42aa); color: #fff;
  filter: drop-shadow(0 0 10px #a349c777);
}
html[data-season="halloween"] #tab-post::before {
  content: ""; position: absolute; z-index: 2; width: 25px; height: 18px; top: -4px; left: calc(50% + 8px);
  background: url("assets/seasons/halloween-bat.svg?v=2") center / contain no-repeat; transform: rotate(12deg); pointer-events: none;
  filter: drop-shadow(0 0 5px #b34de6) drop-shadow(0 0 9px #6b3fa0aa);
}

html[data-season="halloween"] .card-heart .heart-icon,
html[data-season="halloween"] .detail-heart-btn .heart-icon { color: #ff7a1a; }
html[data-season="halloween"] .card-heart .heart-icon img { display: block; width: 25px; height: 25px; margin: auto; object-fit: contain; transition: filter .2s ease, transform .2s ease; }
html[data-season="halloween"] .detail-heart-btn .heart-icon img { display: block; width: 29px; height: 29px; margin: auto; object-fit: contain; transition: filter .2s ease, transform .2s ease; }
html[data-season="halloween"] .card-heart { background: #382619ed; border: 1px solid #ff9d34a8; color: #ff9d34; }
html[data-season="halloween"] .detail-heart-btn { background: #382619ed; border-color: #ff9d34a8; color: #ff9d34; }
html[data-season="halloween"] #tab-fav, html[data-season="halloween"] #desktop-favorites { color: #ff7a1a; }
html[data-season="halloween"] .card-heart .heart-icon.filled img,
html[data-season="halloween"] .detail-heart-btn .heart-icon.filled img { filter: drop-shadow(0 0 5px #ffd75d) drop-shadow(0 0 10px #ff7a1a); transform: scale(1.04); }

/* Separate, non-interactive atmospheric layer: corner webs and sparse drifting leaves. */
html[data-season="halloween"] #seasonal-effects { position: fixed; inset: 0; z-index: 27; pointer-events: none; overflow: hidden; }
html[data-season="halloween"] .seasonal-web { position: absolute; width: 124px; height: 124px; opacity: .82; background: url("assets/seasons/halloween-footer-web.webp?v=2") center / contain no-repeat; filter: brightness(3); }
html[data-season="halloween"] .seasonal-web.footer-web { right: 0; bottom: 0; width: 132px; height: 132px; transform: rotate(180deg); }
html[data-season="halloween"] .seasonal-leaf {
  position: absolute; top: -32px; left: var(--leaf-x); width: 19px; height: 19px; opacity: .82;
  background: url("assets/seasons/halloween-leaf.svg") center / contain no-repeat;
  animation: halloween-leaf-fall var(--leaf-duration) linear var(--leaf-delay) infinite;
  will-change: transform;
}
@keyframes halloween-leaf-fall {
  from { transform: translate3d(0, -4vh, 0) rotate(0deg); }
  to { transform: translate3d(var(--leaf-drift), 112vh, 0) rotate(580deg); }
}
html[data-season="halloween"] #seasonal-fog {
  position: absolute; z-index: 0; pointer-events: none; inset: 0; overflow: hidden;
}
html[data-season="halloween"] #seasonal-fog::before,
html[data-season="halloween"] #seasonal-fog::after {
  content: ""; position: absolute; inset: -4px -2%;
  background: url("assets/seasons/halloween-smoke-texture.webp?v=2") center bottom / 100% 100% no-repeat;
  mix-blend-mode: screen; pointer-events: none; will-change: transform, opacity;
}
html[data-season="halloween"] #seasonal-fog::before { opacity: .52; }
html[data-season="halloween"] #seasonal-fog::after { opacity: .23; transform: scale(1.08); background-position: 58% bottom; }
html[data-theme="light"][data-season="halloween"] #seasonal-fog::before,
html[data-theme="light"][data-season="halloween"] #seasonal-fog::after { filter: grayscale(1) invert(1) brightness(1.18) contrast(.82); mix-blend-mode: multiply; }
html[data-season="halloween"] #tabbar { position: fixed; isolation: isolate; overflow: hidden; background: var(--bg); }
html[data-season="halloween"] #tabbar > .tab { position: relative; z-index: 1; }
html[data-theme="light"][data-season="halloween"] #seasonal-fog {
  opacity: .76;
}
html.standalone-web[data-season="halloween"] #seasonal-fog,
html.standalone-web[data-season="halloween"] .seasonal-web.footer-web { display: none; }
@media (prefers-reduced-motion: no-preference) {
  html[data-season="halloween"] body:not(.zone-active) .market-switcher-item.active:first-child { animation: halloween-candle-glow 4s ease-in-out infinite; }
  html[data-season="halloween"] #seasonal-fog::before { animation: halloween-smoke-drift 16s ease-in-out infinite alternate; }
  html[data-season="halloween"] #seasonal-fog::after { animation: halloween-smoke-drift 23s ease-in-out -8s infinite alternate-reverse; }
  @keyframes halloween-candle-glow {
    0%, 100% { box-shadow: 0 0 12px #ffb52d40; }
    50% { box-shadow: 0 0 20px #ffb52d70; }
  }
  @keyframes halloween-smoke-drift { from { transform: translate3d(-2.4%, 3px, 0) scale(1.02); opacity: .38; } to { transform: translate3d(2.4%, -3px, 0) scale(1.11); opacity: .64; } }
}
@media (prefers-reduced-motion: reduce) {
  html[data-season="halloween"] .seasonal-leaf { display: none; }
}
