/* Układanie v29 - PAE1 Natural Physics + czytelne LCD.
   Rdzeń grup pozostaje sztywny. Efekty wizualne używają istniejącego obrysu SVG,
   a surfacePush zmienia wyłącznie pozycję pojedynczych luźnych grup. */
.pz-uk-stage .pz-real-piece.pae-piece{
  position:absolute!important;
  left:0!important;
  top:0!important;
  margin:0!important;
  padding:0!important;
  transform-origin:0 0!important;
  transition:filter .14s ease,opacity .14s ease!important;
  will-change:transform,filter;
  contain:none!important;
  touch-action:none!important;
  user-select:none!important;
  -webkit-user-select:none!important;
}
.pz-uk-stage .pz-real-piece.pae-piece>svg{
  display:block;
  width:100%;
  height:100%;
  overflow:visible!important;
  transform:none!important;
  transform-origin:center!important;
}
.pz-uk-stage .pz-real-piece.pae-piece .pz-real-piece__outline{
  transition:stroke .12s ease,stroke-width .12s ease,filter .12s ease,opacity .12s ease;
}

/* Puzzel najpierw sunie po macie, potem jest unoszony. */
.pz-uk-stage .pz-real-piece.pae-piece.pae-surface-contact{
  cursor:grabbing;
  filter:brightness(.995) drop-shadow(0 2px 2px rgba(0,0,0,.22)) drop-shadow(0 4px 4px rgba(0,0,0,.08))!important;
}
.pz-uk-stage .pz-real-piece.pae-piece.pae-held,
.pz-uk-stage .pz-real-piece.pae-piece.pae-lifted{cursor:grabbing;}
.pz-uk-stage .pz-real-piece.pae-piece.pae-held.pae-weight-sm{
  filter:brightness(1.025) drop-shadow(0 10px 8px rgba(0,0,0,.30)) drop-shadow(0 18px 14px rgba(0,0,0,.14))!important;
}
.pz-uk-stage .pz-real-piece.pae-piece.pae-held.pae-weight-md{
  filter:brightness(1.03) drop-shadow(0 12px 9px rgba(0,0,0,.32)) drop-shadow(0 21px 16px rgba(0,0,0,.15))!important;
}
.pz-uk-stage .pz-real-piece.pae-piece.pae-held.pae-weight-lg{
  filter:brightness(1.035) drop-shadow(0 14px 10px rgba(0,0,0,.34)) drop-shadow(0 24px 18px rgba(0,0,0,.16))!important;
}
.pz-uk-stage .pz-real-piece.pae-piece.pae-held.pae-weight-xl{
  filter:brightness(1.04) drop-shadow(0 16px 12px rgba(0,0,0,.36)) drop-shadow(0 28px 20px rgba(0,0,0,.17))!important;
}

/* Delikatne fizyczne odsunięcie luźnego puzzla. */
.pz-uk-stage .pz-real-piece.pae-piece.pae-surface-pushed{
  filter:brightness(1.025) drop-shadow(0 4px 4px rgba(0,0,0,.18))!important;
}

/* Efekty wizualne nie dotykają pozycji ani grupowania.
   Near pokazuje tylko faktycznie pasującą parę, nie całą złożoną grupę. */
.pz-uk-stage .pz-real-piece.pae-piece.pae-near .pz-real-piece__outline{
  stroke:#ff9b52!important;
  stroke-width:2.4!important;
  filter:drop-shadow(0 0 2px rgba(255,90,0,.40));
}
.pz-uk-stage .pz-real-piece.pae-piece.pae-almost .pz-real-piece__outline{
  stroke:#ff6a18!important;
  stroke-width:3.4!important;
  filter:drop-shadow(0 0 4px rgba(255,90,0,.62));
}
/* Po poprawnym złączeniu pomarańczowy obrys potwierdza klik i znika równo po 1 s. */
.pz-uk-stage .pz-real-piece.pae-piece.pae-joined-confirm .pz-real-piece__outline{
  stroke:#ff5a00!important;
  stroke-width:3.4!important;
  filter:drop-shadow(0 0 4px rgba(255,90,0,.55));
  animation:pzUk29JoinedConfirm 1s ease-out both;
}
.pz-uk-stage .pz-real-piece.pae-piece.pae-hint .pz-real-piece__outline{
  stroke:#ffd000!important;
  stroke-width:4.7!important;
  filter:drop-shadow(0 0 7px rgba(255,208,0,.96));
  animation:pzUk28ManualHint .72s ease-in-out infinite alternate;
}
.pz-uk-stage .pz-real-piece.pae-piece.pae-auto-hint{
  z-index:910!important;
}
.pz-uk-stage .pz-real-piece.pae-piece.pae-auto-hint .pz-real-piece__outline{
  stroke:#ffd000!important;
  stroke-width:5.2!important;
  filter:drop-shadow(0 0 9px rgba(255,208,0,1));
  animation:pzUk28AutoHintOutline .72s ease-in-out 6 alternate;
}
/* Osobny ruch SVG nie dotyka transformacji pozycyjnej na zewnętrznym .pz-real-piece. */
.pz-uk-stage .pz-real-piece.pae-piece.pae-auto-hint>svg{
  animation:pzUk28AutoHintBounce .72s ease-in-out 6;
}
.pz-uk-stage .pz-real-piece.pae-piece.pae-snap-flash .pz-real-piece__outline{
  stroke:#ff5a00!important;
  stroke-width:4.8!important;
  animation:pzUk28Snap .26s ease-out;
}
.pz-uk-stage .pz-real-piece.pae-piece.pae-break-flash .pz-real-piece__outline{
  stroke:#d6332f!important;
  stroke-width:4.5!important;
  animation:pzUk28Break .32s ease-out;
}
.pz-uk-stage .pz-real-piece.pae-piece.pae-edge-touch .pz-real-piece__outline{
  stroke:#59616b!important;
  stroke-width:3.2!important;
  animation:pzUk28Edge .18s ease-out;
}
.pz-uk-stage .pz-real-piece.pae-piece.pae-drop-settle{
  filter:brightness(.995) drop-shadow(0 3px 2px rgba(0,0,0,.24)) drop-shadow(0 7px 6px rgba(0,0,0,.10))!important;
  animation:pzUk28Settle .20s ease-out;
}

.pz-uk-stage.pae-integrity-error{
  outline:4px solid #c92a2a!important;
  outline-offset:-4px!important;
}

@keyframes pzUk28ManualHint{
  from{stroke:#ffc400;stroke-width:3.6;filter:drop-shadow(0 0 3px rgba(255,196,0,.58));}
  to{stroke:#ffe36a;stroke-width:5.6;filter:drop-shadow(0 0 10px rgba(255,208,0,1));}
}
@keyframes pzUk28AutoHintOutline{
  0%,100%{stroke:#ffb300;stroke-width:3.8;filter:drop-shadow(0 0 3px rgba(255,179,0,.62));}
  50%{stroke:#fff078;stroke-width:5.8;filter:drop-shadow(0 0 11px rgba(255,208,0,1));}
}
@keyframes pzUk28AutoHintBounce{
  0%,100%{translate:0 0;}
  45%{translate:0 -5px;}
}
@keyframes pzUk29JoinedConfirm{
  0%{stroke:#ff5a00;stroke-width:4.4;filter:drop-shadow(0 0 7px rgba(255,90,0,.82));}
  55%{stroke:#ff7a2a;stroke-width:3.3;filter:drop-shadow(0 0 3px rgba(255,90,0,.40));}
  100%{stroke:#111;stroke-width:1.25;filter:none;}
}
@keyframes pzUk28Snap{
  0%{stroke-width:2;filter:drop-shadow(0 0 1px rgba(255,90,0,.2));}
  45%{stroke-width:5.4;filter:drop-shadow(0 0 8px rgba(255,90,0,.98));}
  100%{stroke-width:1.25;filter:none;}
}
@keyframes pzUk28Break{
  0%{stroke-width:2;filter:none;}
  45%{stroke-width:5.2;filter:drop-shadow(0 0 8px rgba(214,51,47,.95));}
  100%{stroke-width:1.25;filter:none;}
}
@keyframes pzUk28Settle{
  0%{filter:brightness(1.02) drop-shadow(0 7px 6px rgba(0,0,0,.20));}
  100%{filter:brightness(1) drop-shadow(0 2px 2px rgba(0,0,0,.10));}
}
@keyframes pzUk28Edge{
  0%{stroke-width:1.25;}
  50%{stroke-width:3.4;}
  100%{stroke-width:1.25;}
}

/* Pauza: większy znak i możliwość wznowienia kliknięciem w całą matę/overlay. */
.pz-uk-stage .pz-uk-pause{cursor:pointer!important;}
.pz-uk-stage .pz-uk-pause img{
  width:min(90%,680px)!important;
  max-height:62%!important;
}
.pz-uk-stage .pz-uk-pause span{
  font-size:clamp(15px,2.2vw,22px)!important;
  letter-spacing:.06em!important;
}

@media(prefers-reduced-motion:reduce){
  .pz-uk-stage .pz-real-piece.pae-piece .pz-real-piece__outline,
  .pz-uk-stage .pz-real-piece.pae-piece.pae-drop-settle,
  .pz-uk-stage .pz-real-piece.pae-piece.pae-auto-hint>svg{animation:none!important;}
  .pz-uk-stage .pz-real-piece.pae-piece.pae-hint .pz-real-piece__outline,
  .pz-uk-stage .pz-real-piece.pae-piece.pae-auto-hint .pz-real-piece__outline{
    stroke:#ffd000!important;
    stroke-width:4.6px!important;
    filter:drop-shadow(0 0 7px rgba(255,208,0,.9))!important;
  }
}


/* ================================================================
   v29: czytelne LCD w retro panelach Układania
   Etykieta jest wyśrodkowana, wartość bezpośrednio pod nią.
   Rozmiar fontu ostatecznie dopasowuje puzzle-games-retro-v5.js.
   ================================================================ */
body.pz-uk-page .pz-retro-lcd-slot .pz-retro-stat,
body.pz-uk-page .pz-retro-bottom-lcd .pz-retro-stat-mirror{
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  padding:0 4%!important;
  margin:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:1px!important;
  text-align:center!important;
  box-sizing:border-box!important;
}
body.pz-uk-page .pz-retro-lcd-slot .pz-retro-stat span,
body.pz-uk-page .pz-retro-bottom-lcd .pz-retro-stat-mirror__label{
  width:100%!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important;
  line-height:.96!important;
  letter-spacing:.025em!important;
  overflow:hidden!important;
  text-overflow:clip!important;
}
body.pz-uk-page .pz-retro-lcd-slot .pz-retro-stat b,
body.pz-uk-page .pz-retro-bottom-lcd .pz-retro-stat-mirror__value{
  width:100%!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important;
  line-height:.94!important;
  letter-spacing:.015em!important;
  overflow:hidden!important;
  text-overflow:clip!important;
}


/* ================================================================
   v30: LCD jak szkic użytkownika
   Każdy ekran: zwarty blok NAPIS bezpośrednio nad LICZBĄ,
   całość wyśrodkowana w szybie LCD. Bez sztucznego podziału 42/58.
   ================================================================ */
body.pz-uk-page .pz-retro-lcd-slot .pz-retro-stat,
body.pz-uk-page .pz-retro-bottom-lcd .pz-retro-stat-mirror{
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  box-sizing:border-box!important;
  padding:3% 4%!important;
  margin:0!important;
  display:grid!important;
  grid-template-columns:100%!important;
  grid-template-rows:max-content max-content!important;
  place-content:center!important;
  justify-items:center!important;
  align-items:center!important;
  row-gap:0!important;
  overflow:hidden!important;
  text-align:center!important;
}
body.pz-uk-page .pz-retro-lcd-slot .pz-retro-stat span,
body.pz-uk-page .pz-retro-bottom-lcd .pz-retro-stat-mirror__label{
  position:static!important;
  flex:none!important;
  width:auto!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  display:block!important;
  align-self:end!important;
  justify-self:center!important;
  text-align:center!important;
  line-height:.88!important;
  letter-spacing:.01em!important;
  font-weight:1000!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  transform:none!important;
}
body.pz-uk-page .pz-retro-lcd-slot .pz-retro-stat b,
body.pz-uk-page .pz-retro-bottom-lcd .pz-retro-stat-mirror__value{
  position:static!important;
  flex:none!important;
  width:auto!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  display:block!important;
  align-self:start!important;
  justify-self:center!important;
  text-align:center!important;
  line-height:.88!important;
  letter-spacing:.01em!important;
  font-weight:1000!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  transform:none!important;
  font-variant-numeric:tabular-nums!important;
}
/* Dodatkowo kasujemy starsze reguły v6, które rezerwowały osobne 42% i 58% LCD. */
body.pz-uk-page.pz-retro-ui-v6 .pz-retro-stat span,
body.pz-uk-page.pz-retro-ui-v6 .pz-retro-stat-mirror__label,
body.pz-uk-page.pz-retro-ui-v6 .pz-retro-stat b,
body.pz-uk-page.pz-retro-ui-v6 .pz-retro-stat-mirror__value{
  flex-basis:auto!important;
}


/* ================================================================
   v31: celebracja ukonczenia - duzy puchar, czytelny wynik, czysta gra
   Rdzen fizyki pozostaje bez zmian.
   ================================================================ */
body.pz-uk-page .pz-control-message,
body.pz-uk-page .pz-game-status.pz-retro-status{
  display:none!important;
}

body.pz-uk-page .pz-uk-complete{
  background:
    radial-gradient(circle at 50% 43%,rgba(255,244,186,.18),transparent 42%),
    rgba(250,247,240,.34)!important;
  backdrop-filter:blur(.65px) saturate(.96)!important;
  -webkit-backdrop-filter:blur(.65px) saturate(.96)!important;
  padding:clamp(10px,2.2vw,24px)!important;
  overflow:hidden!important;
}
html[data-theme="dark"] body.pz-uk-page .pz-uk-complete{
  background:
    radial-gradient(circle at 50% 43%,rgba(255,182,78,.12),transparent 42%),
    rgba(11,14,17,.42)!important;
}

body.pz-uk-page .pz-uk-complete .pz-win-result-card.pz-uk31-win{
  position:relative;
  z-index:3;
  width:min(92%,620px);
  max-height:94%;
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:clamp(7px,1.25vh,14px)!important;
  margin:0 auto!important;
  padding:clamp(8px,1.4vw,18px)!important;
  border:0!important;
  border-radius:24px;
  background:transparent!important;
  box-shadow:none!important;
  color:#20242a;
  overflow:visible;
  isolation:isolate;
}
html[data-theme="dark"] body.pz-uk-page .pz-uk-complete .pz-uk31-win{color:#f3f5f7;}

body.pz-uk-page .pz-uk31-finish-head{
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:clamp(6px,1vh,12px)!important;
  margin:0!important;
  width:100%;
}
body.pz-uk-page .pz-uk31-completed{
  width:min(76%,390px)!important;
  max-height:clamp(94px,20vh,176px)!important;
  height:auto!important;
  object-fit:contain;
  filter:drop-shadow(0 10px 13px rgba(0,0,0,.24))!important;
  transform-origin:center;
  animation:pzUk31CompletedPop .54s cubic-bezier(.18,.92,.25,1.25) both;
}

body.pz-uk-page .pz-uk31-awards{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(8px,2.2vw,24px);
  min-height:clamp(104px,19vh,170px);
}
body.pz-uk-page .pz-uk31-score30{
  width:min(40%,210px);
  max-height:clamp(74px,15vh,132px);
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 7px 10px rgba(0,0,0,.20));
  transform-origin:center;
  animation:pzUk31ScorePop .48s cubic-bezier(.16,.9,.23,1.25) .18s both;
}
body.pz-uk-page .pz-uk31-trophy-stage{
  position:relative;
  width:clamp(118px,23vw,190px);
  height:clamp(104px,19vh,168px);
  display:grid;
  place-items:center;
  transform-origin:50% 92%;
  animation:pzUk31TrophyLand .72s cubic-bezier(.17,.94,.27,1.34) .34s both;
}
body.pz-uk-page .pz-uk31-trophy-stage::before,
body.pz-uk-page .pz-uk31-trophy-stage::after{
  content:"";
  position:absolute;
  inset:3% 0 0;
  border-radius:50%;
  pointer-events:none;
}
body.pz-uk-page .pz-uk31-trophy-stage::before{
  background:repeating-conic-gradient(from 0deg,rgba(255,194,37,.0) 0 9deg,rgba(255,194,37,.30) 10deg 13deg,rgba(255,194,37,.0) 14deg 28deg);
  -webkit-mask:radial-gradient(circle,transparent 0 30%,#000 31% 61%,transparent 62%);
  mask:radial-gradient(circle,transparent 0 30%,#000 31% 61%,transparent 62%);
  animation:pzUk31Rays 4.5s linear 1.0s infinite;
  opacity:.72;
}
body.pz-uk-page .pz-uk31-trophy-glow{
  position:absolute;
  width:86%;height:72%;
  border-radius:50%;
  background:radial-gradient(circle,rgba(255,226,103,.56) 0,rgba(255,177,45,.18) 48%,transparent 72%);
  filter:blur(3px);
  animation:pzUk31Glow 1.35s ease-in-out .7s 2 alternate;
}
body.pz-uk-page .pz-uk31-trophy{
  position:relative;
  z-index:2;
  width:100%;
  max-width:190px;
  height:100%;
  max-height:168px;
  object-fit:contain;
  filter:drop-shadow(0 11px 9px rgba(73,40,0,.27));
  transform-origin:50% 88%;
  animation:pzUk31TrophyWiggle 1.15s ease-in-out 1.03s 2 both;
}
body.pz-uk-page .pz-uk31-trophy-stage::after{
  z-index:3;
  inset:8% 16% 10%;
  background:linear-gradient(105deg,transparent 20%,rgba(255,255,255,.78) 47%,transparent 70%);
  transform:translateX(-145%) skewX(-18deg);
  animation:pzUk31Shine 1.0s ease-out 1.05s 1 both;
  mix-blend-mode:screen;
}

body.pz-uk-page .pz-uk31-summary{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:clamp(5px,.9vh,9px);
  width:min(96%,560px);
  animation:pzUk31SummaryIn .48s ease-out .86s both;
}
body.pz-uk-page .pz-uk31-summary-title{
  display:block;
  margin:0!important;
  font-size:clamp(18px,3.1vw,30px)!important;
  line-height:1!important;
  font-weight:1000!important;
  letter-spacing:.055em!important;
  color:#20242a!important;
  text-align:center;
  text-shadow:0 1px 0 rgba(255,255,255,.6);
}
html[data-theme="dark"] body.pz-uk-page .pz-uk31-summary-title{color:#f2f4f6!important;text-shadow:0 1px 0 rgba(0,0,0,.28);}
body.pz-uk-page .pz-uk31-stats{
  width:100%;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(5px,1.1vw,10px);
}
body.pz-uk-page .pz-uk31-stat{
  min-width:0;
  padding:clamp(7px,1.1vh,11px) clamp(6px,1vw,10px);
  border:1px solid rgba(77,57,31,.18);
  border-radius:12px;
  background:rgba(255,250,239,.74);
  box-shadow:0 4px 12px rgba(44,31,14,.10);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  backdrop-filter:blur(2px);
}
html[data-theme="dark"] body.pz-uk-page .pz-uk31-stat{background:rgba(25,29,33,.78);border-color:rgba(255,255,255,.12);}
body.pz-uk-page .pz-uk31-stat span{
  margin:0!important;
  font-size:clamp(10px,1.55vw,14px)!important;
  line-height:1!important;
  font-weight:1000!important;
  letter-spacing:.09em!important;
  color:#5e574e!important;
}
html[data-theme="dark"] body.pz-uk-page .pz-uk31-stat span{color:#b8c0c7!important;}
body.pz-uk-page .pz-uk31-stat b{
  margin:0!important;
  font-size:clamp(21px,4.2vw,38px)!important;
  line-height:.98!important;
  font-weight:1000!important;
  color:#171b20!important;
  letter-spacing:.01em!important;
  font-variant-numeric:tabular-nums;
}
html[data-theme="dark"] body.pz-uk-page .pz-uk31-stat b{color:#fff!important;}
body.pz-uk-page .pz-uk31-record{
  margin-top:1px;
  padding:5px 11px 4px;
  border-radius:999px;
  background:#ff5a00;
  color:#fff;
  font-size:clamp(10px,1.45vw,13px);
  line-height:1;
  font-weight:1000;
  letter-spacing:.06em;
  box-shadow:0 5px 12px rgba(255,90,0,.25);
  animation:pzUk31RecordPop .46s cubic-bezier(.18,.9,.22,1.28) 1.16s both;
}

body.pz-uk-page .pz-uk-complete .pz-win-close{
  top:8px;
  right:8px;
  background:rgba(255,250,239,.84);
  backdrop-filter:blur(3px);
}
html[data-theme="dark"] body.pz-uk-page .pz-uk-complete .pz-win-close{background:rgba(24,28,32,.86);}

@keyframes pzUk31CompletedPop{
  0%{opacity:0;transform:translateY(-18px) scale(.76)}
  68%{opacity:1;transform:translateY(2px) scale(1.055)}
  100%{opacity:1;transform:none}
}
@keyframes pzUk31ScorePop{
  0%{opacity:0;transform:translateY(14px) scale(.66) rotate(-3deg)}
  72%{opacity:1;transform:translateY(-2px) scale(1.06) rotate(1deg)}
  100%{opacity:1;transform:none}
}
@keyframes pzUk31TrophyLand{
  0%{opacity:0;transform:translateY(-52px) scale(.48)}
  54%{opacity:1;transform:translateY(6px) scale(1.10)}
  72%{transform:translateY(-4px) scale(.97)}
  86%{transform:translateY(2px) scale(1.025)}
  100%{opacity:1;transform:none}
}
@keyframes pzUk31TrophyWiggle{
  0%,100%{transform:rotate(0)}
  18%{transform:rotate(-8deg)}
  38%{transform:rotate(7deg)}
  58%{transform:rotate(-5deg)}
  78%{transform:rotate(3deg)}
}
@keyframes pzUk31Rays{to{transform:rotate(360deg)}}
@keyframes pzUk31Glow{from{opacity:.48;transform:scale(.9)}to{opacity:1;transform:scale(1.08)}}
@keyframes pzUk31Shine{0%{opacity:0;transform:translateX(-145%) skewX(-18deg)}15%{opacity:1}100%{opacity:0;transform:translateX(145%) skewX(-18deg)}}
@keyframes pzUk31SummaryIn{0%{opacity:0;transform:translateY(16px)}100%{opacity:1;transform:none}}
@keyframes pzUk31RecordPop{0%{opacity:0;transform:scale(.62)}75%{opacity:1;transform:scale(1.08)}100%{opacity:1;transform:none}}

@media(max-width:820px) and (orientation:portrait){
  body.pz-uk-page .pz-uk-complete{padding:8px!important;}
  body.pz-uk-page .pz-uk31-completed{width:min(78%,330px)!important;max-height:126px!important;}
  body.pz-uk-page .pz-uk31-awards{min-height:100px;gap:5px;}
  body.pz-uk-page .pz-uk31-score30{width:min(44%,180px);max-height:100px;}
  body.pz-uk-page .pz-uk31-trophy-stage{width:clamp(105px,30vw,155px);height:clamp(92px,16vh,136px);}
  body.pz-uk-page .pz-uk31-trophy{max-width:155px;max-height:136px;}
  body.pz-uk-page .pz-uk31-summary{width:min(98%,470px);}
  body.pz-uk-page .pz-uk31-stat{padding:7px 4px;}
}
@media(max-height:650px) and (orientation:landscape){
  body.pz-uk-page .pz-uk31-win{gap:4px!important;padding:6px!important;}
  body.pz-uk-page .pz-uk31-completed{width:min(54%,300px)!important;max-height:86px!important;}
  body.pz-uk-page .pz-uk31-awards{min-height:82px;gap:5px;}
  body.pz-uk-page .pz-uk31-score30{width:min(28%,160px);max-height:76px;}
  body.pz-uk-page .pz-uk31-trophy-stage{width:104px;height:82px;}
  body.pz-uk-page .pz-uk31-trophy{max-width:104px;max-height:82px;}
  body.pz-uk-page .pz-uk31-summary-title{font-size:18px!important;}
  body.pz-uk-page .pz-uk31-stat{padding:5px 4px;}
  body.pz-uk-page .pz-uk31-stat b{font-size:20px!important;}
}
@media(prefers-reduced-motion:reduce){
  body.pz-uk-page .pz-uk31-completed,
  body.pz-uk-page .pz-uk31-score30,
  body.pz-uk-page .pz-uk31-trophy-stage,
  body.pz-uk-page .pz-uk31-trophy,
  body.pz-uk-page .pz-uk31-trophy-stage::before,
  body.pz-uk-page .pz-uk31-trophy-stage::after,
  body.pz-uk-page .pz-uk31-trophy-glow,
  body.pz-uk-page .pz-uk31-summary,
  body.pz-uk-page .pz-uk31-record{animation:none!important;}
}

/* ==========================================================
   v32 - tryby gry i kampania. Stabilna fizyka v31 bez zmian.
   ========================================================== */

/* Górne podpisy przy przełączniku i pokrętle mają być czytelne. */
body.pz-uk-page .pz-retro-caption{
  font-size:clamp(8px,.78vw,12px)!important;
  font-weight:900!important;
  letter-spacing:.035em!important;
  line-height:1!important;
  text-shadow:0 1px 0 rgba(255,255,255,.22)!important;
}
body.pz-uk-page .pz-retro-caption--sound,
body.pz-uk-page .pz-retro-caption--options{
  transform:translateY(-1px) scale(1.12)!important;
  transform-origin:center!important;
}

/* Dyskretny status trybu na macie. Nie bierze udziału w fizyce. */
.pz-uk32-mode-badge{
  position:absolute;
  z-index:42;
  left:clamp(10px,1.25vw,18px);
  top:clamp(10px,1.25vw,18px);
  pointer-events:none;
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border:1px solid rgba(74,61,45,.24);
  border-radius:999px;
  background:rgba(255,249,237,.82);
  box-shadow:0 4px 14px rgba(49,40,31,.10);
  color:#383027;
  backdrop-filter:blur(3px);
  font-size:clamp(9px,.72vw,12px);
}
.pz-uk32-mode-badge[hidden]{display:none!important;}
.pz-uk32-mode-badge b{font-size:1em;letter-spacing:.05em;}
.pz-uk32-mode-badge span{opacity:.74;font-weight:700;}
html[data-theme="dark"] .pz-uk32-mode-badge{background:rgba(33,35,36,.84);color:#f3efe7;border-color:rgba(255,255,255,.14);}

/* Powitanie i wybór trybu. */
.pz-uk32-mode-overlay{
  position:fixed;
  inset:0;
  z-index:10080;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(28,24,20,.48);
  backdrop-filter:blur(6px);
}
.pz-uk32-mode-overlay[hidden]{display:none!important;}
.pz-uk32-mode-card{
  width:min(840px,96vw);
  max-height:min(850px,94vh);
  overflow:auto;
  padding:clamp(22px,3vw,38px);
  border:1px solid rgba(112,72,38,.22);
  border-radius:28px;
  background:linear-gradient(145deg,#fffaf0,#fff2df 65%,#ffe8d4);
  box-shadow:0 28px 90px rgba(25,20,16,.30),inset 0 1px 0 #fff;
  color:#1c2430;
  text-align:center;
}
html[data-theme="dark"] .pz-uk32-mode-card{
  background:linear-gradient(145deg,#242729,#1e2022 70%,#25201d);
  color:#f7f3eb;
  border-color:rgba(255,255,255,.12);
}
.pz-uk32-mode-card .pz-kicker{display:block;margin-bottom:5px;color:#ef5b17;font-weight:900;letter-spacing:.14em;text-transform:uppercase;font-size:12px;}
.pz-uk32-mode-card h2{margin:0;font-size:clamp(31px,5vw,52px);line-height:1.03;}
.pz-uk32-mode-card h3{margin:24px 0 14px;font-size:clamp(19px,2.4vw,28px);}
.pz-uk32-welcome-copy{max-width:690px;margin:14px auto 6px;font-size:clamp(15px,1.6vw,18px);line-height:1.55;}
.pz-uk32-signoff{margin:7px 0 0;font-size:16px;}
.pz-uk32-signoff b{font-style:italic;}
.pz-uk32-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;}
.pz-uk32-mode-choice{
  min-height:208px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:18px;
  border:2px solid rgba(239,91,23,.25);
  border-radius:22px;
  background:rgba(255,255,255,.72);
  box-shadow:0 9px 24px rgba(92,55,28,.10);
  color:inherit;
  cursor:pointer;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.pz-uk32-mode-choice:hover,.pz-uk32-mode-choice:focus-visible{transform:translateY(-3px);box-shadow:0 15px 30px rgba(92,55,28,.18);border-color:#ff650f;outline:none;}
html[data-theme="dark"] .pz-uk32-mode-choice{background:rgba(255,255,255,.055);border-color:rgba(255,112,33,.28);}
.pz-uk32-mode-choice strong{font-size:clamp(17px,2vw,23px);line-height:1.08;}
.pz-uk32-mode-choice small{max-width:310px;font-size:14px;line-height:1.35;opacity:.75;}
.pz-uk32-mode-choice img{width:min(265px,76%);max-height:82px;object-fit:contain;filter:drop-shadow(0 8px 8px rgba(51,31,14,.12));}
.pz-uk32-mode-icon{
  width:92px;height:70px;display:grid;place-items:center;
  border:9px solid #f46715;border-radius:18px;background:#bfc9a1;
  box-shadow:inset 0 0 0 5px #1b1c19,0 7px 16px rgba(64,37,18,.15);
  font:900 32px/1 ui-monospace,monospace;color:#1a1a16;
}
.pz-uk32-mode-note{margin:16px 0 0;font-size:13px;opacity:.65;}

/* Ekrany między poziomami i po przekroczeniu czasu. */
.pz-uk32-challenge-overlay{
  position:absolute;
  inset:0;
  z-index:82;
  display:grid;
  place-items:center;
  padding:16px;
  background:rgba(250,244,232,.52);
  backdrop-filter:blur(2px);
}
.pz-uk32-challenge-overlay[hidden]{display:none!important;}
html[data-theme="dark"] .pz-uk32-challenge-overlay{background:rgba(22,24,25,.54);}
.pz-uk32-level-card,
.pz-uk32-timeup-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  max-width:min(600px,90%);
  text-align:center;
  animation:uk32CardIn .36s cubic-bezier(.2,.85,.24,1.18) both;
}
.pz-uk32-level-art{width:min(510px,88vw);max-height:178px;object-fit:contain;filter:drop-shadow(0 15px 14px rgba(59,34,15,.18));}
.pz-uk32-time-art{width:min(320px,66vw);max-height:120px;object-fit:contain;}
.pz-uk32-level-card strong{font-size:clamp(30px,5vw,54px);font-variant-numeric:tabular-nums;letter-spacing:.04em;color:#241d17;}
html[data-theme="dark"] .pz-uk32-level-card strong{color:#fff7ea;}
.pz-uk32-level-card p{margin:0;padding:7px 13px;border-radius:999px;background:rgba(255,255,255,.82);font-weight:900;color:#383028;}
.pz-uk32-level-card small{margin-top:4px;padding:5px 9px;border-radius:999px;background:rgba(255,255,255,.68);color:#575049;font-weight:700;}
.pz-uk32-timeup-card>img{width:min(460px,84vw);max-height:190px;object-fit:contain;}
.pz-uk32-timeup-card>button:first-of-type{border:0;background:none;padding:0;cursor:pointer;transition:transform .14s ease;}
.pz-uk32-timeup-card>button:first-of-type:hover{transform:scale(1.035);}
.pz-uk32-timeup-card>button:first-of-type img{width:min(430px,80vw);max-height:160px;object-fit:contain;}
.pz-uk32-text-button{border:0;border-radius:999px;background:#f35b17;color:#fff;padding:10px 20px;font-weight:900;font-size:15px;cursor:pointer;box-shadow:0 7px 18px rgba(80,42,15,.18);}
@keyframes uk32CardIn{from{opacity:0;transform:scale(.78) translateY(18px)}to{opacity:1;transform:scale(1) translateY(0)}}

/* Finał kampanii. */
.pz-uk32-finish-level{width:min(300px,45%);max-height:78px;object-fit:contain;margin:0 auto 5px;display:block;}
.pz-uk32-master{width:min(360px,65%);max-height:190px;object-fit:contain;margin:-4px auto 4px;display:block;animation:uk32MasterIn .7s .45s cubic-bezier(.15,.8,.2,1.25) both;filter:drop-shadow(0 14px 18px rgba(116,65,16,.24));}
@keyframes uk32MasterIn{from{opacity:0;transform:translateY(35px) scale(.62) rotate(-5deg)}to{opacity:1;transform:translateY(0) scale(1) rotate(0)}}

@media (max-width:720px){
  .pz-uk32-mode-grid{grid-template-columns:1fr;}
  .pz-uk32-mode-choice{min-height:160px;}
  .pz-uk32-mode-badge{max-width:70%;flex-wrap:wrap;gap:3px 7px;}
}

@media (prefers-reduced-motion:reduce){
  .pz-uk32-mode-choice,.pz-uk32-level-card,.pz-uk32-timeup-card,.pz-uk32-master{animation:none!important;transition:none!important;}
}


/* ==========================================================
   v33 - nowe assety wyboru trybu, overlay poziomu zawsze nad
   pudelkiem oraz czytelniejsze DZWIEK / OPCJE.
   ========================================================== */

/* Nowe gotowe tabliczki wyboru trybu. */
body.pz-uk-page .pz-uk32-mode-choice{
  min-height:190px;
  padding:16px 14px 14px;
  gap:10px;
}
body.pz-uk-page .pz-uk33-mode-art{
  display:block;
  width:min(560px,96%);
  max-width:100%;
  height:auto;
  max-height:132px;
  object-fit:contain;
  filter:drop-shadow(0 9px 10px rgba(51,31,14,.14));
  pointer-events:none;
  user-select:none;
}
body.pz-uk-page .pz-uk32-mode-choice small{
  margin-top:2px;
  max-width:430px;
  font-size:clamp(13px,1.15vw,15px);
  line-height:1.35;
}

/* Overlay poziomu jest poza stage, wiec nie moze wpasc pod pudelko. */
body.pz-uk-page .pz-uk32-challenge-overlay{
  position:fixed!important;
  inset:0!important;
  z-index:12050!important;
  display:grid!important;
  place-items:center!important;
  padding:18px!important;
  background:rgba(250,244,232,.58)!important;
  backdrop-filter:blur(3px)!important;
  isolation:isolate!important;
}
body.pz-uk-page .pz-uk32-challenge-overlay[hidden]{
  display:none!important;
}
html[data-theme="dark"] body.pz-uk-page .pz-uk32-challenge-overlay{
  background:rgba(22,24,25,.62)!important;
}
body.pz-uk-page .pz-uk32-level-card,
body.pz-uk-page .pz-uk32-timeup-card{
  position:relative!important;
  z-index:1!important;
}

/* Wspolny retro CSS ma bardziej specyficzne reguly, dlatego tutaj
   celowo przebijamy je jeszcze bardziej specyficznym selektorem. */
body.pz-game-page.pz-retro-ui-v3.pz-uk-page .pz-retro-caption.pz-retro-caption--sound,
body.pz-game-page.pz-retro-ui-v3.pz-uk-page .pz-retro-caption.pz-retro-caption--options{
  font-size:clamp(10.8px,1.08vw,15.6px)!important;
  font-weight:950!important;
  letter-spacing:0!important;
  line-height:1!important;
  color:#21150e!important;
  text-shadow:0 1px 0 rgba(255,255,255,.34)!important;
  width:max-content!important;
  max-width:none!important;
  white-space:nowrap!important;
  text-align:center!important;
  transform:translateX(-50%)!important;
}
body.pz-game-page.pz-retro-ui-v3.pz-uk-page .pz-retro-caption.pz-retro-caption--sound{
  left:88.70%!important;
  top:79.1%!important;
}
body.pz-game-page.pz-retro-ui-v3.pz-uk-page .pz-retro-caption.pz-retro-caption--options{
  left:94.20%!important;
  top:79.1%!important;
}

@media (max-width:820px) and (orientation:portrait){
  body.pz-uk-page .pz-uk33-mode-art{
    width:min(500px,98%);
    max-height:112px;
  }
  body.pz-game-page.pz-retro-ui-v3.pz-uk-page .pz-retro-caption.pz-retro-caption--sound,
  body.pz-game-page.pz-retro-ui-v3.pz-uk-page .pz-retro-caption.pz-retro-caption--options{
    font-size:clamp(7.7px,2.1vw,9.8px)!important;
  }
}


/* v34: między poziomami całe podsumowanie jest przyciskiem Dalej.
   Zamknij znika tylko na poziomach 1-9 wyzwania. */
body.pz-uk-page .pz-uk-complete.pz-uk34-tap-next{
  cursor:pointer;
}
body.pz-uk-page .pz-uk-complete.pz-uk34-tap-next .pz-win-close{
  display:none!important;
}

/* v34: wybór 1 lub 10 własnych zdjęć dla kampanii 10 poziomów. */
body.pz-uk-page.pz-uk34-photo-choice-open{
  overflow:hidden!important;
}
.pz-uk34-photo-choice[hidden]{display:none!important;}
.pz-uk34-photo-choice{
  position:fixed;
  inset:0;
  z-index:12050;
  display:grid;
  place-items:center;
  padding:clamp(14px,3vw,34px);
  background:rgba(20,18,15,.64);
  backdrop-filter:blur(6px) saturate(.92);
  -webkit-backdrop-filter:blur(6px) saturate(.92);
}
.pz-uk34-photo-choice__card{
  position:relative;
  width:min(760px,96vw);
  max-height:min(92vh,720px);
  overflow:auto;
  box-sizing:border-box;
  padding:clamp(20px,3.5vw,34px);
  border:5px solid #1b1c1d;
  border-radius:30px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.18),transparent 20%),
    linear-gradient(145deg,#ff7318,#d94b07 65%,#b93705);
  box-shadow:
    0 0 0 4px rgba(255,155,61,.38) inset,
    0 18px 54px rgba(0,0,0,.35);
  color:#17191c;
}
.pz-uk34-photo-choice__card::before{
  content:"";
  position:absolute;
  inset:10px;
  border:2px solid rgba(74,28,5,.42);
  border-radius:22px;
  pointer-events:none;
}
.pz-uk34-photo-choice__close{
  position:absolute;
  z-index:3;
  top:14px;
  right:16px;
  width:42px;
  height:42px;
  border:3px solid #1b1c1d;
  border-radius:50%;
  background:#f4e8cf;
  color:#17191c;
  font:1000 28px/1 Manrope,system-ui,sans-serif;
  cursor:pointer;
  box-shadow:0 3px 0 rgba(0,0,0,.22);
}
.pz-uk34-photo-choice__head{
  position:relative;
  z-index:2;
  width:min(620px,92%);
  margin:0 auto clamp(18px,3vw,28px);
  padding:clamp(16px,2.6vw,24px);
  border:4px solid #151719;
  border-radius:20px;
  background:#f8f0df;
  box-shadow:0 5px 0 rgba(87,31,4,.22);
  text-align:center;
}
.pz-uk34-photo-choice__head span{
  display:block;
  margin-bottom:5px;
  color:#f05b13;
  font:1000 clamp(10px,1.4vw,13px)/1 Manrope,system-ui,sans-serif;
  letter-spacing:.12em;
}
.pz-uk34-photo-choice__head h2{
  margin:0;
  font:1000 clamp(24px,4vw,40px)/1.02 Manrope,system-ui,sans-serif;
  letter-spacing:-.035em;
}
.pz-uk34-photo-choice__head p{
  margin:10px auto 0;
  max-width:560px;
  font:700 clamp(13px,1.8vw,16px)/1.45 Manrope,system-ui,sans-serif;
  color:#403a33;
}
.pz-uk34-photo-choice__options{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:clamp(12px,2.2vw,20px);
}
.pz-uk34-photo-tile{
  appearance:none;
  min-width:0;
  min-height:250px;
  padding:clamp(14px,2.4vw,22px);
  border:4px solid #17191b;
  border-radius:24px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.18),transparent 18%),
    linear-gradient(145deg,#ff761b,#e3520a 72%,#c03a05);
  color:#17191b;
  cursor:pointer;
  box-shadow:
    0 0 0 3px rgba(255,177,88,.30) inset,
    0 7px 0 rgba(95,28,3,.34),
    0 12px 24px rgba(45,20,4,.18);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  text-align:center;
  transition:transform .16s ease,filter .16s ease,box-shadow .16s ease;
}
.pz-uk34-photo-tile:hover,
.pz-uk34-photo-tile:focus-visible{
  transform:translateY(-4px);
  filter:brightness(1.06);
  outline:none;
  box-shadow:
    0 0 0 3px rgba(255,210,116,.52) inset,
    0 10px 0 rgba(95,28,3,.32),
    0 18px 30px rgba(45,20,4,.24);
}
.pz-uk34-photo-tile:active{
  transform:translateY(1px);
  box-shadow:0 0 0 3px rgba(255,177,88,.30) inset,0 3px 0 rgba(95,28,3,.34);
}
.pz-uk34-photo-tile__lcd{
  width:min(220px,88%);
  aspect-ratio:1.95/1;
  box-sizing:border-box;
  border:6px solid #17191b;
  border-radius:18px;
  background:
    radial-gradient(circle at 50% 42%,rgba(255,255,255,.16),transparent 56%),
    linear-gradient(180deg,#bdc99b,#aab78b 58%,#98a77d);
  box-shadow:
    0 0 0 4px #3a3d38 inset,
    0 3px 0 rgba(255,255,255,.18) inset,
    0 4px 8px rgba(0,0,0,.28);
  display:grid;
  place-items:center;
}
.pz-uk34-photo-tile__lcd b{
  font:1000 clamp(54px,9vw,86px)/.9 Manrope,system-ui,sans-serif;
  letter-spacing:-.06em;
  color:#171916;
  text-shadow:0 1px 0 rgba(255,255,255,.25);
}
.pz-uk34-photo-tile strong{
  margin-top:2px;
  padding:7px 13px 6px;
  border:3px solid #17191b;
  border-radius:10px;
  background:#f8edd9;
  font:1000 clamp(18px,2.8vw,26px)/1 Manrope,system-ui,sans-serif;
  letter-spacing:.025em;
}
.pz-uk34-photo-tile small{
  max-width:260px;
  color:#fff8ec;
  font:800 clamp(12px,1.65vw,15px)/1.35 Manrope,system-ui,sans-serif;
  text-shadow:0 1px 1px rgba(73,24,0,.65);
}
.pz-uk34-photo-choice__privacy{
  position:relative;
  z-index:2;
  margin:clamp(18px,2.8vw,25px) auto 0;
  width:max-content;
  max-width:94%;
  padding:8px 13px;
  border-radius:999px;
  background:rgba(31,24,17,.80);
  color:#fff8e9;
  font:800 clamp(11px,1.4vw,13px)/1.3 Manrope,system-ui,sans-serif;
  text-align:center;
}
html[data-theme="dark"] .pz-uk34-photo-choice__head{
  background:#292d31;
  color:#f5f1e9;
}
html[data-theme="dark"] .pz-uk34-photo-choice__head p{color:#cfd3d6;}
html[data-theme="dark"] .pz-uk34-photo-tile strong{background:#292d31;color:#f7f2e9;}

@media(max-width:660px){
  .pz-uk34-photo-choice{padding:10px;}
  .pz-uk34-photo-choice__card{padding:18px 12px 20px;border-radius:22px;}
  .pz-uk34-photo-choice__close{top:9px;right:10px;width:36px;height:36px;font-size:24px;}
  .pz-uk34-photo-choice__head{width:calc(100% - 12px);padding:15px 12px;margin-bottom:13px;}
  .pz-uk34-photo-choice__options{grid-template-columns:1fr;}
  .pz-uk34-photo-tile{min-height:185px;padding:12px;display:grid;grid-template-columns:118px minmax(0,1fr);grid-template-rows:auto auto;column-gap:12px;row-gap:5px;text-align:left;align-items:center;}
  .pz-uk34-photo-tile__lcd{grid-row:1/3;width:118px;}
  .pz-uk34-photo-tile__lcd b{font-size:52px;}
  .pz-uk34-photo-tile strong{justify-self:start;margin:0;font-size:18px;}
  .pz-uk34-photo-tile small{max-width:none;font-size:12px;}
}

@media(prefers-reduced-motion:reduce){
  .pz-uk34-photo-tile{transition:none!important;}
}


/* 20261001: mobile welcome 10% smaller, centered and tap-to-dismiss completion. */
body.pz-uk-page .pz-uk-complete:not([hidden]){
  cursor:pointer;
}
body.pz-uk-page .pz-uk-complete .pz-win-close{
  display:none!important;
}

@media (max-width:820px) and (orientation:portrait){
  body.pz-uk-page .pz-uk32-mode-overlay{
    box-sizing:border-box;
    place-items:center!important;
    padding:10px!important;
  }
  body.pz-uk-page .pz-uk32-mode-card{
    box-sizing:border-box;
    width:86.4vw;
    min-width:min(292px,calc(100vw - 20px));
    max-width:756px;
    max-height:min(765px,84.6dvh);
    margin:auto!important;
    justify-self:center;
    align-self:center;
    padding:clamp(16px,4.4vw,25px);
    border-radius:25px;
  }
  body.pz-uk-page .pz-uk32-mode-card .pz-kicker{
    margin-bottom:4px;
    font-size:10.8px;
  }
  body.pz-uk-page .pz-uk32-mode-card h2{
    font-size:clamp(27px,7.4vw,38px);
  }
  body.pz-uk-page .pz-uk32-welcome-copy{
    margin:11px auto 5px;
    font-size:clamp(13px,3.55vw,15px);
    line-height:1.48;
  }
  body.pz-uk-page .pz-uk32-signoff{
    margin:5px 0 0;
    font-size:14px;
  }
  body.pz-uk-page .pz-uk32-mode-card h3{
    margin:18px 0 10px;
    font-size:clamp(17px,4.8vw,20px);
  }
  body.pz-uk-page .pz-uk32-mode-grid{
    gap:11px;
  }
  body.pz-uk-page .pz-uk32-mode-choice{
    min-height:144px;
    padding:12px 11px;
    gap:7px;
    border-radius:20px;
  }
  body.pz-uk-page .pz-uk33-mode-art{
    width:min(450px,96%);
    max-height:101px;
  }
  body.pz-uk-page .pz-uk32-mode-choice small{
    margin-top:1px;
    font-size:clamp(11.5px,3.1vw,13px);
    line-height:1.32;
  }
  body.pz-uk-page .pz-uk32-mode-note{
    margin:12px 0 0;
    font-size:11.5px;
    line-height:1.35;
  }
}
