/* Feste di stagione: riquadro della home e schermata della festa (src/festival.js) */

/* Riquadro della home */
.fest-tile { position: relative; background: var(--gloss), linear-gradient(100deg, color-mix(in srgb, var(--tc) 85%, #000), color-mix(in srgb, var(--tc) 55%, #1a1020)); }
.fest-tile .dt-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fest-tile .nb { top: -6px; right: -6px; }

/* Schermata */
.fest-screen { margin: 0 auto; max-width: 980px; }
.fest-hero {
  display: flex; gap: 14px; align-items: center; margin: 0 0 12px; padding: 14px 16px; border-radius: 20px;
  background: var(--gloss), var(--stripes, none), linear-gradient(110deg, color-mix(in srgb, var(--fc) 70%, #000), rgba(22, 27, 40, .94));
  border: 2px solid color-mix(in srgb, var(--fc) 60%, #fff); box-shadow: 0 4px 0 rgba(0,0,0,.35);
}
.fest-hero-ico {
  flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 32px;
  background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 3px rgba(255,255,255,.25), 0 0 24px color-mix(in srgb, var(--fc) 60%, transparent);
  animation: fest-glow 2.6s ease-in-out infinite;
}
.fest-hero-ico .ico, .fest-hero-ico svg { width: 36px; height: 36px; }
.fest-hero-txt { min-width: 0; }
.fest-hero-txt b { display: block; font: 400 24px/1.05 var(--display); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.fest-hero-txt p { margin: 6px 0 0; font: 700 13px/1.4 var(--body); color: #e8eaf2; }
.fest-when { display: block; font: 800 11px/1.2 var(--body); color: var(--yellow); margin-bottom: 4px; }
.fest-when em { font-style: normal; text-transform: uppercase; letter-spacing: .5px; }
@keyframes fest-glow { 50% { box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), 0 0 36px color-mix(in srgb, var(--fc) 85%, transparent); } }

.fest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fest-goal { margin: 0 0 10px; font: 900 15px/1.3 var(--body); color: #fff; }
.fest-meter { position: relative; height: 20px; border-radius: 99px; background: #0d1018; overflow: hidden; box-shadow: inset 0 2px 0 rgba(0,0,0,.4); }
.fest-meter i {
  position: absolute; inset: 0 auto 0 0; border-radius: 99px; transition: width .5s;
  background: linear-gradient(180deg, color-mix(in srgb, var(--fc) 55%, #fff), var(--fc)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.2);
}
.fest-meter.done i { background: linear-gradient(180deg, #fff2a0, var(--yellow)); }
.fest-meter b { position: absolute; inset: 0; text-align: center; font: 900 11px/20px var(--body); color: #fff; text-shadow: 0 1px 2px #000; }
.fest-note { margin: 10px 0 0; font: 700 12px/1.4 var(--body); color: var(--muted); }

.fest-ninjas { display: flex; flex-direction: column; gap: 8px; }
.fest-ninja, .fest-past {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 14px;
  background: rgba(0,0,0,.25); border: 2px solid rgba(255,255,255,.08);
}
.fest-ninja { border-color: color-mix(in srgb, var(--nc) 45%, transparent); }
.fest-ninja.got { background: color-mix(in srgb, var(--nc) 22%, rgba(0,0,0,.25)); }
.fest-ninja:not(.got) img { filter: grayscale(.7) brightness(.8); }
.fest-ninja img { flex: none; width: 44px; height: 44px; image-rendering: pixelated; object-fit: contain; }
.fest-ninja-ico, .fest-past-ico { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; background: rgba(0,0,0,.3); }
.fest-ninja > div, .fest-past > div { flex: 1; min-width: 0; }
.fest-ninja b, .fest-past b { display: block; font: 900 14px/1.15 var(--body); color: #fff; }
.fest-ninja small, .fest-past small { display: block; font: 700 11px/1.3 var(--body); color: var(--muted); }
.fest-state { flex: none; font: 900 16px/1 var(--body); color: var(--yellow); }
.fest-past { border-color: color-mix(in srgb, var(--fc) 45%, transparent); }
.fest-past + .fest-past { margin-top: 8px; }
.fest-past-box { margin-top: 12px; }

.fest-others { margin: 14px 0 0; text-align: center; font: 700 12px/1.8 var(--body); color: var(--muted); }
.fest-next { display: inline-block; margin: 0 4px; padding: 2px 9px; border-radius: 99px; color: #fff; background: color-mix(in srgb, var(--fc) 30%, transparent); border: 1px solid var(--fc); white-space: nowrap; }
.fest-next small { opacity: .8; }

.fest-end b { color: var(--yellow); }

@media (max-width: 640px) {
  .fest-grid { grid-template-columns: 1fr; }
  .fest-hero { padding: 12px; gap: 10px; align-items: flex-start; }
  .fest-hero-ico { width: 48px; height: 48px; font-size: 24px; }
  .fest-hero-ico .ico, .fest-hero-ico svg { width: 28px; height: 28px; }
  .fest-hero-txt b { font-size: 20px; }
  .fest-next { white-space: normal; }
}
