/* ==========================================================================
   v16 · sound toggle · progress bar · padlock bubble · sound test ·
   Smocza wieża · Smoczy puchar · Skarbiec · zagadki · łazienka · sklepik
   (loaded after castle15.css; castle path only unless noted)
   ========================================================================== */

/* —— top bar: sound toggle —— */
.tb-right { display: flex; align-items: center; gap: .35rem; }
.tb-snd {
  appearance: none; cursor: pointer; padding: 0; flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 28%, #FFFDF4 0 30%, #F4E2BC 100%);
  border: 2.5px solid #C99A3C; box-shadow: 0 3px 0 #8E6420, 0 5px 8px rgba(74,31,92,.18);
  transition: transform .12s ease, filter .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.tb-snd svg { width: 24px; height: 24px; display: block; }
.tb-snd:active { transform: translateY(2px) scale(.94); box-shadow: 0 1px 0 #8E6420; }
.tb-snd.is-off { filter: saturate(.35); }
.tb-snd.is-off svg { opacity: .75; }
@media (hover: hover) { .tb-snd:hover { transform: translateY(-1px) rotate(-6deg); } }
body.world-trasa .tb-snd { background: radial-gradient(circle at 35% 28%, #F4FAFF 0 30%, #CFE3FF 100%); border-color: #1E5FB8; box-shadow: 0 3px 0 #123F80; }

/* —— top bar: name + overall progress —— */
.tb-pet-row { display: inline-flex; align-items: center; gap: .45rem; min-width: 0; max-width: 100%; }
.tb-pet-row .tb-pet { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tb-prog { display: inline-flex; align-items: center; gap: .22rem; flex: 0 0 auto; }
.tb-prog img { width: 18px; height: 18px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(90,50,20,.35)); }
.tb-prog-track { position: relative; width: 64px; height: 9px; border-radius: 999px; overflow: hidden; background: #EADBC0; box-shadow: inset 0 1px 2px rgba(90,50,20,.35), 0 0 0 1.5px #C99A3C; }
.tb-prog-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, #C58BEA, #8E4FC0 55%, #F2C24E); transition: width .6s ease; }
.tb-prog b { font-size: .66rem; font-weight: 800; color: #7A4A9A; line-height: 1; }
body.world-trasa .tb-prog-track { background: #DCE8F8; box-shadow: inset 0 1px 2px rgba(20,40,90,.3), 0 0 0 1.5px #1E5FB8; }
body.world-trasa .tb-prog-track i { background: linear-gradient(90deg, #5FB0FF, #1E6FD4 60%, #FFB020); }
body.world-trasa .tb-prog b { color: #1E5FB8; }
@media (max-width: 420px) { .tb-prog-track { width: 46px; } .tb-prog b { display: none; } }
@media (orientation: landscape) and (max-height: 420px) { .tb-prog-track { width: 56px; } }

/* —— padlock: hold ring + bubble —— */
.tb-lock { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tb-lock.js-hold .hold-ring circle { animation: none; transition: none; }
.tb-lock.nudge .tb-lock-ico img { animation: lockNudge .45s ease; }
@keyframes lockNudge { 0%,100% { transform: none; } 25% { transform: rotate(-14deg); } 60% { transform: rotate(10deg); } }
.lock-bubble {
  position: fixed; z-index: 10000; display: flex; align-items: center; gap: .5rem;
  padding: .45rem .8rem .45rem .45rem; border-radius: 16px; pointer-events: none;
  font: 800 .92rem/1.1 'Baloo 2', system-ui, sans-serif; color: #4A1F5C;
  background: linear-gradient(180deg, #FFFDF6, #F4E4C6); border: 2.5px solid #C99A3C;
  box-shadow: 0 4px 0 #8E6420, 0 10px 18px rgba(74,31,92,.25);
  animation: lbIn .28s cubic-bezier(.3,1.6,.5,1) both;
}
.lock-bubble::before { content: ""; position: absolute; top: -9px; right: 18px; width: 14px; height: 14px; background: #FFFDF6; border-left: 2.5px solid #C99A3C; border-top: 2.5px solid #C99A3C; transform: rotate(45deg); }
.lock-bubble.is-out { opacity: 0; transform: translateY(-6px); transition: opacity .3s ease, transform .3s ease; }
.lb-ring { position: relative; width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; }
.lb-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.lb-ring circle { fill: #FFF6DE; stroke: #F2C24E; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: lbRing 3s linear infinite; }
.lb-ring img { position: relative; width: 18px; height: auto; }
@keyframes lbIn { from { opacity: 0; transform: translateY(-8px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes lbRing { to { stroke-dashoffset: 0; } }

/* —— parent: sound test —— */
.pc-test-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .5rem 0 .2rem; }
.pc-test { display: inline-flex; align-items: center; gap: .35rem; }
.pc-test svg { width: 20px; height: 20px; }
.pc-diag { margin: 0; font-size: .74rem; font-weight: 700; color: #7A5A44; line-height: 1.25; flex: 1 1 200px; min-width: 0; }
.pc-diag.is-ok { color: #2E7D4A; }
.pc-diag.is-bad { color: #B8306A; }

/* —— map: playroom-linked levels —— */
.level-node--pr .badge { background: linear-gradient(180deg, #A465D6, #5A2370) !important; color: #FFE9A6 !important; }

/* ==========================================================================
   Pokój zabaw menu — 9 games, 3 per page, subtitles wrap
   ========================================================================== */
.pr-page.pr-games { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
body.world-zamek .hub-btn.cplq.pr-card { max-width: 168px; }
.pr-card-sub { white-space: normal; text-align: center; line-height: 1.12; display: block; max-width: 100%; overflow-wrap: anywhere; min-height: 2.2em; }
@media (orientation: portrait) {
  .pr-page.pr-games { gap: .45rem .35rem; }
  body.world-zamek .hub-btn.cplq.pr-card { max-width: 118px; padding: .45rem .2rem .4rem; }
  .pr-card .cplq-win { width: 72px; height: 64px; }
  .pr-card .cplq-lab { font-size: .8rem; }
  .pr-card-sub { font-size: .62rem; }
}

/* ==========================================================================
   (f) Smocza wieża — floors × bricks
   ========================================================================== */
.pr-game--tower .pr-dragon, .pr-game--relay .pr-dragon, .pr-game--vault .pr-dragon { display: none; }
.pr-field--tower { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; align-items: end; gap: .3rem 1.2rem; padding: .2rem 4.6rem .3rem 1rem; }
.tw-side { display: flex; flex-direction: column; align-items: center; gap: .5rem; align-self: center; }
.tw-pile {
  appearance: none; cursor: pointer; position: relative; font-family: inherit; padding: .35rem .5rem .4rem;
  width: 128px; display: flex; flex-direction: column; align-items: center; gap: .2rem;
  border-radius: 18px; background: linear-gradient(180deg, #FFFDF6, #F1DDB8); border: 3px solid #C99A3C;
  box-shadow: 0 4px 0 #8E6420, 0 10px 14px rgba(74,31,92,.2);
  transition: transform .12s ease, opacity .3s ease, filter .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.tw-pile:active { transform: translateY(3px); box-shadow: 0 1px 0 #8E6420; }
.tw-pile.is-empty { opacity: .45; filter: saturate(.4); pointer-events: none; }
.tw-pile-heap { position: relative; width: 96px; height: 52px; display: block; }
.tw-pile-heap img { position: absolute; width: 40px; height: auto; filter: drop-shadow(0 2px 1px rgba(80,30,10,.35)); }
.tw-pile-heap img:nth-child(1) { left: 0; bottom: 0; }
.tw-pile-heap img:nth-child(2) { left: 28px; bottom: 0; }
.tw-pile-heap img:nth-child(3) { left: 56px; bottom: 0; }
.tw-pile-heap img:nth-child(4) { left: 14px; bottom: 17px; }
.tw-pile-heap img:nth-child(5) { left: 42px; bottom: 17px; }
.tw-pile-heap img:nth-child(6) { left: 28px; bottom: 34px; }
.tw-pile-lab { font-size: .82rem; font-weight: 800; color: #5A2370; line-height: 1.05; text-align: center; }
.tw-pile-lab b { font-size: 1.25rem; color: #C98A1E; -webkit-text-stroke: .6px #5A2370; }
.tw-pile:not(.is-empty) { animation: twPulse 1.8s ease-in-out infinite; }
@keyframes twPulse { 0%,100% { box-shadow: 0 4px 0 #8E6420, 0 10px 14px rgba(74,31,92,.2); } 50% { box-shadow: 0 4px 0 #8E6420, 0 0 0 5px rgba(246,203,82,.45), 0 10px 14px rgba(74,31,92,.2); } }
.tw-plan { font-size: .9rem; font-weight: 800; color: #4A1F5C; background: rgba(255,250,238,.92); border: 2px solid #C99A3C; border-radius: 12px; padding: .15rem .6rem; box-shadow: 0 2px 0 #8E6420; white-space: nowrap; }
.tw-plan b { color: #B8306A; font-size: 1.1em; }
.tw-hand { position: absolute; right: -18px; bottom: -14px; width: 54px; height: auto; pointer-events: none; animation: twTap 1.2s ease-in-out infinite; filter: drop-shadow(0 4px 4px rgba(60,25,70,.35)); }
@keyframes twTap { 0%,100% { transform: translate(0,0) rotate(-12deg); } 50% { transform: translate(-6px,-8px) rotate(-12deg) scale(.92); } }

.tw-site { --bw: clamp(22px, calc(300px / var(--b)), 40px); position: relative; justify-self: center; align-self: end; display: flex; flex-direction: column; align-items: center; min-width: 180px; }
.tw-floors { display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; }
.tw-floor { position: relative; display: flex; align-items: center; animation: none; }
.tw-row { display: flex; gap: 1px; padding: 3px 4px; border-radius: 6px; background: linear-gradient(180deg, rgba(210,180,140,.55), rgba(170,130,90,.5)); box-shadow: inset 0 -2px 0 rgba(110,70,30,.35); }
.tw-row img { width: var(--bw); height: auto; display: block; opacity: 0; transform: translateY(-40px) scale(.8); filter: drop-shadow(0 1px 1px rgba(80,30,10,.35)); }
.tw-row img.is-in { opacity: 1; transform: none; transition: transform .26s cubic-bezier(.3,1.6,.5,1), opacity .12s ease; }
.tw-sum { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%) scale(0); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.tw-floor.is-done .tw-sum { transform: translateY(-50%) scale(1); }
.tw-sum b { display: grid; place-items: center; min-width: 34px; height: 28px; padding: 0 6px; border-radius: 10px; font-size: 1.05rem; font-weight: 800; color: #FFE27A; background: linear-gradient(180deg, #8E4FC0, #5A2370); box-shadow: inset 0 0 0 1.5px #E9C46A, 0 2px 0 #3A1248; }
.tw-floor:not(:last-child) .tw-sum b { opacity: .6; transform: scale(.85); }
.tw-base { width: calc(var(--b) * (var(--bw) + 1px) + 28px); height: 14px; margin-top: 2px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #B98A55, #7E5528); box-shadow: 0 3px 0 #4E3315, 0 6px 8px rgba(60,25,10,.25); }
.tw-site.is-win .tw-floors { animation: goodPop .7s cubic-bezier(.3,1.6,.5,1); filter: drop-shadow(0 0 12px rgba(255,226,122,.95)); }
.tw-flag { position: absolute; left: 50%; bottom: 100%; width: 54px; height: auto; transform: translate(-50%, 4px); animation: twFlag .6s cubic-bezier(.3,1.6,.5,1) both; filter: drop-shadow(0 0 8px rgba(255,236,160,.9)); }
@keyframes twFlag { from { transform: translate(-50%, -30px) scale(.3); opacity: 0; } to { transform: translate(-50%, 4px) scale(1); opacity: 1; } }
.pr-field--tower .pr-choices { grid-column: 1 / -1; }
.pr-field--tower.is-ask .tw-side { opacity: .5; pointer-events: none; }
@media (orientation: landscape) and (max-height: 500px) {
  .tw-site { --bw: clamp(18px, calc(250px / var(--b)), 30px); }
  .tw-pile { width: 112px; padding: .25rem .4rem .3rem; }
  .tw-pile-heap { transform: scale(.85); height: 44px; }
  .tw-plan { font-size: .8rem; }
  .pr-field--tower { padding-right: 4.4rem; }
}
@media (orientation: portrait) {
  .pr-field--tower { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto auto; padding: .4rem .3rem 1rem; justify-items: center; }
  .tw-side { order: 2; flex-direction: row; align-self: center; }
  .tw-site { --bw: clamp(18px, calc(250px / var(--b)), 34px); order: 1; }
  .pr-field--tower .pr-choices { order: 3; }
}

/* ==========================================================================
   (g) Smoczy puchar — staircase, the pet hops a step per answer
   ========================================================================== */
.pr-field--relay { grid-template-columns: minmax(0, 1fr) minmax(260px, 1.15fr); padding: .2rem 4.6rem .2rem 1rem; align-items: stretch; }
.cu-stairs { --sw: clamp(30px, calc(100% / (var(--n) + 1.6)), 54px); --sh: clamp(16px, calc((100% - 70px) / (var(--n) + 1)), 26px); position: relative; align-self: stretch; min-height: 200px; }
.cu-step { position: absolute; left: calc(var(--i) * var(--sw)); bottom: 0; width: calc(var(--sw) + 2px); height: calc((var(--i) + 1) * var(--sh)); display: flex; flex-direction: column; align-items: center; transition: filter .3s ease; }
.cu-step img { width: 100%; height: calc(var(--sh) + 6px); object-fit: fill; display: block; filter: drop-shadow(0 2px 1px rgba(60,30,20,.35)); }
.cu-step::after { content: ""; flex: 1 1 auto; width: 100%; margin-top: -3px; border-radius: 0 0 4px 4px; background: linear-gradient(180deg, #E7D3B0, #C7A877); box-shadow: inset 0 0 0 1.5px rgba(150,110,60,.45); }
.cu-step b { position: absolute; top: calc(var(--sh) + 6px); left: 50%; transform: translateX(-50%); font-size: .78rem; font-weight: 800; color: #8E6420; line-height: 1.2; z-index: 1; }
.cu-step.is-done img { filter: drop-shadow(0 0 5px rgba(255,226,122,.95)) drop-shadow(0 2px 1px rgba(60,30,20,.35)); }
.cu-step.is-done b { color: #5A2370; }
.cu-step.is-land img { animation: cuLand .45s ease; }
@keyframes cuLand { 0%,100% { transform: none; } 40% { transform: translateY(3px) scaleY(.9); } }
.cu-step--top::after { background: linear-gradient(180deg, #F6D77A, #C98A1E); }
.cu-cup { position: absolute; left: calc(var(--n) * var(--sw) + var(--sw) * .5); bottom: calc((var(--n) + 1) * var(--sh) + 2px); width: 58px; transform: translateX(-50%); z-index: 2; line-height: 0; }
.cu-cup img { width: 100%; height: auto; filter: drop-shadow(0 0 8px rgba(255,236,160,.85)) drop-shadow(0 4px 4px rgba(60,30,20,.3)); animation: fruitBob 2s ease-in-out infinite; }
.cu-cup.is-win img { animation: cuWin 1s cubic-bezier(.3,1.6,.5,1) 3; filter: drop-shadow(0 0 22px rgba(255,236,160,1)); }
@keyframes cuWin { 0%,100% { transform: none; } 40% { transform: translateY(-14px) scale(1.25) rotate(-6deg); } 70% { transform: scale(1.1) rotate(5deg); } }
.cu-pet { --st: 0; position: absolute; z-index: 3; line-height: 0; pointer-events: none;
  left: calc(var(--st) * var(--sw) + var(--sw) * .5); bottom: calc((var(--st) + 1) * var(--sh) + 2px);
  transform: translateX(-50%); transition: left .55s cubic-bezier(.35,.1,.4,1), bottom .55s cubic-bezier(.3,1.5,.5,1); }
.cu-pet .cu-pet-img { height: min(20vh, 84px); }
.cu-pet.is-hop .pet-sprite { animation: petHop .6s cubic-bezier(.3,.8,.4,1); }
.cu-stairs.is-win .cu-pet .pet-sprite { animation: petHop .6s cubic-bezier(.3,.8,.4,1) 3; }
.cu-stairs .cu-pet .hub-pet-name, .cu-stairs .cu-pet .pet-shadow { display: none; }
@media (orientation: landscape) and (max-height: 500px) {
  .cu-pet .cu-pet-img { height: 62px; }
  .cu-cup { width: 46px; }
  .rl-btn.pr-medal { width: 64px; height: 64px; font-size: 1.7rem; }
  .rl-left { gap: .6rem; }
}
@media (orientation: portrait) {
  .pr-field--relay { grid-template-columns: 1fr; grid-template-rows: auto minmax(220px, 1fr); padding: .5rem .5rem 1rem; }
  .cu-stairs { width: 100%; min-height: 240px; --sw: clamp(26px, calc((100vw - 40px) / (var(--n) + 1.6)), 48px); }
  .rl-choices.pr-choices { flex-wrap: wrap; }
}

/* ==========================================================================
   (h) Skarbiec — drag bars (10) and coins (1)
   ========================================================================== */
.pr-field--vault { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: .2rem 4.6rem .3rem 1rem; }
.vx { display: grid; grid-template-columns: auto minmax(200px, 270px) auto; align-items: center; gap: .6rem 1.1rem; }
.vx-src, .vx-shop { display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.vx-pile {
  position: relative; cursor: grab; touch-action: none; width: 108px; height: 76px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 4px;
  background: linear-gradient(180deg, #FFFDF6, #F1DDB8); border: 3px solid #C99A3C; box-shadow: 0 4px 0 #8E6420, 0 8px 12px rgba(74,31,92,.18);
  -webkit-user-select: none; user-select: none; transition: transform .12s ease;
}
.vx-pile.is-grab { transform: translateY(2px) scale(.97); }
.vx-pile-heap { position: relative; width: 80px; height: 44px; display: block; }
.vx-pile-heap img { position: absolute; left: calc(var(--i) * 14px + 4px); bottom: calc(var(--i) * 3px); width: 46px; height: auto; pointer-events: none; filter: drop-shadow(0 2px 1px rgba(80,50,10,.35)); }
.vx-pile--o .vx-pile-heap img { width: 32px; left: calc(var(--i) * 12px + 10px); bottom: calc(var(--i) % 2 * 9px); }
.vx-pile-lab { position: absolute; right: -10px; top: -10px; min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: 1rem; font-weight: 800; color: #FFE27A; background: linear-gradient(180deg, #8E4FC0, #5A2370); box-shadow: inset 0 0 0 1.5px #E9C46A, 0 2px 0 #3A1248; }
.vx-chest { position: relative; width: 100%; line-height: 0; }
.vx-chest-img { width: 100%; height: auto; display: block; pointer-events: none; filter: drop-shadow(0 8px 8px rgba(60,25,70,.3)); }
.vx-chest.is-target .vx-chest-img { filter: drop-shadow(0 0 14px rgba(255,226,122,1)) drop-shadow(0 8px 8px rgba(60,25,70,.3)); }
.vx-chest.is-gulp .vx-chest-img { animation: vxGulp .32s ease; }
@keyframes vxGulp { 0%,100% { transform: none; } 45% { transform: scale(1.05, .95); } }
.vx-chest.is-win .vx-chest-img { filter: drop-shadow(0 0 18px rgba(255,226,122,1)) drop-shadow(0 8px 8px rgba(60,25,70,.3)); animation: goodPop .7s cubic-bezier(.3,1.6,.5,1); }
.vx-in { position: absolute; left: 13%; right: 13%; top: 8%; height: 50%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.vx-in-t, .vx-in-o { display: flex; flex-wrap: wrap-reverse; justify-content: center; gap: 1px 2px; max-width: 100%; }
.vx-piece { cursor: grab; touch-action: none; line-height: 0; display: block; }
.vx-piece img { display: block; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(80,50,10,.4)); }
.vx-piece--t img { height: 20px; width: auto; }
.vx-piece--o img { height: 19px; width: 19px; }
.vx-in-o.is-many .vx-piece--o img { height: 15px; width: 15px; }
.vx-piece.is-new { animation: fruitDrop .32s cubic-bezier(.3,1.6,.5,1) both; }
.vx-piece.is-lift { opacity: .3; }
.vx-piece.is-merge { transition: transform .6s cubic-bezier(.5,0,.6,1), opacity .6s ease; transform: translate(var(--dx), var(--dy)) scale(.4); opacity: .2; }
.vx-piece.is-split { animation: vxSplit .6s ease forwards; }
@keyframes vxSplit { 0% { transform: none; } 40% { transform: scale(1.3) rotate(-8deg); filter: brightness(1.5); } 100% { transform: scale(0); opacity: 0; } }
.vx-msg { position: absolute; left: 50%; top: -14px; transform: translate(-50%, -100%); white-space: nowrap; line-height: 1.1; font-size: .86rem; font-weight: 800; color: #5A2370; background: #FFF6DE; border: 2px solid #C99A3C; border-radius: 12px; padding: .15rem .55rem; box-shadow: 0 2px 0 #8E6420; opacity: 0; pointer-events: none; z-index: 4; }
.vx-msg.is-on { animation: vxMsg 2.4s ease both; }
@keyframes vxMsg { 0% { opacity: 0; transform: translate(-50%, -80%) scale(.85); } 12%,80% { opacity: 1; transform: translate(-50%, -100%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -110%); } }
.vx-cnt { display: grid; grid-template-columns: 1fr; gap: .3rem; }
.vx-c { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: .3rem; min-width: 128px; padding: .18rem .45rem; border-radius: 12px; background: rgba(255,250,238,.94); border: 2px solid #C99A3C; box-shadow: 0 2px 0 #8E6420; }
.vx-c img { width: 24px; height: 20px; object-fit: contain; }
.vx-c span { font-size: .74rem; font-weight: 800; color: #7A5A44; line-height: 1; }
.vx-c b { font-size: 1.15rem; font-weight: 800; color: #4A1F5C; line-height: 1; text-align: right; }
.vx-c--mv, .vx-c--sum { grid-template-columns: minmax(0, 1fr) auto; }
.vx-c--sum { background: linear-gradient(180deg, #8E4FC0, #5A2370); border-color: #E9C46A; box-shadow: 0 2px 0 #3A1248; }
.vx-c--sum span { color: #F4DDFF; }
.vx-c--sum b { color: #FFE27A; font-size: 1.35rem; }
.vx-c--sum.is-q b { animation: qPulse 1.3s ease-in-out infinite; }
.vx-c.is-bump b { animation: vxBump .3s ease; }
@keyframes vxBump { 50% { transform: scale(1.3); } }
.vx-shop { position: relative; width: 120px; padding: .4rem .3rem .45rem; border-radius: 16px; background: linear-gradient(180deg, #FFF3F7, #F4D9E4); border: 3px solid #C99A3C; box-shadow: 0 4px 0 #8E6420; gap: .15rem; }
.vx-shop.is-target { box-shadow: 0 4px 0 #8E6420, 0 0 0 5px rgba(246,203,82,.6); }
.vx-shop-img { width: 54px; height: auto; }
.vx-shop-lab { font-size: .9rem; font-weight: 800; color: #5A2370; line-height: 1; }
.vx-shop-in { min-height: 22px; display: flex; justify-content: center; }
.vx-shop-in .vg-t img { height: 14px; } .vx-shop-in .vg-o img { height: 13px; }
.vx-shop-n { font-size: .74rem; font-weight: 800; color: #7A5A44; line-height: 1; }
.vx-shop-n b { color: #B8306A; font-size: 1.05rem; }
.vx-ghost { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, -50%) scale(1.1); filter: drop-shadow(0 8px 8px rgba(60,25,70,.35)); }
.vx-ghost--t { width: 58px; height: auto; }
.vx-ghost--o { width: 40px; height: 40px; }
.vx-ghost.is-moving { transform: translate(-50%, -50%) scale(1.25) rotate(-6deg); }
.vx-eqi { height: 22px; width: auto; vertical-align: -4px; }
.vx-hand { z-index: 30; }
.pr-field--vault .pr-choices { flex: 0 0 auto; }
@media (orientation: landscape) and (max-height: 500px) {
  .vx { grid-template-columns: auto minmax(180px, 220px) auto; gap: .4rem .8rem; }
  .vx-pile { width: 96px; height: 64px; }
  .vx-pile-heap { transform: scale(.85); transform-origin: 50% 100%; }
  .vx-c { min-width: 118px; padding: .1rem .4rem; }
  .vx-c b { font-size: 1rem; } .vx-c--sum b { font-size: 1.15rem; }
  .vx-piece--t img { height: 17px; } .vx-piece--o img { height: 16px; width: 16px; }
  .vx-shop { width: 106px; } .vx-shop-img { width: 40px; }
}
@media (orientation: portrait) {
  .pr-field--vault { padding: .4rem .3rem 1rem; }
  .vx { grid-template-columns: 1fr 1fr; grid-template-areas: "chest chest" "src cnt"; gap: .5rem; justify-items: center; }
  .vx-chest { grid-area: chest; width: min(270px, 74vw); }
  .vx-src, .vx-shop { grid-area: src; }
  .vx-cnt { grid-area: cnt; }
  .vx-c { min-width: 0; width: 100%; }
}

/* ==========================================================================
   Zagadki v16 — ile razy więcej · reszta
   ========================================================================== */
.rd-groups { display: flex; flex-wrap: wrap; gap: .25rem .5rem; max-width: 380px; }
.rd-row--grp { padding: 2px 4px; border-radius: 10px; background: rgba(233,196,106,.22); box-shadow: inset 0 0 0 1.5px rgba(201,154,60,.65); flex-wrap: nowrap; }
.rd-rest { display: flex; align-items: center; gap: .9rem; }
.rd-rest .vg-t img { height: 22px; }
.rd-tag { position: relative; display: flex; flex-direction: column; align-items: center; padding: .25rem .5rem .3rem; border-radius: 12px; background: #FFF3F7; border: 2px solid #C99A3C; box-shadow: 0 2px 0 #8E6420; }
.rd-tag img { width: 44px; height: 44px; object-fit: contain; }
.rd-tag b { display: inline-flex; align-items: center; gap: 2px; font-size: 1.05rem; font-weight: 800; color: #B8306A; line-height: 1; }
.rd-tag b::before { content: ""; width: 16px; height: 16px; background: url('art/ui-moneta.png') center/contain no-repeat; }
@media (orientation: landscape) and (max-height: 500px) {
  .rd-row--grp img { width: 18px; height: 18px; }
  .rd-tag img { width: 34px; height: 34px; }
}

/* fruit: remaining-fruit counter on the basket */
.pr-pile-n { position: absolute; right: -8px; top: -8px; z-index: 3; min-width: 32px; height: 32px; padding: 0 6px; box-sizing: border-box; display: grid; place-items: center; border-radius: 999px; background: linear-gradient(180deg, #8E4FC0, #5A2370); box-shadow: inset 0 0 0 1.5px #E9C46A, 0 2px 0 #3A1248; }
.pr-pile-n b { font-size: 1.05rem; font-weight: 800; color: #FFE27A; line-height: 1; }
.pr-pile.is-empty .pr-pile-n { filter: grayscale(.6); opacity: .6; }

/* ==========================================================================
   Sklepik (kitchen) — wardrobe panel in treats-only mode
   ========================================================================== */
body.room-shop .sky { background-image: url('art/tlo-kuchnia.jpg') !important; background-size: cover !important; background-position: center !important; }
.wd-title { display: flex; align-items: center; gap: .4rem; margin: 0 0 .35rem; padding: .1rem .3rem; font-size: 1.05rem; font-weight: 800; color: #4A1F5C; line-height: 1.1; }
.wd-title img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(60,25,70,.3)); }
.wd-title span { text-shadow: 0 1px 0 #fff; }
@media (orientation: landscape) and (max-height: 500px) { .wd-title { font-size: .92rem; margin-bottom: .2rem; } .wd-title img { width: 24px; height: 24px; } }

/* ==========================================================================
   Łazienka v16 — soap → sponge foam → shower → towel; duck & toothbrush
   ========================================================================== */
body.room-bathroom .sky { background-image: url('art/tlo-lazienka16.jpg') !important; background-size: cover !important; background-position: 50% 100% !important; }
body:has(.bt16) #app { max-width: none; }
.bt16 { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0 !important; }
.bt-stage { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; display: block !important; }
.bt16 .bt-pet-zone { position: absolute !important; left: 50%; bottom: 7%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; z-index: 3; padding: 0 !important; margin: 0 !important; background: transparent !important; box-shadow: none !important; }
.bt16 .bathroom-pet { height: min(46vh, 230px) !important; }
.bt16 .bt-pet-zone .hub-pet-name { margin-top: -4px; }
/* tool tray: gilded shelf on the left (landscape) */
.bt-tray { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); z-index: 5; display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; padding: .5rem; border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,251,240,.94), rgba(243,226,191,.94)); border: 3px solid #C99A3C; box-shadow: inset 0 0 0 2px #FFF6DE, 0 5px 0 #8E6420, 0 12px 18px rgba(74,31,92,.22); }
.bt-tool { appearance: none; cursor: pointer; font-family: inherit; position: relative; width: 84px; padding: .25rem .2rem .3rem; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: .1rem;
  background: linear-gradient(180deg, #FFFFFF, #F6EAD2); border: 2.5px solid #E2C68A; box-shadow: 0 3px 0 #B98C3E; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, filter .2s ease, opacity .2s ease, box-shadow .2s ease; }
.bt-tool-art { width: 58px; height: 50px; display: grid; place-items: center; line-height: 0; }
.bt-tool-art img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(60,30,60,.3)); transition: opacity .15s ease, transform .2s ease; }
.bt-tool-lab { display: flex; align-items: center; gap: .2rem; font-size: .74rem; font-weight: 800; color: #5A2370; line-height: 1; white-space: nowrap; }
.bt-tool-lab b { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; font-size: .68rem; color: #FFE27A; background: linear-gradient(180deg, #8E4FC0, #5A2370); }
.bt-tool.is-next { border-color: #F2C24E; box-shadow: 0 3px 0 #B98C3E, 0 0 0 4px rgba(246,203,82,.55), 0 0 18px rgba(255,226,122,.9); animation: btNext 1.4s ease-in-out infinite; }
.bt-tool.is-next .bt-tool-art img { animation: fruitBob 1.4s ease-in-out infinite; }
@keyframes btNext { 0%,100% { transform: none; } 50% { transform: translateY(-3px); } }
.bt-tool:not(.is-next) { filter: saturate(.75); opacity: .82; }
.bt-tool.is-done { opacity: .9; filter: none; }
.bt-tool.is-done::after { content: "✓"; position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-size: .8rem; font-weight: 800; color: #fff; background: linear-gradient(180deg, #6BCB77, #2E8B57); box-shadow: 0 2px 0 #1E5E3A; }
.bt-tool.is-lifted .bt-tool-art img { opacity: .25; transform: scale(.9); }
.bt-tool.is-nudge { animation: btNudge .5s ease; }
@keyframes btNudge { 0%,100% { transform: none; } 20% { transform: translateX(-5px) rotate(-4deg); } 50% { transform: translateX(5px) rotate(4deg); } 75% { transform: translateX(-3px); } }
.bt-tool--sponge.is-soapy .bt-tool-art::after { content: ""; position: absolute; width: 50px; height: 22px; margin-top: -30px; pointer-events: none;
  background: radial-gradient(circle at 20% 70%, #fff 0 5px, transparent 6px), radial-gradient(circle at 48% 40%, #fff 0 7px, transparent 8px), radial-gradient(circle at 76% 66%, #fff 0 5px, transparent 6px);
  filter: drop-shadow(0 0 2px rgba(190,160,255,.9)); animation: fruitBob 1.2s ease-in-out infinite; }
.bt-tool--sponge .bt-tool-art { position: relative; }
.bt-meter { position: absolute; left: 50%; top: .5rem; transform: translateX(-50%); width: min(240px, 46%); height: 12px; border-radius: 999px; z-index: 4; overflow: hidden;
  background: linear-gradient(180deg, #E3D2B0, #EFE2C6); box-shadow: inset 0 1px 2px rgba(90,50,20,.35), 0 0 0 2px #C99A3C, 0 3px 0 #8E6420; }
.bt-meter i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #B9E4FF, #7FC4F5 50%, #C58BEA); transition: width .25s ease; }
.bt16 .bt-hint { position: absolute; left: 50%; bottom: .3rem; transform: translateX(-50%); z-index: 6; margin: 0; white-space: nowrap; max-width: calc(100% - 1rem); overflow: hidden; text-overflow: ellipsis; }
/* props */
.bt-prop { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; position: absolute; z-index: 4; line-height: 0; touch-action: none; -webkit-tap-highlight-color: transparent; }
.bt-prop img { display: block; pointer-events: none; filter: drop-shadow(0 6px 5px rgba(60,30,40,.3)); }
.bt-duck { right: 24%; bottom: 8%; }
.bt-duck img { width: 76px; height: auto; animation: btBob 2.6s ease-in-out infinite; }
.bt-duck.is-squeak img { animation: btSqueak .45s cubic-bezier(.3,1.6,.5,1); }
.bt-say { position: absolute; left: 60%; top: -18px; font-size: .9rem; font-weight: 800; line-height: 1; color: #C98A1E; -webkit-text-stroke: .5px #5A2370; opacity: 0; pointer-events: none; }
.bt-duck.is-squeak .bt-say { animation: btSay .9s ease both; }
@keyframes btBob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4px) rotate(3deg); } }
@keyframes btSqueak { 0% { transform: scale(1); } 35% { transform: scale(1.18, .78); } 70% { transform: scale(.92, 1.12); } 100% { transform: scale(1); } }
@keyframes btSay { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 25% { opacity: 1; transform: translateY(-4px) scale(1.1); } 100% { opacity: 0; transform: translateY(-20px); } }
.bt-brush { right: 7%; bottom: 30%; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bt-brush img { width: 78px; height: auto; transform: rotate(-12deg); }
.bt-brush.is-lifted img { opacity: .25; }
.bt-prop-lab { font-size: .74rem; font-weight: 800; color: #5A2370; line-height: 1.1; background: rgba(255,250,238,.92); border: 2px solid #C99A3C; border-radius: 8px; padding: .05rem .4rem; box-shadow: 0 2px 0 #8E6420; }
@media (hover: hover) { .bt-prop:hover img { transform: translateY(-3px) rotate(-4deg); } .bt-tool:hover { transform: translateY(-2px); } }
/* ghosts, water, wet look */
.bt-ghost { width: 84px; height: auto; }
.bt-ghost--shower { width: 92px; transform: translate(-30%, -50%) rotate(-8deg); }
.bt-ghost--shower.is-over { transform: translate(-30%, -50%) rotate(-14deg) scale(1.08); }
.bt-ghost--towel { width: 96px; }
.bt-ghost--towel.is-over { animation: btRub .3s ease-in-out infinite; }
@keyframes btRub { 0%,100% { transform: translate(-50%, -50%) rotate(-8deg); } 50% { transform: translate(-50%, -50%) rotate(8deg); } }
.bt-ghost--brush { width: 76px; }
.bt-ghost--brush.is-brushing { transform: translate(-80%, -50%) rotate(-6deg); animation: btBrush .17s ease-in-out infinite; }
@keyframes btBrush { 0%,100% { margin-left: -6px; } 50% { margin-left: 6px; } }
.bt-drop { position: fixed; z-index: 9998; width: 7px; height: 11px; margin: -5px 0 0 -3px; pointer-events: none; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 30%, #fff 0 20%, #9ED8FF 45%, #4FA8E8 100%); box-shadow: 0 0 2px rgba(255,255,255,.8);
  animation: btDrop .65s cubic-bezier(.4,0,1,1) forwards; }
@keyframes btDrop { 0% { transform: translate(0,0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx, 0), 210px) scale(1); opacity: 0; } }
.bt-drips { position: absolute; inset: 0; pointer-events: none; z-index: 6; opacity: 0; transition: opacity .3s ease; }
.pet-sprite.is-wet .bt-drips { opacity: 1; }
.bt-drips i { position: absolute; top: 34%; width: 6px; height: 9px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 30%, #fff 0 20%, #9ED8FF 45%, #4FA8E8 100%); animation: btDrip 1.3s ease-in var(--d, 0s) infinite; }
@keyframes btDrip { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(70px); opacity: 0; } }
.pet-sprite.is-wet .pet-body { filter: saturate(1.15) brightness(.96) drop-shadow(0 0 4px rgba(158,216,255,.8)); }
.bt16 .lather-bubble { width: calc(16px * var(--s, 1)); height: calc(16px * var(--s, 1)); margin: calc(-8px * var(--s, 1)) 0 0 calc(-8px * var(--s, 1)); }
@media (orientation: landscape) and (max-height: 500px) {
  .bt-tray { gap: .3rem; padding: .35rem; left: .4rem; }
  .bt-tool { width: 74px; padding: .15rem .15rem .2rem; }
  .bt-tool-art { width: 50px; height: 40px; }
  .bt16 .bathroom-pet { height: min(48vh, 170px) !important; }
  .bt16 .bt-pet-zone { bottom: 9%; }
  .bt-duck img { width: 60px; } .bt-brush img { width: 64px; }
  .bt-duck { right: 25%; bottom: 10%; } .bt-brush { right: 4.5%; bottom: 28%; }
}
@media (orientation: portrait) {
  body.room-bathroom .sky { background-size: auto 100% !important; background-position: 50% 100% !important; }
  .bt-tray { left: 50%; top: auto; bottom: 2.6rem; transform: translateX(-50%); grid-template-columns: repeat(4, 1fr); gap: .3rem; padding: .35rem; }
  .bt-tool { width: 78px; }
  .bt-tool-art { width: 50px; height: 42px; }
  .bt16 .bt-pet-zone { bottom: calc(2.6rem + 108px); }
  .bt16 .bathroom-pet { height: min(30vh, 220px) !important; }
  .bt-duck { right: 6%; bottom: calc(2.6rem + 112px); } .bt-duck img { width: 62px; }
  .bt-brush { left: 5%; right: auto; bottom: calc(2.6rem + 120px); } .bt-brush img { width: 62px; }
  .bt-meter { width: 62%; }
  .bt16 .bt-hint { white-space: normal; text-align: center; width: calc(100% - 1rem); font-size: .86rem; }
}

/* v16 QA fixes – bathroom */
.bt-tool-art { overflow: visible; }
.bt-tool-art img { width: 100%; height: 100%; min-height: 0; }
@media (orientation: landscape) {
  .bt-meter { left: .6rem; top: .55rem; transform: none; width: 182px; }
  .bt16 .bt-hint { display: block !important; left: .6rem; top: 1.5rem; bottom: auto; transform: none; max-width: 200px; white-space: normal; text-align: left; font-size: .8rem; line-height: 1.2; padding: .3rem .55rem; }
}

/* v16 QA fixes – relay pet size + grounding (sprite has ~9% transparent foot room) */
.cu-pet .pet-sprite .pet-body.cu-pet-img { height: min(20vh, 84px) !important; width: auto !important; }
.cu-pet { margin-bottom: calc(min(20vh, 84px) * -.08); }
@media (orientation: landscape) and (max-height: 500px) {
  .cu-pet .pet-sprite .pet-body.cu-pet-img { height: 70px !important; }
  .cu-pet { margin-bottom: -6px; }
}

/* v16 QA fixes – vault: show the contents on a velvet cushion on the lid so they read clearly */
.vx-in { left: 12%; right: 12%; top: 4%; height: auto; bottom: 47%; padding: 4px 6px; border-radius: 16px 16px 10px 10px; justify-content: center; gap: 3px;
  background: radial-gradient(ellipse at 50% 35%, rgba(126,62,170,.92), rgba(62,22,92,.94)); box-shadow: inset 0 0 0 2px #E9C46A, inset 0 3px 8px rgba(0,0,0,.35), 0 3px 6px rgba(40,10,50,.35); z-index: 2; }
.vx-in:not(:has(.vx-piece))::after { content: "pusto"; font-size: .78rem; font-weight: 800; color: rgba(244,221,255,.75); line-height: 1; }
.vx-piece--t img { height: 24px; }
.vx-piece--o img { height: 22px; width: 22px; }
.vx-in-o.is-many .vx-piece--o img { height: 18px; width: 18px; }
@media (orientation: landscape) and (max-height: 500px) {
  .vx-piece--t img { height: 19px; } .vx-piece--o img { height: 18px; width: 18px; }
  .vx-in-o.is-many .vx-piece--o img { height: 15px; width: 15px; }
}
/* vault ask phase: never wrap into a second column */
.pr-field--vault { flex-wrap: nowrap !important; }
.pr-field--vault .pr-choices { width: auto; max-width: 100%; }
.pr-field--vault.is-ask .vx-src { opacity: .35; pointer-events: none; }
@media (orientation: landscape) and (max-height: 500px) {
  .pr-field--vault.is-ask .vx { grid-template-columns: auto 160px auto; }
  .pr-field--vault.is-ask .vx-src { transform: scale(.8); }
}
.vx-in { top: 3%; bottom: 44%; overflow: hidden; }
.vx-in-t:has(.vx-piece:nth-child(5)) .vx-piece--t img { height: 19px; }
.vx-in-t:has(.vx-piece:nth-child(8)) .vx-piece--t img { height: 16px; }
