/* ===== v24 proto — bigger heroes in Pokój zabaw, calm bathroom, portrait polish ===== */

/* —— Pokój zabaw menu: hero clearly bigger —— */
@media (orientation: landscape) {
  .pr-menu20 .pg19-menu { grid-template-columns: clamp(150px, 24vw, 300px) minmax(0, 1fr); }
  body.world-zamek .pg19-pet .playroom-pet { height: min(58vh, 450px); }
  body.world-zamek .pg19-pet .pet-sprite--human { margin-top: calc(min(58vh, 450px) * .27); }
  .pg19-pet { pointer-events: none; }
  .pg19-pet > * { pointer-events: auto; }
}
@media (orientation: portrait) {
  body.world-zamek .pg19-pet .playroom-pet { height: min(30vh, 360px); }
  body.world-zamek .pg19-pet .pet-sprite--human { margin-top: calc(min(30vh, 360px) * .27); }
  .pg19-host { justify-content: center; gap: 1rem; }
}
@media (orientation: portrait) and (min-height: 701px) {
  /* same tidy 4 + 3 board as landscape */
  .pr-menu20 .pg20-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .pr-menu20 .pg20-grid--7 > :nth-child(5) { grid-column: 2 / span 2; }
  .pr-menu20 .pg20-grid--7 > :nth-child(7) { grid-column: auto / span 2; }
  .pr-menu20 .pg20-grid--5, .pr-menu20 .pg20-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
}

/* —— in-game hero: bigger in every game —— */
@media (min-width: 1000px) and (min-height: 640px) { body.world-zamek .pr-game { --pet-h: min(46vh, 340px); } }
@media (orientation: landscape) {
  body.world-zamek .pr-game .pr-dragon { width: calc(var(--pet-h) * .66); }
}
@media (min-width: 760px) and (min-height: 1000px) and (orientation: portrait) {
  body.world-zamek .pr-game .pr-dragon .playroom-pet { height: 250px; }
}
@media (orientation: portrait) {
  .pr-menu20 .pg19-host { position: relative; justify-content: center; }
  .pr-menu20 .pg19-host .pg19-bubble { position: absolute; left: calc(50% + 130px); right: auto; top: 32%; bottom: auto; max-width: 230px; }
  .pr-menu20 .pg19-host .pg19-bubble::after { right: auto; left: -8px; bottom: 40%; transform: rotate(135deg); }
}

/* —— Łazienka: calm things, tidy spots —— */
.lz24 .lz-it { filter: drop-shadow(0 4px 4px rgba(60, 30, 40, .3)); }
.lz24 .lz-it--lodka { animation: lzFloat 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
@media (prefers-reduced-motion: reduce) { .lz24 .lz-it--lodka { animation: none; } }

/* Option A — cabinet = the shop; bought things stand in its cubbies */
.lz-cab {
  position: fixed; z-index: 4; appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  height: clamp(170px, 27vh, 230px); aspect-ratio: 483 / 560; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  font-family: var(--font); transition: transform .14s ease; transform-origin: 50% 100%;
  left: 18.2vw; bottom: 3.6vh;
}
.lz-cab:active { transform: translateY(3px) scale(.97); }
.lz-cab-art { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 8px 8px rgba(50, 22, 40, .34)); pointer-events: none; }
.lz-cab-sign {
  position: absolute; left: 50%; top: 33.1%; transform: translate(-50%, -50%); white-space: nowrap;
  font-size: clamp(.95rem, 2.3vh, 1.25rem); font-weight: 800; line-height: 1; letter-spacing: .04em; color: #FFF3D6;
  padding: .26em .9em .32em; border-radius: 10px; text-shadow: 0 2px 0 rgba(40, 10, 50, .5);
  background: linear-gradient(180deg, #9A5BCC, #5A2370);
  box-shadow: inset 0 0 0 2px #F0CE72, 0 3px 0 #3A1248, 0 6px 10px rgba(58, 18, 72, .3);
  animation: lzSign 2.6s ease-in-out infinite;
}
@keyframes lzSign { 0%, 100% { box-shadow: inset 0 0 0 2px #F0CE72, 0 3px 0 #3A1248, 0 6px 10px rgba(58,18,72,.3); }
  50% { box-shadow: inset 0 0 0 2px #FFE7A0, 0 3px 0 #3A1248, 0 0 18px 4px rgba(255, 226, 122, .75); } }
@media (prefers-reduced-motion: reduce) { .lz-cab-sign { animation: none; } }
.lz-cab-slots { position: absolute; inset: 0; pointer-events: none; }
.lz-cab-it { position: absolute; height: 15.5%; width: auto; max-width: 23%; object-fit: contain; transform: translate(-50%, -100%); filter: drop-shadow(0 2px 2px rgba(40, 18, 20, .35)); }
.lz-cab-it--recznik, .lz-cab-it--lodka { height: 14%; }
.lz-cab-tag {
  position: absolute; transform: translate(-50%, -120%); display: inline-flex; align-items: center; gap: 2px;
  font-size: clamp(.62rem, 1.4vh, .8rem); font-weight: 800; color: #5A3410; padding: 1px 6px 1px 3px; border-radius: 999px;
  background: rgba(255, 246, 222, .82); box-shadow: 0 1px 0 rgba(110, 74, 22, .35);
}
.lz-cab-tag .ci { width: 1.25em; height: 1.25em; }

/* Option B — a big castle "Sklepik" button, bottom-left, right of the candle */
.lz-shopbtn--b {
  left: 7.2vw; bottom: max(10px, env(safe-area-inset-bottom, 0px)); width: 132px; height: 118px; gap: 0; z-index: 70;
}
.lz-shopbtn--b .lz-shopbtn-art {
  height: 86px; width: 112px; display: grid; place-items: center; border-radius: 22px 22px 14px 14px;
  background: radial-gradient(ellipse at 50% 30%, #FFFDF6, #F4E3BF); border: 3px solid #C99A3C;
  box-shadow: inset 0 0 0 3px #FFF6DE, 0 4px 0 #8E6420, 0 10px 16px rgba(58, 18, 72, .3);
  animation: lzSign 2.6s ease-in-out infinite;
}
.lz-shopbtn--b .lz-shopbtn-art img { height: 74px; }
.lz-shopbtn--b .lz-shopbtn-lab {
  margin-top: -12px; position: relative; font-size: 1.15rem; letter-spacing: .05em; color: #FFF3D6; padding: 5px 16px 6px; border-radius: 12px;
  background: linear-gradient(180deg, #9A5BCC, #5A2370); border: 0; text-shadow: 0 2px 0 rgba(40,10,50,.5);
  box-shadow: inset 0 0 0 2px #F0CE72, 0 3px 0 #3A1248, 0 6px 10px rgba(58, 18, 72, .3);
}
@media (prefers-reduced-motion: reduce) { .lz-shopbtn--b .lz-shopbtn-art { animation: none; } }

/* shop card: 6 calm things → 3 × 2 */
.lz24 ~ .lz-ov .lz-card, .lz-ov .lz-card { width: min(780px, 100%); }
.lz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lz-tile:last-child { grid-column: auto !important; }
@media (orientation: portrait) {
  .lz-ov .lz-card { width: min(640px, 100%); }
}

/* —— portrait bathroom: bigger hero, symmetric props —— */
@media (orientation: portrait) {
  .bt16 .bathroom-pet { height: min(30vh, 300px) !important; }
  .bt16 .bt-prop.bt-duck, .bt16 .bt-prop.bt-brush { bottom: 214px !important; top: auto !important; }
  .bt16 .bt-prop.bt-brush { left: 6% !important; right: auto !important; }
  .bt16 .bt-prop.bt-duck { right: 6% !important; left: auto !important; }
  .bt16 .bt-prop img { height: 64px !important; width: auto !important; }
  .lz24--A .bt-prop.bt-brush { left: auto !important; right: 6% !important; bottom: 318px !important; }
  .lz24--A .bt-prop.bt-duck { bottom: 84px !important; }
  .lz-cab { left: 2.6vw; bottom: 64px; height: 214px; }
  .lz-shopbtn--b { left: 12px; bottom: 62px; }
}

/* —— portrait lesson (play): wider column, answers in one row, a big hero centred in the free lower board —— */
@media (orientation: portrait) and (min-width: 600px) {
  body:has(.play-area) #app { max-width: 760px; }
  .play-area .opts.two:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body:has(.play-area) #mascot-buddy {
    left: 50% !important; right: auto !important; bottom: 56px !important; transform: translateX(-50%) !important;
    width: 280px; height: 300px; opacity: 1 !important;
  }
  body:has(.play-area) #mascot-buddy .buddy-face { width: 270px; height: 290px; }
  body:has(.play-area) #mascot-buddy .buddy-img { width: 270px; height: 280px; }
}
@media (orientation: portrait) and (min-width: 600px) and (min-height: 900px) {
  .play-area .chalkboard { justify-content: center; padding-bottom: 300px; }
  .play-area .chalkboard > .q-title { zoom: 1.3; }
}

/* —— portrait kitchen: hero exactly centred, pantry in the left column —— */
@media (orientation: portrait) and (min-width: 600px) {
  body.world-zamek .kitchen-stage { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important; }
  body.world-zamek .kitchen-stage .pantry { grid-column: 1; grid-row: 1; }
  body.world-zamek .kitchen-stage .kitchen-pet-zone { grid-column: 2; grid-row: 1; }
  /* bedroom: hero centred on the rug in front of the bed */
  .bedroom15 .bedroom-pet-zone { left: 50%; }
}
/* wardrobe portrait: hero exactly centred; the panel hugs its content (no half-empty card) */
@media (orientation: portrait) and (min-width: 600px) {
  .wardrobe-stage .wd-pet-zone { transform: none !important; padding-left: 0 !important; justify-self: center !important; }
  .wardrobe-stage .wd-panel { align-self: start !important; height: auto !important; max-height: calc(100dvh - 560px); max-width: 520px; }
  .wardrobe-stage .wd-scroll { flex: 0 1 auto !important; }
}
@media (orientation: portrait) and (min-width: 600px) {
  .wardrobe-stage .wd-pet-zone { transform: translateX(14%) !important; }
  .wardrobe-stage .wd-grid { display: flex !important; flex-wrap: wrap; justify-content: center; gap: .5rem; }
  .wardrobe-stage .wd-grid > * { flex: 0 0 calc((100% - 1.5rem) / 4); min-width: 0; box-sizing: border-box; }
}

/* —— portrait games: hero centred above the task card —— */
@media (orientation: portrait) {
  body.world-zamek .pr-game .pr-dragon { align-self: center !important; margin-left: auto !important; margin-right: auto !important; }
}
@media (orientation: portrait) and (min-width: 600px) and (min-height: 900px) {
  body.world-zamek .pr-field--pairs .pp-grid { width: min(100%, 580px) !important; max-height: none !important; height: auto !important; gap: .7rem !important; }
}
