/* Festive themes (_fest.html): loaded by base.html and the standalone War Room.
   Decoration only, never the app's own colours; hidden unless html.festive. */
html:not(.festive) .fest-banner, html:not(.festive) .fest-sky{display:none}
.fest-banner{display:flex;align-items:center;justify-content:center;gap:10px;padding:7px 14px;
  font-weight:600;font-size:calc(13px*var(--fs,1));color:#2b1d05;
  background:linear-gradient(90deg,#f7c873,#f5a25d,#f7c873);background-size:200% 100%;
  animation:fest-shine 8s linear infinite}
.fest-banner[hidden]{display:none}
.fest-ico{font-size:1.2em}
.fest-x{border:0;background:none;color:inherit;font-size:18px;line-height:1;cursor:pointer;opacity:.7;margin-left:6px}
.fest-x:hover{opacity:1}
@keyframes fest-shine{to{background-position:200% 0}}
body[data-fest="holi"] .fest-banner{background:linear-gradient(90deg,#ff7eb3,#ffd166,#7bdff2,#b2f7ef,#ff7eb3);background-size:300% 100%}
body[data-fest="christmas"] .fest-banner{background:linear-gradient(90deg,#c0392b,#1e7d4a,#c0392b);background-size:200% 100%;color:#fff}
body[data-fest="newyear"] .fest-banner{background:linear-gradient(90deg,#1b1b2f,#3a3a6a,#1b1b2f);background-size:200% 100%;color:#ffd66b}
body[data-fest="eid"] .fest-banner{background:linear-gradient(90deg,#0f5e57,#1d8a7e,#0f5e57);background-size:200% 100%;color:#ffe9a8}
body[data-fest="tricolor"] .fest-banner{background:linear-gradient(90deg,#ff9933,#ffffff 50%,#138808);color:#0b2a6b}
body[data-fest="halloween"] .fest-banner{background:linear-gradient(90deg,#ff7518,#5b2a86,#ff7518);background-size:200% 100%;color:#fff}
body[data-fest="autumn"] .fest-banner{background:linear-gradient(90deg,#c46a2b,#e0a458,#c46a2b);background-size:200% 100%;color:#2b1405}

/* The sky: sixteen pieces falling (or rising, for fireworks) behind the page. */
.fest-sky{position:fixed;inset:0;pointer-events:none;z-index:4;overflow:hidden}
.fest-sky i{position:absolute;top:-24px;left:calc(var(--i) * 6.2% + 1%);width:8px;height:8px;border-radius:2px;opacity:.85;
  background:#f5b942;animation:fest-fall calc(9s + var(--i) * .35s) linear infinite;animation-delay:calc(var(--i) * -0.9s)}
@keyframes fest-fall{to{transform:translateY(110vh) rotate(540deg)}}
body[data-fest="diwali"] .fest-sky i{width:5px;height:5px;border-radius:50%;background:#ffcf5a;box-shadow:0 0 8px 2px #ffb13b}
body[data-fest="diwali"] .fest-sky i:nth-child(3n){background:#ff8a3d;box-shadow:0 0 8px 2px #ff7a2a}
body[data-fest="holi"] .fest-sky i{width:14px;height:14px;border-radius:50%;opacity:.55;filter:blur(1px)}
body[data-fest="holi"] .fest-sky i:nth-child(4n){background:#ff4f9a}
body[data-fest="holi"] .fest-sky i:nth-child(4n+1){background:#ffd23f}
body[data-fest="holi"] .fest-sky i:nth-child(4n+2){background:#3bceac}
body[data-fest="holi"] .fest-sky i:nth-child(4n+3){background:#7b6cff}
body[data-fest="christmas"] .fest-sky i{width:7px;height:7px;border-radius:50%;background:#fff;box-shadow:0 0 4px #ffffffaa}
body[data-fest="eid"] .fest-sky i{width:6px;height:6px;border-radius:50%;background:#ffe9a8;box-shadow:0 0 6px #ffe08a}
body[data-fest="tricolor"] .fest-sky i:nth-child(3n){background:#ff9933}
body[data-fest="tricolor"] .fest-sky i:nth-child(3n+1){background:#ffffff;box-shadow:0 0 0 1px #0002}
body[data-fest="tricolor"] .fest-sky i:nth-child(3n+2){background:#138808}
body[data-fest="halloween"] .fest-sky i:nth-child(2n){background:#ff7518}
body[data-fest="halloween"] .fest-sky i:nth-child(2n+1){background:#7d3cbd}
body[data-fest="autumn"] .fest-sky i{width:11px;height:7px;border-radius:0 8px;background:#d2691e}
body[data-fest="autumn"] .fest-sky i:nth-child(2n){background:#e0a458}
body[data-fest="newyear"] .fest-sky i{top:auto;bottom:-20px;width:4px;height:4px;border-radius:50%;background:#ffd66b;
  box-shadow:0 0 6px 2px #ffd66b;animation:fest-rise calc(3s + var(--i) * .2s) ease-out infinite;animation-delay:calc(var(--i) * -0.4s)}
body[data-fest="newyear"] .fest-sky i:nth-child(3n){background:#9be7ff;box-shadow:0 0 6px 2px #9be7ff}
@keyframes fest-rise{0%{transform:translateY(0);opacity:1}80%{opacity:1}100%{transform:translateY(-75vh) scale(2.5);opacity:0}}
@media(prefers-reduced-motion:reduce){.fest-banner{animation:none}.fest-sky{display:none}}

/* String lights along the top edge while a festival runs (base.html). Bulbs in
   the festival's colours, a slow twinkle; nothing with festival touches off or
   under reduced motion (then they simply stay lit). */
html:not(.festive) .fest-lights{display:none}
.fest-lights{position:fixed;top:0;left:0;right:0;height:16px;z-index:70;pointer-events:none;display:flex;
  justify-content:space-around;align-items:flex-start;
  background:radial-gradient(120% 22px at 50% -14px,transparent 15px,#5a4a3a66 16px,transparent 17px) 0 0/80px 16px repeat-x}
.fest-lights i{width:6px;height:9px;margin-top:5px;border-radius:50% 50% 45% 45%;background:#ffcf5a;
  box-shadow:0 0 6px 1px #ffb13b88;animation:fest-twinkle 2.6s ease-in-out infinite;animation-delay:calc(var(--i) * -0.37s)}
.fest-lights i:nth-child(3n){background:#ff8a3d;box-shadow:0 0 6px 1px #ff7a2a88}
.fest-lights i:nth-child(3n+1){background:#ffe7a3}
@keyframes fest-twinkle{50%{filter:brightness(.55)}}
body[data-fest="christmas"] .fest-lights i:nth-child(3n){background:#e5484d;box-shadow:0 0 6px 1px #e5484d88}
body[data-fest="christmas"] .fest-lights i:nth-child(3n+1){background:#30a46c;box-shadow:0 0 6px 1px #30a46c88}
body[data-fest="christmas"] .fest-lights i:nth-child(3n+2){background:#ffd23f}
body[data-fest="holi"] .fest-lights i:nth-child(4n){background:#ff4f9a}
body[data-fest="holi"] .fest-lights i:nth-child(4n+1){background:#ffd23f}
body[data-fest="holi"] .fest-lights i:nth-child(4n+2){background:#3bceac}
body[data-fest="holi"] .fest-lights i:nth-child(4n+3){background:#7b6cff}
body[data-fest="tricolor"] .fest-lights i:nth-child(3n){background:#ff9933}
body[data-fest="tricolor"] .fest-lights i:nth-child(3n+1){background:#ffffff;box-shadow:0 0 0 1px #0002}
body[data-fest="tricolor"] .fest-lights i:nth-child(3n+2){background:#138808}
body[data-fest="halloween"] .fest-lights i:nth-child(2n){background:#ff7518}
body[data-fest="halloween"] .fest-lights i:nth-child(2n+1){background:#7d3cbd}
body[data-fest="eid"] .fest-lights i{background:#ffe9a8;box-shadow:0 0 6px 1px #ffe08a88}
@media (prefers-reduced-motion: reduce){.fest-lights i{animation:none}}
@media print{.fest-lights{display:none}}

/* Festival games on Today (today.html). */
html:not(.festive) .fest-games{display:none}
.fest-games{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px;margin-bottom:14px}
.fl-me{display:flex;align-items:center;gap:10px;margin:10px 0;color:var(--text-dim)}
.fl-lamp{font-size:28px;filter:grayscale(1) opacity(.45);transition:filter .4s ease}
.fl-me.is-lit .fl-lamp{filter:none;animation:fl-glow 2.4s ease-in-out infinite}
@keyframes fl-glow{50%{transform:scale(1.08)}}
.fl-bar{height:8px;border-radius:999px;background:var(--track);overflow:hidden;margin:6px 0}
.fl-bar span{display:block;height:100%;border-radius:inherit;background-color:var(--cta-b);
  background-image:linear-gradient(90deg,var(--cta-a),var(--cta-b))}
.gift-pick{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.gift-chip{display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.gift-chip input{margin:0}
.gift-got{margin-top:12px}
.gift-open{height:26px;padding:0 10px;margin-left:6px}
.gift-msg{display:block;margin-top:2px}
.today-surprise{display:flex;flex-direction:column;gap:8px}
.surprise-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:14px;cursor:pointer;
  border:1px dashed var(--rule);border-radius:var(--radius);background:var(--surface-2);color:var(--text);font:inherit;font-weight:600}
.surprise-btn:hover{background:var(--hover)}
.surprise-btn:focus-visible{outline:none;box-shadow:var(--ring)}
.surprise-text{margin:0;color:var(--text)}
@media (prefers-reduced-motion: reduce){.fl-me.is-lit .fl-lamp{animation:none}}
