/* Iskierka / Light Sprite – companion, loaders, intro, favourites (29.11.2026). Transform/opacity animations only. */
.spr-cv { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 65; }
.spr { position: fixed; left: 0; top: 0; width: 82px; height: 66px; pointer-events: none; z-index: 66; will-change: transform; transform: translate3d(-200px, -200px, 0); contain: layout size style;
  --s0: #fff6dc; --s1: #ecd59e; --s2: #c9a55a; }
.spr-b { width: 100%; height: 100%; animation: sprBob 2.9s ease-in-out infinite; }
.spr svg { display: block; overflow: visible; filter: drop-shadow(0 0 1px rgba(96, 66, 18, .55)) drop-shadow(0 3px 7px rgba(19, 36, 42, .22)); }
.spr stop { transition: stop-color .6s; }
.spr .sp-wr { animation: sprFlapR .42s ease-in-out infinite alternate; }
.spr .sp-wl { animation: sprFlapL .42s ease-in-out infinite alternate; }
.spr.fast .sp-wr { animation-duration: .17s; } .spr.fast .sp-wl { animation-duration: .17s; }
.spr .sp-glow { animation: sprPulse 2.4s ease-in-out infinite; }
.spr .sp-halo { animation: sprPulse 3.6s ease-in-out infinite reverse; opacity: .8; }
.spr.busy .sp-halo, .spr.busy .sp-glow { animation-duration: .9s; }
.spr .sp-star { animation: sprGlint 6.5s ease-in-out infinite; }
@keyframes sprBob { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }
@keyframes sprFlapR { from { transform: rotate(5deg); } to { transform: rotate(-9deg) scale(.74, 1.03); } }
@keyframes sprFlapL { from { transform: rotate(-5deg); } to { transform: rotate(9deg) scale(.74, 1.03); } }
@keyframes sprPulse { 0%, 100% { opacity: .72; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes sprGlint { 0%, 86%, 100% { transform: rotate(0) scale(1); } 91% { transform: rotate(45deg) scale(1.45); } 95% { transform: rotate(90deg) scale(.85); } }

/* speech bubble + lit halo */
.spr-bub { position: fixed; left: 0; top: 0; z-index: 67; pointer-events: none; width: max-content; max-width: min(270px, 64vw); padding: 7px 13px; border-radius: 14px; text-align: center; font: 600 12.5px/1.3 var(--sans, sans-serif);
  color: #f6e3b0; background: rgba(9, 22, 26, .92); border: 1px solid rgba(226, 185, 104, .55); box-shadow: 0 6px 22px rgba(0, 0, 0, .25), 0 0 18px rgba(236, 213, 158, .25);
  opacity: 0; transition: opacity .3s; transform: translate3d(-400px, -400px, 0); }
.spr-bub.on { opacity: 1; }
.spr-lit { position: fixed; left: 0; top: 0; z-index: 64; pointer-events: none; opacity: 0; transition: opacity .3s; border-radius: 999px;
  box-shadow: 0 0 0 1.5px rgba(255, 238, 190, .9), 0 0 22px 4px rgba(236, 200, 120, .55), 0 0 60px 10px rgba(236, 200, 120, .22); }
.spr-lit.on { opacity: 1; }

/* first-visit intro */
.spr-intro { position: fixed; inset: 0; z-index: 63; pointer-events: none; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 46%, #183f4a 0%, #0e2730 45%, #07151a 100%); transition: opacity .5s ease; }
.spr-intro.out { opacity: 0; }
.spr-intro-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; transform: translateY(6vh) scale(.86); opacity: 0; transition: opacity .5s ease, transform .7s cubic-bezier(.2, .9, .3, 1.2); }
.spr-intro.logo .spr-intro-logo { opacity: 1; transform: translateY(4vh) scale(1); }
.spr-intro-logo svg { width: 64px; height: 64px; }
.spr-intro-logo b { font: 700 clamp(26px, 5vw, 40px)/1 var(--serif, Georgia, serif); color: #f4ecdd; letter-spacing: .02em; }
.spr-skip { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 68; border: 1px solid rgba(226, 185, 104, .5); background: rgba(9, 22, 26, .6); color: #f6e3b0;
  border-radius: 999px; padding: 7px 14px; font: 600 12.5px var(--sans, sans-serif); cursor: pointer; transition: opacity .4s; }
.spr-skip.out { opacity: 0; pointer-events: none; }

/* inline loader (replaces spinners / "…") */
.spr-inl { display: inline-flex; align-items: center; gap: 10px; color: var(--muted, #74848a); font-size: 13px; vertical-align: middle; }
.spr-inl svg { width: 40px; height: 40px; flex: none; overflow: visible; }
.spr-inl .spr-orb { animation: sprSpin 1.15s linear infinite; }
.spr-inl .spm { animation: sprPulse 1.6s ease-in-out infinite; }
.spr-inl.lg { flex-direction: column; gap: 12px; }
.spr-inl.lg svg { width: 76px; height: 76px; }
.spr-inl.sm svg { width: 22px; height: 22px; }
.spr-inl.sm { margin-right: 2px; }
@keyframes sprSpin { to { transform: rotate(360deg); } }
.spr-pl { min-height: 50vh; display: grid; place-items: center; padding: 40px 16px; }
.spr-on .spr-pl .spr-inl svg { opacity: 0; } /* the live companion takes over the placeholder */
.spr-gal { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2; background: radial-gradient(circle at 50% 50%, rgba(22, 50, 58, .55), rgba(14, 33, 38, .0) 60%); transition: opacity .6s; }
.spr-gal.done { opacity: 0; } .spr-gal.done svg { transform: scale(1.8); opacity: 0; transition: transform .55s cubic-bezier(.2, .8, .3, 1), opacity .55s; }
#results[aria-busy="true"] { opacity: .55; transition: opacity .25s; }
#results { transition: opacity .3s; }

/* footer toggle */
.spr-tog { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: rgba(255, 255, 255, .75); border-radius: 999px; padding: 3px 10px 3px 6px; font: inherit; font-size: 12px; cursor: pointer; }
.spr-tog:hover, .spr-tog:focus-visible { color: #f6e3b0; border-color: rgba(226, 185, 104, .6); }
.spr-tog[aria-pressed="false"] { opacity: .7; }
.spr-tog svg { width: 22px; height: 18px; overflow: visible; }

/* inline sprite icon (Featured / premium badges) */
.spr-ic { width: 1.55em; height: 1.2em; vertical-align: -.28em; margin: 0 .25em 0 -.2em; overflow: visible; }

/* favourites */
.fav { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: rgba(19, 36, 42, .72); color: #fff; transition: transform .2s, background .2s; -webkit-tap-highlight-color: transparent; }
.fav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .25s; }
.fav:hover { transform: scale(1.08); background: rgba(19, 36, 42, .88); }
.fav:focus-visible { outline: 2px solid var(--gold-2, #d2a75f); outline-offset: 2px; }
.fav.on { color: #f1cf86; background: rgba(19, 36, 42, .9); }
.fav.on svg { fill: currentColor; animation: favPop .45s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes favPop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.gal .fav { top: 12px; bottom: auto; right: 12px; width: 44px; height: 44px; z-index: 3; }

@media (prefers-reduced-motion: reduce) {
  .spr *, .spr-inl *, .fav svg, .spr-intro-logo { animation: none !important; transition: none !important; }
  .spr-inl .spr-orb { opacity: .8; }
}
.spr.still .spr-b, .spr.still .sp-wr, .spr.still .sp-wl, .spr.still .sp-glow, .spr.still .sp-halo, .spr.still .sp-star { animation: none; }
@media print { .spr, .spr-cv, .spr-bub, .spr-lit, .spr-intro, .spr-skip, .spr-tog, .fav { display: none !important; } }
