:root {
  --blue: #2f6bff;
  --amber: #f5b84a;
  --amber-strong: #b9760a;
  --bg: #f5f7fc;
  --text: #0d0f12;
  --muted: #5a6479;
  --line: #dde3f0;
}
[data-role="ksz"] { --owl-b: #e52336; --owl-f: #f7a3ab; --owl-l: #f5b84a; --owl-w: #ffffff; --owl-d: #243050; }
[data-role="zarzadca"] { --owl-b: #2f6bff; --owl-f: #9db8ff; --owl-l: #f5b84a; --owl-w: #ffffff; --owl-d: #0d0f12; }
[data-role="wykonawca"] { --owl-b: #3ddc97; --owl-f: #b6f3d8; --owl-l: #f5b84a; --owl-w: #ffffff; --owl-d: #0d0f12; }
[data-role="recenzent"] { --owl-b: #f5b84a; --owl-f: #fde3b0; --owl-l: #ffffff; --owl-w: #ffffff; --owl-d: #0d0f12; }
[data-role="wdrozeniowiec"] { --owl-b: #b388ff; --owl-f: #e2d1ff; --owl-l: #f5b84a; --owl-w: #ffffff; --owl-d: #0d0f12; }
[data-role="nadzorca"] { --owl-b: #4dd0e1; --owl-f: #c2f1f7; --owl-l: #f5b84a; --owl-w: #ffffff; --owl-d: #0d0f12; }
.cB { fill: var(--owl-b); transition: fill .3s; }
.cF { fill: var(--owl-f); transition: fill .3s; }
.cL { fill: var(--owl-l); transition: fill .3s; }
.cW { fill: var(--owl-w); }
.cD { fill: var(--owl-d); }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.home {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.scene {
  --s: 84px;
  --fy: 36px;
  position: relative;
  width: 100%;
  height: calc(var(--s) * 2 + var(--fy) + 24px);
  overflow: hidden;
}
.floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--fy) - 4px);
  height: 4px;
  background: var(--line);
}
.walker {
  position: absolute;
  left: 0;
  bottom: var(--fy);
  width: var(--s);
  height: var(--s);
  transform: translateX(0);
  transition: transform var(--dur, 0ms) linear;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.shadow {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -5px;
  height: 7px;
  border-radius: 50%;
  background: rgba(13, 15, 18, .12);
}
.flip, .lean, .hop {
  position: absolute;
  inset: 0;
}
.flip { transition: transform .24s ease-in-out; }
.lean { transform-origin: 50% 100%; }
.hop { transform-origin: 50% 100%; }
.face {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  image-rendering: pixelated;
}
.head {
  transform-origin: 7px 8px;
  transform: translate(0, var(--hy, 0px)) rotate(var(--tilt, 0deg));
  transition: transform .18s ease-out;
}
.pupils {
  transform: translate(var(--lx, 0px), var(--ly, 0px));
  transition: transform .12s ease-out;
}
.lid {
  transform-origin: 0 4px;
  transform: scaleY(0);
  transition: transform .07s linear;
}
.blink .lid, .closed .lid { transform: scaleY(1); }
.wingL { transform-origin: 3px 8px; }
.wingR { transform-origin: 11px 8px; }
.seed {
  position: absolute;
  left: 0;
  bottom: var(--fy);
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background: var(--amber-strong);
  display: none;
}
.seed.show { display: block; }
.badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 8px;
  max-width: min(92vw, 420px);
  margin: 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  color: var(--text);
  text-align: center;
  font-size: 15px;
}
.badge .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--owl-b);
  border: 1px solid rgba(13, 15, 18, .25);
  flex: none;
  transition: background .3s;
}
.badge .role { font-weight: 700; }
.badge .desc { color: var(--text); }
.caption {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .28em;
  text-indent: .28em;
  color: var(--muted);
  user-select: none;
  -webkit-user-select: none;
}
.z {
  position: absolute;
  left: 64%;
  top: 2%;
  font-weight: 700;
  font-size: calc(var(--s) * .2);
  color: var(--blue);
  pointer-events: none;
  opacity: 0;
  animation: floatz 2.2s ease-out forwards;
}

.walking .lean { animation: waddle .4s ease-in-out infinite alternate; }
.walking .hop { animation: stepbob .2s ease-out infinite alternate; }
.walking .footL { animation: footA .4s steps(1) infinite; }
.walking .footR { animation: footB .4s steps(1) infinite; }
.morphing .hop { animation: morph .7s ease-in-out; }
.morphing .shadow { animation: shadowjump .7s ease-out; }
.hopping .hop { animation: jump .52s cubic-bezier(.3, .7, .4, 1); }
.hopping .shadow { animation: shadowjump .52s ease-out; }
.flapping .wingL { animation: flapL .16s ease-in-out infinite alternate; }
.flapping .wingR { animation: flapR .16s ease-in-out infinite alternate; }
.flapping .hop { animation: lift .32s ease-in-out infinite alternate; }
.shaking .lean { animation: shake .09s linear infinite alternate; }
.dancing .lean { animation: dance .46s ease-in-out infinite alternate; }
.dancing .hop { animation: stepbob .23s ease-out infinite alternate; }
.sleeping .hop { animation: breathe 2.4s ease-in-out infinite; }
.pecking .hop { animation: peckdip .22s ease-in-out infinite alternate; }
.paused *, .paused *::before, .paused *::after { animation-play-state: paused !important; }

@keyframes waddle { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes stepbob { from { transform: translateY(0); } to { transform: translateY(-5%); } }
@keyframes footA { 0% { transform: translateY(-.9px); } 50% { transform: translateY(0); } }
@keyframes footB { 0% { transform: translateY(0); } 50% { transform: translateY(-.9px); } }
@keyframes morph {
  0% { transform: scale(1, 1); filter: none; }
  35% { transform: scale(.05, 1.15); filter: brightness(1.8); }
  50% { transform: scale(.05, 1.15) translateY(-10%); filter: brightness(2); }
  100% { transform: scale(1, 1); filter: none; }
}
@keyframes jump {
  0% { transform: translateY(0) scale(1.08, .88); }
  20% { transform: translateY(0) scale(.96, 1.06); }
  55% { transform: translateY(-48%) scale(.98, 1.04); }
  85% { transform: translateY(0) scale(1.08, .9); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes shadowjump { 0%, 100% { transform: scale(1); opacity: 1; } 55% { transform: scale(.6); opacity: .5; } }
@keyframes flapL { from { transform: rotate(0deg); } to { transform: rotate(52deg); } }
@keyframes flapR { from { transform: rotate(0deg); } to { transform: rotate(-52deg); } }
@keyframes lift { from { transform: translateY(0); } to { transform: translateY(-8%); } }
@keyframes shake { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes dance { from { transform: rotate(-11deg); } to { transform: rotate(11deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.02, .96); } }
@keyframes peckdip { from { transform: translateY(0); } to { transform: translateY(3%); } }
@keyframes floatz {
  0% { opacity: 0; transform: translate(0, 0) scale(.7); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--s) * .25), calc(var(--s) * -.55)) scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .walker, .flip, .head, .pupils { transition: none; }
  .cB, .cF, .cL, .badge .dot { transition: none; }
  .walking .lean, .walking .hop, .walking .footL, .walking .footR { animation: none; }
}
