/* Puzzlownia layout v3.
   Wspolny, lekki uklad pieciu klasycznych gier puzzlowych. */

body.pz-game-page.pz-classic-layout-v2{
  min-height:100dvh!important;
  height:auto!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}

body.pz-game-page.pz-classic-layout-v2 .pz-game-shell{
  width:min(1600px,calc(100% - 20px))!important;
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  overflow:visible!important;
  grid-template-rows:auto auto auto!important;
  gap:10px!important;
  padding:8px 0 18px!important;
}

body.pz-game-page.pz-classic-layout-v2 .pz-game-head{
  padding:10px 14px!important;
  border-radius:16px!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-game-head h1{
  font-size:clamp(22px,2vw,31px)!important;
  line-height:1.05!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-game-head p{
  max-width:980px!important;
  margin-top:4px!important;
  font-size:11px!important;
  line-height:1.45!important;
}

body.pz-game-page.pz-classic-layout-v2 :is(.pz-uk-layout,.pz-od-layout,.pz-mem-layout,.pz-demontaz-layout,.pz-sp-layout){
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto auto auto!important;
  gap:10px!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  align-items:start!important;
}

body.pz-game-page.pz-classic-layout-v2 .pz-control-panel{
  display:none!important;
}

body.pz-game-page.pz-classic-layout-v2 :is(.pz-uk-rotate,.pz-od-rotate,.pz-mem-rotate,.pz-demontaz-rotate,.pz-sp-rotate){
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

.pz-game-top-controls{
  display:grid;
  grid-template-columns:minmax(420px,.95fr) minmax(440px,1.05fr);
  gap:10px;
  align-items:stretch;
  padding:10px;
  border:1px solid var(--border,#e2e6ea);
  border-radius:16px;
  background:var(--surface,#fff);
  box-shadow:0 8px 24px rgba(17,24,39,.06);
}

.pz-game-primary-actions{
  display:grid;
  grid-template-columns:1.35fr repeat(3,minmax(105px,1fr));
  gap:7px;
  align-items:stretch;
}
.pz-game-primary-actions>.pz-btn{
  width:100%!important;
  min-height:46px!important;
  padding:8px 10px!important;
  border-radius:12px!important;
  font-size:12px!important;
  line-height:1.15!important;
}
.pz-game-primary-actions[data-count="3"]{grid-template-columns:1.4fr 1fr 1fr}
.pz-game-primary-actions>#start{
  font-size:14px!important;
  font-weight:900!important;
}

.pz-game-primary-stats{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
  min-width:0;
}
.pz-game-primary-stats>div{
  min-width:0!important;
  margin:0!important;
  padding:8px 10px!important;
  border:1px solid var(--border,#e5e8eb)!important;
  border-radius:11px!important;
  background:var(--surface-2,#fafafa)!important;
}
.pz-game-primary-stats span{
  display:block!important;
  font-size:8px!important;
  line-height:1.15!important;
  text-transform:uppercase!important;
  letter-spacing:.07em!important;
  font-weight:900!important;
  color:var(--muted,#77818d)!important;
}
.pz-game-primary-stats b{
  display:block!important;
  margin-top:4px!important;
  font-size:15px!important;
  line-height:1!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  font-variant-numeric:tabular-nums;
}

body.pz-game-page.pz-classic-layout-v2 :is(.pz-uk-board-wrap,.pz-od-board-wrap,.pz-mem-board-wrap,.pz-demontaz-board-wrap,.pz-sp-board-wrap){
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:16/10!important;
  overflow:hidden!important;
}

body.pz-game-page.pz-classic-layout-v2 :is(.pz-uk-stage,.pz-od-stage,.pz-mem-stage,.pz-demontaz-stage,.pz-sp-stage){
  display:block!important;
  width:100%;
  height:100%;
  max-width:none!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  border-radius:16px!important;
}

.pz-game-after-board{
  min-width:0;
}
.pz-game-more{
  border:1px solid var(--border,#e2e6ea);
  border-radius:16px;
  background:var(--surface,#fff);
  box-shadow:0 8px 24px rgba(17,24,39,.05);
  overflow:hidden;
}
.pz-game-more>summary{
  display:none;
}
.pz-game-more__body{
  display:grid;
  gap:9px;
  padding:10px;
}
.pz-game-bottom-line{
  display:grid;
  grid-template-columns:auto minmax(320px,1fr);
  gap:9px;
  align-items:stretch;
}
.pz-game-bottom-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  align-items:stretch;
}
.pz-game-bottom-actions>.pz-btn{
  min-height:40px!important;
  padding:7px 11px!important;
  border-radius:11px!important;
  font-size:10px!important;
  white-space:nowrap;
}
.pz-game-extra-stats{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr))!important;
  gap:7px!important;
  min-width:0;
}
.pz-game-extra-stats>div{
  min-width:0!important;
  margin:0!important;
  padding:7px 9px!important;
  border:1px solid var(--border,#e5e8eb)!important;
  border-radius:10px!important;
  background:var(--surface-2,#fafafa)!important;
}
.pz-game-extra-stats span{
  display:block!important;
  font-size:7px!important;
  line-height:1.15!important;
  text-transform:uppercase!important;
  letter-spacing:.06em!important;
  font-weight:900!important;
  color:var(--muted,#77818d)!important;
}
.pz-game-extra-stats b{
  display:block!important;
  margin-top:3px!important;
  font-size:12px!important;
  line-height:1.05!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.pz-game-secondary-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:start;
}
.pz-game-settings{
  min-width:0;
}
.pz-game-settings>summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:34px;
  padding:6px 10px;
  border:1px solid var(--border,#e2e6ea);
  border-radius:10px;
  background:var(--surface-2,#fafafa);
  font-size:9px;
  font-weight:900;
}
.pz-game-settings>summary::-webkit-details-marker{display:none}
.pz-game-settings>summary::after{content:"+";font-size:15px;line-height:1}
.pz-game-settings[open]>summary::after{content:"-"}
.pz-game-settings__body{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:7px!important;
  margin-top:7px;
  padding:9px;
  border:1px solid var(--border,#e2e6ea);
  border-radius:11px;
  background:var(--surface-2,#fafafa);
}
.pz-game-settings__body label{
  display:grid!important;
  gap:3px!important;
  margin:0!important;
}
.pz-game-settings__body label>span,
.pz-game-settings__body .pz-control-source>span,
.pz-game-settings__body .pz-control-sound>span{
  font-size:7px!important;
  text-transform:uppercase!important;
  letter-spacing:.065em!important;
  font-weight:900!important;
  color:var(--muted,#78828e)!important;
}
.pz-game-settings__body select{
  width:100%!important;
  min-height:34px!important;
  height:34px!important;
  padding:4px 8px!important;
  border-radius:9px!important;
  font-size:10px!important;
}
.pz-game-settings__body .pz-control-source,
.pz-game-settings__body .pz-control-sound{
  min-height:34px!important;
}
.pz-game-settings__body .pz-mat-field{display:none!important}

.pz-game-download{
  display:grid;
  gap:4px;
}
.pz-game-download .pz-download-puzzle:not([hidden]){
  min-height:34px!important;
  padding:6px 9px!important;
  font-size:9px!important;
}
.pz-game-download .pz-download-note{display:none!important}

.pz-game-status .pz-result-box{
  height:auto!important;
  min-height:34px!important;
  max-height:none!important;
  overflow:visible!important;
  padding:8px 10px!important;
  border:1px solid rgba(255,90,0,.18)!important;
  border-radius:10px!important;
  background:var(--orange-pale,#fff8f3)!important;
  font-size:9px!important;
  line-height:1.4!important;
}

.pz-game-readmore-row{
  display:flex;
  justify-content:flex-end;
  margin-top:7px;
}
.pz-game-readmore-row .pz-control-readmore{
  min-height:38px!important;
  padding:7px 13px!important;
  border-radius:11px!important;
  font-size:10px!important;
  text-decoration:none!important;
}

html[data-theme="dark"] .pz-game-top-controls,
html[data-theme="dark"] .pz-game-more{
  background:#171b20;
  border-color:#2d333b;
  box-shadow:0 8px 24px rgba(0,0,0,.18);
}
html[data-theme="dark"] .pz-game-primary-stats>div,
html[data-theme="dark"] .pz-game-extra-stats>div,
html[data-theme="dark"] .pz-game-settings>summary,
html[data-theme="dark"] .pz-game-settings__body{
  background:#11151a!important;
  border-color:#303740!important;
}
html[data-theme="dark"] .pz-game-status .pz-result-box{
  background:#211a16!important;
  border-color:#51301f!important;
  color:#e9edf1!important;
}

/* Pionowy telefon. */
@media (max-width:820px) and (orientation:portrait){
  body.pz-game-page.pz-classic-layout-v2{
    min-height:100dvh!important;
    overflow-y:auto!important;
  }
  body.pz-game-page.pz-classic-layout-v2 .pz-game-shell{
    width:calc(100% - 8px)!important;
    margin:0 auto!important;
    padding:4px 0 12px!important;
    gap:5px!important;
  }
  body.pz-game-page.pz-classic-layout-v2 .pz-game-head{
    display:none!important;
  }
  body.pz-game-page.pz-classic-layout-v2 :is(.pz-uk-rotate,.pz-od-rotate,.pz-mem-rotate,.pz-demontaz-rotate,.pz-sp-rotate){
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  body.pz-game-page.pz-classic-layout-v2 :is(.pz-uk-shell,.pz-od-shell,.pz-mem-shell,.pz-demontaz-shell,.pz-sp-shell){
    visibility:visible!important;
  }

  .pz-game-top-controls{
    grid-template-columns:1fr;
    gap:5px;
    padding:5px;
    border-radius:11px;
    box-shadow:none;
  }
  .pz-game-primary-stats{
    order:1;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:3px!important;
  }
  .pz-game-primary-stats>div{
    padding:4px 4px!important;
    border-radius:7px!important;
    text-align:left;
  }
  .pz-game-primary-stats span{
    font-size:5.4px!important;
    letter-spacing:.04em!important;
  }
  .pz-game-primary-stats b{
    margin-top:2px!important;
    font-size:9px!important;
  }
  .pz-game-primary-actions{
    order:2;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px;
  }
  .pz-game-primary-actions[data-count="3"]{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pz-game-primary-actions>#start{
    grid-column:1/-1;
    min-height:36px!important;
    font-size:12px!important;
  }
  .pz-game-primary-actions>.pz-btn:not(#start){
    min-height:31px!important;
    padding:4px 4px!important;
    border-radius:8px!important;
    font-size:7.5px!important;
  }
  .pz-game-primary-actions>.pz-btn[data-pz-icon]::before{
    width:13px!important;
    height:13px!important;
  }
  .pz-game-primary-actions>#start[data-pz-icon]::before{
    width:16px!important;
    height:16px!important;
  }

  body.pz-game-page.pz-classic-layout-v2 :is(.pz-uk-board-wrap,.pz-od-board-wrap,.pz-mem-board-wrap,.pz-demontaz-board-wrap,.pz-sp-board-wrap){
    width:100%!important;
    height:auto!important;
    aspect-ratio:.72!important;
    border-radius:11px!important;
  }
  body.pz-game-page.pz-classic-layout-v2 :is(.pz-uk-stage,.pz-od-stage,.pz-mem-stage,.pz-demontaz-stage,.pz-sp-stage){
    width:100%;
    height:100%;
    border-radius:11px!important;
  }

  .pz-game-more{
    border-radius:11px;
    box-shadow:none;
  }
  .pz-game-more>summary{
    list-style:none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:38px;
    padding:7px 10px;
    cursor:pointer;
    font-size:9px;
    font-weight:900;
  }
  .pz-game-more>summary::-webkit-details-marker{display:none}
  .pz-game-more>summary::after{content:"+";font-size:16px;line-height:1}
  .pz-game-more[open]>summary::after{content:"-"}
  .pz-game-more__body{padding:7px;gap:7px}
  .pz-game-bottom-line{grid-template-columns:1fr;gap:7px}
  .pz-game-bottom-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .pz-game-bottom-actions>.pz-btn{
    min-height:34px!important;
    padding:4px!important;
    font-size:7px!important;
    white-space:normal;
  }
  .pz-game-extra-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important}
  .pz-game-extra-stats>div{padding:5px 6px!important}
  .pz-game-extra-stats span{font-size:5.5px!important}
  .pz-game-extra-stats b{font-size:9px!important}
  .pz-game-secondary-row{grid-template-columns:1fr}
  .pz-game-settings>summary{min-height:34px;font-size:8px}
  .pz-game-settings__body{grid-template-columns:1fr;gap:5px!important;padding:7px}
  .pz-game-settings__body select{height:34px!important;font-size:10px!important}
  .pz-game-status .pz-result-box{font-size:8px!important;padding:7px!important}
  .pz-game-readmore-row{margin-top:5px}
  .pz-game-readmore-row .pz-control-readmore{width:100%!important;min-height:36px!important;font-size:8px!important}

  /* Układanie - podglad obrazu w rogu nie zabiera przestrzeni roboczej. */
  .pz-uk-page .pz-jigsaw-box{width:min(52%,210px)!important}
  .pz-uk-page .pz-jigsaw-box.is-corner{
    left:auto!important;
    right:5px!important;
    top:5px!important;
    width:min(28%,106px)!important;
    transform:none!important;
  }
  .pz-uk-page .pz-jigsaw-box__zoom{display:none!important}

  /* Odkrywacz i Pamieciowka - obraz moze byc prawie na cala szerokosc maty. */
  .pz-od-page .pz-od-board-guide,
  .pz-mem-page .pz-mem-board-label{border-radius:8px}
  .pz-mem-page .pz-mem-target-stage{inset:7px!important}
  .pz-mem-page .pz-mem-target-card{
    width:min(82%,330px)!important;
    height:min(48%,300px)!important;
    min-width:0!important;
    min-height:190px!important;
    padding:9px!important;
    border-radius:15px!important;
  }
  .pz-mem-page .pz-mem-target-kicker{font-size:7px!important}
  .pz-mem-page .pz-mem-target-foot b{font-size:9px!important}
  .pz-mem-page .pz-mem-target-foot span{font-size:6.5px!important}

  /* Sprint - wzorzec u gory, odpowiedzi 3 x 3 pod nim. */
  .pz-sp-page .pz-sp-quick{
    inset:6px!important;
    grid-template-columns:1fr!important;
    grid-template-rows:minmax(120px,.30fr) minmax(0,.70fr)!important;
    gap:6px!important;
  }
  .pz-sp-page .pz-sp-target-card{
    grid-template-columns:auto minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;
    gap:4px 7px!important;
    padding:7px!important;
    border-radius:11px!important;
  }
  .pz-sp-page .pz-sp-card-kicker{
    grid-column:1;
    grid-row:1;
    align-self:center;
    font-size:6px!important;
  }
  .pz-sp-page .pz-sp-target-piece{
    grid-column:2;
    grid-row:1/3;
    min-height:88px!important;
  }
  .pz-sp-page .pz-sp-phase{
    grid-column:3;
    grid-row:1;
    align-self:center;
    padding:4px 6px!important;
    font-size:5.5px!important;
  }
  .pz-sp-page .pz-sp-target-card small{
    grid-column:1/2;
    grid-row:2;
    align-self:start;
    font-size:5.5px!important;
  }
  .pz-sp-page .pz-sp-choices{gap:4px!important}
  .pz-sp-page .pz-sp-choice{border-radius:9px!important}
  .pz-sp-page .pz-sp-preview-label{
    left:6px!important;
    top:6px!important;
    padding:5px 6px!important;
    border-radius:7px!important;
  }
  .pz-sp-page .pz-sp-preview-label b{font-size:6px!important}
  .pz-sp-page .pz-sp-preview-label span{font-size:5.5px!important}
  .pz-sp-page .pz-showcase-box{width:min(68%,230px)!important}

  /* Demontaz - spokojniejsza etykieta, wiecej miejsca na same elementy. */
  .pz-demontaz-page .pz-demontaz-zone-title{font-size:5.5px!important}
  .pz-demontaz-page .pz-demontaz-origin>span{font-size:5.5px!important}
}

@media (max-width:560px) and (orientation:portrait){
  .pz-game-primary-actions>.pz-btn:not(#start){font-size:6.8px!important}
  .pz-game-primary-stats span{font-size:5px!important}
  .pz-game-primary-stats b{font-size:8.5px!important}
}


/* V3 - spokojniejsze, bardziej czytelne sterowanie. */
body.pz-game-page.pz-classic-layout-v2 .pz-game-top-controls{
  padding:9px!important;
  gap:9px!important;
  border-color:rgba(112,123,136,.18)!important;
  box-shadow:0 6px 18px rgba(17,24,39,.045)!important;
}

/* W tych pieciu grach przyciski sa tekstowe. Bez ozdobnych ikonek. */
body.pz-game-page.pz-classic-layout-v2 .pz-btn[data-pz-icon]::before,
body.pz-game-page.pz-classic-layout-v2 .pz-control-readmore[data-pz-icon]::before{
  display:none!important;
  content:none!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-btn[data-pz-icon],
body.pz-game-page.pz-classic-layout-v2 .pz-control-readmore[data-pz-icon]{
  gap:0!important;
}

body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions{
  gap:6px!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions>.pz-btn{
  min-height:44px!important;
  padding:8px 14px!important;
  border:1px solid rgba(112,123,136,.22)!important;
  border-radius:11px!important;
  background:var(--surface-2,#f8f9fa)!important;
  color:var(--text,#151922)!important;
  box-shadow:none!important;
  font-size:11px!important;
  font-weight:800!important;
  letter-spacing:-.01em!important;
  transition:transform .14s ease,border-color .14s ease,background .14s ease,box-shadow .14s ease!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions>#start{
  background:#ff5a00!important;
  border-color:#ff5a00!important;
  color:#fff!important;
  font-size:13px!important;
  font-weight:900!important;
  box-shadow:0 5px 13px rgba(255,90,0,.18)!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions>.pz-btn:not(#start):hover{
  border-color:rgba(255,90,0,.42)!important;
  background:#fff8f3!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions>#start:hover{
  background:#ef5200!important;
  border-color:#ef5200!important;
  box-shadow:0 7px 16px rgba(255,90,0,.23)!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions>.pz-btn:active{
  transform:translateY(1px)!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions>.pz-btn:disabled{
  opacity:.48!important;
  box-shadow:none!important;
  cursor:not-allowed!important;
}

body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-stats>div{
  border-color:rgba(112,123,136,.16)!important;
  background:var(--surface-2,#fafafa)!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-game-bottom-actions>.pz-btn,
body.pz-game-page.pz-classic-layout-v2 .pz-game-readmore-row .pz-control-readmore{
  border:1px solid rgba(112,123,136,.20)!important;
  background:var(--surface-2,#fafafa)!important;
  color:var(--text,#151922)!important;
  box-shadow:none!important;
  font-weight:800!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-game-bottom-actions>#customPhoto{
  border-color:rgba(255,90,0,.28)!important;
  background:#fff8f3!important;
  color:#a8420b!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-game-readmore-row .pz-control-readmore{
  border-color:rgba(255,90,0,.25)!important;
  background:#fff8f3!important;
  color:#9c400d!important;
}

/* Pudelko przed startem zajmuje duza czesc maty. Po starcie rozmiar rogu pozostaje bez zmian. */
body.pz-game-page.pz-classic-layout-v2.pz-uk-page .pz-jigsaw-box:not(.is-corner){
  height:min(88%,760px)!important;
  width:auto!important;
  max-width:none!important;
}
body.pz-game-page.pz-classic-layout-v2 :is(.pz-mem-page,.pz-sp-page) .pz-showcase-box{
  height:min(86%,740px)!important;
  width:auto!important;
  max-width:none!important;
}

/* Podglad przed startem ma byc spokojny i czytelny. */
body.pz-game-page.pz-classic-layout-v2 :is(.pz-jigsaw-box,.pz-showcase-box){
  filter:drop-shadow(0 15px 18px rgba(0,0,0,.18))!important;
}
body.pz-game-page.pz-classic-layout-v2 .pz-showcase-box__caption{
  display:none!important;
}

html[data-theme="dark"] body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions>.pz-btn:not(#start),
html[data-theme="dark"] body.pz-game-page.pz-classic-layout-v2 .pz-game-bottom-actions>.pz-btn,
html[data-theme="dark"] body.pz-game-page.pz-classic-layout-v2 .pz-game-readmore-row .pz-control-readmore{
  background:#151a20!important;
  border-color:#313943!important;
  color:#eef1f4!important;
}
html[data-theme="dark"] body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions>.pz-btn:not(#start):hover,
html[data-theme="dark"] body.pz-game-page.pz-classic-layout-v2 .pz-game-bottom-actions>#customPhoto,
html[data-theme="dark"] body.pz-game-page.pz-classic-layout-v2 .pz-game-readmore-row .pz-control-readmore{
  background:#2d2019!important;
  border-color:#66402c!important;
  color:#ffb58b!important;
}

@media (max-width:820px) and (orientation:portrait){
  body.pz-game-page.pz-classic-layout-v2 .pz-game-top-controls{
    padding:5px!important;
    gap:4px!important;
    border-radius:10px!important;
  }
  body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions{
    gap:4px!important;
  }
  body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions>#start{
    min-height:38px!important;
    border-radius:9px!important;
    font-size:11px!important;
    box-shadow:0 4px 10px rgba(255,90,0,.16)!important;
  }
  body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions>.pz-btn:not(#start){
    min-height:32px!important;
    padding:4px 5px!important;
    border-radius:8px!important;
    font-size:7.2px!important;
  }
  body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-stats>div{
    min-height:30px!important;
    padding:4px 5px!important;
  }

  /* Na telefonie pudełko prawie wypelnia pionowa mate, ale zostaje bezpieczny margines. */
  body.pz-game-page.pz-classic-layout-v2.pz-uk-page .pz-jigsaw-box:not(.is-corner){
    height:88%!important;
    width:auto!important;
  }
  body.pz-game-page.pz-classic-layout-v2 :is(.pz-mem-page,.pz-sp-page) .pz-showcase-box{
    height:84%!important;
    width:auto!important;
  }
  body.pz-game-page.pz-classic-layout-v2 .pz-jigsaw-box__zoom{
    display:none!important;
  }

  body.pz-game-page.pz-classic-layout-v2 .pz-game-bottom-actions>.pz-btn{
    min-height:34px!important;
    border-radius:8px!important;
    font-size:7px!important;
  }
}

@media (prefers-reduced-motion:reduce){
  body.pz-game-page.pz-classic-layout-v2 .pz-game-primary-actions>.pz-btn{
    transition:none!important;
  }
}

/* ========================================================================
   RETRO UI V1 - wspolny manipulator dla 5 gier puzzlowych
   ======================================================================== */
body.pz-game-page.pz-retro-ui-v1{
  --pz-retro-cream:#f4e4bf;
  --pz-retro-ink:#17140f;
  --pz-retro-lcd:#20251d;
  --pz-retro-lcd-soft:#394035;
}

body.pz-game-page.pz-retro-ui-v1 .pz-game-top-controls{
  display:block!important;
  position:relative!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.pz-retro-panel{
  position:relative;
  width:100%;
  background-repeat:no-repeat;
  background-size:100% 100%;
  background-position:center;
  isolation:isolate;
  user-select:none;
  -webkit-user-select:none;
}
.pz-retro-panel--top{
  height:clamp(88px,8.2vw,122px);
  background-image:url("retro-ui/01_panels/panel-desktop-top.webp");
  filter:drop-shadow(0 8px 10px rgba(51,35,20,.16));
}
.pz-retro-panel--bottom{
  height:clamp(76px,7.2vw,104px);
  background-image:url("retro-ui/01_panels/panel-desktop-bottom.webp");
  filter:drop-shadow(0 6px 9px rgba(51,35,20,.13));
}
html[data-theme="dark"] .pz-retro-panel{
  filter:drop-shadow(0 8px 12px rgba(0,0,0,.32));
}

/* Hotspot/button shell. The artwork supplies the housing; these layers add labels
   and a real press state without changing the game engines. */
.pz-retro-slot{position:absolute;z-index:4;display:grid;place-items:center;}
.pz-retro-slot--start{left:4.35%;top:19%;width:19.2%;height:62%;}
.pz-retro-slot--quick1{left:25.6%;top:18%;width:8.8%;height:64%;}
.pz-retro-slot--quick2{left:34.2%;top:18%;width:8.8%;height:64%;}
.pz-retro-slot--quick3{left:42.85%;top:18%;width:8.8%;height:64%;}

.pz-retro-button{
  appearance:none!important;
  -webkit-appearance:none!important;
  border:0!important;
  outline:0!important;
  margin:0!important;
  display:grid!important;
  place-items:center!important;
  position:relative!important;
  overflow:visible!important;
  background-color:transparent!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:100% 100%!important;
  box-shadow:none!important;
  color:#1d1810!important;
  font-family:Manrope,system-ui,sans-serif!important;
  font-weight:900!important;
  text-align:center!important;
  text-shadow:0 1px 0 rgba(255,255,255,.28)!important;
  cursor:pointer!important;
  transition:filter .08s ease,transform .08s ease,opacity .12s ease!important;
  -webkit-tap-highlight-color:transparent;
}
.pz-retro-button:focus-visible{
  outline:3px solid rgba(255,255,255,.92)!important;
  outline-offset:2px!important;
  filter:drop-shadow(0 0 0 2px #17140f)!important;
}
.pz-retro-button:disabled{cursor:not-allowed!important;filter:saturate(.45) brightness(.82)!important;opacity:.62!important;}
.pz-retro-button:active:not(:disabled){transform:translateY(2px) scale(.985)!important;}

.pz-retro-button--main{
  width:96%!important;height:92%!important;min-height:0!important;padding:0 12%!important;
  background-image:url("retro-ui/03_buttons/button-yellow-long-xl-up.webp")!important;
  font-size:clamp(10px,.86vw,14px)!important;
  line-height:1.05!important;
}
.pz-retro-button--main:active:not(:disabled){
  background-image:url("retro-ui/03_buttons/button-yellow-long-xl-down.webp")!important;
}
.pz-retro-button--round{
  width:90%!important;height:94%!important;min-width:0!important;min-height:0!important;
  padding:0 7%!important;border-radius:50%!important;
  font-size:clamp(7px,.64vw,10px)!important;line-height:1.05!important;
}
.pz-retro-button--image{background-image:url("retro-ui/03_buttons_round/button-round-green-up.webp")!important;color:#f7ecd2!important;text-shadow:0 1px 1px rgba(0,0,0,.35)!important;}
.pz-retro-button--image:active:not(:disabled){background-image:url("retro-ui/03_buttons_round/button-round-green-down.webp")!important;}
.pz-retro-button--middle{background-image:url("retro-ui/03_buttons_round/button-round-orange-up.webp")!important;color:#24180f!important;}
.pz-retro-button--middle:active:not(:disabled){background-image:url("retro-ui/03_buttons_round/button-round-orange-down.webp")!important;}
.pz-retro-button--restart{background-image:url("retro-ui/03_buttons_round/button-round-red-up.webp")!important;color:#fff2d5!important;text-shadow:0 1px 1px rgba(0,0,0,.38)!important;}
.pz-retro-button--restart:active:not(:disabled){background-image:url("retro-ui/03_buttons_round/button-round-red-down.webp")!important;}

/* Four real HUD values inside the four LCD windows. */
.pz-retro-lcd-slot{
  position:absolute;z-index:5;top:26%;height:48%;width:7.2%;
  display:flex;align-items:center;justify-content:center;min-width:0;
  pointer-events:none;
}
.pz-retro-lcd-slot--1{left:52.45%;}
.pz-retro-lcd-slot--2{left:60.75%;}
.pz-retro-lcd-slot--3{left:69.05%;}
.pz-retro-lcd-slot--4{left:77.35%;}
.pz-retro-stat{
  width:100%!important;min-width:0!important;margin:0!important;padding:0 5%!important;
  border:0!important;background:transparent!important;text-align:left!important;
}
.pz-retro-stat span{
  display:block!important;margin:0!important;color:#3b4035!important;
  font-size:clamp(5px,.46vw,7px)!important;line-height:1.05!important;
  font-weight:900!important;letter-spacing:.045em!important;text-transform:uppercase!important;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.pz-retro-stat b{
  display:block!important;margin-top:2px!important;color:#10130f!important;
  font-family:"Courier New",ui-monospace,monospace!important;
  font-size:clamp(9px,.9vw,15px)!important;line-height:1!important;
  font-weight:900!important;letter-spacing:.02em!important;font-variant-numeric:tabular-nums!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  text-shadow:0 1px 0 rgba(255,255,255,.22)!important;
}

/* Real control visuals laid over the controls already printed into the housing. */
.pz-retro-lamp,.pz-retro-switch,.pz-retro-knob{position:absolute;z-index:6;object-fit:contain;pointer-events:none;}
.pz-retro-lamp{left:87.25%;top:14%;width:3.15%;height:28%;}
.pz-retro-switch{left:86.35%;top:42%;width:5.1%;height:35%;}
.pz-retro-knob{left:92.25%;top:42%;width:4.8%;height:39%;}
.pz-retro-hit{
  position:absolute!important;z-index:8!important;background:transparent!important;border:0!important;
  color:transparent!important;text-shadow:none!important;padding:0!important;min-height:0!important;
}
.pz-retro-hit--sound{left:86.25%;top:38%;width:5.4%;height:42%;}
.pz-retro-hit--options{left:92.0%;top:38%;width:5.25%;height:46%;}
.pz-retro-caption{
  position:absolute;z-index:7;color:#281b12;font-size:clamp(4.6px,.39vw,6px);font-weight:900;letter-spacing:.06em;
  text-shadow:0 1px 0 rgba(255,255,255,.24);pointer-events:none;
}
.pz-retro-caption--sound{left:86.15%;top:80%;width:5.7%;text-align:center;}
.pz-retro-caption--options{left:91.8%;top:80%;width:5.6%;text-align:center;}

/* Settings opens from the physical knob. */
.pz-retro-settings-popover{
  position:absolute;right:1.5%;top:calc(100% - 2px);z-index:80;
  width:min(620px,92vw);padding:10px;border:1px solid rgba(39,28,18,.32);border-radius:14px;
  background:linear-gradient(180deg,#fffaf0,#f3e4c7);box-shadow:0 18px 45px rgba(18,13,8,.28);
  color:#1b1712;
}
.pz-retro-settings-popover[hidden]{display:none!important;}
.pz-retro-settings-popover__head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;}
.pz-retro-settings-popover__head b{font-size:12px;}
.pz-retro-settings-close{
  width:auto!important;height:auto!important;min-height:30px!important;padding:5px 10px!important;border:1px solid rgba(40,30,20,.2)!important;
  border-radius:9px!important;background:#fff7e7!important;background-image:none!important;font-size:9px!important;
}
.pz-retro-settings-body{
  display:grid!important;grid-template-columns:repeat(auto-fit,minmax(130px,1fr))!important;gap:8px!important;
  padding:0!important;margin:0!important;background:transparent!important;border:0!important;
}
.pz-retro-settings-body label,.pz-retro-settings-body .pz-control-source,.pz-retro-settings-body .pz-control-sound{display:grid!important;gap:4px!important;margin:0!important;align-content:start;}
.pz-retro-settings-body label>span,.pz-retro-settings-body .pz-control-source>span,.pz-retro-settings-body .pz-control-sound>span{font-size:7px!important;font-weight:900!important;text-transform:uppercase!important;letter-spacing:.05em!important;color:#715a42!important;}
.pz-retro-settings-body select{width:100%!important;height:35px!important;min-height:35px!important;padding:4px 8px!important;border:1px solid #cbb99b!important;border-radius:8px!important;background:#fffdf7!important;color:#18140f!important;font-size:10px!important;}
.pz-retro-settings-body .pz-mat-field{display:none!important;}
.pz-retro-settings-body .pz-segmented-btn{min-height:35px!important;border:1px solid #cbb99b!important;border-radius:8px!important;background:#fffdf7!important;color:#18140f!important;font-size:9px!important;font-weight:900!important;box-shadow:none!important;}
html[data-theme="dark"] .pz-retro-settings-popover{background:linear-gradient(180deg,#29231d,#171512);border-color:#57493a;color:#f4ead8;}
html[data-theme="dark"] .pz-retro-settings-body select,html[data-theme="dark"] .pz-retro-settings-body .pz-segmented-btn,html[data-theme="dark"] .pz-retro-settings-close{background:#151719!important;color:#f3eadb!important;border-color:#5b4e3f!important;}

/* Bottom desktop controller. */
.pz-retro-after{display:grid;gap:7px;min-width:0;}
.pz-retro-slot--bottom1{left:4.25%;top:18%;width:7.1%;height:64%;}
.pz-retro-slot--bottom2{left:11.5%;top:18%;width:7.1%;height:64%;}
.pz-retro-slot--bottom3{left:18.8%;top:18%;width:7.1%;height:64%;}
.pz-retro-button--bottom-yellow{background-image:url("retro-ui/03_buttons_round/button-round-yellow-up.webp")!important;color:#23190d!important;}
.pz-retro-button--bottom-yellow:active:not(:disabled){background-image:url("retro-ui/03_buttons_round/button-round-yellow-down.webp")!important;}
.pz-retro-button--bottom-green{background-image:url("retro-ui/03_buttons_round/button-round-green-up.webp")!important;color:#fff0d4!important;text-shadow:0 1px 1px rgba(0,0,0,.35)!important;}
.pz-retro-button--bottom-green:active:not(:disabled){background-image:url("retro-ui/03_buttons_round/button-round-green-down.webp")!important;}
.pz-retro-button--bottom-orange{background-image:url("retro-ui/03_buttons_round/button-round-orange2-up.webp")!important;color:#23170f!important;}
.pz-retro-button--bottom-orange:active:not(:disabled){background-image:url("retro-ui/03_buttons_round/button-round-orange2-down.webp")!important;}

.pz-retro-bottom-lcd{
  position:absolute;z-index:5;top:27%;height:47%;width:7.25%;display:flex;align-items:center;justify-content:center;pointer-events:none;
}
.pz-retro-bottom-lcd--1{left:28.05%;}
.pz-retro-bottom-lcd--2{left:35.95%;}
.pz-retro-bottom-lcd--3{left:43.85%;}
.pz-retro-bottom-lcd--4{left:51.75%;}
.pz-retro-stat-mirror{width:100%;padding:0 6%;min-width:0;}
.pz-retro-stat-mirror__label{display:block;font-size:clamp(4.5px,.39vw,6px);line-height:1.05;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#3b4035;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.pz-retro-stat-mirror__value{display:block;margin-top:2px;font-family:"Courier New",ui-monospace,monospace;font-size:clamp(8px,.75vw,12px);line-height:1;font-weight:900;color:#10130f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.pz-retro-hit--bottom-options{left:61.3%;top:25%;width:6%;height:54%;}
.pz-retro-slot--readmore{left:73.5%;top:18%;width:23.0%;height:64%;}
.pz-retro-button--readmore{
  width:98%!important;height:90%!important;padding:0 8%!important;
  background-image:url("retro-ui/03_buttons/button-yellow-long-xl-up.webp")!important;
  color:#25180c!important;font-size:clamp(7px,.62vw,10px)!important;line-height:1.05!important;text-decoration:none!important;
}
.pz-retro-button--readmore:active{background-image:url("retro-ui/03_buttons/button-yellow-long-xl-down.webp")!important;}

/* Mobile-only accordion stays lightweight; desktop uses the physical lower controller. */
.pz-retro-mobile-more{display:none!important;}
.pz-retro-download{display:flex!important;justify-content:flex-end!important;align-items:center!important;min-height:0!important;background:transparent!important;border:0!important;padding:0!important;margin:0!important;box-shadow:none!important;}
.pz-retro-download .pz-download-puzzle:not([hidden]){
  min-width:190px!important;min-height:42px!important;padding:7px 18px!important;border:0!important;
  background:transparent url("retro-ui/03_buttons/button-green-long-lg-up.webp") center/100% 100% no-repeat!important;
  color:#fff3d9!important;font-size:9px!important;font-weight:900!important;text-shadow:0 1px 1px rgba(0,0,0,.35)!important;box-shadow:none!important;
}
.pz-retro-download .pz-download-puzzle:active:not([hidden]){background-image:url("retro-ui/03_buttons/button-green-long-lg-down.webp")!important;transform:translateY(2px)!important;}
.pz-retro-download .pz-download-note{display:none!important;}
.pz-retro-status{margin:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;}
.pz-retro-status .pz-result-box{
  min-height:34px!important;height:auto!important;padding:8px 12px!important;border:1px solid rgba(169,91,25,.22)!important;border-radius:10px!important;
  background:#fff8ec!important;color:#4d321c!important;font-size:9px!important;line-height:1.35!important;box-shadow:none!important;
}
html[data-theme="dark"] .pz-retro-status .pz-result-box{background:#201b17!important;border-color:#573a24!important;color:#eadfce!important;}

/* Prevent old white controller cards from resurfacing. */
body.pz-game-page.pz-retro-ui-v1 .pz-control-panel{display:none!important;}
body.pz-game-page.pz-retro-ui-v1 .pz-game-after-board{min-width:0;}

/* Keep the board itself exactly as in the previous layout. */
body.pz-game-page.pz-retro-ui-v1 :is(.pz-uk-board-wrap,.pz-od-board-wrap,.pz-mem-board-wrap,.pz-demontaz-board-wrap,.pz-sp-board-wrap){margin:0!important;}

@media (max-width:980px) and (min-width:821px){
  .pz-retro-panel--top{height:96px;}
  .pz-retro-panel--bottom{height:80px;}
  .pz-retro-button--round{font-size:6.6px!important;}
  .pz-retro-button--main{font-size:9px!important;}
  .pz-retro-stat b{font-size:10px!important;}
  .pz-retro-stat span{font-size:5px!important;}
}

/* PHONE PORTRAIT: one compact retro controller above the large vertical board. */
@media (max-width:820px) and (orientation:portrait){
  body.pz-game-page.pz-retro-ui-v1 .pz-game-shell{gap:5px!important;}
  body.pz-game-page.pz-retro-ui-v1 .pz-game-top-controls{padding:0!important;background:transparent!important;border:0!important;}
  .pz-retro-panel--top{
    height:auto!important;aspect-ratio:2043/630!important;
    background-image:url("retro-ui/01_panels/panel-mobile-top.webp");
    filter:drop-shadow(0 5px 7px rgba(51,35,20,.15));
  }
  .pz-retro-slot--start{left:28.8%;top:36.5%;width:42.5%;height:27%;}
  .pz-retro-slot--quick1{left:22.3%;top:67.0%;width:17%;height:28%;}
  .pz-retro-slot--quick2{left:41.4%;top:67.0%;width:17%;height:28%;}
  .pz-retro-slot--quick3{left:60.6%;top:67.0%;width:17%;height:28%;}

  .pz-retro-button--main{
    width:98%!important;height:96%!important;padding:0 12%!important;
    background-image:url("retro-ui/03_buttons/button-cream-long-xl-up.webp")!important;
    color:#21170e!important;font-size:10px!important;
  }
  .pz-retro-button--main:active:not(:disabled){background-image:url("retro-ui/03_buttons/button-cream-long-xl-down.webp")!important;}
  .pz-retro-button--round{width:92%!important;height:94%!important;padding:0 5%!important;font-size:6.8px!important;}
  .pz-retro-button--image{background-image:url("retro-ui/03_buttons_round/button-round-yellow-up.webp")!important;color:#20170e!important;text-shadow:0 1px 0 rgba(255,255,255,.2)!important;}
  .pz-retro-button--image:active:not(:disabled){background-image:url("retro-ui/03_buttons_round/button-round-yellow-down.webp")!important;}

  .pz-retro-lcd-slot{top:8.5%;height:23%;width:16.5%;}
  .pz-retro-lcd-slot--1{left:8.8%;}
  .pz-retro-lcd-slot--2{left:29.5%;}
  .pz-retro-lcd-slot--3{left:50.2%;}
  .pz-retro-lcd-slot--4{left:70.8%;}
  .pz-retro-stat{padding:0 6%!important;}
  .pz-retro-stat span{font-size:4.8px!important;}
  .pz-retro-stat b{font-size:8.2px!important;margin-top:1px!important;}

  .pz-retro-lamp{left:13.0%;top:44%;width:6.1%;height:17%;}
  .pz-retro-switch{left:79.3%;top:42.5%;width:9.4%;height:18%;}
  .pz-retro-knob{left:80.7%;top:57.0%;width:7.7%;height:19%;}
  .pz-retro-hit--sound{left:78.5%;top:40%;width:11%;height:22%;}
  .pz-retro-hit--options{left:79.5%;top:56%;width:10%;height:21%;}
  .pz-retro-caption--sound{left:76.7%;top:35.7%;width:14%;font-size:4.5px;}
  .pz-retro-caption--options{left:77.5%;top:77%;width:13%;font-size:4.5px;}

  .pz-retro-settings-popover{
    left:2%;right:2%;top:calc(100% + 2px);width:auto;padding:8px;border-radius:11px;
  }
  .pz-retro-settings-popover__head b{font-size:10px;}
  .pz-retro-settings-body{grid-template-columns:1fr 1fr!important;gap:6px!important;}
  .pz-retro-settings-body select,.pz-retro-settings-body .pz-segmented-btn{height:32px!important;min-height:32px!important;font-size:9px!important;}

  .pz-retro-panel--bottom{display:none!important;}
  .pz-retro-mobile-more{
    display:block!important;border:1px solid rgba(153,97,47,.22)!important;border-radius:11px!important;
    background:#fff9ee!important;box-shadow:none!important;overflow:hidden!important;
  }
  html[data-theme="dark"] .pz-retro-mobile-more{background:#1b1815!important;border-color:#4f3a28!important;}
  .pz-retro-mobile-more>summary{
    display:flex!important;min-height:37px!important;padding:7px 10px!important;align-items:center!important;justify-content:space-between!important;
    list-style:none!important;font-size:8px!important;font-weight:900!important;color:#5c3a1f!important;cursor:pointer!important;
  }
  html[data-theme="dark"] .pz-retro-mobile-more>summary{color:#f0dcc2!important;}
  .pz-retro-mobile-more>summary::-webkit-details-marker{display:none!important;}
  .pz-retro-mobile-more>summary::after{content:"+";font-size:15px;}
  .pz-retro-mobile-more[open]>summary::after{content:"-";}
  .pz-retro-mobile-more .pz-game-more__body{display:grid!important;gap:6px!important;padding:7px!important;}
  .pz-retro-mobile-more .pz-game-bottom-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;}
  .pz-retro-mobile-more .pz-game-bottom-actions>.pz-btn,
  .pz-retro-mobile-more .pz-game-bottom-actions>button{
    min-height:34px!important;padding:5px 7px!important;border:1px solid #d9c5a7!important;border-radius:8px!important;
    background:#fffdf7!important;color:#2b2117!important;font-size:7.5px!important;font-weight:900!important;box-shadow:none!important;
  }
  html[data-theme="dark"] .pz-retro-mobile-more .pz-game-bottom-actions>.pz-btn,
  html[data-theme="dark"] .pz-retro-mobile-more .pz-game-bottom-actions>button{background:#151719!important;color:#f4ead8!important;border-color:#554a3d!important;}
  .pz-retro-mobile-more .pz-game-extra-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important;}
  .pz-retro-mobile-more .pz-game-extra-stats>div{padding:5px 7px!important;border:1px solid rgba(133,101,67,.18)!important;border-radius:8px!important;background:rgba(255,255,255,.54)!important;}
  html[data-theme="dark"] .pz-retro-mobile-more .pz-game-extra-stats>div{background:#151719!important;border-color:#38322c!important;}
  .pz-retro-mobile-more .pz-game-extra-stats span{font-size:5.4px!important;}
  .pz-retro-mobile-more .pz-game-extra-stats b{font-size:9px!important;}
  .pz-retro-mobile-more .pz-game-readmore-row{margin:0!important;}
  .pz-retro-mobile-more .pz-control-readmore{width:100%!important;min-height:34px!important;padding:6px!important;border:1px solid #d6b57b!important;border-radius:8px!important;background:#ffefc6!important;color:#5b3613!important;font-size:8px!important;font-weight:900!important;text-decoration:none!important;box-shadow:none!important;}

  .pz-retro-download{justify-content:stretch!important;}
  .pz-retro-download .pz-download-puzzle:not([hidden]){width:100%!important;min-height:38px!important;font-size:8px!important;}
  .pz-retro-status .pz-result-box{font-size:8px!important;padding:7px 9px!important;}
}

@media (max-width:430px) and (orientation:portrait){
  .pz-retro-stat span{font-size:4.2px!important;letter-spacing:.02em!important;}
  .pz-retro-stat b{font-size:7.7px!important;}
  .pz-retro-button--round{font-size:6.1px!important;}
  .pz-retro-button--main{font-size:9px!important;}
  .pz-retro-settings-body{grid-template-columns:1fr!important;}
}

@media (prefers-reduced-motion:reduce){
  .pz-retro-button{transition:none!important;}
}

/* ========================================================================
   RETRO UI V2 - proporcje 1:1 z assetami i geometria liczona z pikseli
   Panel jest jednym fizycznym obiektem. Nigdy nie rozciagamy go osobno w X/Y.
   ======================================================================== */
body.pz-game-page.pz-retro-ui-v2 .pz-retro-panel{
  width:100%!important;
  height:auto!important;
  background-size:100% auto!important;
  background-position:center top!important;
  background-repeat:no-repeat!important;
  overflow:visible!important;
}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-panel--top{
  aspect-ratio:2042 / 252!important;
  min-height:0!important;
  max-height:none!important;
}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-panel--bottom{
  aspect-ratio:2035 / 235!important;
  min-height:0!important;
  max-height:none!important;
}

/* W panelach przyciski sa juz narysowane. HTML dodaje tylko napis i hitbox.
   Dzieki temu grafika przycisku nigdy nie ma innej proporcji niz obudowa. */
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button{
  background-image:none!important;
  background-color:transparent!important;
  background-size:contain!important;
  border-radius:999px!important;
  transform:none!important;
  box-shadow:none!important;
}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button::after{
  content:"";
  position:absolute;
  inset:5%;
  border-radius:inherit;
  pointer-events:none;
  opacity:0;
  background:rgba(30,18,8,.10);
  box-shadow:inset 0 2px 5px rgba(25,14,7,.28);
  transition:opacity .07s ease, transform .07s ease;
}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button:active:not(:disabled){
  transform:none!important;
}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button:active:not(:disabled)::after{
  opacity:1;
  transform:translateY(1px);
}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button:active:not(:disabled){
  padding-top:2px!important;
}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button--main,
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button--round,
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button--readmore{
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  padding-left:6%!important;
  padding-right:6%!important;
}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button--main{
  font-size:clamp(11px,.95vw,15px)!important;
  color:#20170d!important;
}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button--round{
  font-size:clamp(7px,.62vw,10px)!important;
  line-height:1.02!important;
  color:#21170e!important;
  text-shadow:0 1px 0 rgba(255,255,255,.24)!important;
}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button--image{
  color:#f5edd7!important;
  text-shadow:0 1px 1px rgba(0,0,0,.48)!important;
}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button--restart{
  color:#fff0d4!important;
  text-shadow:0 1px 1px rgba(0,0,0,.46)!important;
}

/* ---------------- DESKTOP TOP: pomiary z panel-desktop-top.webp 2042x252 ---------------- */
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--start{left:4.897%!important;top:19.444%!important;width:18.315%!important;height:60.714%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--quick1{left:26.445%!important;top:19.444%!important;width:7.199%!important;height:59.524%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--quick2{left:34.819%!important;top:19.841%!important;width:7.150%!important;height:59.524%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--quick3{left:43.144%!important;top:19.444%!important;width:7.297%!important;height:59.921%!important;}

body.pz-game-page.pz-retro-ui-v2 .pz-retro-lcd-slot{height:auto!important;display:flex!important;align-items:center!important;justify-content:center!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-lcd-slot--1{left:53.134%!important;top:30.952%!important;width:6.366%!important;height:37.302%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-lcd-slot--2{left:61.019%!important;top:30.556%!important;width:6.709%!important;height:37.698%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-lcd-slot--3{left:69.246%!important;top:30.952%!important;width:6.709%!important;height:37.302%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-lcd-slot--4{left:77.424%!important;top:30.952%!important;width:6.513%!important;height:37.302%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-stat{padding:0 4%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-stat span{font-size:clamp(5px,.42vw,7px)!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-stat b{font-size:clamp(10px,.92vw,15px)!important;}

body.pz-game-page.pz-retro-ui-v2 .pz-retro-lamp{left:87.120%!important;top:14.286%!important;width:2.693%!important;height:21.825%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-switch{left:86.386%!important;top:48.016%!important;width:4.554%!important;height:20.635%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-knob{left:91.920%!important;top:42.063%!important;width:3.673%!important;height:30.952%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-hit--sound{left:85.95%!important;top:43.5%!important;width:5.45%!important;height:32.5%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-hit--options{left:91.35%!important;top:37.5%!important;width:4.85%!important;height:43%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-caption--sound{left:85.7%!important;top:80.5%!important;width:5.8%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-caption--options{left:90.9%!important;top:80.5%!important;width:5.8%!important;}

/* ---------------- DESKTOP BOTTOM: panel-desktop-bottom.webp 2035x235 ---------------- */
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--bottom1{left:4.963%!important;top:24.255%!important;width:5.897%!important;height:50.638%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--bottom2{left:11.400%!important;top:24.255%!important;width:5.799%!important;height:50.638%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--bottom3{left:17.789%!important;top:24.255%!important;width:5.749%!important;height:50.638%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--bottom1 .pz-retro-button,
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--bottom2 .pz-retro-button,
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--bottom3 .pz-retro-button{
  font-size:clamp(5.8px,.48vw,8px)!important;
}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--bottom1 .pz-retro-button{color:#2c2114!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--bottom2 .pz-retro-button{color:#f8edd6!important;text-shadow:0 1px 1px rgba(0,0,0,.45)!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--bottom3 .pz-retro-button{color:#25180f!important;}

body.pz-game-page.pz-retro-ui-v2 .pz-retro-bottom-lcd--1{left:27.420%!important;top:28.085%!important;width:7.224%!important;height:43.830%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-bottom-lcd--2{left:35.135%!important;top:27.234%!important;width:7.715%!important;height:45.106%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-bottom-lcd--3{left:43.391%!important;top:28.936%!important;width:7.568%!important;height:42.979%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-bottom-lcd--4{left:51.400%!important;top:29.787%!important;width:7.469%!important;height:42.128%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-stat-mirror{padding:0 4%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-stat-mirror__label{font-size:clamp(4.7px,.39vw,6.3px)!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-stat-mirror__value{font-size:clamp(8.5px,.75vw,12.5px)!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-hit--bottom-options{left:61.25%!important;top:18%!important;width:5.3%!important;height:58%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--readmore{left:72.776%!important;top:21.702%!important;width:22.162%!important;height:54.468%!important;}
body.pz-game-page.pz-retro-ui-v2 .pz-retro-button--readmore{
  font-size:clamp(7px,.62vw,10px)!important;
  color:#2a1c0f!important;
  text-shadow:0 1px 0 rgba(255,255,255,.24)!important;
}

/* Na szerokim desktopie nie zmieniamy proporcji panelu - zmienia sie tylko cala skala. */
@media (max-width:980px) and (min-width:821px){
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-panel--top,
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-panel--bottom{height:auto!important;}
}

/* ---------------- MOBILE PORTRAIT: panel-mobile-top.webp 2043x630 ---------------- */
@media (max-width:820px) and (orientation:portrait){
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-panel--top{
    width:100%!important;
    height:auto!important;
    aspect-ratio:2043 / 630!important;
    background-size:100% auto!important;
    background-position:center top!important;
  }
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--start{left:29.026%!important;top:36.825%!important;width:41.899%!important;height:27.143%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--quick1{left:22.663%!important;top:67.778%!important;width:15.908%!important;height:23.175%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--quick2{left:41.605%!important;top:67.778%!important;width:16.544%!important;height:23.175%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-slot--quick3{left:61.185%!important;top:67.778%!important;width:15.957%!important;height:23.175%!important;}

  body.pz-game-page.pz-retro-ui-v2 .pz-retro-button--main{
    width:100%!important;height:100%!important;padding:0 6%!important;
    font-size:clamp(8.5px,2.6vw,11px)!important;
    color:#251c12!important;
  }
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-button--round{
    width:100%!important;height:100%!important;padding:0 4%!important;
    font-size:clamp(5.5px,1.72vw,7.2px)!important;
  }
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-button--image{color:#2a2116!important;text-shadow:0 1px 0 rgba(255,255,255,.25)!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-button--restart{color:#fff0d6!important;}

  body.pz-game-page.pz-retro-ui-v2 .pz-retro-lcd-slot--1{left:10.279%!important;top:10.635%!important;width:12.971%!important;height:16.349%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-lcd-slot--2{left:30.396%!important;top:10.476%!important;width:16.300%!important;height:16.349%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-lcd-slot--3{left:53.989%!important;top:10.635%!important;width:15.370%!important;height:15.238%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-lcd-slot--4{left:77.190%!important;top:10.794%!important;width:12.286%!important;height:15.079%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-stat{padding:0 5%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-stat span{font-size:clamp(3.5px,1.08vw,4.6px)!important;line-height:1!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-stat b{font-size:clamp(6.5px,2vw,8.5px)!important;line-height:1!important;margin-top:1px!important;}

  body.pz-game-page.pz-retro-ui-v2 .pz-retro-lamp{left:12.628%!important;top:43.968%!important;width:3.818%!important;height:12.381%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-switch{left:77.876%!important;top:39.365%!important;width:9.153%!important;height:12.540%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-knob{left:80.666%!important;top:54.921%!important;width:6.412%!important;height:20.476%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-hit--sound{left:76.9%!important;top:37.5%!important;width:11.2%!important;height:18%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-hit--options{left:79.3%!important;top:53.2%!important;width:9.3%!important;height:24%!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-caption--sound{left:76.1%!important;top:33.2%!important;width:12.5%!important;font-size:clamp(3.4px,1vw,4.4px)!important;}
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-caption--options{left:77.7%!important;top:76.0%!important;width:12%!important;font-size:clamp(3.4px,1vw,4.4px)!important;}
}

@media (prefers-reduced-motion:reduce){
  body.pz-game-page.pz-retro-ui-v2 .pz-retro-button::after{transition:none!important;}
}

/* ========================================================================
   RETRO UI V3 - czytelnosc, 3D overlap, wspolne flyouty i game feel
   ======================================================================== */
body.pz-game-page.pz-retro-ui-v3 :is(.pz-uk-layout,.pz-od-layout,.pz-mem-layout,.pz-demontaz-layout,.pz-sp-layout){
  position:relative!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-top{
  position:relative!important;
  z-index:30!important;
  margin-bottom:-20px!important; /* 10px gap siatki + 10px realnego nachodzenia */
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-after{
  position:relative!important;
  z-index:30!important;
  margin-top:-20px!important;
}
body.pz-game-page.pz-retro-ui-v3 :is(.pz-uk-board-wrap,.pz-od-board-wrap,.pz-mem-board-wrap,.pz-demontaz-board-wrap,.pz-sp-board-wrap){
  position:relative!important;
  z-index:5!important;
}

/* Duze, czytelne napisy fizycznych przyciskow. */
body.pz-game-page.pz-retro-ui-v3 .pz-retro-button__label{display:block;line-height:.98;text-align:center;}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-button--main{
  font-size:clamp(14px,1.16vw,19px)!important;
  line-height:1!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-button--round{
  font-size:clamp(9.5px,.82vw,13px)!important;
  line-height:.98!important;
  letter-spacing:-.015em!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-slot--bottom1 .pz-retro-button,
body.pz-game-page.pz-retro-ui-v3 .pz-retro-slot--bottom2 .pz-retro-button,
body.pz-game-page.pz-retro-ui-v3 .pz-retro-slot--bottom3 .pz-retro-button{
  font-size:clamp(8.5px,.70vw,11.5px)!important;
  line-height:.96!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-button--readmore{
  font-size:clamp(9px,.78vw,12.5px)!important;
}

/* LCD: maksymalna czytelnosc bez wychodzenia poza prawdziwe szybki. */
body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  height:100%!important;
  padding:0 5%!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat span{
  font-size:clamp(7.5px,.64vw,10px)!important;
  line-height:.95!important;
  letter-spacing:.025em!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat b{
  margin-top:2px!important;
  font-size:clamp(15px,1.32vw,21px)!important;
  line-height:.92!important;
  letter-spacing:0!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat-mirror{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  height:100%!important;
  padding:0 5%!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat-mirror__label{
  font-size:clamp(6.5px,.55vw,8.5px)!important;
  line-height:.92!important;
  letter-spacing:.015em!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  max-height:1.9em;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat-mirror__value{
  margin-top:2px!important;
  font-size:clamp(13px,1.08vw,18px)!important;
  line-height:.95!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-caption{
  font-size:clamp(5.8px,.49vw,7.5px)!important;
}

/* Wspolny styl kazdego rozwijanego kafelka. */
body.pz-game-page.pz-retro-ui-v3 .pz-retro-flyout{
  position:absolute;
  z-index:120;
  width:min(620px,92vw);
  padding:11px 12px 12px;
  border:1px solid rgba(190,105,36,.58);
  border-radius:15px;
  background:linear-gradient(180deg,#fff8e9 0%,#f5dfb7 100%);
  box-shadow:0 16px 36px rgba(56,31,12,.24),inset 0 1px 0 rgba(255,255,255,.78);
  color:#21170f;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-flyout::before{
  content:"";
  position:absolute;
  left:16px;right:16px;top:0;
  height:3px;
  border-radius:0 0 4px 4px;
  background:linear-gradient(90deg,#ffb51f,#ff6f00,#d94a26);
  opacity:.9;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-flyout[hidden]{display:none!important;}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-flyout__head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-flyout__head b{
  font-size:13px!important;line-height:1.15;color:#2b1b0e;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-flyout__body{
  position:relative;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-popover.is-top-origin{
  right:1.5%;top:calc(100% - 8px);
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-popover.is-bottom-origin{
  right:1.5%;top:calc(100% - 8px);
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-hint-popover{
  left:24.5%;top:calc(100% - 8px);width:min(500px,70vw);
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-hint-body{
  min-height:42px;
  padding:10px 12px;
  border:1px solid rgba(216,132,55,.35);
  border-radius:11px;
  background:rgba(255,253,246,.76);
  font-size:12px;
  line-height:1.45;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-close{
  min-height:30px!important;
  padding:5px 11px!important;
  border:1px solid rgba(106,69,34,.28)!important;
  border-radius:999px!important;
  background:#fffaf0!important;
  color:#342113!important;
  font-size:9px!important;
  font-weight:900!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-body{
  gap:9px!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-body label,
body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-body .pz-control-source,
body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-body .pz-control-sound{
  min-width:0;
  padding:7px 8px!important;
  border:1px solid rgba(177,120,65,.25)!important;
  border-radius:10px!important;
  background:rgba(255,253,247,.62)!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-body label>span,
body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-body .pz-control-source>span,
body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-body .pz-control-sound>span{
  font-size:8px!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-body select,
body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-body .pz-segmented-btn{
  min-height:38px!important;height:38px!important;font-size:11px!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-mood-field[hidden]{display:none!important;}
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v3 .pz-retro-flyout{
  background:linear-gradient(180deg,#2d251c,#1b1713);
  border-color:#82562f;
  color:#f4eadb;
  box-shadow:0 18px 38px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.05);
}
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v3 .pz-retro-flyout__head b{color:#f5e7d3;}
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v3 .pz-retro-hint-body,
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-body label,
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-body .pz-control-source,
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v3 .pz-retro-settings-body .pz-control-sound{
  background:rgba(18,19,20,.62)!important;border-color:#594a3c!important;color:#f3e8d7!important;
}

/* Pokretla sa fizyczne: obracaja sie i zostaja w tej pozycji do zamkniecia kafelka. */
body.pz-game-page.pz-retro-ui-v3 .pz-retro-knob,
body.pz-game-page.pz-retro-ui-v3 .pz-retro-bottom-knob{
  transform-origin:50% 50%;
  transition:transform .18s cubic-bezier(.2,.8,.2,1),filter .18s ease;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-knob.is-turned,
body.pz-game-page.pz-retro-ui-v3 .pz-retro-bottom-knob.is-turned{
  transform:rotate(45deg)!important;
  filter:brightness(1.04) drop-shadow(0 2px 2px rgba(0,0,0,.22));
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-bottom-knob{
  position:absolute;z-index:6;left:61.35%;top:18%;width:5.2%;height:58%;object-fit:contain;pointer-events:none;
}

/* Nowa podpowiedz nie wyskakuje sama. Migajacy fizyczny guzik informuje, ze warto go nacisnac. */
@keyframes pzRetroHintPulse{
  0%,100%{box-shadow:0 0 0 0 rgba(255,222,78,0);filter:brightness(1)}
  45%{box-shadow:0 0 0 4px rgba(255,228,89,.55),0 0 18px 5px rgba(255,158,35,.40);filter:brightness(1.18)}
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-hint-ready{
  animation:pzRetroHintPulse 1.05s ease-in-out infinite!important;
  border-radius:50%!important;
}
body.pz-game-page.pz-retro-ui-v3 .pz-retro-hint-ready::after{opacity:.18!important;}

/* Mobilne "Więcej" jest tym samym typem kafelka, tylko osadzonym w przeplywie strony. */
@media (max-width:820px) and (orientation:portrait){
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-top{margin-bottom:-10px!important;} /* gap 5 + overlap 5 */
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-button--main{font-size:clamp(12px,3.4vw,15px)!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-button--round{font-size:clamp(7.8px,2.35vw,10px)!important;line-height:.96!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat span{font-size:clamp(5.6px,1.55vw,6.8px)!important;line-height:.92!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat b{font-size:clamp(10px,2.9vw,12.5px)!important;line-height:.92!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-caption{font-size:clamp(4.2px,1.2vw,5px)!important;}

  body.pz-game-page.pz-retro-ui-v3 .pz-retro-flyout{
    left:2%!important;right:2%!important;top:calc(100% - 5px)!important;width:auto!important;
    padding:9px 9px 10px!important;border-radius:12px!important;
  }
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-hint-popover{width:auto!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-hint-body{font-size:10px!important;padding:8px 9px!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-flyout__head b{font-size:11px!important;}

  body.pz-game-page.pz-retro-ui-v3 .pz-retro-mobile-more{
    border:1px solid rgba(190,105,36,.46)!important;
    background:linear-gradient(180deg,#fff8e9,#f5dfb7)!important;
    box-shadow:0 10px 24px rgba(56,31,12,.10)!important;
  }
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-mobile-more>summary{
    min-height:40px!important;padding:8px 11px!important;font-size:9px!important;color:#3b2514!important;
  }
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-mobile-more .pz-game-more__body{
    padding:8px!important;gap:7px!important;
  }
  html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v3 .pz-retro-mobile-more{
    background:linear-gradient(180deg,#2d251c,#1b1713)!important;border-color:#82562f!important;
  }
  html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v3 .pz-retro-mobile-more>summary{color:#f3e6d1!important;}
}

@media (max-width:430px) and (orientation:portrait){
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-button--round{font-size:8.2px!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat span{font-size:5.8px!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat b{font-size:10.8px!important;}
}

@media (prefers-reduced-motion:reduce){
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-knob,
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-bottom-knob{transition:none!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-hint-ready{animation:none!important;box-shadow:0 0 0 4px rgba(255,228,89,.55)!important;}
}

/* Finalna korekta czytelnosci po podgladzie na realnej szerokosci strony. */
@media (min-width:821px){
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-button--main{font-size:clamp(16px,1.35vw,21px)!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-button--round{font-size:clamp(11px,.95vw,14.5px)!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-slot--bottom1 .pz-retro-button,
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-slot--bottom2 .pz-retro-button,
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-slot--bottom3 .pz-retro-button{font-size:clamp(9.5px,.82vw,13px)!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat span{font-size:clamp(8.5px,.72vw,10.5px)!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat b{font-size:clamp(17px,1.48vw,22px)!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat-mirror__label{font-size:clamp(7px,.60vw,9px)!important;}
  body.pz-game-page.pz-retro-ui-v3 .pz-retro-stat-mirror__value{font-size:clamp(15px,1.22vw,19px)!important;}
}

/* ========================================================================
   RETRO UI v4 - czytelność, jednolite kafelki, miniatury podkładów i proxy.
   ======================================================================== */
body.pz-game-page.pz-retro-ui-v4 .pz-retro-button--image{
  color:#fffdf4!important;
  text-shadow:0 2px 2px rgba(0,0,0,.72),0 0 5px rgba(0,0,0,.32)!important;
  filter:brightness(1.16) saturate(.92)!important;
  font-weight:1000!important;
}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-button--restart .pz-retro-button__label,
body.pz-game-page.pz-retro-ui-v4 .pz-retro-button--image .pz-retro-button__label{
  line-height:.88!important;
}

/* Większe LCD na dole. */
body.pz-game-page.pz-retro-ui-v4 .pz-retro-stat-mirror__label{
  font-size:clamp(8px,.69vw,10.5px)!important;
  line-height:.88!important;
  font-weight:1000!important;
  max-height:2em!important;
}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-stat-mirror__value{
  margin-top:2px!important;
  font-size:clamp(17px,1.36vw,22px)!important;
  line-height:.9!important;
  font-weight:1000!important;
}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-button--readmore{
  font-size:clamp(12px,1.02vw,16px)!important;
  line-height:1!important;
  font-weight:1000!important;
}

/* Kafelki zawsze jedna rodzina wizualna. */
body.pz-game-page.pz-retro-ui-v4 .pz-retro-flyout{
  background:linear-gradient(180deg,#fff8e8 0%,#f5dfb5 100%)!important;
  border:1px solid rgba(191,105,35,.62)!important;
  box-shadow:0 18px 38px rgba(58,30,10,.25),inset 0 1px 0 rgba(255,255,255,.78)!important;
}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-info-popover,
body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-popover,
body.pz-game-page.pz-retro-ui-v4 .pz-retro-instruction-popover{
  left:1.5%;right:1.5%;top:calc(100% - 8px);width:auto!important;
}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-hint-popover{left:24.5%;top:calc(100% - 8px);width:min(520px,72vw)!important;}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-settings-popover{right:1.5%;top:calc(100% - 8px);}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-info-popover p{margin:7px 0 0;font-size:12px;line-height:1.5;}

/* Ustawienia są kopiami kontrolek - silnik gry zachowuje oryginalne ID w ukrytym panelu. */
body.pz-game-page.pz-retro-ui-v4 .pz-retro-settings-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:9px!important;
}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-setting-tile{
  display:grid!important;
  gap:5px!important;
  min-width:0;
  padding:8px 9px!important;
  border:1px solid rgba(177,120,65,.28)!important;
  border-radius:11px!important;
  background:rgba(255,253,247,.72)!important;
  align-content:start;
}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-setting-tile>span{
  font-size:8px!important;font-weight:1000!important;text-transform:uppercase!important;letter-spacing:.055em!important;color:#715a42!important;
}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-setting-tile select,
body.pz-game-page.pz-retro-ui-v4 .pz-retro-sound-proxy{
  width:100%!important;min-height:39px!important;height:39px!important;padding:5px 9px!important;border:1px solid #cbb99b!important;border-radius:9px!important;background:#fffdf7!important;color:#18140f!important;font-size:11px!important;font-weight:900!important;
}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-setting-tile--source{grid-column:span 1;}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-source-value{
  display:block;min-height:39px;padding:9px 10px;border:1px solid #d8c4a3;border-radius:9px;background:#fffdf7;color:#1c1711;font-size:12px;line-height:1.25;font-weight:1000;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;word-break:break-word;
}
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v4 .pz-retro-setting-tile{background:rgba(18,19,20,.70)!important;border-color:#594a3c!important;}
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v4 .pz-retro-setting-tile>span{color:#d8c8b3!important;}
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v4 .pz-retro-setting-tile select,
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v4 .pz-retro-sound-proxy,
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v4 .pz-retro-source-value{background:#151719!important;color:#f3eadb!important;border-color:#5b4e3f!important;}

/* Podkłady jako galeria miniatur. */
body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-popover{max-height:min(520px,62vh);overflow:auto;}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-grid{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;
}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-choice{
  display:grid;grid-template-rows:72px auto;gap:5px;min-width:0;padding:5px;border:1px solid rgba(151,104,61,.30);border-radius:10px;background:rgba(255,255,255,.55);cursor:pointer;color:#2b1e13;font:inherit;text-align:left;transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease;
}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-choice:hover{transform:translateY(-1px);border-color:#ef8b34;box-shadow:0 7px 14px rgba(87,48,17,.13);}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-choice.is-selected{border:2px solid #ff7200;box-shadow:0 0 0 2px rgba(255,114,0,.12);}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-choice img{width:100%;height:72px;object-fit:cover;border-radius:7px;border:1px solid rgba(0,0,0,.12);background:#ddd;}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-choice span{font-size:9px;line-height:1.15;font-weight:900;white-space:normal;}
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-choice{background:rgba(12,14,15,.62);color:#f3e9da;border-color:#54483d;}

/* Instrukcja też jako wysuwany kafelek. */
body.pz-game-page.pz-retro-ui-v4 .pz-retro-instruction-popover{max-height:min(560px,68vh);overflow:auto;}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-instruction-content{font-size:12px;line-height:1.5;color:inherit;}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-instruction-content h2{margin:2px 0 8px;font-size:17px;}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-instruction-content ol{margin:8px 0 8px 20px;padding:0;display:grid;gap:5px;}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-instruction-content p{margin:8px 0 0;}

/* Status jest lustrzanym komunikatem, nie przenosimy oryginalnego #result. */
body.pz-game-page.pz-retro-ui-v4 .pz-retro-status[hidden]{display:none!important;}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-status .pz-result-box{
  min-height:38px;padding:9px 11px;border:1px solid rgba(255,90,0,.18);border-radius:10px;background:var(--orange-pale,#fff8f3);font-size:10px;line-height:1.45;
}
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v4 .pz-retro-status .pz-result-box{background:#211a16;color:#eee2d6;border-color:#51301f;}

/* Download jest proxy - oryginalny przycisk pozostaje w DOM gry. */
body.pz-game-page.pz-retro-ui-v4 .pz-retro-download[hidden]{display:none!important;}
body.pz-game-page.pz-retro-ui-v4 .pz-retro-download-proxy{
  min-width:230px;min-height:42px;padding:8px 14px!important;border-radius:12px!important;background:linear-gradient(#2da260,#17804a)!important;color:#fff!important;font-size:11px!important;font-weight:1000!important;box-shadow:0 5px 12px rgba(19,100,58,.18)!important;
}

@media (min-width:821px){
  body.pz-game-page.pz-retro-ui-v4 .pz-retro-button--round{font-size:clamp(12px,1.03vw,15.5px)!important;font-weight:1000!important;}
  body.pz-game-page.pz-retro-ui-v4 .pz-retro-slot--bottom1 .pz-retro-button,
  body.pz-game-page.pz-retro-ui-v4 .pz-retro-slot--bottom2 .pz-retro-button,
  body.pz-game-page.pz-retro-ui-v4 .pz-retro-slot--bottom3 .pz-retro-button{font-size:clamp(10.5px,.90vw,14px)!important;font-weight:1000!important;}
}

@media (max-width:1100px) and (min-width:821px){
  body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
}

@media (max-width:820px) and (orientation:portrait){
  body.pz-game-page.pz-retro-ui-v4 .pz-retro-flyout{left:1.5%!important;right:1.5%!important;top:calc(100% - 5px)!important;width:auto!important;max-width:none!important;}
  body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
  body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-choice{grid-template-rows:58px auto;padding:4px;}
  body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-choice img{height:58px;}
  body.pz-game-page.pz-retro-ui-v4 .pz-retro-mat-choice span{font-size:7.5px;}
  body.pz-game-page.pz-retro-ui-v4 .pz-retro-instruction-content{font-size:10px;}
  body.pz-game-page.pz-retro-ui-v4 .pz-retro-instruction-content h2{font-size:14px;}
}

/* ========================================================================
   RETRO UI v5 - dolne kafelki do góry, małe podkłady, obrazowy wybór motywu.
   ======================================================================== */
body.pz-game-page.pz-retro-ui-v5 .pz-retro-after,
body.pz-game-page.pz-retro-ui-v5 .pz-retro-panel{
  position:relative;
}

/* Każdy kafelek wywołany z dolnego manipulatora otwiera się NAD panelem. */
body.pz-game-page.pz-retro-ui-v5 .pz-retro-flyout.is-bottom-origin{
  top:auto!important;
  bottom:calc(100% - 8px)!important;
  left:1.5%!important;
  right:1.5%!important;
  width:auto!important;
  max-width:none!important;
  transform-origin:50% 100%;
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-flyout.is-top-origin{
  bottom:auto!important;
}

/* Podkłady: około połowy poprzedniego rozmiaru, większa liczba na ekranie. */
body.pz-game-page.pz-retro-ui-v5 .pz-retro-mat-popover{
  max-height:min(350px,46vh)!important;
  overflow:auto!important;
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-mat-grid{
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:6px!important;
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-mat-choice{
  grid-template-rows:38px auto!important;
  gap:3px!important;
  padding:3px!important;
  border-radius:8px!important;
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-mat-choice img{
  height:38px!important;
  border-radius:5px!important;
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-mat-choice span{
  font-size:7px!important;
  line-height:1.05!important;
  font-weight:900!important;
}

/* Motyw puzzli jako obrazowe kafelki, jak wybory w ustawieniach Czelendży. */
body.pz-game-page.pz-retro-ui-v5 .pz-retro-setting-tile--theme{
  grid-column:1 / -1!important;
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-choice{
  min-width:0;
  padding:5px;
  border:1px solid rgba(150,101,57,.30);
  border-radius:11px;
  background:rgba(255,255,255,.58);
  color:#2b1e13;
  cursor:pointer;
  font:inherit;
  text-align:left;
  transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease,background .12s ease;
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-choice:hover{
  transform:translateY(-1px);
  border-color:#ef8b34;
  box-shadow:0 7px 14px rgba(87,48,17,.13);
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-choice.is-selected{
  border:2px solid #ff7200;
  box-shadow:0 0 0 2px rgba(255,114,0,.13),0 7px 14px rgba(87,48,17,.10);
  background:#fffaf0;
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview{
  position:relative;
  display:grid;
  place-items:center;
  height:70px;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.12);
  border-radius:8px;
  isolation:isolate;
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview::before,
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview::after{
  content:"";
  position:absolute;
  z-index:-1;
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview b{
  display:block;
  max-width:88%;
  padding:4px 6px;
  border-radius:6px;
  font-size:clamp(9px,.8vw,12px)!important;
  line-height:.95;
  font-weight:1000;
  letter-spacing:.015em;
  text-align:center;
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview--chill{
  background:linear-gradient(145deg,#e9f2e2,#f7ecd4 58%,#d9e9dc);
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview--chill::before{
  width:58px;height:58px;border-radius:50%;left:8%;top:12%;
  background:rgba(112,156,117,.30);box-shadow:72px 15px 0 rgba(215,167,99,.23),125px -8px 0 rgba(105,139,126,.18);
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview--chill b{
  color:#38533f;background:rgba(255,255,255,.58);
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview--cytaty{
  background:linear-gradient(165deg,#f8edcc 0 33%,#ef694d 33% 50%,#f7c72d 50% 67%,#68b9b2 67% 82%,#f3b4c2 82%);
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview--cytaty b{
  color:#172833;background:#fff5d9;box-shadow:3px 3px 0 rgba(20,48,49,.26);transform:rotate(-2deg);
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview--humor{
  background:linear-gradient(135deg,#fde1a6,#ffc768 42%,#f59e7c 42% 68%,#82bfd5 68%);
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview--humor::before{
  left:9%;bottom:12%;width:40%;height:38%;background:#fff;border:2px solid #29343c;border-radius:45% 45% 45% 15%;transform:rotate(-4deg);
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview--humor b{
  color:#1f2930;background:#fff;border:2px solid #29343c;transform:rotate(2deg);
}
body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-choice__label{
  display:block;
  padding:5px 3px 2px;
  font-size:10px!important;
  line-height:1.1!important;
  font-weight:1000!important;
  text-align:center;
}
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-choice{
  background:rgba(12,14,15,.62);color:#f3e9da;border-color:#54483d;
}
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-choice.is-selected{
  background:#211a14;border-color:#ff8a2a;
}

/* Na telefonie nadal ma być obrazowo, ale bardzo kompaktowo. */
@media (max-width:1100px) and (min-width:821px){
  body.pz-game-page.pz-retro-ui-v5 .pz-retro-mat-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;}
}
@media (max-width:820px) and (orientation:portrait){
  body.pz-game-page.pz-retro-ui-v5 .pz-retro-flyout.is-bottom-origin{
    top:auto!important;
    bottom:calc(100% - 4px)!important;
    left:1%!important;right:1%!important;
    max-height:min(62vh,480px)!important;
    overflow:auto!important;
  }
  body.pz-game-page.pz-retro-ui-v5 .pz-retro-mat-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;}
  body.pz-game-page.pz-retro-ui-v5 .pz-retro-mat-choice{grid-template-rows:34px auto!important;padding:3px!important;}
  body.pz-game-page.pz-retro-ui-v5 .pz-retro-mat-choice img{height:34px!important;}
  body.pz-game-page.pz-retro-ui-v5 .pz-retro-mat-choice span{font-size:6.5px!important;}
  body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;}
  body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview{height:48px;}
  body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-preview b{font-size:7px!important;padding:3px 4px;}
  body.pz-game-page.pz-retro-ui-v5 .pz-retro-theme-choice__label{font-size:7.5px!important;padding-top:4px;}
}

/* Nowe assety stanów gry i nagród. */
body.pz-game-page .pz-game-state-art{
  display:block;
  width:min(260px,28vw);
  height:auto;
  max-height:42vh;
  object-fit:contain;
  filter:drop-shadow(0 8px 12px rgba(0,0,0,.24));
}
body.pz-game-page .pz-game-retro-finish-head{
  display:grid;
  justify-items:center;
  gap:8px;
  margin:0 auto 10px;
}
body.pz-game-page .pz-game-retro-finish-state{
  width:min(300px,62vw);
  max-height:145px;
  object-fit:contain;
  filter:drop-shadow(0 8px 14px rgba(0,0,0,.22));
}
body.pz-game-page .pz-game-retro-awards{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
}
body.pz-game-page .pz-game-retro-awards img{
  width:auto;
  height:62px;
  max-width:150px;
  object-fit:contain;
  filter:drop-shadow(0 5px 8px rgba(0,0,0,.18));
}
body.pz-game-page .pz-game-retro-awards img.is-main{height:78px;}
body.pz-game-page .pz-win-rewards{display:none!important;}
@media (max-width:820px) and (orientation:portrait){
  body.pz-game-page .pz-game-state-art{width:min(180px,48vw);max-height:30vh;}
  body.pz-game-page .pz-game-retro-finish-state{width:min(230px,68vw);max-height:110px;}
  body.pz-game-page .pz-game-retro-awards img{height:46px;max-width:105px;}
  body.pz-game-page .pz-game-retro-awards img.is-main{height:58px;}
}

/* ========================================================================
   RETRO UI v6 - prawdziwe miniatury motywów, LCD auto-fit, proporcje podkładów.
   ======================================================================== */
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat,
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat-mirror{
  overflow:hidden!important;
  min-width:0!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:0!important;
  padding:3% 5%!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat span,
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat-mirror__label{
  flex:0 0 42%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  width:100%!important;
  margin:0!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-start!important;
  white-space:normal!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  line-height:.92!important;
  letter-spacing:0!important;
  font-weight:1000!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat b,
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat-mirror__value{
  flex:1 1 58%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  width:100%!important;
  margin:0!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  line-height:.94!important;
  letter-spacing:0!important;
  font-weight:1000!important;
  font-variant-numeric:tabular-nums!important;
}

/* Podkłady: tylko obraz, bez nazw. Miniatura zachowuje prawdziwe proporcje pliku. */
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-grid{
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:7px!important;
  align-items:start!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice{
  display:block!important;
  min-width:0!important;
  padding:3px!important;
  border-radius:8px!important;
  background:rgba(255,255,255,.58)!important;
  overflow:hidden!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:5px!important;
  border:1px solid rgba(0,0,0,.12)!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice span{display:none!important;}

/* Motywy: taki sam język wizualny jak wybór klimatu przy starcie Czelendżu. */
body.pz-game-page.pz-retro-ui-v6 .pz-retro-setting-tile--theme{
  grid-column:1 / -1!important;
  padding:12px!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice{
  display:grid!important;
  grid-template-rows:1fr auto!important;
  gap:9px!important;
  min-height:178px!important;
  padding:10px!important;
  border:1px solid rgba(118,111,101,.22)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.62)!important;
  color:#191c22!important;
  cursor:pointer!important;
  overflow:hidden!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice:hover{
  transform:translateY(-1px)!important;
  border-color:rgba(255,90,0,.45)!important;
  box-shadow:0 9px 18px rgba(70,40,17,.10)!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice.is-selected{
  border:2px solid #ff7200!important;
  background:rgba(255,242,232,.86)!important;
  box-shadow:0 0 0 3px rgba(255,114,0,.11)!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-puzzle-preview{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:center!important;
  min-height:116px!important;
  overflow:hidden!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-style-piece{
  position:relative!important;
  display:block!important;
  width:100%!important;
  aspect-ratio:169/200!important;
  overflow:hidden!important;
  isolation:isolate!important;
  filter:drop-shadow(0 4px 6px rgba(0,0,0,.10))!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-style-piece__image{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-style-piece__frame{
  position:absolute!important;
  inset:0!important;
  z-index:2!important;
  width:100%!important;
  height:100%!important;
  object-fit:fill!important;
  pointer-events:none!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice__label{
  display:block!important;
  padding:0 4px 2px!important;
  font-size:13px!important;
  line-height:1.15!important;
  font-weight:950!important;
  text-align:center!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice--custom{
  grid-column:1 / -1!important;
  min-height:126px!important;
  grid-template-columns:150px 1fr!important;
  grid-template-rows:1fr!important;
  align-items:center!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-custom-preview{
  display:grid!important;
  place-items:center!important;
  min-height:100px!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-custom-preview img{
  display:block!important;
  width:96px!important;
  height:96px!important;
  object-fit:contain!important;
  filter:drop-shadow(0 5px 7px rgba(0,0,0,.12))!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice--custom .pz-retro-theme-choice__label{
  font-size:15px!important;
  text-align:left!important;
}
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice{
  background:rgba(20,22,24,.76)!important;
  color:#f3eadc!important;
  border-color:#54483d!important;
}
html[data-theme="dark"] body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice.is-selected{
  background:#2a211a!important;
  border-color:#ff8a2a!important;
}

/* Pudełka Pamięciówki i Sprintu: ten sam duży startowy rozmiar co w Układaniu. */
body.pz-game-page.pz-classic-layout-v2:is(.pz-mem-page,.pz-sp-page) .pz-showcase-box{
  height:min(88%,760px)!important;
  width:auto!important;
  max-width:none!important;
}

@media (max-width:1100px) and (min-width:821px){
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;}
}
@media (max-width:820px) and (orientation:portrait){
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice{min-height:138px!important;padding:7px!important;border-radius:13px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-puzzle-preview{min-height:86px!important;gap:5px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice__label{font-size:9px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice--custom{
    grid-column:1 / -1!important;
    min-height:92px!important;
    grid-template-columns:88px 1fr!important;
  }
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-custom-preview{min-height:72px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-custom-preview img{width:68px!important;height:68px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice--custom .pz-retro-theme-choice__label{font-size:11px!important;}
  body.pz-game-page.pz-classic-layout-v2:is(.pz-mem-page,.pz-sp-page) .pz-showcase-box{
    height:88%!important;
    width:auto!important;
  }
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat span,
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat-mirror__label{
  display:block!important;
  height:42%!important;
  padding-top:1px!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat b,
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat-mirror__value{
  display:block!important;
  height:58%!important;
  padding-top:1px!important;
}


/* ========================================================================
   RETRO UI v7 - pionowe preview motywów + nieodkształcone podkłady.
   ======================================================================== */
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-popover{
  max-height:min(360px,46vh)!important;
  overflow:auto!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-grid{
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:7px!important;
  align-items:start!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:52px!important;
  padding:3px!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:46px!important;
  object-fit:contain!important;
  object-position:center!important;
  aspect-ratio:auto!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-setting-tile--theme{
  grid-column:1 / -1!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice{
  min-height:208px!important;
  padding:10px!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.72)!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-puzzle-preview{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:9px!important;
  align-items:start!important;
  min-height:138px!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-style-piece{
  position:relative!important;
  width:100%!important;
  aspect-ratio:3 / 4.25!important;
  border-radius:10px!important;
  overflow:hidden!important;
  isolation:isolate!important;
  background:#efe9dc!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-style-piece__image,
body.pz-game-page.pz-retro-ui-v6 .pz-retro-style-piece__frame{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-style-piece__image{object-fit:cover!important;object-position:center top!important;}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-style-piece__frame{z-index:2!important;object-fit:fill!important;pointer-events:none!important;}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice--custom{
  grid-column:auto!important;
  min-height:208px!important;
  grid-template-columns:1fr!important;
  grid-template-rows:1fr auto!important;
  align-items:center!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-custom-preview{
  min-height:138px!important;
  display:grid!important;
  place-items:center!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-custom-preview img{
  width:min(110px,70%)!important;
  height:auto!important;
  max-height:118px!important;
  object-fit:contain!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice__label{
  font-size:13px!important;
  line-height:1.15!important;
  font-weight:950!important;
  text-align:center!important;
  padding:0 4px 2px!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat span,
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat-mirror__label,
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat b,
body.pz-game-page.pz-retro-ui-v6 .pz-retro-stat-mirror__value{
  justify-content:flex-start!important;
}
@media (max-width:1100px) and (min-width:821px){
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;}
}
@media (max-width:820px) and (orientation:portrait){
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice{min-height:38px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice img{max-height:34px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice{min-height:152px!important;padding:7px!important;border-radius:13px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-puzzle-preview{min-height:92px!important;gap:6px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice--custom{min-height:152px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-custom-preview{min-height:92px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-custom-preview img{width:min(74px,76%)!important;max-height:76px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-theme-choice__label{font-size:9px!important;}
}


/* ========================================================================
   RETRO UI v8 - zwarty wybór podkładu bez kafelków wokół każdej tekstury.
   ======================================================================== */
@media (min-width:821px){
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-popover.is-bottom-origin{
    left:1.5%!important;
    right:auto!important;
    width:min(660px,54vw)!important;
    max-width:660px!important;
  }
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-popover{
  max-height:min(390px,50vh)!important;
  overflow:auto!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-grid{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:8px 10px!important;
  align-items:center!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  min-height:54px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:7px!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
  cursor:pointer!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice:hover{
  transform:none!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:54px!important;
  object-fit:contain!important;
  object-position:center!important;
  aspect-ratio:auto!important;
  border:1px solid rgba(84,61,39,.14)!important;
  border-radius:5px!important;
  background:transparent!important;
  box-shadow:0 2px 6px rgba(47,30,15,.08)!important;
  transition:transform .12s ease,box-shadow .12s ease,outline-color .12s ease!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice:hover img{
  transform:translateY(-1px)!important;
  box-shadow:0 5px 10px rgba(47,30,15,.14)!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice.is-selected{
  border:0!important;background:transparent!important;box-shadow:none!important;
}
body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice.is-selected img{
  outline:2px solid #ff7200!important;
  outline-offset:2px!important;
  box-shadow:0 5px 12px rgba(255,114,0,.18)!important;
}
@media (max-width:820px) and (orientation:portrait){
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-popover.is-bottom-origin{
    left:1%!important;right:1%!important;width:auto!important;max-width:none!important;
  }
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:6px!important;
  }
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice{min-height:42px!important;}
  body.pz-game-page.pz-retro-ui-v6 .pz-retro-mat-choice img{max-height:40px!important;}
}
