/* ===== v26 — one hero size in every room, game and the tutorial (all 3 heroes) =====
   --hero26 = frame edge, set by heroBox() in app.js (0.42 × short side, ≤ 0.30 × long side, ≤ 380px).
   Painted figure ≈ 0.889 × frame for every hero (same art framing), so equal frames = equal heroes. */
html body .pet-sprite .pet-rig { scale: none !important; }
html body.world-zamek .pet-sprite .pet-rig .pet-body.hub-pet-img:not(.cu-pet-img) {
  width: var(--hero26, 340px) !important; height: var(--hero26, 340px) !important;
  max-width: none !important; max-height: none !important; min-width: 0 !important; min-height: 0 !important;
}
html body.world-zamek .hub22 .hub22-pet { --h22: var(--hero26, 340px) !important; }

/* v26 — "tap goes to the place": small Idź chevron chip (no pointing hands) */
.m26-go, .cap26-go {
  display: inline-flex; align-items: center; gap: 2px; font-style: normal;
  font-size: .82rem; font-weight: 800; line-height: 1; letter-spacing: .02em; color: #fff;
  padding: 4px 6px 5px 10px; border-radius: 999px;
  background: linear-gradient(180deg, #B57AE0, #7A3AB0); border: 1.5px solid #5A2370;
  box-shadow: 0 2px 0 #4A1D6E, 0 3px 6px rgba(58,18,72,.22);
}
.m26-go svg, .cap26-go svg { width: 13px; height: 13px; transition: transform .2s ease; }
.m26-go { position: absolute; top: 10px; right: 10px; z-index: 2; }
.r5b-m.is-go26, .qb-m.is-go26, .r5b-day.is-go26[data-go26], .tb-meter.is-go26 { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.r5b-m.is-go26 { transition: transform .15s ease, box-shadow .15s ease; }
.r5b-m.is-go26:hover .m26-go svg, .is-go26:hover .cap26-go svg { transform: translateX(2px); }
.r5b-m.is-go26:active, .qb-m.is-go26:active { transform: translateY(3px) scale(.98); }
.r5b-day.is-go26[data-go26]:active, .tb-meter.is-go26:active { transform: scale(.94); }
.tb-meter.is-go26 { transition: transform .12s ease; }
/* need bubble: tappable, chip on its own line under the words */
.v17-cap.is-go26.is-on { pointer-events: auto; cursor: pointer; }
.v17-cap .cap26-go { margin: 7px auto 0; display: flex; width: max-content; }
.v17-cap.is-go26:active { transform: translate(-50%, 2px) scale(.97); }

/* ==========================================================================
   v26 — hero moods (needs low): painted face overlay + light FX, never a circle/halo under the hero
   ========================================================================== */
.pet-sprite .pet-mood-face { position: absolute; left: 0; top: 0; width: 100%; height: auto; z-index: 3; pointer-events: none; max-width: none; animation: none !important; filter: none !important; }
.pet-sprite .pet-mood-face--kn { top: -9.375%; }
.pet-sprite .pet-mood-face[hidden] { display: none; }
.pet-sprite .pet-mood { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.pet-mood .mfx { position: absolute; display: block; font-style: normal; }
.pet-mood .mfx svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* per-hero anchor points (% of the 512 frame) */
.pet-sprite--smok        { --mz-x: 66%; --mz-y: 4%;  --mt-x: 67%; --mt-y: -8%; --tum-y: 64%; --tum-l: 27%; --tum-r: 57%; --st-x: 72%; --st-y: 2%; }
.pet-sprite--ksiezniczka { --mz-x: 66%; --mz-y: 2%;  --mt-x: 64%; --mt-y: -8%; --tum-y: 60%; --tum-l: 35%; --tum-r: 60%; --st-x: 64%; --st-y: 20%; }
.pet-sprite--chlopiec    { --mz-x: 68%; --mz-y: 0%;  --mt-x: 66%; --mt-y: -10%; --tum-y: 50%; --tum-l: 37%; --tum-r: 62%; --st-x: 66%; --st-y: 18%; }

/* sleepy — droopy eyes (painted lids; Smoczek's own lids drop), slow sway, little zzz */
.pet-sprite.mood-sleepy .pet-lid { animation: none !important; transform: scaleY(.58) !important; }
.pet-sprite.mood-sleepy .pet-rig { animation: petBreathe 4.8s ease-in-out infinite, sleepySway 6s ease-in-out infinite; }
.mfx-z { width: 7%; aspect-ratio: 1; left: var(--mz-x); top: var(--mz-y); opacity: 0; animation: mood26Z 3.6s ease-in-out infinite; }
.mfx-z2 { width: 9%; animation-delay: 1.2s; }
.mfx-z3 { width: 11%; animation-delay: 2.4s; }
@keyframes mood26Z { 0% { opacity: 0; transform: translate(0, 18%) scale(.6) rotate(-8deg); } 20% { opacity: 1; } 75% { opacity: .9; } 100% { opacity: 0; transform: translate(70%, -120%) scale(1) rotate(10deg); } }

/* hungry — sad mouth, grumbling tummy lines, small apple thought bubble */
.pet-sprite.mood-hungry .pet-lid { animation: none !important; transform: scaleY(.24) rotate(var(--lid-rot, 0deg)) !important; }
.pet-sprite.mood-hungry .pet-lid--l { --lid-rot: -12deg; }
.pet-sprite.mood-hungry .pet-lid--r { --lid-rot: 12deg; }
.mfx-think { left: var(--mt-x); top: var(--mt-y); width: 24%; aspect-ratio: 1; animation: mood26Bob 2.8s ease-in-out infinite; transform-origin: 0 100%; }
.mfx-think b { position: absolute; display: block; border-radius: 50%; background: #FFFDF4; border: 2px solid #E2C584; box-shadow: 0 2px 4px rgba(74,31,92,.15); }
.mfx-think .mfx-th1 { width: 9%; height: 9%; left: 0; bottom: 4%; }
.mfx-think .mfx-th2 { width: 15%; height: 15%; left: 10%; bottom: 16%; }
.mfx-think .mfx-cloud { width: 70%; height: 62%; left: 26%; top: 6%; border-radius: 46% 54% 48% 52%; display: grid; place-items: center; }
.mfx-think .mfx-cloud svg { width: 66%; height: 66%; animation: mood26Apple 2.8s ease-in-out infinite; }
@keyframes mood26Bob { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4%) scale(1.03); } }
@keyframes mood26Apple { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.mfx-grum { width: 7%; aspect-ratio: 1; top: var(--tum-y); opacity: 0; animation: mood26Grum 2.4s ease-in-out infinite; }
.mfx-grum1 { left: var(--tum-l); transform: scaleX(-1); }
.mfx-grum2 { left: var(--tum-r); animation-delay: .25s; }
@keyframes mood26Grum { 0%, 40%, 100% { opacity: 0; } 50%, 75% { opacity: .95; } 55% { margin-top: -1%; } 65% { margin-top: 1%; } }
.pet-sprite.mood-hungry .pet-rig { animation: petBreathe 4.2s ease-in-out infinite, mood26Tummy 2.4s ease-in-out infinite; }
@keyframes mood26Tummy { 0%, 45%, 80%, 100% { translate: 0 0; } 52% { translate: -0.6% 0; } 60% { translate: 0.6% 0; } 68% { translate: -0.4% 0; } }

/* dirty — mud spots, stink lines, two little flies */
.pet-sprite.mood-dirty .pet-lid { animation: none !important; transform: scaleY(.3) !important; }
.mfx-mud { width: 10%; aspect-ratio: 4 / 3; opacity: .92; }
.mfx-mud svg { transform: rotate(var(--r, 0deg)); }
.pet-sprite--smok .mfx-mud1 { left: 19%; top: 44%; } .pet-sprite--smok .mfx-mud2 { left: 41%; top: 72%; width: 13%; }
.pet-sprite--smok .mfx-mud3 { left: 64%; top: 86%; width: 8%; } .pet-sprite--smok .mfx-mud4 { left: 24%; top: 62%; width: 8%; }
.pet-sprite--ksiezniczka .mfx-mud1 { left: 58%; top: 41%; width: 6%; } .pet-sprite--ksiezniczka .mfx-mud2 { left: 34%; top: 72%; width: 12%; }
.pet-sprite--ksiezniczka .mfx-mud3 { left: 58%; top: 82%; width: 10%; } .pet-sprite--ksiezniczka .mfx-mud4 { left: 32%; top: 55%; width: 7%; }
.pet-sprite--chlopiec .mfx-mud1 { left: 60%; top: 30%; width: 6%; } .pet-sprite--chlopiec .mfx-mud2 { left: 46%; top: 56%; width: 10%; }
.pet-sprite--chlopiec .mfx-mud3 { left: 40%; top: 78%; width: 9%; } .pet-sprite--chlopiec .mfx-mud4 { left: 64%; top: 84%; width: 8%; }
.mfx-stink { width: 5.5%; aspect-ratio: 20 / 46; left: var(--st-x); top: var(--st-y); opacity: 0; animation: mood26Stink 3s ease-in-out infinite; }
.mfx-st2 { margin-left: 5%; margin-top: -3%; animation-delay: 1s; }
.mfx-st3 { margin-left: 10%; animation-delay: 2s; }
@keyframes mood26Stink { 0% { opacity: 0; transform: translateY(20%) scaleY(.8); } 30% { opacity: .85; } 100% { opacity: 0; transform: translateY(-60%) scaleY(1.1); } }
.mfx-fly { width: 0; height: 0; left: 50%; top: 30%; animation: mood26Orbit 3.4s linear infinite; }
.mfx-fly2 { top: 52%; animation-duration: 4.4s; animation-direction: reverse; animation-delay: -1.5s; }
.mfx-fly span { position: absolute; display: block; width: 5.5vmin; max-width: 26px; min-width: 14px; aspect-ratio: 30 / 24; left: 0; top: 0; translate: -50% -50%; }
.pet-sprite .mfx-fly span { width: calc(var(--hero26, 340px) * .095); max-width: none; min-width: 12px; }
.mfx-fly .mfw { transform-box: fill-box; transform-origin: 50% 100%; animation: mood26Wing .12s linear infinite alternate; }
@keyframes mood26Orbit { 0% { transform: rotate(0deg) translateX(calc(var(--hero26, 340px) * .30)) rotate(0deg); } 100% { transform: rotate(360deg) translateX(calc(var(--hero26, 340px) * .30)) rotate(-360deg); } }
@keyframes mood26Wing { from { transform: scaleY(1); } to { transform: scaleY(.45); } }

/* bored — grumpy face, slumped slow breathing, little "…" */
.pet-sprite.mood-bored .pet-lid { animation: none !important; transform: scaleY(.42) !important; }
.pet-sprite.mood-bored .pet-rig { animation: mood26Slump 5.5s ease-in-out infinite; transform-origin: 50% 91%; }
@keyframes mood26Slump { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.006, .985); } }
.mfx-dots { left: var(--mz-x); top: calc(var(--mz-y) + 4%); width: 15%; aspect-ratio: 44 / 20; padding: 2% 3%; box-sizing: content-box; border-radius: 999px; background: #FFFDF4; border: 2px solid #E2C584; box-shadow: 0 2px 4px rgba(74,31,92,.15); animation: mood26Bob 3.2s ease-in-out infinite; }
.mfx-dots svg circle { animation: mood26Dot 1.8s ease-in-out infinite; }
.mfx-dots svg circle:nth-child(2) { animation-delay: .3s; } .mfx-dots svg circle:nth-child(3) { animation-delay: .6s; }
@keyframes mood26Dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) { .pet-mood .mfx, .pet-mood .mfx * { animation: none !important; opacity: .9; } }
/* the hero sleeping in bed / small portraits never show mood FX */
.bedroom-screen.is-asleep .pet-mood, .wd-thumb .pet-mood { display: none; }
/* gift road: prize days open the Garderoba — tiny chevron tag */
.r5b-day.is-go26[data-go26] { position: relative; }
.r5b-day.is-go26[data-go26]::after {
  content: ""; position: absolute; right: -5px; bottom: -5px; width: 20px; height: 20px; border-radius: 7px;
  background: linear-gradient(180deg, #B57AE0, #7A3AB0) center / 100% 100% no-repeat; border: 1.5px solid #5A2370; box-shadow: 0 2px 0 #4A1D6E;
  -webkit-mask: none;
}
.r5b-day.is-go26[data-go26]::before {
  content: ""; position: absolute; right: 1px; bottom: 1px; width: 10px; height: 10px; z-index: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 2.5L7.8 6 4 9.5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ==========================================================================
   v26b — ONE Wróć arrow everywhere (#wroc26 on <body>, outside every transform)
   ========================================================================== */
html body #wroc26.castle-back {
  position: fixed !important; z-index: 2147483000 !important;
  right: max(10px, env(safe-area-inset-right, 0px)) !important; bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
  left: auto !important; top: auto !important; margin: 0 !important;
  width: 74px !important; min-width: 74px !important; max-width: 74px !important; height: 70px !important; min-height: 70px !important; max-height: 70px !important;
  padding: 0 !important; gap: 2px !important; display: flex !important; flex-direction: column !important; justify-content: flex-end !important; align-items: center !important;
  background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important;
  transform: none; scale: none !important; rotate: none !important; zoom: 1 !important; filter: none !important; opacity: 1 !important; visibility: visible !important;
  pointer-events: auto !important; cursor: pointer; -webkit-tap-highlight-color: transparent; font-size: 16px !important; font-family: inherit !important; color: inherit; box-sizing: border-box !important;
}
html body #wroc26.castle-back[hidden] { display: none !important; }
html body #wroc26.castle-back:active { transform: translateY(3px) scale(.95); }
html body #wroc26 .castle-back-arrow { display: block !important; width: 54px !important; height: 42px !important; flex: none !important; }
html body #wroc26 .castle-back-lab { display: block !important; font-size: 12.16px !important; font-weight: 800 !important; line-height: 1 !important; color: #3E1650 !important;
  padding: 3px 9px 4px !important; margin: 0 !important; border-radius: 8px !important;
  background: linear-gradient(#FFFBF1, #F4E3BF) !important; border: 1.5px solid #C9A14A !important;
  box-shadow: 0 1px 0 rgba(110, 74, 22, .35), 0 3px 6px rgba(58, 18, 72, .18) !important; font-family: inherit; }
/* every other back / close control is replaced by the one arrow (their actions still run through it) */
html body .castle-back:not(#wroc26) { visibility: hidden !important; pointer-events: none !important; }
html body .qb-close, html body .lz-x, html body .st19-back, html body .pg-cancel,
html body .parent-castle [data-act="hub"], html body .story-screen [data-act="back"], html body .success-screen [data-act="hub"] { display: none !important; }

/* v26c — Czystość fills live while washing */
.tb-meter[data-meter="clean"] .tb-meter-fill { transition: width .28s ease-out; }
@keyframes tick26 { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
.tb-meter.is-tick26 .tb-meter-ico { animation: tick26 .32s ease-out; }

/* v29 — kid-friendly compare: yellow vs blue shield, word answers */
.nx-shield.nx-shield--y29 { background: linear-gradient(180deg, #FFD34D, #E5A512); color: #5A3A00; }
.nx-shield.nx-shield--y29 b { text-shadow: 0 2px 0 rgba(255,255,255,.55); }
.nx-shield.nx-shield--b29 { background: linear-gradient(180deg, #6FA8F0, #2F5E9E); color: #FFF7DE; }
.ex21-row .nx-shield { width: 74px; }
.nx-card--compare + .nx-choices button, .nx-choices button { white-space: normal; }
.nx-card--compare + .nx-choices button span { font-size: clamp(.9rem, 2.2vh, 1.15rem); line-height: 1.15; }
/* v29 — 3 lives */
.pr-lives29 { display: inline-flex; gap: 2px; font-size: 1.15rem; line-height: 1; margin-right: 6px; align-items: center; }
.pr-lives29 i { font-style: normal; display: inline-block; transition: transform .3s; }
.pr-lives29 i.is-lost { opacity: .55; transform: scale(.85); }
.pr-lives29.is-hit { animation: lives29 .45s ease; }
@keyframes lives29 { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.pr-out29-hearts { font-size: 2rem; letter-spacing: 4px; margin-bottom: 4px; }
/* v29 — splash: age line */
.st19-age29 { margin: 4px 0 0; font: 800 1.1rem/1.2 inherit; color: #7A3E9D; background: #FFF3D1; border: 2px solid #E9C779; border-radius: 999px; padding: 4px 14px; display: inline-block; }
