/* ===== v20b — 30 games in tabs, Klasa 1/2/3, the 17 new games on one task card ===== */

/* —— Pokój zabaw: 5 category tabs, one board, never scrolls —— */
.pg20-board { gap: .3rem; }
.pg20-tabs { flex: 0 0 auto; display: flex; justify-content: center; gap: clamp(.2rem, .8vw, .5rem); padding: 0 .1rem; }
.pg20-tab {
  flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: .35rem;
  font: 800 clamp(.74rem, 1.9vh, 1rem)/1.05 var(--font, 'Baloo 2', system-ui, sans-serif); color: #4A1F5C;
  background: linear-gradient(180deg, #FFFBF0, #F3E2BC); border: 2px solid #D8B25A; border-radius: 14px 14px 10px 10px;
  padding: .22rem .7rem .26rem .26rem; box-shadow: 0 3px 0 rgba(110, 74, 22, .45); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: transform .15s ease, box-shadow .15s ease;
}
.pg20-tab i {
  font-style: normal; display: inline-grid; place-items: center; min-width: 1.9em; height: 1.6em; padding: 0 .3em; border-radius: 999px;
  color: #fff; font-weight: 800; font-size: .9em; text-shadow: 0 1px 0 rgba(40, 10, 50, .4); white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px rgba(255, 240, 190, .85);
}
.pg20-tab--num i { background: linear-gradient(180deg, #A783D8, #6B45A3); }
.pg20-tab--add i { background: linear-gradient(180deg, #59A9E0, #2F6FA8); }
.pg20-tab--mul i { background: linear-gradient(180deg, #F07C93, #B63E5C); }
.pg20-tab--time i { background: linear-gradient(180deg, #F2B544, #B3761C); }
.pg20-tab--logic i { background: linear-gradient(180deg, #5CC08A, #2E8A5A); }
.pg20-tab span { white-space: nowrap; }
.pg20-tab.is-on {
  background: linear-gradient(180deg, #8E4FC0, #5A2370); color: #FFF3D6; border-color: #E9C46A;
  box-shadow: 0 3px 0 #3A1248, 0 0 0 3px rgba(255, 226, 122, .45); transform: translateY(-2px);
}
.pg20-tab:focus-visible { outline: 3px solid #FFE27A; outline-offset: 2px; }
@media (orientation: landscape) and (max-height: 500px) {
  .pg20-tab { padding: .14rem .5rem .18rem .2rem; font-size: .78rem; }
}
@media (orientation: portrait) {
  .pg20-tabs { gap: .22rem; }
  .pg20-tab { flex: 1 1 0; flex-direction: column; gap: .12rem; padding: .25rem .1rem .28rem; font-size: clamp(.66rem, 3vw, .95rem); border-radius: 12px; }
}
@media (orientation: portrait) and (min-width: 700px) {
  .pg20-tab { flex-direction: row; gap: .4rem; font-size: 1.1rem; padding: .35rem .3rem; }
}
body.world-zamek .pr-menu20 .pg19-grid .hub-btn.cplq.pg20 { max-height: 100%; }
/* tab grid: doubled columns so a short last row sits centred */
.pr-menu20 .pg20-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); padding-top: .35rem; padding-bottom: .45rem; }
.pr-menu20 .pg20-grid > * { grid-column: span 2; }
.pr-menu20 .pg20-grid--7 > :nth-child(5) { grid-column: 2 / span 2; }
.pr-menu20 .pg20-grid--5, .pr-menu20 .pg20-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pr-menu20 .pg20-grid--5 > :nth-child(4) { grid-column: 2 / span 2; }
@media (orientation: portrait) and (min-height: 701px) {
  .pr-menu20 .pg20-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); padding-bottom: .6rem; }
  .pr-menu20 .pg20-grid--7 > :nth-child(5) { grid-column: span 2; }
  .pr-menu20 .pg20-grid--7 > :nth-child(7) { grid-column: 3 / span 2; }
  .pr-menu20 .pg20-grid--5, .pr-menu20 .pg20-grid--6 { grid-template-rows: repeat(2, minmax(0, 1fr)); }
}

/* —— Klasa: first-run choice + parent selector —— */
.st20-card--grade .st19-name-r { align-items: stretch; }
.st20-grades { display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; margin: .4rem 0 .3rem; }
.st20-gr {
  flex: 1 1 0; min-width: 96px; max-width: 170px; display: flex; flex-direction: column; align-items: center; gap: .1rem;
  font: 800 1rem/1.1 var(--font, 'Baloo 2', system-ui, sans-serif); color: #4A1F5C; cursor: pointer;
  background: linear-gradient(180deg, #FFFDF6, #F6E6C2); border: 2.5px solid #D8B25A; border-radius: 16px;
  padding: .5rem .45rem .55rem; box-shadow: 0 4px 0 rgba(110, 74, 22, .45);
  -webkit-tap-highlight-color: transparent; transition: transform .15s ease;
}
.st20-gr b { font-size: 1.3rem; line-height: 1; }
.st20-gr small { font-size: .82rem; font-weight: 700; color: #7A4A12; text-align: center; }
.st20-gr.is-on { background: linear-gradient(180deg, #8E4FC0, #5A2370); color: #FFF3D6; border-color: #E9C46A; transform: translateY(-2px); box-shadow: 0 4px 0 #3A1248, 0 0 0 4px rgba(255, 226, 122, .5); }
.st20-gr.is-on small { color: #FFE9A8; }
.st20-gr:focus-visible { outline: 3px solid #FFE27A; outline-offset: 2px; }
.st20-note { margin: .2rem 0 0; font-size: .82rem; font-weight: 700; color: #7A4A12; text-align: center; }
@media (orientation: landscape) and (max-height: 500px) {
  .st20-gr { padding: .32rem .35rem .38rem; }
  .st20-gr b { font-size: 1.1rem; }
  .st20-gr small { font-size: .74rem; }
  .st20-grades { margin: .2rem 0; gap: .4rem; }
  .st20-note { font-size: .74rem; }
}
@media (orientation: portrait) and (max-width: 560px) {
  .st20-grades { flex-direction: column; align-items: stretch; gap: .4rem; }
  .st20-gr { max-width: none; flex-direction: row; justify-content: center; gap: .55rem; padding: .42rem .6rem; }
}
.pc-grade { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; margin: .4rem 0; }
.pc-grade-lab { font-weight: 800; color: #4A1F5C; }
.pc-grade-b { display: inline-flex; gap: .35rem; }
.pc-gr {
  min-width: 46px; height: 42px; font: 800 1.15rem/1 var(--font, 'Baloo 2', system-ui, sans-serif); color: #4A1F5C; cursor: pointer;
  background: linear-gradient(180deg, #FFFDF6, #F6E6C2); border: 2px solid #D8B25A; border-radius: 12px; box-shadow: 0 3px 0 rgba(110, 74, 22, .45);
}
.pc-gr.is-on { background: linear-gradient(180deg, #8E4FC0, #5A2370); color: #FFE27A; border-color: #E9C46A; box-shadow: 0 3px 0 #3A1248; }
.pc-grade-note { margin: -.1rem 0 .5rem; font-size: .85rem; color: #7A4A12; }

/* —— the new games: the picture sits on the card as a dashed light box (like the riddles) —— */
body.world-zamek .pr-task .pr-field--nx {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s1, 8px);
  overflow: hidden; padding-bottom: var(--s2, 12px) !important;
}
body.world-zamek .pr-task .pr-field--nx .pr-choices { flex: 0 0 auto; height: auto; min-height: 0; }
.nx-card {
  flex: 0 1 auto; min-height: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(255, 255, 255, .55); border: 2px dashed rgba(201, 154, 60, .6); border-radius: 18px; padding: 8px 14px;
  color: #4A1F5C; font-family: var(--font, 'Baloo 2', system-ui, sans-serif);
}
.nx-card--tap { flex: 0 1 auto; }
.nx-card button { font-family: inherit; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.nx-card svg { display: block; }
body.world-zamek .pr-task .pr-say--nx { font-size: 1.18rem; }
body.world-zamek .pr-medal.nx-pill { width: auto; min-width: calc(var(--ans, 68px) * 1.25); height: calc(var(--ans, 68px) * .78); padding: 0 18px; border-radius: 999px; font-size: clamp(1rem, 2.6vh, 1.3rem);
  background: radial-gradient(ellipse at 35% 22%, #FFF8D8 0 14%, #F7D46A 50%, #D9A23A 100%); }
body.world-zamek .pr-medal.nx-pill span { white-space: nowrap; }
.nx-choices { gap: 12px; }

/* shared states for tappable pieces */
.nx-card [data-val] { transition: transform .15s ease, opacity .2s ease, filter .2s ease; }
.nx-card [data-val].is-dud { animation: nxDud .5s ease; }
.nx-card [data-val].is-good { animation: nxGood .6s cubic-bezier(.3, 1.6, .5, 1); filter: drop-shadow(0 0 8px rgba(255, 226, 122, .95)); }
.nx-card [data-val].is-hint { animation: nxHint 1.1s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(255, 214, 90, 1)); }
.nx-card [data-val].is-used { opacity: .28; transform: scale(.9); pointer-events: none; }
@keyframes nxDud { 20% { transform: translateX(-6px) rotate(-4deg); } 45% { transform: translateX(6px) rotate(3deg); } 70% { transform: translateX(-3px); } }
@keyframes nxGood { 40% { transform: scale(1.15); } }
@keyframes nxHint { 50% { transform: scale(1.1); } }

/* shields: < = > */
.nx-cmp { display: flex; align-items: center; gap: 14px; }
.nx-shield {
  display: grid; place-items: center; width: clamp(92px, 22vh, 150px); aspect-ratio: 5 / 6;
  background: linear-gradient(180deg, #5C8FD6, #2F5E9E); color: #FFF7DE;
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 45%, 92% 70%, 50% 100%, 8% 70%, 0 45%);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 92% 70%, 50% 100%, 8% 70%, 0 45%);
  box-shadow: inset 0 0 0 5px #E9C46A;
}
.nx-shield--r { background: linear-gradient(180deg, #E67A92, #A93A58); }
.nx-shield b { font-size: clamp(1.4rem, 5.2vh, 2.3rem); line-height: 1; margin-top: -14%; text-shadow: 0 2px 0 rgba(40, 10, 50, .45); white-space: nowrap; padding: 0 6px; }
.nx-qm { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #FFF3D6; border: 3px dashed #B8306A; color: #B8306A; font-weight: 800; font-size: 1.5rem; animation: qPulse 1.3s ease-in-out infinite; }

/* flags + slots (order) and rune stones (digits) */
.nx-slots { display: flex; gap: 8px; justify-content: center; }
.nx-slot {
  display: grid; place-items: center; min-width: 46px; height: 40px; padding: 0 6px; border-radius: 10px;
  border: 2px dashed rgba(122, 74, 18, .55); background: rgba(255, 248, 230, .8); font-weight: 800; font-size: 1.3rem; color: #4A1F5C;
}
.nx-slot.is-on { border-style: solid; border-color: #E9C46A; background: #FFF3D6; animation: nxGood .45s ease; }
.nx-order { display: flex; gap: clamp(6px, 1.4vw, 14px); justify-content: center; flex-wrap: nowrap; }
.nx-flag {
  position: relative; border: 0; padding: 0; background: none; width: clamp(54px, 13vh, 84px); height: clamp(70px, 17vh, 108px);
}
.nx-flag::before { content: ""; position: absolute; left: 50%; top: 0; width: 4px; height: 100%; margin-left: -2px; background: #7A4A12; border-radius: 2px; }
.nx-flag span {
  position: absolute; left: 6%; right: 6%; top: 8%; bottom: 22%; display: grid; place-items: center; padding-bottom: 12%;
  background: var(--fc); color: #FFF; font-weight: 800; font-size: clamp(1.05rem, 3.6vh, 1.5rem); text-shadow: 0 1px 0 rgba(30, 10, 40, .5);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 240, 190, .7);
}
.nx-runes { display: flex; gap: 12px; justify-content: center; }
.nx-rune {
  width: clamp(58px, 14vh, 84px); height: clamp(58px, 14vh, 84px); border: 0; border-radius: 40% 44% 36% 42%;
  background: radial-gradient(circle at 35% 30%, #B9B2C8, #6E6585 70%, #4E4664); box-shadow: 0 4px 0 #3A3350, inset 0 -4px 0 rgba(0, 0, 0, .2);
}
.nx-rune span { font-weight: 800; font-size: clamp(1.6rem, 5vh, 2.3rem); color: #9FF3FF; text-shadow: 0 0 8px rgba(120, 230, 255, .9), 0 1px 0 #1C3A4A; }

/* socks */
.nx-socks { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; max-width: 440px; }
.nx-pair { display: inline-flex; gap: 1px; padding: 3px 5px; border-radius: 10px; background: rgba(201, 154, 60, .14); box-shadow: inset 0 0 0 1.5px rgba(201, 154, 60, .45); }
.nx-pair.is-alone { background: rgba(184, 48, 106, .1); box-shadow: inset 0 0 0 2px rgba(184, 48, 106, .55); }
.nx-sock { width: clamp(22px, 6vh, 34px); height: auto; }
.nx-big b { display: block; font-size: clamp(2.4rem, 9vh, 4rem); font-weight: 800; line-height: 1; color: #5A2370; padding: 4px 18px; }

/* clock */
.nx-clock { width: clamp(118px, 30vh, 210px); height: auto; filter: drop-shadow(0 4px 3px rgba(60, 30, 20, .25)); }

/* money */
.nx-coins { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; max-width: 470px; }
.nx-coin {
  display: grid; place-items: center; width: clamp(44px, 11vh, 62px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF3B8, #E9B83E 60%, #B07E1E); box-shadow: inset 0 0 0 3px #C9952E, 0 3px 0 #7A5410;
}
.nx-coin--1 { width: clamp(40px, 10vh, 54px); background: radial-gradient(circle at 35% 30%, #F4F4F4, #BFC3C9 60%, #8A8F96); box-shadow: inset 0 0 0 3px #9EA3AA, 0 3px 0 #5E6268; }
.nx-coin--2 { background: radial-gradient(circle at 35% 30%, #F4F4F4, #C8CCD2 45%, #E9B83E 47%, #B07E1E); }
.nx-coin--gr { width: clamp(34px, 9vh, 46px); background: radial-gradient(circle at 35% 30%, #FFE2B8, #D08A4A 60%, #9A5A22); box-shadow: inset 0 0 0 3px #B4733A, 0 3px 0 #6A3A12; }
.nx-coin b { font-size: clamp(.7rem, 2vh, .9rem); font-weight: 800; color: #4A2A08; white-space: nowrap; }
.nx-note {
  display: grid; place-items: center; width: clamp(78px, 19vh, 108px); height: clamp(42px, 10vh, 58px); border-radius: 8px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .55), 0 3px 0 rgba(40, 30, 20, .4);
}
.nx-note--10 { background: linear-gradient(135deg, #C98A5A, #9A5A32); }
.nx-note--20 { background: linear-gradient(135deg, #8E7AC9, #5E4A9A); }
.nx-note--50 { background: linear-gradient(135deg, #6AA0D9, #3A6AA6); }
.nx-note--100 { background: linear-gradient(135deg, #6CBF8A, #3A8A5A); }
.nx-note b { font-size: clamp(.9rem, 2.6vh, 1.15rem); font-weight: 800; color: #FFF; text-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
.nx-tag {
  display: inline-grid; place-items: center; min-width: 70px; height: 44px; padding: 0 14px 0 22px; font-weight: 800; font-size: 1.15rem; color: #4A1F5C;
  background: #FFF3D6; border: 2px solid #C99A3C; border-radius: 6px 12px 12px 6px; position: relative;
}
.nx-tag::before { content: ""; position: absolute; left: 7px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #C99A3C; }

/* shapes */
.nx-shapes { display: flex; gap: 14px; justify-content: center; align-items: center; }
.nx-shbtn { border: 0; background: rgba(255, 251, 240, .8); border-radius: 16px; padding: 6px; box-shadow: 0 3px 0 rgba(110, 74, 22, .35), inset 0 0 0 2px #E2C27A; }
.nx-shape { width: clamp(64px, 17vh, 112px); height: auto; }
.nx-shapes--one .nx-shape { width: clamp(90px, 25vh, 160px); }
.nx-shapes--one .nx-shape--per { width: clamp(130px, 33vh, 220px); }

/* beads / gems */
.nx-beads { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 10px; position: relative; flex-wrap: nowrap; }
.nx-beads::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; background: #B48A4A; border-radius: 2px; z-index: 0; }
.nx-gemw { position: relative; z-index: 1; display: grid; place-items: center; width: clamp(30px, 8vh, 44px); height: clamp(30px, 8vh, 44px); }
.nx-gemw .nx-gem { width: 100%; height: 100%; }
.nx-gemw--q { border-radius: 50%; background: #FFF3D6; border: 3px dashed #B8306A; color: #B8306A; font-weight: 800; font-size: 1.3rem; animation: qPulse 1.3s ease-in-out infinite; }
.nx-gemopts { display: flex; gap: 14px; justify-content: center; }
.nx-gembtn { width: clamp(58px, 14vh, 80px); height: clamp(58px, 14vh, 80px); border: 0; border-radius: 50%; padding: 8px; background: rgba(255, 251, 240, .9); box-shadow: 0 3px 0 rgba(110, 74, 22, .35), inset 0 0 0 2px #E2C27A; }
.nx-gembtn .nx-gem { width: 100%; height: 100%; }
.nx-bead {
  position: relative; z-index: 1; display: grid; place-items: center; min-width: clamp(44px, 11vh, 60px); height: clamp(44px, 11vh, 60px); padding: 0 6px;
  border-radius: 999px; background: radial-gradient(circle at 35% 30%, #F7DFFF, #B98AE0 55%, #7B52B5); color: #FFF; font-weight: 800;
  font-size: clamp(1rem, 3.2vh, 1.35rem); text-shadow: 0 1px 0 rgba(40, 10, 50, .5); box-shadow: 0 3px 0 #4A2A70;
}
.nx-bead--q { background: #FFF3D6; color: #B8306A; border: 3px dashed #B8306A; box-shadow: none; text-shadow: none; animation: qPulse 1.3s ease-in-out infinite; }

/* ten-frames and bars */
.nx-ten { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.nx-frame { display: grid; grid-template-columns: repeat(5, clamp(22px, 6vh, 32px)); gap: 3px; padding: 5px; border-radius: 10px; background: #8A5A2B; box-shadow: 0 3px 0 #5A3410; }
.nx-frame i { aspect-ratio: 1; border-radius: 6px; background: #FFF3D6; }
.nx-frame i.is-on { background: radial-gradient(circle at 35% 30%, #FFF6C8, #F2C24E 55%, #C98A1E); box-shadow: inset 0 0 0 2px #B07E1E; }
.nx-tens { display: flex; gap: 4px; padding: 5px; border-radius: 10px; background: #8A5A2B; }
.nx-tens i { width: clamp(16px, 4.2vh, 24px); height: clamp(70px, 18vh, 110px); border-radius: 5px; background: #FFF3D6; }
.nx-tens i.is-on { background: linear-gradient(90deg, #FFE27A, #E2A23B); box-shadow: inset 0 0 0 2px #B07E1E; }
body.world-zamek .pr-task .nx-eq { font-size: 1.6em; font-weight: 800; white-space: nowrap; }
.nx-eq u { text-decoration: none; display: inline-block; min-width: 1.4em; color: #B8306A; border-bottom: 3px dashed #B8306A; }

/* mirror */
.nx-mirror { display: flex; align-items: stretch; gap: 10px; }
.nx-mside { display: grid; place-items: center; min-width: 92px; min-height: clamp(70px, 16vh, 110px); padding: 6px 10px; border-radius: 14px; background: rgba(255, 251, 240, .85); box-shadow: inset 0 0 0 2px #E2C27A; }
.nx-mside b { font-size: clamp(1.8rem, 6.5vh, 3rem); font-weight: 800; color: #5A2370; line-height: 1; }
.nx-mside--q { color: #B8306A; font-weight: 800; font-size: 2rem; border: 3px dashed #B8306A; box-shadow: none; animation: qPulse 1.3s ease-in-out infinite; }
.nx-glass { width: 14px; border-radius: 8px; background: linear-gradient(90deg, #C7E6FF, #FFFFFF 50%, #A9D2F5); box-shadow: 0 0 0 3px #C99A3C, 0 0 12px rgba(160, 210, 255, .9); }
.nx-apples { display: grid; grid-template-columns: repeat(3, auto); gap: 2px; }
.nx-apples img { width: clamp(22px, 6vh, 34px); height: auto; }

/* houses */
.nx-houses { display: flex; gap: clamp(8px, 2vw, 18px); align-items: flex-end; }
.nx-house { display: flex; flex-direction: column; align-items: center; }
.nx-roof { width: clamp(84px, 20vh, 124px); height: clamp(34px, 8vh, 50px); background: var(--rc); -webkit-clip-path: polygon(50% 0, 100% 100%, 0 100%); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.nx-house b {
  display: grid; place-items: center; width: clamp(70px, 17vh, 104px); height: clamp(52px, 12vh, 76px); margin-top: -1px;
  background: #FFF3D6; border: 3px solid #8A5A2B; border-top: 0; border-radius: 0 0 6px 6px;
  font-size: clamp(1.3rem, 4.4vh, 2rem); font-weight: 800; color: #5A2370;
}
.nx-house b.is-q { color: #B8306A; background: repeating-linear-gradient(45deg, #FFF3D6 0 8px, #FCE6C8 8px 16px); animation: qPulse 1.3s ease-in-out infinite; }

/* stone tablet (roman, conversions) */
.nx-stone { display: grid; place-items: center; min-width: 150px; padding: 10px 26px; border-radius: 16px 16px 10px 10px; background: linear-gradient(180deg, #C9C1B4, #9C9283); box-shadow: inset 0 0 0 3px #7E7466, 0 4px 0 #5E5548; }
.nx-stone b { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2rem, 8vh, 3.4rem); letter-spacing: .08em; color: #3A2E22; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); white-space: nowrap; }
.nx-stone--ar b { font-family: var(--font, 'Baloo 2', system-ui, sans-serif); letter-spacing: 0; font-size: clamp(1.6rem, 6vh, 2.6rem); }

/* ruler */
.nx-ruler { width: min(100%, 560px); height: auto; max-height: clamp(90px, 24vh, 150px); }
.nx-card--measure { width: min(100%, 600px); }

/* calendar */
.nx-week { display: flex; gap: 4px; }
.nx-week span { display: grid; place-items: center; width: clamp(34px, 8.6vh, 52px); height: clamp(34px, 8.6vh, 52px); border-radius: 8px; background: #FFF3D6; border: 2px solid #D8B25A; font-weight: 800; font-size: clamp(.85rem, 2.6vh, 1.1rem); color: #4A1F5C; }
.nx-week span.is-on { background: linear-gradient(180deg, #8E4FC0, #5A2370); color: #FFE27A; border-color: #E9C46A; }
.nx-cal { display: flex; flex-direction: column; align-items: center; min-width: 150px; border-radius: 12px; overflow: hidden; background: #FFF; box-shadow: 0 3px 0 rgba(110, 74, 22, .35), inset 0 0 0 2px #D8B25A; padding: 0 16px 8px; border-top: 16px solid #C94A6A; }
.nx-cal b { font-size: clamp(1.4rem, 5vh, 2.3rem); font-weight: 800; color: #5A2370; line-height: 1.15; }
.nx-cal small { font-size: .95rem; font-weight: 700; color: #7A4A12; }

/* cake */
.nx-cake { position: relative; display: grid; place-items: center; }
.nx-pie { width: clamp(100px, 26vh, 170px); height: auto; filter: drop-shadow(0 4px 2px rgba(60, 30, 20, .25)); }
.nx-cake-n { position: absolute; right: -16px; top: -6px; min-width: 40px; height: 40px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: #D8394F; color: #FFF; font-weight: 800; font-size: 1.15rem; box-shadow: inset 0 0 0 2px #FFE9A8; }

/* hoard */
.nx-hoard { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; align-items: flex-end; max-width: 520px; }
.nx-grp { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.nx-bag, .nx-chest { position: relative; display: inline-block; }
.nx-bag img { width: clamp(30px, 8vh, 44px); height: auto; }
.nx-chest img { width: clamp(40px, 10.5vh, 58px); height: auto; }
.nx-bag b, .nx-chest b { position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); font-size: .7rem; font-weight: 800; color: #FFF; background: #5A2370; border-radius: 999px; padding: 0 5px; line-height: 1.3; }
.nx-loose { display: grid; grid-template-columns: repeat(5, auto); gap: 3px; }
.nx-loose--5 { grid-template-columns: repeat(5, auto); }
.nx-loose--5 .nx-g1:nth-child(5n) { margin-right: 6px; }
.nx-g1 { display: block; width: clamp(14px, 4vh, 22px); height: clamp(14px, 4vh, 22px); background: linear-gradient(135deg, #8FE3FF, #2F7FD0); -webkit-clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); }
.nx-key { display: inline-flex; align-items: center; gap: 4px; font-size: .8em; font-weight: 800; color: #7A4A12; white-space: nowrap; vertical-align: middle; }
.nx-key img { width: 1.4em; height: auto; vertical-align: middle; }

/* grid board */
.nx-board { display: grid; grid-template-columns: 26px repeat(var(--n), var(--c)); grid-auto-rows: var(--c); --c: clamp(30px, calc((100vh - 230px) / (var(--n) + 1)), 60px); gap: 3px; }
.nx-gh { display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; color: #7A4A12; }
.nx-board > .nx-gh:first-child { visibility: hidden; }
.nx-cell { display: grid; place-items: center; border: 0; padding: 0; border-radius: 6px; background: #F6E3B6; box-shadow: inset 0 0 0 1.5px #C99A3C; }
.nx-cell.is-alt { background: #E9CC8A; }
.nx-pin { width: 76%; height: 76%; }

/* ---- landscape phones: the picture shrinks, choices stay big ---- */
@media (orientation: landscape) and (max-height: 500px) {
  .nx-card { padding: 4px 12px; gap: 5px; border-radius: 14px; }
  .nx-slot { height: 32px; min-width: 40px; font-size: 1.1rem; }
  .nx-shield b { margin-top: -10%; }
  .nx-board { --c: clamp(20px, calc((100vh - 220px) / (var(--n) + 1)), 40px); gap: 2px; }
  .nx-gh { font-size: .85rem; }
  .nx-cal small { font-size: .8rem; }
  body.world-zamek .pr-task .pr-say--nx { font-size: 1rem; }
}
/* ---- portrait: more height, keep within the card width ---- */
@media (orientation: portrait) {
  .nx-card { max-width: 100%; padding: 8px 10px; }
  .nx-shield { width: clamp(96px, 14vh, 150px); }
  .nx-clock { width: clamp(150px, 26vh, 260px); }
  .nx-flag { width: clamp(50px, 14vw, 84px); height: clamp(68px, 10vh, 110px); }
  .nx-order { gap: 6px; }
  .nx-week span { width: clamp(34px, 11vw, 52px); height: clamp(34px, 11vw, 52px); }
  .nx-beads { gap: 2px; padding: 6px 4px; }
  .nx-bead { min-width: clamp(44px, 14vw, 60px); height: clamp(44px, 14vw, 60px); font-size: clamp(.95rem, 4.2vw, 1.35rem); padding: 0 3px; }
  .nx-gemw { width: clamp(30px, 10vw, 44px); height: clamp(30px, 10vw, 44px); }
  .nx-board { --c: clamp(34px, calc((100vw - 110px) / var(--n)), 74px); }
  .nx-roof { width: clamp(80px, 26vw, 124px); }
  .nx-house b { width: clamp(66px, 22vw, 104px); }
  .nx-shape { width: clamp(70px, 22vw, 120px); }
  .nx-shapes--one .nx-shape { width: clamp(110px, 36vw, 180px); }
  .nx-shapes--one .nx-shape--per { width: clamp(160px, 56vw, 260px); }
  .nx-pie { width: clamp(130px, 40vw, 220px); }
  .nx-tens i { height: clamp(80px, 12vh, 130px); width: clamp(14px, 5.2vw, 26px); }
  .nx-frame { grid-template-columns: repeat(5, clamp(24px, 8vw, 38px)); }
  .nx-mside { min-width: 80px; min-height: clamp(80px, 12vh, 130px); }
  .nx-nums { flex-wrap: wrap; }
}
/* ---- big screens ---- */
@media (min-width: 1000px) and (min-height: 640px), (min-width: 760px) and (min-height: 1000px) {
  .nx-card { padding: 12px 22px; gap: 12px; border-radius: 22px; }
  body.world-zamek .pr-task .pr-say--nx { font-size: 1.4rem; }
  .nx-slot { height: 50px; min-width: 58px; font-size: 1.6rem; }
  .nx-board { --c: clamp(40px, calc((100vh - 330px) / (var(--n) + 1)), 74px); }
  .nx-gh { font-size: 1.3rem; }
}
body.world-zamek .nx-choices { flex-wrap: wrap; row-gap: 10px; }
@media (orientation: portrait) and (max-width: 600px) {
  body.world-zamek .nx-choices:has(.nx-pill) { flex-direction: column; flex-wrap: nowrap; gap: 10px; }
  body.world-zamek .nx-choices .pr-medal.nx-pill { min-width: 62%; }
}
