/* Art pass: Lucas & Friends vibe – tropical + chalkboard + candy tiles */
:root {
  --wood: #C8884A;
  --wood-deep: #8B5428;
  --wood-light: #E8B878;
  --chalk: #2F7A45;
  --chalk-deep: #1F5A32;
  --chalk-line: rgba(255,255,255,.18);
  --candy-blue: #4DA3FF;
  --candy-blue-d: #1E6FD4;
  --candy-pink: #FF6BB5;
  --candy-pink-d: #D4287A;
  --candy-lime: #7ED957;
  --candy-lime-d: #3A9E28;
  --candy-orange: #FFB020;
  --candy-orange-d: #D07800;
  --ink: #2A1848;
  --card: #FFFDF8;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Baloo 2", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  min-height: 100%; min-height: 100dvh;
  font-family: var(--font);
  background: #5EC8F0;
  color: var(--ink);
  overflow-x: hidden; overflow-y: auto;
}

/* —— Painted world backgrounds (path-aware) —— */
.sky {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
  background:
    linear-gradient(180deg, #6EC8FF 0%, #A8E8FF 45%, #F5D9A0 70%, #D4B060 100%);
  background-size: cover;
  background-position: center;
  transition: background-image .4s ease, background-color .4s ease;
}
.sky::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.12));
  pointer-events: none;
}
body.world-menu .sky {
  background-image: linear-gradient(180deg, #7EC8FF 0%, #B8E8FF 40%, #FFE8B0 75%, #E8C878 100%);
}
body.world-zamek .sky {
  background-color: #87CEEB;
  background-image: url('art/tlo-zamek.jpg');
  background-size: cover;
  background-position: center bottom;
}
body.world-trasa .sky {
  background-color: #5BA8D8;
  background-image: url('art/tlo-trasa.jpg');
  background-size: cover;
  background-position: center bottom;
}
/* hide legacy tropical decorations if any remain */
.blob, .cloud, .ocean, .palm, .hill, .leaf-l, .leaf-r { display: none !important; }

@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(22px); }
}

#app {
  min-height: 100dvh; max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column;
  position: relative; z-index: 1;
  padding-bottom: var(--safe-bottom);
  width: 100%;
}
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }

.screen {
  flex: 1; display: flex; flex-direction: column;
  padding: 1rem 1rem 1.25rem;
  animation: fadeIn .35s ease;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes hubPetIdle {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-7px) scale(1.015, .985); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-7deg); }
  75% { transform: rotate(7deg); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@keyframes jelly {
  0% { transform: scale(1); }
  30% { transform: scale(1.1, .92); }
  50% { transform: scale(.95, 1.06); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255,200,60,0)); }
  50% { filter: drop-shadow(0 0 10px rgba(255,210,80,.8)); }
}
@keyframes shine { to { background-position: 300%; } }
@keyframes starFall {
  0% { transform: translateY(0) rotate(0) scale(1); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg) scale(.4); opacity: 0; }
}
@keyframes sparkle {
  0%, 100% { opacity: .4; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Sticker cards (splash / map / story) */
.card {
  background: var(--card);
  border-radius: 28px;
  padding: 1.25rem 1.15rem;
  border: 5px solid #fff;
  box-shadow:
    0 0 0 4px #FFB8E0,
    0 10px 0 rgba(80, 40, 20, .18),
    0 16px 36px rgba(40, 60, 100, .18);
  text-align: center;
  animation: pop .4s cubic-bezier(.3, 1.5, .5, 1);
}

h1 { margin: .2rem 0 .45rem; font-size: 1.85rem; font-weight: 700; color: #5A2FCC; line-height: 1.15; letter-spacing: -.01em; }
h2 { margin: .2rem 0; font-size: 1.45rem; font-weight: 700; color: #1E6FD4; }
p { margin: .4rem 0; line-height: 1.45; font-size: 1.15rem; font-weight: 500; }
.lead { font-size: 1.22rem; color: #3A3060; font-weight: 600; }

/* Juicy candy buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 62px; min-width: 62px;
  padding: .95rem 1.55rem;
  border: 4px solid rgba(255,255,255,.65);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 1.25rem; font-weight: 700;
  color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #FF9FD0 0%, #FF5FA8 50%, #E0187A 100%);
  box-shadow: 0 8px 0 #B01060, inset 0 3px 0 rgba(255,255,255,.35);
  margin: .3rem;
  transition: transform .1s, box-shadow .1s;
  touch-action: manipulation; user-select: none;
  text-shadow: 0 2px 0 rgba(0,0,0,.12);
}
.btn:active { transform: translateY(6px); box-shadow: 0 2px 0 #B01060, inset 0 2px 0 rgba(255,255,255,.25); }
.btn.primary {
  background: linear-gradient(180deg, #FFE066 0%, #FFB020 55%, #F09000 100%);
  box-shadow: 0 8px 0 #C45E00, inset 0 3px 0 rgba(255,255,255,.45);
  color: #5A2A00; text-shadow: 0 1px 0 rgba(255,255,255,.35);
  animation: glowPulse 2.5s ease-in-out infinite;
}
.btn.primary:active { box-shadow: 0 2px 0 #C45E00; animation: none; }
.btn.alt {
  background: linear-gradient(180deg, #8EC4FF 0%, #4DA3FF 50%, #1E6FD4 100%);
  box-shadow: 0 8px 0 #154A9A, inset 0 3px 0 rgba(255,255,255,.4);
}
.btn.alt:active { box-shadow: 0 2px 0 #154A9A; }
.btn.ghost {
  background: #fff; color: #5A2FCC;
  border: 4px solid #E0C8FF;
  box-shadow: 0 6px 0 #C9A6FF;
  text-shadow: none; animation: none;
}
.btn.ghost:active { box-shadow: 0 2px 0 #C9A6FF; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.huge { font-size: 1.38rem; padding: 1.05rem 1.85rem; min-height: 68px; }
.btn.block { width: 100%; margin: .4rem 0; }
.btn.press-pop { animation: jelly .4s ease; }

input[type="text"], input[type="password"] {
  width: 100%; max-width: 300px;
  font-family: var(--font);
  font-size: 1.35rem; font-weight: 700;
  text-align: center;
  padding: .8rem 1rem;
  border-radius: 20px;
  border: 4px solid #E0C8FF;
  background: #fff; color: var(--ink);
  outline: none;
  box-shadow: inset 0 3px 8px rgba(80,40,120,.08);
}
input:focus { border-color: #4DA3FF; box-shadow: 0 0 0 5px rgba(77,163,255,.28); }

.hero-art {
  display: flex; justify-content: center; align-items: flex-end;
  gap: .45rem; margin: .55rem 0 1rem; min-height: 200px;
  position: relative;
}
.hero-art .bob,
.hero-art .wiggle,
.hero-art .lion-buddy {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end;
}
.hero-art .bob { animation: bounce 2.4s ease-in-out infinite; }
.hero-art .wiggle { animation: bounce 2.4s ease-in-out infinite .35s; }
.hero-art .lion-buddy { animation: bounce 2.6s ease-in-out infinite .55s; }
.hero-img {
  display: block;
  width: auto;
  height: 190px;
  max-width: 46vw;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 12px 14px rgba(40, 30, 80, .35));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  position: relative;
  z-index: 1;
}
/* Soft circular/ellipse pedestal glow behind cutout characters (not square stickers) */
.hero-pedestal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.hero-pedestal::before,
.path-card--hero .hero-pedestal::before,
body.world-trasa .hero-pedestal::before {
  content: none !important;
  display: none !important;
}
.hero-princess { height: 200px; }
.hero-smoczek { height: 185px; }
.hero-lion { height: 170px; }
.hero-name {
  display: inline-block;
  margin-top: .15rem;
  font-size: .88rem;
  font-weight: 700;
  color: #5A2FCC;
  background: #fff;
  border: 3px solid #FFE066;
  border-radius: 999px;
  padding: .12rem .55rem;
  box-shadow: 0 3px 0 #E07000;
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-art.sm { min-height: 130px; }
.hero-art.sm .hero-img { height: 120px; }
.hero-art.sm .hero-princess { height: 128px; }
.hero-art.sm .hero-smoczek { height: 118px; }
.hero-art.sm .hero-name { font-size: .78rem; }
.hero-art--splash { min-height: 220px; gap: .2rem; }
.hero-art--splash .hero-img { height: 175px; }
.hero-art--splash .hero-princess { height: 188px; }
.hero-art--splash .hero-smoczek { height: 172px; }
.hero-art--splash .hero-lion { height: 158px; }
.hero-art--solo .hero-img { height: 210px; }

.story-bubble {
  background: linear-gradient(180deg, #fff, #FFF5FF);
  border: 5px solid #FFB0E0;
  border-radius: 22px;
  padding: 1rem 1.1rem;
  text-align: left; font-size: 1.12rem; line-height: 1.45;
  box-shadow: 0 7px 0 #FF8FD0;
  position: relative; margin: .65rem 0 1rem; font-weight: 500;
}
.story-bubble::after {
  content: ""; position: absolute; bottom: -16px; left: 34px;
  border: 9px solid transparent; border-top-color: #FFB0E0;
}
.story-bubble .who {
  display: block; font-size: .85rem; font-weight: 700;
  color: #E0187A; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .25rem;
}

/* Parent gate overlay */
.parent-gate-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(30, 16, 55, .62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.parent-gate-card {
  max-width: 340px; width: 100%;
  background: var(--card);
  border-radius: 24px;
  padding: 1.25rem 1.15rem 1.15rem;
  box-shadow: 0 20px 50px rgba(30,10,60,.35);
  text-align: center;
  border: 3px solid rgba(169,139,255,.45);
}
.parent-gate-card h2 { margin: 0 0 .35rem; font-size: 1.45rem; }
.parent-gate-card p { margin: 0 0 .75rem; color: #6A5A88; font-weight: 600; font-size: .95rem; }
.parent-gate-card .q-main { font-size: 2.1rem; margin: .4rem 0 .8rem; }
.parent-gate-card input {
  width: 100%; max-width: 140px; margin: 0 auto .9rem;
  display: block; text-align: center;
  font-family: var(--font); font-size: 1.6rem; font-weight: 800;
  padding: .45rem .6rem; border-radius: 14px;
  border: 3px solid #D8C8FF; background: #fff;
  color: var(--ink);
}
.parent-mute-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; background: #F6F2FF; border-radius: 16px;
  padding: .75rem .9rem; margin: .6rem 0 1rem;
  border: 2px solid #E8D8FF;
}
.parent-mute-row span { font-weight: 700; color: var(--ink); }
.parent-mute-row .btn { min-width: 7.5rem; }

/* Map */
.map-wrap { padding: .4rem 0 1.5rem; }
.map-path {
  display: flex; flex-direction: column; gap: .9rem;
  position: relative;
}
.map-path::before {
  content: "";
  position: absolute; left: 40px; top: 18px; bottom: 18px; width: 8px;
  background: repeating-linear-gradient(180deg, #FFE066 0 12px, #FFB020 12px 24px);
  border-radius: 999px; opacity: .55; z-index: 0;
}
.level-node {
  display: flex; align-items: center; gap: .85rem;
  background: #fff;
  border-radius: 24px;
  padding: .85rem .95rem;
  border: 5px solid #C8E8FF;
  box-shadow: 0 7px 0 #7EC8F0;
  text-align: left; min-height: 80px;
  cursor: pointer; transition: transform .1s;
  touch-action: manipulation;
  position: relative; z-index: 1;
  font-family: var(--font);
}
.level-node:active:not(.locked) { transform: scale(.97) translateY(3px); }
.level-node.open {
  border-color: #FFB84D;
  box-shadow: 0 0 0 4px rgba(255,200,60,.4), 0 7px 0 #E0A000, 0 0 24px rgba(255,200,60,.5);
  animation: pulse 2s infinite;
  background: linear-gradient(180deg, #FFFDF0, #FFF5D0);
}
.level-node.done {
  border-color: #7ED957;
  box-shadow: 0 7px 0 #3A9E28;
  background: linear-gradient(180deg, #F0FFF4, #D8FFE0);
}
.level-node.locked {
  opacity: .75; filter: grayscale(.4);
  cursor: default; border-color: #C8C0D0;
  box-shadow: 0 6px 0 #A8A0B0; background: #F4F2F8;
}
.level-node .emoji {
  font-size: 1.9rem; width: 62px; height: 62px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #E8F8FF, #D0ECFF);
  border-radius: 50%; flex-shrink: 0;
  border: 4px solid #fff;
  box-shadow: 0 4px 0 rgba(30,100,160,.18), inset 0 -3px 0 rgba(0,0,0,.05);
}
.level-node.open .emoji {
  background: linear-gradient(160deg, #FFE066, #FFB020);
  box-shadow: 0 0 14px rgba(255,180,40,.55);
}
.level-node.done .emoji { background: linear-gradient(160deg, #B8FF90, #7ED957); }
.level-node .info { flex: 1; min-width: 0; }
.level-node .info strong { display: block; font-size: 1.1rem; color: #2A1848; font-weight: 700; }
.level-node .info span { font-size: .9rem; color: #6A6080; font-weight: 500; }
.level-node .badge {
  font-size: .76rem; font-weight: 700;
  background: linear-gradient(180deg, #FFE066, #FFB020);
  color: #5A2A00; border-radius: 999px; padding: .28rem .55rem;
  white-space: nowrap; border: 2px solid #fff; box-shadow: 0 2px 0 #E07000;
}
.level-node.locked .badge { background: #DDD; color: #666; box-shadow: 0 2px 0 #AAA; }

/* —— PLAY: wooden chalkboard —— */
.play-area { flex: 1; display: flex; flex-direction: column; gap: .65rem; }
.progress-bar {
  height: 16px; background: rgba(255,255,255,.5);
  border-radius: 999px; overflow: hidden;
  border: 3px solid #fff;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.08);
}
.progress-bar > div {
  height: 100%;
  background: repeating-linear-gradient(45deg, #FF5FA8 0 11px, #FF8FD0 11px 22px);
  transition: width .4s ease; border-radius: 999px;
}

.chalk-quest, .chalk-answers { display: contents; }

.chalkboard {
  flex: 1;
  display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.06), transparent 50%),
    linear-gradient(165deg, #3A9A55 0%, #2F7A45 40%, #246838 100%);
  border-radius: 18px;
  border: 14px solid var(--wood);
  box-shadow:
    inset 0 0 0 3px var(--wood-light),
    inset 0 0 40px rgba(0,0,0,.2),
    0 10px 0 var(--wood-deep),
    0 16px 28px rgba(40, 30, 10, .35);
  padding: .85rem .75rem 1rem;
  position: relative;
  min-height: 280px;
}
.chalkboard::before {
  /* wood grain hint on frame via outer ring already; butterfly */
  content: "🦋";
  position: absolute; top: -22px; left: 18px;
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.25));
  z-index: 2;
}
.chalkboard .q-title {
  font-size: .95rem; color: rgba(255,255,255,.7); font-weight: 600;
  margin-bottom: .35rem; text-align: center;
}
.chalkboard .q-main {
  font-size: 2.6rem; font-weight: 700;
  color: #fff;
  text-shadow: 0 3px 0 rgba(0,0,0,.25);
  margin: .35rem 0 .7rem; line-height: 1.15;
  letter-spacing: .03em; text-align: center;
}
.chalkboard .q-main .n-cyan { color: #7EE8FF; }
.chalkboard .q-main .n-orange { color: #FFC04A; }
.chalkboard .q-main .n-pink { color: #FF9FD6; }
.chalkboard .q-main .n-lime { color: #B8FF80; }
.chalkboard .q-main .slot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.4em; padding: .05em .2em;
  background: rgba(0,0,0,.28);
  border-radius: 12px;
  border: 3px solid rgba(255,255,255,.25);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.3), 0 0 12px rgba(255,220,80,.35);
  color: #FFE066;
}

/* legacy q-card still used in parent etc. */
.q-card {
  background: var(--card);
  border-radius: 28px; padding: 1.2rem 1rem 1.4rem;
  border: 5px solid #fff;
  box-shadow: 0 0 0 4px #B8D4FF, 0 10px 0 rgba(60,80,160,.12);
  text-align: center; flex: 1;
  display: flex; flex-direction: column;
}
.q-title { font-size: 1rem; color: #7A6090; font-weight: 700; margin-bottom: .4rem; }
.q-main {
  font-size: 2.5rem; font-weight: 700; color: #2A1848;
  margin: .45rem 0 .8rem; line-height: 1.15;
}

.objects {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: .55rem; margin: .4rem auto .85rem;
  max-width: 100%;
  padding: .65rem .5rem;
  background: rgba(0,0,0,.18);
  border-radius: 16px;
  border: 2px dashed rgba(255,255,255,.22);
  min-height: 72px;
}
.objects .obj {
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  animation: pop .35s both;
  filter: drop-shadow(0 5px 4px rgba(0,0,0,.3));
}
.objects .obj svg { width: 56px; height: 56px; }
.objects.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
  background: transparent; border: none; padding: 0;
}
.objects.split .obj-group {
  background: rgba(0,0,0,.18);
  border-radius: 14px;
  border: 2px dashed rgba(255,255,255,.2);
  padding: .5rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem;
  min-height: 70px;
}

.compare-row {
  display: flex; justify-content: center; align-items: center;
  gap: .75rem; margin: .55rem 0 .9rem; flex-wrap: wrap;
}
.compare-box {
  background: rgba(0,0,0,.22);
  border-radius: 16px; padding: .7rem 1rem;
  min-width: 90px;
  border: 3px solid rgba(255,255,255,.22);
}
.compare-box .num { font-size: 2.1rem; font-weight: 700; color: #FFE066; }

/* Candy answer tiles – Lucas style */
.opts {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: .65rem; margin-top: .55rem; padding: .15rem;
}
.opts.two { grid-template-columns: 1fr 1fr; }
.opt {
  min-height: 84px;
  font-family: var(--font);
  font-size: 2.25rem; font-weight: 700;
  border-radius: 22px;
  border: 6px solid rgba(255,255,255,.8);
  color: #fff;
  cursor: pointer; touch-action: manipulation;
  transition: transform .1s, box-shadow .1s;
  text-shadow: 0 2px 0 rgba(0,0,0,.2);
  position: relative;
  /* default blue candy */
  background: linear-gradient(180deg, #8EC8FF 0%, #4DA3FF 45%, #2A7FE0 100%);
  box-shadow: 0 8px 0 #154A9A, inset 0 4px 0 rgba(255,255,255,.4), inset 0 -3px 0 rgba(0,0,0,.12);
}
.opt::after {
  content: "";
  position: absolute; top: 8px; left: 12%; right: 28%; height: 28%;
  background: linear-gradient(180deg, rgba(255,255,255,.55), transparent);
  border-radius: 12px; pointer-events: none;
}
.opt:nth-child(1) {
  background: linear-gradient(180deg, #8EC8FF 0%, #4DA3FF 45%, #2A7FE0 100%);
  box-shadow: 0 8px 0 #154A9A, inset 0 4px 0 rgba(255,255,255,.4), inset 0 -3px 0 rgba(0,0,0,.12);
}
.opt:nth-child(2) {
  background: linear-gradient(180deg, #FF9FD6 0%, #FF5FA8 45%, #E02880 100%);
  box-shadow: 0 8px 0 #A01058, inset 0 4px 0 rgba(255,255,255,.4), inset 0 -3px 0 rgba(0,0,0,.12);
}
.opt:nth-child(3) {
  background: linear-gradient(180deg, #B8FF80 0%, #7ED957 45%, #4ABA30 100%);
  box-shadow: 0 8px 0 #2A7A18, inset 0 4px 0 rgba(255,255,255,.4), inset 0 -3px 0 rgba(0,0,0,.12);
}
.opt:nth-child(4) {
  background: linear-gradient(180deg, #FFE066 0%, #FFB020 50%, #E09000 100%);
  box-shadow: 0 8px 0 #A06000, inset 0 4px 0 rgba(255,255,255,.45), inset 0 -3px 0 rgba(0,0,0,.1);
  color: #5A2A00; text-shadow: 0 1px 0 rgba(255,255,255,.3);
}
.opt:active { transform: translateY(6px); }
.opt:nth-child(1):active { box-shadow: 0 2px 0 #154A9A, inset 0 2px 0 rgba(255,255,255,.3); }
.opt:nth-child(2):active { box-shadow: 0 2px 0 #A01058, inset 0 2px 0 rgba(255,255,255,.3); }
.opt:nth-child(3):active { box-shadow: 0 2px 0 #2A7A18, inset 0 2px 0 rgba(255,255,255,.3); }
.opt.good {
  background: linear-gradient(180deg, #C8FFA0, #5EE260) !important;
  box-shadow: 0 8px 0 #1A7A30, inset 0 4px 0 rgba(255,255,255,.45) !important;
  animation: jelly .45s ease;
}
.opt.bad {
  background: linear-gradient(180deg, #FFB0B0, #FF6060) !important;
  box-shadow: 0 8px 0 #A01010, inset 0 4px 0 rgba(255,255,255,.3) !important;
  animation: shake .4s ease;
}

.numpad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: .5rem; margin-top: .5rem;
}
.numpad .key {
  min-height: 58px;
  font-family: var(--font);
  font-size: 1.55rem; font-weight: 700;
  border-radius: 16px;
  border: 4px solid rgba(255,255,255,.7);
  background: linear-gradient(180deg, #8EC8FF, #4DA3FF);
  color: #fff;
  box-shadow: 0 5px 0 #154A9A, inset 0 3px 0 rgba(255,255,255,.35);
  cursor: pointer; touch-action: manipulation;
  text-shadow: 0 1px 0 rgba(0,0,0,.15);
}
.numpad .key:active { transform: translateY(4px); box-shadow: 0 1px 0 #154A9A; }
.numpad .key.ok {
  background: linear-gradient(180deg, #B8FF80, #7ED957);
  box-shadow: 0 5px 0 #2A7A18, inset 0 3px 0 rgba(255,255,255,.4);
}
.answer-display {
  font-size: 2.7rem; font-weight: 700; color: #FFE066;
  min-height: 3rem; letter-spacing: .08em;
  background: rgba(0,0,0,.25);
  border-radius: 16px;
  border: 3px dashed rgba(255,255,255,.28);
  margin: .4rem 0;
  display: flex; align-items: center; justify-content: center;
  text-shadow: 0 2px 0 rgba(0,0,0,.3);
}

.feedback {
  margin-top: .55rem; font-size: 1.2rem; font-weight: 700;
  min-height: 1.5em; text-align: center; color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.feedback.ok { color: #B8FF80; animation: jelly .4s ease; }
.feedback.no { color: #FFB0B0; }

.sticker-big {
  font-size: 5.5rem; line-height: 1;
  animation: pop .5s cubic-bezier(.3, 1.6, .5, 1);
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.22));
  margin: .4rem 0;
}
.stars {
  font-size: 2.1rem; letter-spacing: .28rem; margin: .3rem 0;
  animation: bounce 1.2s ease-in-out infinite;
}

.parent-gate {
  background: #F3F0FF; border-radius: 20px;
  padding: 1rem; border: 4px dashed #A98BFF; margin: .8rem 0;
}
.parent-stats {
  text-align: left; background: #fff; border-radius: 16px;
  padding: .9rem 1rem; margin: .6rem 0;
  border: 4px solid #E8D8FF;
}
.parent-stats li { margin: .35rem 0; font-size: 1.04rem; }

.splash-logo {
  font-size: 2.15rem; font-weight: 700;
  background: linear-gradient(90deg, #FF4FA3, #FFB300, #4DA3FF, #7ED957, #FF4FA3);
  background-size: 300%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: shine 5s linear infinite;
  margin: .25rem 0;
}

.hint-chip {
  display: inline-block; background: #FFF5C2;
  border: 3px dashed #E0A000; border-radius: 12px;
  padding: .45rem .75rem; font-size: .92rem; margin-top: .45rem;
  color: #6A4A00; font-weight: 600;
}

#toast {
  position: fixed; left: 50%; top: 34%;
  transform: translate(-50%, -50%) scale(0);
  font-family: var(--font);
  font-size: 2.3rem; font-weight: 700;
  background: #fff; border-radius: 26px;
  padding: .9rem 1.4rem; z-index: 100;
  border: 5px solid #FFE066;
  box-shadow: 0 0 0 4px #FFB020, 0 14px 36px rgba(0,0,0,.28);
  pointer-events: none; text-align: center;
  transition: transform .28s cubic-bezier(.3, 1.6, .5, 1);
  max-width: 90vw;
}
#toast.show { transform: translate(-50%, -50%) scale(1); }

.footer-note {
  font-size: .8rem; color: rgba(40, 40, 80, .65);
  text-align: center; margin-top: .85rem; font-weight: 600;
}
.muted { opacity: .8; font-size: .94rem; font-weight: 500; }
.row-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem; margin-top: .65rem; }
.fx-piece {
  position: absolute; top: -20px; font-size: 1.5rem;
  animation: starFall linear forwards; pointer-events: none;
}

@media (min-height: 700px) {
  .hero-img { height: 210px; }
  .hero-princess { height: 220px; }
  .hero-smoczek { height: 205px; }
  .hero-lion { height: 190px; }
  .hero-art--splash .hero-img { height: 195px; }
  .hero-art--splash .hero-princess { height: 210px; }
  .chalkboard .q-main { font-size: 3rem; }
  .objects .obj { width: 68px; height: 68px; }
  .objects .obj svg { width: 66px; height: 66px; }
  .opt { min-height: 92px; font-size: 2.35rem; }
}

/* Extra tropical layers */
.ocean {
  position: absolute; left: 0; right: 0; top: 48%; height: 18%;
  background: linear-gradient(180deg, #5EC8F0 0%, #3AA8D8 55%, #F0D090 100%);
  opacity: .95;
}
.palm {
  position: absolute; bottom: 28%; width: 14px; height: 100px;
  background: #5A3A18; border-radius: 6px;
  z-index: 1;
}
.palm::before {
  content: ""; position: absolute; top: -8px; left: 50%;
  width: 70px; height: 40px; margin-left: -35px;
  background:
    radial-gradient(ellipse 40% 70% at 20% 80%, #2E9E3A 0%, transparent 70%),
    radial-gradient(ellipse 40% 70% at 80% 80%, #34A844 0%, transparent 70%),
    radial-gradient(ellipse 45% 80% at 50% 60%, #48B850 0%, transparent 70%);
}
.palm.left { left: 6%; transform: rotate(-6deg); }
.palm.right { right: 8%; transform: rotate(8deg); bottom: 30%; }
.leaf-l, .leaf-r {
  position: absolute; bottom: -10px; width: 120px; height: 140px; z-index: 2;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, #2E9E3A 0%, #2E9E3A 50%, transparent 51%);
}
.leaf-l { left: -30px; }
.leaf-r { right: -30px; transform: scaleX(-1); }


/* —— Hero: kierowca / autko —— */
.hero-boy { height: 200px; }
.hero-autko { height: 150px; }
.hero-art.sm .hero-boy { height: 128px; }
.hero-art.sm .hero-autko { height: 100px; }
.hero-art--splash .hero-boy { height: 188px; }
.hero-art--splash .hero-autko { height: 140px; }

/* —— Character path picker (large heroes, no white JPG frames) —— */
.path-pick {
  display: grid; grid-template-columns: 1fr 1fr; gap: .9rem;
  margin: .85rem 0 1rem;
}
.path-card {
  appearance: none; border: none;
  min-width: 0; overflow: visible;
  border-radius: 28px; padding: .55rem .35rem .85rem;
  background: transparent;
  box-shadow: none;
  cursor: pointer; touch-action: manipulation;
  font-family: var(--font); color: var(--ink);
  transition: transform .12s;
  text-align: center;
}
.path-card--hero:active { transform: scale(.96); }
.path-card .path-art {
  display: flex; align-items: flex-end; justify-content: center;
  gap: .1rem; min-height: 170px; margin-bottom: .45rem;
  width: 100%; overflow: visible;
  background: transparent;
}
.path-card .path-art--solo {
  min-height: 200px;
}
.path-card .path-art .hero-img {
  height: 190px; width: auto; max-width: 92%;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  /* no white sticker box */
  box-shadow: none;
  filter: drop-shadow(0 14px 16px rgba(40, 30, 80, .38));
}
.path-card .path-art .hero-boy {
  height: 200px;
  border-radius: 0;
  -webkit-mask-image: none;
  mask-image: none;
}
.path-card .path-art .hero-princess {
  height: 210px;
}
.path-card .path-art .hero-name { display: none; }
.path-card strong {
  display: inline-block;
  font-size: 1.2rem; font-weight: 800; line-height: 1.15;
  padding: .35rem .9rem;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  border: 3px solid #FFE066;
  box-shadow: 0 4px 0 rgba(180,100,0,.22);
  color: #5A2FCC;
}
.path-card span.sub { display: none; }
.path-card.selected strong,
.path-card:focus-visible strong {
  border-color: #FFB020;
  box-shadow: 0 0 0 4px rgba(255,176,32,.45), 0 4px 0 rgba(180,100,0,.22);
}

.hero-art--duo { gap: 1rem; }
.hero-art--duo .hero-img { max-width: 42vw; }
.hero-boy {
  height: 200px;
  border-radius: 0;
  -webkit-mask-image: none;
  mask-image: none;
}
.hero-art--splash .hero-boy { height: 188px; }
.hero-art.sm .hero-boy { height: 128px; }
.card--pick { background: rgba(255,253,248,.82); }
.card--splash .splash-logo { text-transform: none; }

/* Soft scrim so chalkboard/cards stay readable on busy photos */
body.world-zamek .card,
body.world-trasa .card {
  background: rgba(255,253,248,.94);
}
body.world-zamek .chalkboard,
body.world-trasa .chalkboard {
  /* keep wood board strong on photo bg */
  box-shadow:
    inset 0 0 0 3px var(--wood-light),
    inset 0 0 40px rgba(0,0,0,.2),
    0 10px 0 var(--wood-deep),
    0 16px 28px rgba(40, 30, 10, .45);
}



/* —— Pet-care HOME HUB (Pou-style) —— */
.hub-screen {
  justify-content: flex-start;
  gap: .45rem;
  padding-top: .3rem;
  min-height: 0;
  overflow: hidden;
}
.care-meters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .35rem;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  flex-shrink: 0;
}
.care-meter {
  background: rgba(255,253,248,.92);
  border: 3px solid #fff;
  border-radius: 14px;
  padding: .3rem .4rem .4rem;
  box-shadow: 0 4px 0 rgba(40,30,80,.12), 0 8px 16px rgba(40,30,80,.1);
}
.care-meter .care-lab {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  color: #3A3060;
  margin-bottom: .15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.care-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(60,40,100,.12);
  overflow: hidden;
}
.care-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7ED957, #B8FF80);
  transition: width .45s ease;
}
.care-meter.mid .care-fill { background: linear-gradient(90deg, #FFB020, #FFE066); }
.care-meter.low .care-fill { background: linear-gradient(90deg, #FF6BB5, #FF9FD6); }

.hub-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(108px, 0.9fr) minmax(150px, 1.35fr) minmax(108px, 0.9fr);
  align-items: stretch;
  gap: .45rem .5rem;
}
.hub-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  min-width: 0;
  z-index: 3;
}
.hub-col-c {
  justify-content: center;
  gap: .4rem;
  z-index: 2;
}
.hub-pet {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
/* no pedestal / glow rings under pet — user wants clean sprite only */
.hub-pet::before,
body.world-trasa .hub-pet::before {
  content: none !important;
  display: none !important;
}
.hub-pet-img {
  position: relative;
  z-index: 1;
  width: auto;
  height: min(32vh, 220px);
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(40,20,60,.16));
  animation: hubPetIdle 3.4s ease-in-out infinite;
  transform-origin: 50% 90%;
  user-select: none;
}
.hub-pet-img.hero-autko {
  height: min(30vh, 200px);
  max-width: 88%;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  -webkit-mask-image: none;
  mask-image: none;
}
.hero-img.hero-autko {
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  -webkit-mask-image: none;
  mask-image: none;
}
.hub-pet-name {
  margin-top: .25rem;
  padding: .18rem .75rem;
  border-radius: 999px;
  background: rgba(255,253,248,.95);
  border: 3px solid #fff;
  font-weight: 800;
  font-size: .98rem;
  color: #2A1848;
  box-shadow: 0 3px 0 rgba(60,80,160,.15);
}

.hub-btn {
  appearance: none;
  border: 4px solid #fff;
  border-radius: 20px;
  min-height: 58px;
  width: 100%;
  max-width: 148px;
  padding: .35rem .45rem .45rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .05rem;
  font-family: var(--font);
  font-weight: 800;
  font-size: .95rem;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.18);
  cursor: pointer;
  touch-action: manipulation;
  box-shadow:
    0 6px 0 rgba(0,0,0,.18),
    0 10px 16px rgba(40,20,60,.16),
    inset 0 2px 0 rgba(255,255,255,.35);
  transition: transform .12s, box-shadow .12s;
  flex-shrink: 0;
}
.hub-btn--matma {
  max-width: 180px;
  min-height: 56px;
}
.hub-btn .hub-ico {
  font-size: 1.35rem;
  line-height: 1;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.15));
}
.hub-btn:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 rgba(0,0,0,.18),
    0 4px 10px rgba(40,20,60,.14),
    inset 0 2px 0 rgba(255,255,255,.28);
}
.hub-btn--orange { background: linear-gradient(180deg, #FFB85A, #FF7A18); }
.hub-btn--cyan { background: linear-gradient(180deg, #7EE8FF, #2AA8E0); }
.hub-btn--yellow { background: linear-gradient(180deg, #FFE066, #FFB020); color: #5A3010; text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.hub-btn--purple { background: linear-gradient(180deg, #C8A0FF, #7A4AE0); }
.hub-btn--lime { background: linear-gradient(180deg, #B8FF80, #4ABA40); color: #1A4A18; text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.hub-btn--pink { background: linear-gradient(180deg, #FF9FD6, #FF4FA8); }
.hub-btn--green { background: linear-gradient(180deg, #9AF07A, #3A9E28); }
.hub-btn--blue { background: linear-gradient(180deg, #7EC8FF, #2A7AE8); }

.hub-hero-corner,
.hub-hero-corner-img {
  display: none !important;
}

.hub-hint {
  text-align: center;
  margin: 0 auto;
  font-size: .85rem;
  background: rgba(255,253,248,.82);
  border-radius: 999px;
  padding: .28rem .7rem;
  flex-shrink: 0;
}

.hub-fx {
  position: absolute;
  z-index: 6;
  font-size: 1.55rem;
  animation: hubFxUp 1.05s ease forwards;
  pointer-events: none;
}
@keyframes hubFxUp {
  0% { opacity: 0; transform: translateY(12px) scale(.6); }
  20% { opacity: 1; transform: translateY(0) scale(1.15); }
  100% { opacity: 0; transform: translateY(-70px) scale(.85); }
}
.hub-pet-img.hub-react-eat { animation: jelly .55s ease, glowPulse .8s ease; }
.hub-pet-img.hub-react-wash { animation: wiggle .55s ease; }
.hub-pet-img.hub-react-play { animation: bounce .5s ease, jelly .55s ease; }
.hub-pet-img.hub-react-service { animation: pulse .55s ease, glowPulse .8s ease; }

@media (orientation: landscape) {
  .hub-screen {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: .35rem .65rem;
    overflow: hidden;
    height: calc(100dvh - 70px);
    max-height: calc(100dvh - 70px);
    padding-top: .15rem;
    padding-bottom: .25rem;
  }
  .care-meters {
    max-width: 150px;
    grid-template-columns: 1fr;
    align-self: center;
    flex-shrink: 0;
  }
  .hub-stage {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    order: 2;
  }
  .hub-hint { display: none; }
  .hub-col { gap: .35rem; }
  .hub-pet-img { height: min(42vh, 200px); }
  .hub-pet-img.hero-autko { height: min(38vh, 180px); }
  .hub-btn { min-height: 50px; font-size: .88rem; border-radius: 16px; max-width: 128px; }
  .hub-btn--matma { max-width: 150px; min-height: 48px; }
  .hub-btn .hub-ico { font-size: 1.15rem; }
  .hub-hero-corner { display: none; }
}

@media (orientation: landscape) and (max-height: 420px) {
  .care-meters, .hub-hint, .hub-hero-corner { display: none; }
  .hub-stage { min-height: calc(100dvh - 58px); max-height: calc(100dvh - 58px); }
  .hub-pet-name { font-size: .8rem; padding: .1rem .5rem; }
  .hub-pet-img { height: min(55vh, 170px); }
  .hub-btn { min-height: 44px; font-size: .8rem; padding: .2rem .35rem; }
}

body:has(.hub-screen) #app { max-width: 720px; }
@media (orientation: landscape) {
  body:has(.hub-screen) #app { max-width: 1040px; }
}

/* —— Landscape play layout —— */
@media (orientation: landscape) {
  #app { max-width: 960px; }
  .screen { padding: .55rem .75rem .7rem; }
  .hero-art--splash { min-height: 140px; }
  .hero-art--splash .hero-img { height: 120px; }
  .hero-art--splash .hero-princess,
  .hero-art--splash .hero-boy { height: 130px; }
  .hero-art--splash .hero-smoczek { height: 115px; }
  .hero-art--splash .hero-autko { height: 90px; }
  .path-pick { gap: .55rem; }
  .path-card .path-art,
  .path-card .path-art--solo { min-height: 130px; }
  .path-card .path-art .hero-img { height: 120px; }
  .path-card .path-art .hero-princess { height: 128px; }
  .path-card .path-art .hero-boy { height: 124px; }
  .path-card strong { font-size: 1rem; padding: .28rem .7rem; }

  .play-area {
    flex-direction: column;
    gap: .4rem;
    min-height: 0;
  }
  .play-area .progress-bar { height: 12px; flex-shrink: 0; }

  .chalkboard {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
      "title title"
      "quest answers"
      "quest answers"
      "fb answers";
    gap: .35rem .75rem;
    min-height: 0;
    padding: .55rem .65rem .65rem;
    border-width: 10px;
  }
  .chalkboard .q-title { grid-area: title; margin-bottom: 0; font-size: .85rem; }
  .chalkboard .chalk-quest { grid-area: quest; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
  .chalkboard .chalk-answers { grid-area: answers; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
  .chalkboard .feedback { grid-area: fb; margin-top: .2rem; font-size: 1rem; min-height: 1.2em; }
  .chalkboard .q-main { font-size: 2.1rem; margin: .2rem 0 .4rem; }
  .objects { margin: .2rem auto .4rem; padding: .4rem; min-height: 52px; }
  .objects .obj { width: 44px; height: 44px; }
  .objects .obj svg { width: 42px; height: 42px; }
  .opts { gap: .45rem; margin-top: .2rem; }
  .opt { min-height: 64px; font-size: 1.75rem; border-width: 4px; border-radius: 16px; }
  .opt:active { transform: translateY(4px); }
  .numpad { gap: .35rem; margin-top: .2rem; }
  .numpad .key { min-height: 44px; font-size: 1.25rem; }
  .answer-display { font-size: 2rem; min-height: 2.4rem; margin: .2rem 0; }

  .chalkboard .chalk-quest .objects { max-height: 120px; overflow: auto; }

  .card { padding: .85rem .9rem 1rem; }
  .splash-logo { font-size: 1.65rem; }
  .map-wrap { padding-top: .25rem; }
  .map-path { gap: .45rem; }
  .level-node { padding: .55rem .65rem; }
}

@media (orientation: landscape) and (max-height: 420px) {
  .chalkboard .q-main { font-size: 1.75rem; }
  .opt { min-height: 52px; font-size: 1.45rem; }
  .numpad .key { min-height: 38px; font-size: 1.1rem; }
  #mascot-buddy { transform: scale(.72); transform-origin: bottom right; bottom: 4px; right: 4px; }
  body:has(.play-area) #mascot-buddy { opacity: .92; }
}




/* Hub pet: one soft idle only — don't stack mascotBreathe */
.hub-pet.mascot-live,
.hub-pet .mascot-live,
.hub-pet-img.mascot-live {
  animation: hubPetIdle 3.4s ease-in-out infinite !important;
}
.hub-screen .hub-pet::after {
  content: none !important;
}



/* Full-bleed kitchen room backdrop (Pou care room) */
body.room-kitchen .sky {
  background-image: url('art/tlo-kuchnia.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  filter: none;
}
body.room-kitchen .sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,244,230,.1), rgba(80,40,70,.12));
  pointer-events: none;
}

/* ——— Pou-style kitchen (castle care room) ——— */
@keyframes kitchenPetIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.kitchen-screen {
  justify-content: flex-start;
  gap: .4rem;
  padding-top: .25rem;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.kitchen-screen::before {
  content: none;
}
.kitchen-screen > * { position: relative; z-index: 1; }

.kitchen-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(96px, 0.85fr) minmax(150px, 1.4fr) minmax(96px, 0.85fr);
  align-items: end;
  gap: .4rem .5rem;
  padding: .2rem .15rem .35rem;
}

/* Fairy-tale castle pantry / ice cabinet (cream · gold · soft purple) */
.kitchen-fridge {
  appearance: none;
  border: 4px solid #FFF8EE;
  border-radius: 22px 22px 18px 18px;
  min-height: 158px;
  width: 100%;
  max-width: 128px;
  margin: 0 auto;
  padding: .55rem .35rem .7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: .15rem;
  cursor: pointer;
  touch-action: manipulation;
  background:
    linear-gradient(165deg, #FFF9F0 0%, #F5E6FF 38%, #DCC4F5 72%, #C4A0E8 100%);
  box-shadow:
    0 8px 0 rgba(120, 70, 40, .18),
    0 14px 22px rgba(60, 30, 80, .16),
    inset 0 2px 0 rgba(255,255,255,.85),
    inset 0 0 0 2px rgba(212, 168, 70, .35);
  color: #4A2868;
  font-family: var(--font);
  font-weight: 800;
  position: relative;
  overflow: hidden;
  transition: transform .12s, box-shadow .12s, background .18s;
  z-index: 4;
}
.kitchen-fridge::after {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 10px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #FFE8A0, #D4A846);
  box-shadow: 0 2px 0 rgba(120,80,20,.2);
}
.kitchen-fridge::before {
  content: "";
  position: absolute;
  top: 18%;
  right: 12%;
  width: 11px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFE8A0 0%, #E8C050 55%, #C49020 100%);
  box-shadow:
    0 2px 0 rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.7);
  border: 1px solid rgba(180,120,30,.35);
}
.kitchen-fridge-door {
  position: absolute;
  inset: 18px 14px 48px;
  border-radius: 12px;
  border: 2px solid rgba(212, 168, 70, .55);
  background:
    linear-gradient(160deg, rgba(255,252,245,.72), rgba(230,210,255,.22));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.55),
    inset 0 -6px 12px rgba(100,60,140,.08);
}
.kitchen-fridge.is-open .kitchen-fridge-door {
  background: linear-gradient(160deg, rgba(255,248,220,.75), rgba(255,220,160,.28));
  border-color: #E8C050;
}
.kitchen-fridge-lab {
  font-size: .88rem;
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
  z-index: 1;
  color: #4A2868;
}
.kitchen-fridge-hint {
  font-size: .66rem;
  font-weight: 700;
  z-index: 1;
  background: linear-gradient(180deg, #FFF8EE, #FFE8C8);
  color: #6A3A18;
  border: 1px solid rgba(212,168,70,.45);
  border-radius: 999px;
  padding: .08rem .45rem;
  text-shadow: none;
  box-shadow: inset 0 1px 0 #fff;
}
.kitchen-fridge:active {
  transform: translateY(4px);
  box-shadow:
    0 3px 0 rgba(120, 70, 40, .16),
    0 6px 12px rgba(60, 30, 80, .12),
    inset 0 2px 0 rgba(255,255,255,.7),
    inset 0 0 0 2px rgba(212, 168, 70, .3);
}
.kitchen-fridge.is-open {
  background:
    linear-gradient(165deg, #FFF6E0 0%, #FFE8A8 40%, #F0C868 100%);
  color: #5A3010;
}
.kitchen-fridge.is-open .kitchen-fridge-lab { color: #5A3010; }

.kitchen-pet-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  padding-bottom: .2rem;
  border-radius: 24px;
  transition: background .2s, box-shadow .2s;
  background: transparent;
}
.kitchen-pet-zone::before { content: none; } /* no pedestal */
.kitchen-pet-zone.is-drop-target {
  background: rgba(255,248,230,.35);
  box-shadow: 0 0 0 3px rgba(212,168,70,.55);
}
.kitchen-pet {
  height: min(34vh, 230px);
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 5px 6px rgba(40,20,60,.14));
  animation: kitchenPetIdle 4.2s ease-in-out infinite;
  transform-origin: 50% 100%;
  user-select: none;
  pointer-events: none;
}
.kitchen-pet.hub-react-eat {
  animation: jelly .55s ease, glowPulse .8s ease;
}
.kitchen-pet-zone .hub-pet-name {
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,252,245,.92), rgba(245,230,255,.88));
  border: 1px solid rgba(212,168,70,.4);
  color: #4A2868;
}


.kitchen-tray {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: .5rem .6rem .55rem;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,252,245,.96) 0%, rgba(250,240,255,.92) 100%);
  backdrop-filter: blur(10px);
  border: 3px solid #FFF8EE;
  box-shadow:
    0 6px 0 rgba(120, 70, 40, .12),
    0 12px 22px rgba(60, 30, 80, .14),
    inset 0 0 0 2px rgba(212, 168, 70, .28);
  flex-shrink: 0;
}
.kitchen-tray[hidden] { display: none !important; }
.kitchen-tray-title {
  margin: 0 0 .35rem;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
  color: #4A2868;
}
.kitchen-tray-hint {
  margin: .35rem 0 0;
  text-align: center;
  font-size: .78rem;
  color: #6A5080;
}
.kitchen-foods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .4rem;
}
.kitchen-food {
  appearance: none;
  border: 3px solid #FFF8EE;
  border-radius: 18px;
  background: linear-gradient(180deg, #FFFCF6, #F3E6FF);
  box-shadow:
    0 4px 0 rgba(120, 70, 40, .1),
    0 8px 14px rgba(60, 30, 80, .1),
    inset 0 0 0 1px rgba(212,168,70,.22);
  padding: .35rem .2rem .4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  cursor: grab;
  touch-action: none;
  font-family: var(--font);
  font-weight: 800;
  color: #4A2868;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.kitchen-food:active { cursor: grabbing; transform: scale(.96); }
.kitchen-food.is-selected {
  background: linear-gradient(180deg, #FFF0C8, #FFE066);
  box-shadow: 0 0 0 3px #D4A846, 0 6px 0 rgba(180,120,30,.18);
  transform: translateY(-2px);
}
.kitchen-food-art {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.kitchen-food-art svg { width: 100%; height: 100%; display: block; }
.kitchen-food-lab {
  font-size: .72rem;
  line-height: 1.1;
  text-align: center;
  pointer-events: none;
}

.kitchen-drag-ghost {
  position: fixed;
  z-index: 9999;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(40,20,60,.28));
  transform: scale(1.08);
  transition: transform .1s;
}
.kitchen-drag-ghost.is-over { transform: scale(1.2); }
.kitchen-drag-ghost svg { width: 100%; height: 100%; display: block; }

.kitchen-hint {
  background: linear-gradient(180deg, rgba(255,252,245,.9), rgba(245,230,255,.85));
  border: 1px solid rgba(212,168,70,.35);
  color: #4A2868;
}

.kitchen-fx { z-index: 8; }

@media (orientation: landscape) {
  .kitchen-screen {
    flex-direction: column;
  }
  .kitchen-stage {
    grid-template-columns: minmax(90px, 0.75fr) minmax(160px, 1.5fr) minmax(90px, 0.75fr);
    align-items: center;
  }
  .kitchen-pet { height: min(42vh, 200px); }
  .kitchen-fridge { min-height: 120px; max-width: 100px; }
  .kitchen-foods { gap: .3rem; }
  .kitchen-food-art { width: 44px; height: 44px; }
  .kitchen-tray { max-width: 640px; padding: .35rem .5rem .45rem; }
  .kitchen-hint { display: none; }
}
@media (orientation: landscape) and (max-height: 420px) {
  .kitchen-screen .care-meters { display: none; }
  .kitchen-pet { height: min(48vh, 150px); }
  .kitchen-fridge { min-height: 96px; border-radius: 16px; }
  .kitchen-fridge-lab { font-size: .8rem; }
  .kitchen-food-art { width: 36px; height: 36px; }
  .kitchen-food-lab { font-size: .62rem; }
  .kitchen-tray-title { font-size: .85rem; margin-bottom: .2rem; }
  .kitchen-tray-hint { display: none; }
}
@media (max-width: 380px) {
  .kitchen-foods { grid-template-columns: repeat(2, 1fr); }
  .kitchen-fridge { max-width: 96px; min-height: 120px; }
}

body:has(.kitchen-screen) #app { max-width: 720px; }
@media (orientation: landscape) {
  body:has(.kitchen-screen) #app { max-width: 1040px; }
}

/* Full-bleed bathroom room backdrop (Pou care room · castle) */
body.room-bathroom .sky {
  background-image: url('art/tlo-lazienka.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  filter: none;
}
body.room-bathroom .sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,244,230,.08), rgba(80,40,90,.14));
  pointer-events: none;
}

/* ——— Pou-style bathroom (castle care room) ——— */
@keyframes bathroomPetIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes bathroomBubblePop {
  0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translate(-50%, -120%) scale(1.15); opacity: 0; }
}

.bathroom-screen {
  justify-content: flex-start;
  gap: .35rem;
  padding-top: .25rem;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.bathroom-screen::before { content: none; }
.bathroom-screen > * { position: relative; z-index: 1; }

.bathroom-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(96px, 0.9fr) minmax(150px, 1.4fr) minmax(96px, 0.85fr);
  align-items: end;
  gap: .4rem .5rem;
  padding: .2rem .15rem .25rem;
}

.bathroom-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  z-index: 4;
}

.bathroom-soap,
.bathroom-sponge {
  appearance: none;
  border: 4px solid #FFF8EE;
  border-radius: 22px;
  width: 100%;
  max-width: 120px;
  margin: 0 auto;
  padding: .4rem .3rem .5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  cursor: pointer;
  touch-action: none;
  font-family: var(--font);
  font-weight: 800;
  color: #4A2868;
  position: relative;
  transition: transform .12s, box-shadow .12s, background .18s;
}
.bathroom-soap {
  background: linear-gradient(165deg, #FFF9F0 0%, #F0E0FF 45%, #D0B0F0 100%);
  box-shadow:
    0 6px 0 rgba(120, 70, 40, .16),
    0 12px 18px rgba(60, 30, 80, .14),
    inset 0 2px 0 rgba(255,255,255,.85),
    inset 0 0 0 2px rgba(212, 168, 70, .32);
}
.bathroom-soap.is-active {
  background: linear-gradient(165deg, #FFF0C8 0%, #E8D0FF 40%, #C898F0 100%);
  box-shadow: 0 0 0 3px #D4A846, 0 6px 0 rgba(120,70,40,.14);
}
.bathroom-sponge {
  background: linear-gradient(165deg, #FFFCF0 0%, #FFE8A0 50%, #F0C868 100%);
  box-shadow:
    0 8px 0 rgba(120, 70, 40, .18),
    0 14px 22px rgba(60, 30, 80, .16),
    inset 0 2px 0 rgba(255,255,255,.85),
    inset 0 0 0 2px rgba(212, 168, 70, .4);
  cursor: grab;
  min-height: 120px;
}
.bathroom-sponge:active { cursor: grabbing; transform: scale(.97); }
.bathroom-tool-art {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.bathroom-tool-art svg { width: 100%; height: 100%; display: block; }
.bathroom-tool-lab {
  font-size: .82rem;
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
  pointer-events: none;
}
.bathroom-tool-hint {
  font-size: .62rem;
  font-weight: 700;
  background: linear-gradient(180deg, #FFF8EE, #FFE8C8);
  color: #6A3A18;
  border: 1px solid rgba(212,168,70,.45);
  border-radius: 999px;
  padding: .06rem .4rem;
  pointer-events: none;
  box-shadow: inset 0 1px 0 #fff;
}

.bathroom-pet-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  padding-bottom: .2rem;
  border-radius: 24px;
  transition: background .2s, box-shadow .2s;
  background: transparent;
  position: relative;
}
.bathroom-pet-zone::before { content: none; }
.bathroom-pet-zone.is-scrubbing {
  background: rgba(220, 240, 255, .28);
  box-shadow: 0 0 0 3px rgba(120, 180, 230, .55);
}
.bathroom-pet {
  height: min(34vh, 230px);
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 5px 6px rgba(40,20,60,.14));
  animation: bathroomPetIdle 4.2s ease-in-out infinite;
  transform-origin: 50% 100%;
  user-select: none;
  pointer-events: none;
}
.bathroom-pet.hub-react-wash {
  animation: wiggle .55s ease, glowPulse .8s ease;
}
.bathroom-pet-zone .hub-pet-name {
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,252,245,.92), rgba(245,230,255,.88));
  border: 1px solid rgba(212,168,70,.4);
  color: #4A2868;
}
.bathroom-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}
.bathroom-bubble {
  position: absolute;
  font-size: 1.35rem;
  animation: bathroomBubblePop .85s ease-out forwards;
  pointer-events: none;
}


.bathroom-scrubbar {
  width: min(280px, 70%);
  height: 10px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(255,248,238,.55);
  border: 2px solid rgba(212,168,70,.4);
  box-shadow: inset 0 1px 3px rgba(60,30,80,.12);
  overflow: hidden;
  flex-shrink: 0;
}
.bathroom-scrubbar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #A8E0FF, #C8A0FF 55%, #FFE066);
  transition: width .15s ease-out;
}

.bathroom-hint {
  background: linear-gradient(180deg, rgba(255,252,245,.9), rgba(245,230,255,.85));
  border: 1px solid rgba(212,168,70,.35);
  color: #4A2868;
}

.bathroom-drag-ghost {
  position: fixed;
  z-index: 9999;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(40,20,60,.28));
  transform: scale(1.08);
  transition: transform .1s;
}
.bathroom-drag-ghost.is-soapy {
  filter: drop-shadow(0 8px 12px rgba(40,20,60,.28)) drop-shadow(0 0 10px rgba(180,220,255,.85));
}
.bathroom-drag-ghost.is-over { transform: scale(1.22) rotate(-8deg); }
.bathroom-drag-ghost svg { width: 100%; height: 100%; display: block; }

.bathroom-fx { z-index: 8; }

@media (orientation: landscape) {
  .bathroom-stage {
    grid-template-columns: minmax(90px, 0.8fr) minmax(160px, 1.5fr) minmax(90px, 0.75fr);
    align-items: center;
  }
  .bathroom-pet { height: min(42vh, 200px); }
  .bathroom-sponge { min-height: 96px; max-width: 100px; }
  .bathroom-soap { max-width: 100px; }
  .bathroom-tool-art { width: 44px; height: 44px; }
  .bathroom-hint { display: none; }
}
@media (orientation: landscape) and (max-height: 420px) {
  .bathroom-screen .care-meters { display: none; }
  .bathroom-pet { height: min(48vh, 150px); }
  .bathroom-scrubbar { display: none; }
}
@media (max-width: 380px) {
  .bathroom-soap, .bathroom-sponge { max-width: 96px; }
  .bathroom-sponge { min-height: 100px; }
}

body:has(.bathroom-screen) #app { max-width: 720px; }
@media (orientation: landscape) {
  body:has(.bathroom-screen) #app { max-width: 1040px; }
}
