/* ==========================================================================
   castle18.css — v18 (princess / castle path only, loaded last)
   One task card in the centre for every mini-game: verb line · big question
   · the picture · answers right under it — and the pet standing beside it.
   Ten-frame comparison rows · 4 new games (kuchnia, koszyk, mapa, wagi).
   Never restyles .castle-back (castle.css owns the shield override).
   ========================================================================== */
body.world-zamek { --it: 26px; --card-max: 880px; }

/* ---- arena: pet | card ------------------------------------------------- */
body.world-zamek .pr-game .pr-arena {
  position: relative; flex: 1 1 auto; min-height: 0; width: 100%;
  display: flex; align-items: stretch; justify-content: center; gap: var(--s1);
  padding: 2px 76px var(--s1) var(--s1);
}
body.world-zamek .pr-game .pr-task {
  position: relative; z-index: 4; flex: 1 1 auto; min-width: 0; max-width: var(--card-max);
  display: flex; flex-direction: column; min-height: 0;
  background: linear-gradient(180deg, #FFFDF6 0%, #FBF1DC 60%, #F4E4C6 100%);
  border: 3px solid #C99A3C; border-radius: 24px;
  box-shadow: inset 0 0 0 2px #FFF6DE, 0 4px 0 #8E6420, 0 14px 28px rgba(74, 31, 92, .22);
  overflow: hidden;
}
body.world-zamek .pr-game:not(.is-on) .pr-task { opacity: .5; filter: saturate(.6); }

/* the pet: a real column beside the card, grounded, facing the card */
body.world-zamek .pr-game .pr-dragon {
  position: relative; left: auto; right: auto; bottom: auto; top: auto; transform: none;
  flex: 0 0 auto; align-self: flex-end; z-index: 5; margin: 0 -14px 0 0;
  display: flex; flex-direction: column; align-items: center;
}
body.world-zamek .pr-game:not(.is-on) .pr-dragon { z-index: 31; }
body.world-zamek .pr-game .pr-pet-m { display: block; transform: scaleX(-1); line-height: 0; }
body.world-zamek .pr-game .pr-dragon .playroom-pet { height: min(40vh, 150px); }
body.world-zamek .pr-game--tower .pr-dragon, body.world-zamek .pr-game--vault .pr-dragon { display: flex; }
body.world-zamek .pr-game--relay .pr-dragon { display: none; }
body.world-zamek .pr-game--relay .pr-arena { padding-left: var(--s2); }

/* pet speech: above its head, never over the card text */
body.world-zamek .pr-pet-say {
  position: absolute; bottom: calc(100% - 6px); left: 50%; z-index: 6;
  width: max-content; max-width: 150px; padding: 6px 12px 7px; border-radius: 16px;
  font: 800 .86rem/1.15 var(--font); color: #4A1F5C; text-align: center;
  background: #FFFDF6; border: 2.5px solid #C99A3C; box-shadow: 0 3px 0 #8E6420, 0 8px 14px rgba(74, 31, 92, .2);
  opacity: 0; transform: translate(-50%, 8px) scale(.7); pointer-events: none;
  transition: opacity .2s ease, transform .3s var(--spring);
}
body.world-zamek .pr-pet-say::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; margin-left: -6px;
  background: #FFFDF6; border: solid #C99A3C; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
body.world-zamek .pr-pet-say:empty { display: none; }
body.world-zamek .pr-pet-say.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
body.world-zamek .pr-dragon.is-cheer .pr-pet-m { animation: v18Cheer .7s var(--spring) 2; }
body.world-zamek .pr-dragon.is-jump .pr-pet-m { animation: v18Jump .6s var(--spring); }
body.world-zamek .pr-dragon.is-think .pr-pet-m { animation: v18Think 1.6s ease-in-out 2; }
body.world-zamek .pr-dragon.is-sad .pr-pet-m { animation: v18Nudge .6s ease; }
@keyframes v18Cheer { 40% { transform: scaleX(-1) translateY(-10px) rotate(-4deg); } }
@keyframes v18Jump { 35% { transform: scaleX(-1) translateY(-26px) scale(1.04, .96); } 70% { transform: scaleX(-1) translateY(0) scale(1.06, .94); } }
@keyframes v18Think { 50% { transform: scaleX(-1) rotate(6deg) translateX(-4px); } }
@keyframes v18Nudge { 30% { transform: scaleX(-1) translateX(8px) rotate(-5deg); } 60% { transform: scaleX(-1) translateX(-4px); } }

/* ---- card header: verb pill · progress · streak, then the question ---- */
body.world-zamek .pr-task .pr-plaque {
  grid-area: auto; justify-self: auto; flex: 0 0 auto; width: 100%; min-width: 0; max-width: none;
  background: none; border: 0; border-radius: 0; box-shadow: none; text-align: center;
  padding: var(--s1) var(--s2) 4px;
}
body.world-zamek .pr-task .pr-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s1); min-height: 26px; }
body.world-zamek .pr-task .pr-verb {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  padding: 3px 14px 4px 10px; border-radius: 999px;
  background: linear-gradient(180deg, #8E4FC0, #5A2370); color: #FFF3D6;
  box-shadow: inset 0 0 0 1.5px #E9C46A, 0 2px 0 #3A1248;
  font: 800 .92rem/1.15 var(--font); letter-spacing: .01em; text-align: left;
}
body.world-zamek .pr-task .pr-verb::before {
  content: ""; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF6C8 0 20%, #F2C24E 55%, #C98A1E 100%);
}
body.world-zamek .pr-task .pr-verb:empty { visibility: hidden; }
body.world-zamek .pr-task .pr-verb.is-new { animation: v17QIn .45s var(--spring) both; }
body.world-zamek .pr-task .pr-hud {
  display: flex; align-items: center; gap: var(--s1); padding: 0; grid-template-columns: none; grid-template-areas: none;
  position: static; opacity: 1; filter: none;
}
body.world-zamek .pr-task .pr-dots { padding: 0; gap: 4px; flex-wrap: nowrap; }
body.world-zamek .pr-task .pr-dots i { width: 11px; height: 11px; }
body.world-zamek .pr-task .pr-hud-r { margin: 0; }
body.world-zamek .pr-task .pr-streak { margin: 0; font-size: .8rem; padding: .1rem .55rem .12rem .3rem; }
body.world-zamek .pr-task .pr-q { margin-top: 4px; }
body.world-zamek .pr-task .pr-q:empty { display: none; }
body.world-zamek .pr-task .pr-say { font-size: 1.22rem; line-height: 1.22; font-weight: 700; color: #4A1F5C; max-width: 40em; }
body.world-zamek .pr-task .pr-say--riddle { font-size: 1.18rem; }
body.world-zamek .pr-task .pr-say em { color: #B8306A; font-size: 1.18em; font-weight: 800; }
body.world-zamek .pr-task .pr-eq { font-size: 2.1rem; }
body.world-zamek .pr-task .pr-eq--sm { font-size: 1.4rem; }
body.world-zamek .pr-task .pr-hint { font-size: .9rem; }

/* ---- the field lives inside the card ----------------------------------- */
body.world-zamek .pr-task .pr-field {
  flex: 1 1 auto; min-height: 0; width: 100%;
  padding: 4px var(--s2) var(--s1) !important;
}
body.world-zamek .pr-task .pr-field--fire,
body.world-zamek .pr-task .pr-field--egg,
body.world-zamek .pr-task .pr-field--catch { padding: 0 !important; }
body.world-zamek .pr-task .pr-field--riddles { gap: var(--s1); justify-content: center; }
body.world-zamek .pr-task .pr-field--relay { padding: 4px var(--s2) var(--s1) !important; }
body.world-zamek .pr-task .pr-field--vault { flex-wrap: nowrap !important; }

/* riddles: the picture is part of the card — no second parchment, no book */
body.world-zamek .pr-task .rd-scroll { background: rgba(255, 255, 255, .55); border: 2px dashed rgba(201, 154, 60, .6); box-shadow: none; padding: var(--s1) var(--s2); min-width: 0; }
body.world-zamek .pr-task .rd-scroll-img { display: none; }

/* ---- ten-frame comparison rows (groups of 5, columns line up) ---------- */
body.world-zamek .rd-cmp2 {
  display: grid; grid-template-columns: auto auto; gap: 6px var(--s2); align-items: center; justify-content: center;
}
body.world-zamek .rd-cmp2 .rd-who { font-size: .95rem; text-align: right; }
body.world-zamek .rd-cmp2 .rd-who b { display: inline-grid; place-items: center; min-width: 1.7em; padding: 0 .3em; margin-left: 4px; border-radius: 8px; background: #5A2370; color: #FFE9A8; }
body.world-zamek .rd-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; width: calc(4 * (5 * var(--it) + 8px) + 3 * 10px + 30px); }
body.world-zamek .rd-5 { display: grid; grid-template-columns: repeat(5, var(--it)); gap: 2px; padding: 2px; border-radius: 8px; background: rgba(201, 154, 60, .14); box-shadow: inset 0 0 0 1.5px rgba(201, 154, 60, .45); }
body.world-zamek .rd-5 img { width: var(--it); height: var(--it); object-fit: contain; filter: drop-shadow(0 2px 1px rgba(60, 30, 20, .3)); animation: fruitDrop .3s cubic-bezier(.3,1.6,.5,1) calc(var(--k, 0) * .03s) both; }
body.world-zamek .rd-5 img.is-extra { border-radius: 50%; background: radial-gradient(circle, rgba(255, 226, 122, .95) 0 45%, rgba(255, 226, 122, 0) 72%); box-shadow: 0 0 0 2px #F2C24E; }
body.world-zamek .rd-qm { display: inline-grid; place-items: center; width: calc(var(--it) + 4px); height: calc(var(--it) + 4px); border-radius: 50%; background: #B8306A; color: #FFF; font: 800 1rem/1 var(--font); animation: qPulse 1.3s ease-in-out infinite; }

/* ---- portrait: pet peeks above the card's top-left corner --------------- */
@media (orientation: portrait) {
  body.world-zamek .pr-game .pr-arena { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 0 var(--s1) 74px; }
  body.world-zamek .pr-game .pr-dragon { align-self: flex-start; flex-direction: row; align-items: flex-end; margin: 0 0 -12px var(--s2); z-index: 6; }
  body.world-zamek .pr-game .pr-dragon .playroom-pet { height: 92px; }
  body.world-zamek .pr-game--egg .pr-dragon .playroom-pet { height: 92px; }
  body.world-zamek .pr-pet-say { left: calc(100% + 6px); bottom: 30px; transform: translate(0, 6px) scale(.7); transform-origin: left bottom; max-width: 200px; }
  body.world-zamek .pr-pet-say.is-on { transform: none; }
  body.world-zamek .pr-pet-say::after { left: -2px; bottom: 10px; border-width: 0 0 2.5px 2.5px; }
  body.world-zamek .pr-game .pr-task { flex: 1 1 auto; max-width: none; }
  body.world-zamek .pr-task .pr-say { font-size: 1.12rem; }
  body.world-zamek { --it: 22px; }
  body.world-zamek .rd-line { width: calc(2 * (5 * var(--it) + 8px) + 10px + 30px); }
  body.world-zamek .pr-task .pr-field--fruit,
  body.world-zamek .pr-task .pr-field--treats,
  body.world-zamek .pr-task .pr-field--pairs,
  body.world-zamek .pr-task .pr-field--riddles,
  body.world-zamek .pr-task .pr-field--vault { padding-bottom: var(--s2) !important; }
  body.world-zamek .pr-game--relay .pr-arena { padding-left: var(--s1); }
}

/* ---- phone landscape: tighter header so the visual keeps its room ------- */
@media (orientation: landscape) and (max-height: 500px) {
  body.world-zamek .pr-task .pr-plaque { padding: 6px var(--s2) 2px; }
  body.world-zamek .pr-task .pr-say { font-size: 1.05rem; }
  body.world-zamek .pr-task .pr-say--riddle { font-size: 1rem; }
  body.world-zamek .pr-task .pr-eq { font-size: 1.7rem; }
  body.world-zamek .pr-task .pr-eq--sm { font-size: 1.15rem; }
  body.world-zamek .pr-task .pr-verb { font-size: .82rem; }
  body.world-zamek .pr-game .pr-dragon .playroom-pet { height: min(36vh, 126px); }
  body.world-zamek { --it: 22px; }
}

/* ---- big screens (laptop / tablet): everything grows with the card ----- */
@media (min-width: 1000px) and (min-height: 640px), (min-width: 760px) and (min-height: 1000px) {
  :root { --ans: 92px; }
  body.world-zamek { --it: 38px; }
  body.world-zamek .pr-task .pr-plaque { padding: var(--s2) var(--s3) var(--s1); }
  body.world-zamek .pr-task .pr-verb { font-size: 1.08rem; padding: 5px 18px 6px 12px; }
  body.world-zamek .pr-task .pr-say { font-size: 1.6rem; }
  body.world-zamek .pr-task .pr-say--riddle { font-size: 1.5rem; }
  body.world-zamek .pr-task .pr-eq { font-size: 2.8rem; }
  body.world-zamek .pr-task .pr-eq--sm { font-size: 1.8rem; }
  body.world-zamek .pr-task .pr-dots i { width: 14px; height: 14px; }
  body.world-zamek .pr-game .pr-dragon .playroom-pet { height: 210px; }
  body.world-zamek .pr-pet-say { font-size: 1rem; max-width: 190px; }
  body.world-zamek .rd-cmp2 .rd-who { font-size: 1.15rem; }
  body.world-zamek .pr-game .pr-arena { padding-top: var(--s1); padding-bottom: var(--s2); }
  body.world-zamek .pr-game .pr-task { max-height: 780px; align-self: center; height: 100%; }
}
@media (min-width: 760px) and (min-height: 1000px) and (orientation: portrait) {
  body.world-zamek .pr-game .pr-dragon .playroom-pet { height: 150px; }
  body.world-zamek { --it: 34px; }
}

/* ==========================================================================
   (k) Smocza kuchnia
   ========================================================================== */
.pr-field--kitchen { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; align-content: center; gap: var(--s1) var(--s3); }
.kt-row { display: flex; justify-content: center; align-items: flex-end; gap: var(--s1); flex-wrap: nowrap; }
.kt-cake { position: relative; width: clamp(58px, 11vw, 120px); display: flex; flex-direction: column; align-items: center; transition: transform .3s var(--spring), filter .3s ease; filter: saturate(.75) brightness(.97); }
.kt-cake.is-now { filter: none; }
.kt-cake:first-child { filter: none; }
.kt-cake:first-child::after { content: ""; position: absolute; inset: -6px -6px 14px; border-radius: 20px; border: 3px dashed #C0367A; opacity: .55; pointer-events: none; }
.kt-row.is-copy .kt-cake:first-child::after, .pr-field--kitchen.is-ask .kt-cake:first-child::after { display: none; }
.kt-cake.is-target { transform: scale(1.08); }
.kt-cake.is-wob { animation: dudWobble .5s ease; }
.kt-cake.is-cheer { animation: goodPop .6s var(--spring); }
.kt-cake-img { width: 100%; height: auto; filter: drop-shadow(0 4px 4px rgba(74, 31, 92, .25)); }
.kt-berries { position: absolute; left: 10%; right: 10%; top: 2%; display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 0; z-index: 2; }
.kt-berries img { width: 92%; max-width: 34px; height: auto; margin-top: -14%; filter: drop-shadow(0 2px 1px rgba(30, 20, 60, .35)); animation: fruitDrop .3s cubic-bezier(.3,1.6,.5,1) both; }
.kt-n { margin-top: 2px; min-width: 32px; padding: 0 8px; border-radius: 999px; background: #5A2370; color: #FFE9A8; font: 800 .95rem/1.5 var(--font); text-align: center; box-shadow: inset 0 0 0 1.5px #E9C46A; }
.kt-side { display: flex; align-items: center; }
.kt-bowl { appearance: none; border: 0; background: none; padding: 0; cursor: grab; touch-action: none; position: relative; width: clamp(96px, 15vw, 170px); display: flex; flex-direction: column; align-items: center; }
.kt-bowl img { width: 100%; height: auto; filter: drop-shadow(0 6px 8px rgba(74, 31, 92, .28)); pointer-events: none; }
.kt-bowl:active { transform: scale(.95); }
.kt-lab { margin-top: -4px; padding: 1px 10px 2px; border-radius: 999px; background: #C0367A; color: #FFF; font: 800 .8rem/1.3 var(--font); box-shadow: 0 2px 0 #7A1E4A; }
.pr-field--kitchen.is-ask .kt-side { display: none; }
.pr-field--kitchen .pr-choices { flex: 0 0 100%; }
.pr-field--kitchen .pr-choices:empty { display: none; }

/* ==========================================================================
   (l) Gwiezdny koszyk
   ========================================================================== */
.pr-field--catch { position: relative; }
.ct-sky { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: ew-resize;
  background: radial-gradient(ellipse at 50% 0%, rgba(143, 211, 255, .35), rgba(143, 211, 255, 0) 60%), linear-gradient(180deg, rgba(90, 35, 112, .08), rgba(255, 255, 255, 0)); }
.ct-stars { position: absolute; inset: 0; pointer-events: none; }
.ct-star { position: absolute; top: 0; width: clamp(56px, 9vw, 96px); aspect-ratio: 1; transform: translate(-50%, -80px); display: grid; place-items: center; transition: opacity .25s ease; }
.ct-star-svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(160, 90, 10, .35)); animation: ctSpin 3s ease-in-out infinite alternate; }
.ct-star b { position: relative; z-index: 1; font: 800 clamp(1.1rem, 2.4vw, 1.9rem)/1 var(--font); color: #4A1F5C; margin-top: 8%; text-shadow: 0 1px 0 #FFF6C8; }
.ct-star.is-dud { opacity: 0; filter: grayscale(1); }
.ct-star.is-caught { opacity: 0; transition: opacity .4s ease .2s; }
.ct-star.is-away, .ct-star.is-gone { opacity: 0; }
@keyframes ctSpin { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.ct-basket { position: absolute; bottom: 10px; left: 50%; width: clamp(88px, 13vw, 150px); transform: translateX(-50%); transition: left .12s ease-out; z-index: 2; outline: none; }
.ct-basket img { width: 100%; height: auto; display: block; pointer-events: none; filter: drop-shadow(0 6px 6px rgba(74, 31, 92, .3)); }
.ct-basket.is-cheer { animation: goodPop .6s var(--spring); }
.ct-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: linear-gradient(180deg, rgba(155, 218, 106, 0), rgba(155, 218, 106, .45)); pointer-events: none; }

/* ==========================================================================
   (m) Smocza mapa — number line
   ========================================================================== */
.pr-field--map { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); }
.mp-wrap { width: min(100%, 820px); padding: 0 var(--s3); }
.mp-line { position: relative; height: 112px; margin: 0 6px; }
.mp-track { position: absolute; left: -10px; right: -10px; bottom: 34px; height: 12px; border-radius: 6px; background: linear-gradient(180deg, #E9C46A, #B8862A); box-shadow: inset 0 0 0 2px #8E6420, 0 3px 0 rgba(110, 74, 22, .4); }
.mp-t { position: absolute; bottom: 40px; width: 1.5px; height: 6px; margin-left: -.75px; background: #8E6420; opacity: .55; }
.mp-t.is-five { height: 11px; opacity: .8; }
.mp-t.is-ten { width: 3px; height: 20px; margin-left: -1.5px; bottom: 30px; opacity: 1; background: #5A2370; border-radius: 2px; }
.mp-l { position: absolute; bottom: 4px; transform: translateX(-50%); font: 800 .9rem/1 var(--font); color: #5A2370; }
.mp-flag { position: absolute; bottom: 44px; width: 30px; transform: translateX(-6px); line-height: 0; }
.mp-flag-svg { width: 30px; height: 42px; }
.mp-flag em { position: absolute; left: 20px; top: -4px; font: 800 .8rem/1 var(--font); font-style: normal; color: #FFF; background: #C0367A; border-radius: 6px; padding: 2px 5px; }
.mp-arcs { position: absolute; inset: 0; pointer-events: none; }
.mp-arc { position: absolute; bottom: 46px; height: 34px; border: 3px dashed #C0367A; border-bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; animation: v17In .35s var(--spring) both; }
.mp-arc.is-one { height: 14px; border-color: #8E4FC0; border-width: 2px; }
.mp-tok { position: absolute; bottom: 44px; width: 54px; transform: translateX(-50%); transition: left .45s var(--ease-out); z-index: 2; display: flex; flex-direction: column; align-items: center; }
.mp-tok img { width: 100%; height: auto; filter: drop-shadow(0 4px 3px rgba(74, 31, 92, .3)); }
.mp-tok em { position: absolute; top: -18px; font: 800 .95rem/1 var(--font); font-style: normal; color: #FFF; background: #5A2370; border: 2px solid #E9C46A; border-radius: 8px; padding: 2px 7px; }
.mp-tok.is-hop img { animation: mpHop .45s ease; }
.mp-tok.is-land em { background: #2E8B3A; }
@keyframes mpHop { 45% { transform: translateY(-26px) rotate(-8deg); } }
.mp-left { min-height: 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; font: 800 .95rem/1 var(--font); color: #5A2370; }
.mp-chip { padding: 3px 8px; border-radius: 999px; background: #C0367A; color: #FFF; animation: v17In .35s var(--spring) both; }
.mp-chip--1 { background: #8E4FC0; }
.mp-chip--q { background: rgba(90, 35, 112, .15); color: #5A2370; }
.mp-hops { display: flex; gap: var(--s3); justify-content: center; }
.mp-hop { appearance: none; border: 0; cursor: pointer; min-width: calc(var(--ans) * 1.5); height: var(--ans); padding: 0 var(--s2); border-radius: 22px;
  font: 800 calc(var(--ans) * .42)/1 var(--font); color: #FFF3D6;
  background: linear-gradient(180deg, #D4508F, #9A2860); box-shadow: inset 0 0 0 2px #F7B6D2, 0 5px 0 #6A1440, 0 10px 16px rgba(74, 31, 92, .25); }
.mp-hop--1 { background: linear-gradient(180deg, #A465D6, #5A2370); box-shadow: inset 0 0 0 2px #D9B8F2, 0 5px 0 #3A1248, 0 10px 16px rgba(74, 31, 92, .25); min-width: var(--ans); }
.mp-hop:active { transform: translateY(4px); box-shadow: inset 0 0 0 2px #F7B6D2, 0 1px 0 #6A1440; }
.mp-hop.is-wob { animation: dudWobble .5s ease; }
.pr-field--map.is-ask .mp-hops { display: none; }
.pr-field--map .pr-choices:empty { display: none; }
@media (orientation: portrait) {
  .mp-wrap { padding: 0 var(--s1); }
  .mp-l { font-size: .72rem; }
  .mp-tok { width: 42px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .pr-field--map { gap: var(--s1); }
  .mp-line { height: 96px; }
  .mp-hops { gap: var(--s2); }
}

/* ==========================================================================
   (n) Magiczne wagi
   ========================================================================== */
.pr-field--scale { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); }
.sc-scale { --dy: 0px; position: relative; width: min(100%, 560px); height: clamp(150px, 30vh, 270px); }
.sc-post { position: absolute; left: 50%; top: 22px; bottom: 16px; width: 12px; margin-left: -6px; border-radius: 6px; background: linear-gradient(90deg, #B8862A, #FFE27A 45%, #B8862A); box-shadow: 0 0 0 2px #8E6420; }
.sc-base { position: absolute; left: 50%; bottom: 0; width: 120px; height: 22px; margin-left: -60px; border-radius: 50% 50% 10px 10px; background: linear-gradient(180deg, #FFE27A, #C98A1E); box-shadow: 0 0 0 2px #8E6420, 0 6px 10px rgba(74, 31, 92, .25); }
.sc-beam { position: absolute; left: 16%; right: 16%; top: 16px; height: 12px; border-radius: 6px; background: linear-gradient(180deg, #FFE9A0, #D9A436 60%, #A8741E); box-shadow: 0 0 0 2px #8E6420; transform: rotate(var(--tilt)); transition: transform .7s var(--spring); }
.sc-gem { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #E9D5FF 0 20%, #A465D6 55%, #5A2370 100%); box-shadow: 0 0 0 2px #E9C46A; }
.sc-pan { position: absolute; top: 22px; width: 36%; display: flex; flex-direction: column; align-items: center; transition: transform .7s var(--spring); }
.sc-pan--l { left: -2%; transform: translateY(calc(-1 * var(--dy))); }
.sc-pan--r { right: -2%; transform: translateY(var(--dy)); }
.sc-pan::before { content: ""; width: 70%; height: clamp(54px, 12vh, 110px); border: 2px solid #A8741E; border-bottom: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: none; margin-bottom: -2px;
  background: linear-gradient(to bottom right, transparent calc(50% - 1.5px), #A8741E calc(50% - 1.5px), #A8741E calc(50% + 1.5px), transparent calc(50% + 1.5px)) left / 50% 100% no-repeat,
              linear-gradient(to bottom left, transparent calc(50% - 1.5px), #A8741E calc(50% - 1.5px), #A8741E calc(50% + 1.5px), transparent calc(50% + 1.5px)) right / 50% 100% no-repeat; border: 0; clip-path: none; }
.sc-load { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .2em; margin-bottom: -4px; padding: 4px 12px; border-radius: 14px; background: #FFFDF6; box-shadow: 0 0 0 2.5px #C99A3C, 0 3px 0 #8E6420;
  font: 800 clamp(1.3rem, 3.6vh, 2.4rem)/1.1 var(--font); color: #4A1F5C; white-space: nowrap; }
.sc-load i { font-style: normal; color: #C98A1E; }
.sc-dish { display: block; width: 100%; height: 16px; border-radius: 0 0 50% 50% / 0 0 100% 100%; background: linear-gradient(180deg, #FFE27A, #C98A1E); box-shadow: 0 0 0 2px #8E6420, 0 6px 8px rgba(74, 31, 92, .25); }
.sc-box { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.3em; border-radius: 10px; border: 3px dashed #B8306A; color: #B8306A; animation: qPulse 1.3s ease-in-out infinite; }
.sc-box.is-full { border-style: solid; background: linear-gradient(180deg, #FFE9A0, #E9B44A); color: #4A1F5C; animation: none; }
.sc-box.is-target { transform: scale(1.15); background: rgba(255, 226, 122, .6); }
.sc-scale.is-level .sc-gem { box-shadow: 0 0 0 2px #E9C46A, 0 0 18px 6px rgba(255, 226, 122, .9); }
.sc-tray { display: flex; gap: var(--s2); justify-content: center; flex-wrap: wrap; }
.sc-w { appearance: none; border: 0; cursor: grab; touch-action: none; position: relative; width: var(--ans); height: calc(var(--ans) * .92); padding: 0;
  border-radius: 14px 14px 18px 18px; font: 800 calc(var(--ans) * .38)/1 var(--font); color: #4A1F5C;
  background: linear-gradient(180deg, #E4E7F0 0%, #B9BFCF 55%, #8C93A8 100%); box-shadow: inset 0 0 0 2px #F7F8FC, 0 4px 0 #5D6378, 0 8px 12px rgba(40, 30, 60, .25);
  animation: v17In .5s var(--spring) both; animation-delay: calc(var(--k, 0) * 90ms); }
.sc-w::before { content: ""; position: absolute; left: 50%; top: -10px; width: 26px; height: 14px; margin-left: -13px; border: 4px solid #8C93A8; border-bottom: 0; border-radius: 14px 14px 0 0; }
.sc-w span { position: relative; top: 4px; }
.sc-w.is-lift, .sc-w.is-used { opacity: .35; }
.sc-w.is-dud { opacity: .3; filter: grayscale(1); animation: dudWobble .5s ease; }
.sc-w.is-good { opacity: 1; background: linear-gradient(180deg, #FFF3B0, #F2C24E 60%, #C98A1E); }
.sc-w.is-hint { animation: hintBob .8s ease-in-out infinite alternate; box-shadow: inset 0 0 0 2px #FFF6C8, 0 0 0 4px #FFE27A, 0 4px 0 #5D6378; }
.sc-ghost { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, -50%) scale(1.1); width: 64px; height: 58px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(180deg, #E4E7F0, #8C93A8); box-shadow: 0 0 0 2px #5D6378, 0 10px 14px rgba(40, 30, 60, .35); font: 800 1.5rem/1 var(--font); color: #4A1F5C; }

/* naming screen: suggested pet names */
.v18-names { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0 2px; }
.v18-name { appearance: none; cursor: pointer; border: 2px solid #C99A3C; background: #FFFDF6; color: #5A2370; border-radius: 999px; padding: 4px 12px; font: 800 .9rem/1.2 var(--font); box-shadow: 0 2px 0 #8E6420; }
.v18-name.is-on { background: #5A2370; color: #FFE9A8; }

/* ---- v18 card sizing: hug the content so the picture sits right under the question;
        only the 'scene' games (sky, fire, nest, tower, relay) take the full height ---- */
body.world-zamek .pr-game .pr-task { align-self: center; height: auto; max-height: 100%; justify-content: flex-start; }
body.world-zamek .pr-game .pr-task .pr-field { flex: 0 1 auto; }
body.world-zamek .pr-game:is(.pr-game--catch, .pr-game--fire, .pr-game--egg, .pr-game--tower, .pr-game--relay) .pr-task { align-self: stretch; height: auto; }
body.world-zamek .pr-game:is(.pr-game--catch, .pr-game--fire, .pr-game--egg, .pr-game--tower, .pr-game--relay) .pr-task .pr-field { flex: 1 1 auto; }
body.world-zamek .rd-line { position: relative; width: auto; max-width: calc(4 * (5 * var(--it) + 14px) + 30px); padding-right: calc(var(--it) + 12px); }
body.world-zamek .rd-qm { position: absolute; right: 0; top: 50%; margin-top: calc(var(--it) / -2 - 2px); }
@media (orientation: portrait) {
  body.world-zamek .pr-game .pr-arena { justify-content: center; }
  body.world-zamek .pr-game .pr-task { align-self: stretch; }
  body.world-zamek .rd-cmp2 { grid-template-columns: auto; gap: 2px; justify-items: start; }
  body.world-zamek .rd-cmp2 .rd-who { text-align: left; margin-top: 4px; }
  body.world-zamek .rd-line { max-width: calc(2 * (5 * var(--it) + 14px) + 30px); }
}
@media (min-width: 1000px) and (min-height: 640px), (min-width: 760px) and (min-height: 1000px) {
  body.world-zamek .pr-game .pr-task { height: auto; }
}

/* pet column has a fixed size (layout never waits for the sprite image) */
body.world-zamek .pr-game { --pet-h: min(40vh, 150px); }
@media (orientation: landscape) and (max-height: 500px) { body.world-zamek .pr-game { --pet-h: min(36vh, 126px); } }
@media (min-width: 1000px) and (min-height: 640px) { body.world-zamek .pr-game { --pet-h: 210px; } }
@media (orientation: landscape) {
  body.world-zamek .pr-game .pr-dragon { width: calc(var(--pet-h) * .92); }
  body.world-zamek .pr-game .pr-dragon .playroom-pet { height: var(--pet-h); }
}
/* relay: answers column hugs its content, stairs take the rest */
@media (orientation: landscape) { body.world-zamek .pr-task .pr-field--relay { grid-template-columns: auto minmax(220px, 1fr); } }
/* pairs needs the full card height for its grid */
body.world-zamek .pr-game--pairs .pr-task { align-self: stretch; }
body.world-zamek .pr-game--pairs .pr-task .pr-field { flex: 1 1 auto; }
/* tower: keep castle17's pile | tower grid; the tap-hand inside the pile would cover its label */
body.world-zamek .pr-task .tw-hand { display: none; }
/* verb pill stays on one line */
body.world-zamek .pr-task .pr-verb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 72%; }
body.world-zamek .pr-task .pr-q, body.world-zamek .pr-task .pr-q * { white-space: normal; overflow-wrap: break-word; }
@media (orientation: portrait) {
  body.world-zamek .pr-task .pr-verb { font-size: .8rem; padding: 3px 10px 4px 8px; max-width: 64%; }
  body.world-zamek .pr-game .pr-task { flex: 0 1 auto; }
  body.world-zamek .pr-game:is(.pr-game--catch, .pr-game--fire, .pr-game--egg, .pr-game--tower, .pr-game--relay, .pr-game--pairs) .pr-task { flex: 1 1 auto; }
  body.world-zamek .pr-task .pr-eq--sm { font-size: 1.15rem; }
  .kt-cake { width: clamp(64px, 21vw, 130px); }
  .kt-bowl { width: clamp(110px, 32vw, 180px); }
}
@media (min-width: 760px) and (min-height: 1000px) and (orientation: portrait) {
  .kt-cake { width: 130px; }
}
/* "?" sits right after the last group of the longer row (next to the extra items) */
body.world-zamek .rd-line { padding-right: 0; max-width: calc(21 * var(--it) + 92px); }
body.world-zamek .rd-qm { position: static; margin: 0; }
@media (orientation: portrait) { body.world-zamek .rd-line { max-width: calc(11 * var(--it) + 48px); } }
