/*
 * Nasz Dom - style. Wszystkie klasy mają prefiks "nd-",
 * a reguły dotyczą tylko elementów wewnątrz #nd-game (bez globalnych resetów),
 * żeby gra nie kolidowała ze stroną główną DolphinGames ani innymi grami.
 */
.nd-body {
  margin: 0;
  background: #2f6236;
  overflow: hidden;
  overscroll-behavior: none;
}

.nd-game {
  --nd-safe-t: env(safe-area-inset-top, 0px);
  --nd-safe-r: env(safe-area-inset-right, 0px);
  --nd-safe-b: env(safe-area-inset-bottom, 0px);
  --nd-safe-l: env(safe-area-inset-left, 0px);
  --nd-ink: #23312a;
  --nd-accent: #ffd23f;
  --nd-green: #3fae5a;
  position: fixed;
  inset: 0;
  overflow: hidden;
  font-family: "Nunito", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--nd-ink);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: none;
}
.nd-game *, .nd-game *::before, .nd-game *::after { box-sizing: border-box; }
.nd-game [hidden] { display: none !important; }

.nd-world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ---------- przyciski ---------- */
.nd-btn {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease;
}
.nd-btn:active { transform: scale(.92); }
.nd-btn:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
.nd-ico, .nd-ico svg, .nd-action-icon svg, .nd-pill-ico svg { display: block; width: 100%; height: 100%; }

.nd-btn-round {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #2f8fd8;
  box-shadow: 0 5px 0 #1f6aa3, 0 8px 18px rgba(0, 0, 0, .25);
  display: grid;
  place-items: center;
}
.nd-btn-round .nd-ico { width: 34px; height: 34px; }

/* ---------- HUD ---------- */
.nd-hud {
  position: absolute;
  top: calc(10px + var(--nd-safe-t));
  left: calc(10px + var(--nd-safe-l));
  right: calc(10px + var(--nd-safe-r));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  z-index: 10;
  transition: opacity .3s;
}
.nd-hud > * { pointer-events: auto; }
/* liczniki tylko pokazują - nie przechwytują dotyku (mogą nachodzić na panele) */
.nd-hud .nd-res, .nd-hud .nd-pill { pointer-events: none; }
.nd-res { display: flex; flex-wrap: wrap; gap: 8px; }
.nd-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 50px;
  min-width: 86px;
  padding: 4px 14px 4px 5px;
  border-radius: 25px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .12), 0 6px 14px rgba(0, 0, 0, .18);
}
.nd-pill-ico { width: 40px; height: 40px; flex: none; }
.nd-pill-num { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 1.2em; }
.nd-pill.nd-pop { animation: nd-pop .45s ease; }
@keyframes nd-pop { 0% { transform: scale(1); } 35% { transform: scale(1.22); background: #fff6c8; } 100% { transform: scale(1); } }

/* przycisk akcji */
.nd-btn-action {
  position: absolute;
  right: calc(18px + var(--nd-safe-r));
  bottom: calc(22px + var(--nd-safe-b));
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 6px 0 #b9c7bf, 0 10px 22px rgba(0, 0, 0, .3);
  border: 6px solid #cfd8d3;
  display: grid;
  place-items: center;
  z-index: 10;
  opacity: .75;
  transition: transform .12s, opacity .2s, border-color .2s;
}
.nd-btn-action .nd-action-icon { width: 60px; height: 60px; display: block; }
.nd-btn-action.nd-ready { opacity: 1; border-color: var(--nd-accent); animation: nd-ready 1.1s ease-in-out infinite; }
.nd-btn-action.nd-pressed { transform: scale(.9); }
@keyframes nd-ready { 50% { box-shadow: 0 6px 0 #d7b52e, 0 0 0 10px rgba(255, 210, 63, .35); } }

/* joystick (tylko przy przeciąganiu) */
.nd-joy {
  position: absolute;
  width: 128px;
  height: 128px;
  margin: -64px 0 0 -64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: 3px solid rgba(255, 255, 255, .55);
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 9;
}
.nd-joy.nd-on { opacity: 1; }
.nd-joy-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}

/* lot zdobytych zasobów */
.nd-fly-layer { position: absolute; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.nd-fly { position: absolute; left: 0; top: 0; width: 36px; height: 36px; margin: -18px 0 0 -18px; will-change: transform; filter: drop-shadow(0 3px 2px rgba(0,0,0,.25)); }
.nd-fly svg { width: 100%; height: 100%; display: block; }
.nd-float {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  -webkit-text-stroke: 1.5px #3b2a12;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .25);
  animation: nd-float 1.1s ease-out forwards;
}
.nd-float span { width: 34px; height: 34px; display: block; }
.nd-float svg { width: 100%; height: 100%; display: block; }
@keyframes nd-float {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(.5); }
  20% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -190%) scale(1); }
}

/* ---------- widok domu ---------- */
.nd-house {
  position: absolute;
  inset: 0;
  background: #8fd0f2;
  z-index: 15;
  display: flex;
  align-items: center;
}
.nd-house-scroll {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
}
.nd-house-svg { display: block; width: 100%; height: 100%; overflow: hidden; }
@keyframes nd-dash { to { stroke-dashoffset: -60; } }
.nd-bulb { animation: nd-swing 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
@keyframes nd-swing { 50% { transform: rotate(4deg); } }
.nd-drip { animation: nd-drip 1.8s ease-in infinite; }
@keyframes nd-drip { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(60px); opacity: 1; } 100% { transform: translateY(60px); opacity: 0; } }
.nd-cloud { animation: nd-cloud 26s ease-in-out infinite alternate; }
.nd-cloud-b { animation-duration: 34s; }
@keyframes nd-cloud { to { transform: translateX(60px); } }
.nd-rays { animation: nd-rays 4s ease-in-out infinite alternate; }
@keyframes nd-rays { from { opacity: .55; } to { opacity: 1; } }

.nd-btn-back {
  position: absolute;
  left: calc(14px + var(--nd-safe-l));
  top: calc(14px + var(--nd-safe-t));
  width: 72px;
  height: 72px;
  background: #3fae5a;
  box-shadow: 0 5px 0 #2b8042, 0 8px 18px rgba(0, 0, 0, .25);
  z-index: 2;
}
.nd-btn-back .nd-ico { width: 40px; height: 40px; }
/* ---------- ekran startowy ---------- */
.nd-start {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, .25), rgba(20, 50, 25, .55));
  transition: opacity .45s;
}
.nd-start.nd-leave { opacity: 0; pointer-events: none; }
.nd-start-card { display: flex; flex-direction: column; align-items: center; gap: 10px; animation: nd-in .6s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes nd-in { from { transform: scale(.6); opacity: 0; } }
.nd-logo { width: 170px; height: 170px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .3)); animation: nd-bob 2.6s ease-in-out infinite; }
.nd-logo-img { width: 100%; height: 100%; display: block; }
@keyframes nd-bob { 50% { transform: translateY(-8px); } }
.nd-title {
  margin: 0;
  font-size: 46px;
  font-weight: 900;
  letter-spacing: .02em;
  color: #fff;
  -webkit-text-stroke: 2px #2c4a23;
  text-shadow: 0 5px 0 #2c4a23;
}
.nd-btn-play {
  margin-top: 8px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--nd-green);
  box-shadow: 0 8px 0 #2b8042, 0 14px 26px rgba(0, 0, 0, .3);
  display: grid;
  place-items: center;
  animation: nd-pulse 1.4s ease-in-out infinite;
}
.nd-btn-play .nd-ico { width: 64px; height: 64px; margin-left: 8px; }
@keyframes nd-pulse { 50% { transform: scale(1.07); } }

/* widoczność elementów zależnie od widoku */
.nd-view-start .nd-hud, .nd-view-start .nd-btn-action { opacity: 0; pointer-events: none; }
.nd-view-house .nd-btn-action, .nd-view-house .nd-btn-home { visibility: hidden; }

/* ---------- przejście ---------- */
.nd-iris {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 200vmax #1b2b22;
  pointer-events: none;
  z-index: 40;
  display: none;
}
.nd-iris.nd-on { display: block; pointer-events: auto; }

/* ---------- większe ekrany ---------- */
@media (min-width: 900px) and (min-height: 600px) {
  .nd-pill { height: 58px; padding-right: 18px; }
  .nd-pill-ico { width: 46px; height: 46px; }
  .nd-pill-num { font-size: 28px; }
  .nd-btn-action { width: 96px; height: 96px; }
  .nd-btn-round { width: 64px; height: 64px; }
  .nd-title { font-size: 60px; }
}
/* bardzo niskie ekrany (telefon poziomo) */
@media (max-height: 430px) {
  .nd-logo { width: 110px; height: 110px; }
  .nd-title { font-size: 34px; }
  .nd-btn-play { width: 92px; height: 92px; }
  .nd-btn-action { width: 88px; height: 88px; }
}

/* ================= CL-2 ================= */
.nd-view-shop .nd-btn-action, .nd-view-shop .nd-btn-home { visibility: hidden; }
.nd-mini-ico { width: 26px; height: 26px; display: inline-block; vertical-align: middle; flex: none; }
.nd-mini-ico svg { width: 100%; height: 100%; display: block; }
.nd-fly-rare { width: 44px; height: 44px; margin: -22px 0 0 -22px; filter: drop-shadow(0 0 6px #bff4ff); }

/* --- ekran handlarza --- */
.nd-shop { position: absolute; inset: 0; z-index: 9; }
.nd-shop.nd-guard .nd-shop-panel, .nd-shop.nd-guard .nd-shop-backdrop { pointer-events: none; }
.nd-shop-backdrop { position: absolute; inset: 0; background: rgba(20, 35, 25, .45); }
.nd-shop-panel {
  position: absolute;
  left: 50%;
  top: calc(var(--nd-hud-bottom, 64px) + 8px);
  max-height: calc(100% - var(--nd-hud-bottom, 64px) - 20px - var(--nd-safe-b));
  width: min(560px, calc(100% - 20px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  background: #fffaf0;
  border-radius: 26px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .12), 0 16px 40px rgba(0, 0, 0, .35);
  overflow: hidden;
}
.nd-shop.nd-in .nd-shop-panel { animation: nd-sheet .28s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes nd-sheet { from { transform: translateX(-50%) translateY(30px) scale(.94); opacity: 0; } }
.nd-shop-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 0 10px; }
.nd-shop-tabs { display: flex; gap: 6px; flex: 1; min-width: 0; }
.nd-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 56px;
  border-radius: 18px 18px 0 0;
  background: #e8dfcc;
  color: #6b5c45;
  font-size: 18px;
  font-weight: 900;
}
.nd-tab.nd-on { background: #f7e7b4; color: var(--nd-ink); }
.nd-tab-ico { width: 34px; height: 34px; flex: none; }
@media (max-width: 440px) { .nd-tab { font-size: 15px; gap: 4px; } .nd-tab-ico { width: 28px; height: 28px; } }
.nd-tab-ico svg { width: 100%; height: 100%; display: block; }
.nd-shop-money { display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 12px 0 8px; border-radius: 22px; background: #fff3c4; font-size: 20px; font-variant-numeric: tabular-nums; flex: none; margin-bottom: 4px; }
.nd-shop-money.nd-pop { animation: nd-pop .45s ease; }
.nd-shop-close { width: 52px; height: 52px; background: #e2574c; box-shadow: 0 4px 0 #b13d34; flex: none; margin-bottom: 4px; }
.nd-shop-close .nd-ico { width: 26px; height: 26px; }
.nd-shop-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  background: #f7e7b4;
  margin: 0 10px 10px;
  border-radius: 0 0 18px 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nd-sell-list { display: flex; flex-direction: column; gap: 10px; }
.nd-sell-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 6px 14px 6px 8px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 0 #dccb9c;
  text-align: left;
  color: var(--nd-ink);
}
.nd-sell-row:disabled { opacity: .45; cursor: default; }
.nd-sell-row.nd-rare:not(:disabled) { background: linear-gradient(135deg, #ffffff, #dff7ff); box-shadow: 0 4px 0 #9fd8ea; }
.nd-sell-ico { width: 56px; height: 56px; }
.nd-sell-ico svg { width: 100%; height: 100%; display: block; }
.nd-sell-name { font-size: 18px; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-sell-qty { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.nd-sell-price { display: flex; align-items: center; gap: 2px; padding: 4px 10px; border-radius: 14px; background: #fff3c4; font-size: 20px; }
.nd-sell-quick, .nd-sell-go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 72px;
  padding: 8px 16px;
  border-radius: 22px;
  background: var(--nd-green);
  box-shadow: 0 6px 0 #2b8042;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}
.nd-sell-quick:disabled, .nd-sell-go:disabled { background: #b8b2a3; box-shadow: 0 6px 0 #8f897b; cursor: default; }
.nd-quick-icons { display: flex; }
.nd-quick-label { flex: 1; text-align: left; }
.nd-quick-sum, .nd-sell-go-sum { display: flex; align-items: center; gap: 2px; padding: 4px 12px; border-radius: 14px; background: rgba(255, 255, 255, .25); font-size: 24px; }
.nd-sell-go { font-size: 24px; }
.nd-sold { animation: nd-sold .4s ease; }
@keyframes nd-sold { 40% { transform: scale(1.06); filter: brightness(1.2); } }
.nd-pick { display: flex; flex-direction: column; gap: 14px; }
.nd-pick-head { display: flex; align-items: center; gap: 12px; }
.nd-pick-back { width: 52px; height: 52px; background: #3fae5a; box-shadow: 0 4px 0 #2b8042; flex: none; }
.nd-pick-back .nd-ico { width: 28px; height: 28px; }
.nd-pick-ico { width: 60px; height: 60px; flex: none; }
.nd-pick-ico svg { width: 100%; height: 100%; display: block; }
.nd-pick-name { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.nd-buy-soon { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 200px; color: #8a7a5c; font-size: 24px; }
.nd-buy-ico { width: 90px; height: 90px; opacity: .8; }
.nd-buy-ico svg { width: 100%; height: 100%; display: block; }

/* --- uniwersalny wybór ilości --- */
.nd-qp { display: flex; flex-direction: column; gap: 14px; padding: 14px; border-radius: 22px; background: #fff; box-shadow: 0 4px 0 #dccb9c; }
.nd-qp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nd-qp-step { width: 72px; height: 72px; border-radius: 50%; background: #2f8fd8; box-shadow: 0 5px 0 #1f6aa3; display: grid; place-items: center; flex: none; }
.nd-qp-step .nd-ico { width: 34px; height: 34px; }
.nd-qp-step:disabled { background: #c4ccd2; box-shadow: 0 5px 0 #9aa3aa; cursor: default; }
.nd-qp-val { flex: 1; text-align: center; font-size: 48px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--nd-ink); }
.nd-qp-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; touch-action: none; }
.nd-qp-slider::-webkit-slider-runnable-track { height: 14px; border-radius: 7px; background: #e5dcc6; }
.nd-qp-slider::-moz-range-track { height: 14px; border-radius: 7px; background: #e5dcc6; }
.nd-qp-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 44px; margin-top: -15px; border-radius: 50%; background: #ffd23f; border: 5px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); }
.nd-qp-slider::-moz-range-thumb { width: 34px; height: 34px; border-radius: 50%; background: #ffd23f; border: 5px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); }
.nd-qp-slider:disabled { opacity: .5; }
.nd-qp-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.nd-qp-preset { flex: 1 1 0; min-width: 56px; height: 52px; border-radius: 16px; background: #f1ead9; color: var(--nd-ink); font-size: 20px; font-weight: 900; box-shadow: 0 3px 0 #d6caa9; }
.nd-qp-preset.nd-on { background: #ffd23f; box-shadow: 0 3px 0 #d7b52e; }
.nd-qp-max { background: #ffe9a3; }
.nd-qp-sum { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: #5b4a2f; }
.nd-qp-sum b { font-size: 28px; color: var(--nd-ink); }
.nd-qp-ico { width: 28px; height: 28px; display: inline-block; }
.nd-qp-ico svg { width: 100%; height: 100%; display: block; }

/* --- rzadka zdobycz: KRYSZTAŁ! --- */
.nd-celebrate {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 22;
  pointer-events: none;
  animation: nd-cel-in .45s cubic-bezier(.3, 1.6, .5, 1);
}
.nd-celebrate.nd-leave { animation: nd-cel-out .35s ease-in forwards; }
@keyframes nd-cel-in { from { transform: translate(-50%, -50%) scale(.2); opacity: 0; } }
@keyframes nd-cel-out { to { opacity: 0; transform: translate(-50%, -50%) scale(.8); } }
.nd-cel-rays {
  position: absolute;
  left: 50%;
  top: 70px;
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .55) 0 10deg, rgba(255, 255, 255, 0) 10deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%);
  mask: radial-gradient(circle, #000 25%, transparent 70%);
  animation: nd-spin 4s linear infinite;
}
@keyframes nd-spin { to { transform: rotate(360deg); } }
.nd-cel-ico { position: relative; width: 140px; height: 140px; filter: drop-shadow(0 0 18px #9becff) drop-shadow(0 8px 6px rgba(0, 0, 0, .25)); animation: nd-cel-bob .8s ease-in-out infinite alternate; }
.nd-cel-ico svg { width: 100%; height: 100%; display: block; }
@keyframes nd-cel-bob { to { transform: translateY(-8px) rotate(6deg); } }
.nd-cel-text { position: relative; margin-top: 4px; font-size: 44px; font-weight: 900; color: #fff; -webkit-text-stroke: 2px #1f6f96; text-shadow: 0 5px 0 #1f6f96; letter-spacing: .03em; }

/* --- CL-10: łup ze stwora - mały pasek pod licznikami (lewa strona), nie blokuje dotyku --- */
.nd-loot-stack { position: absolute; left: 12px; top: calc(var(--nd-hud-bottom, 64px) + 58px); z-index: 14; pointer-events: none; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.nd-loot { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 20px; background: rgba(255, 250, 240, .94); box-shadow: 0 3px 0 rgba(0, 0, 0, .12), 0 0 0 3px #ffd23f; animation: nd-loot-in .3s cubic-bezier(.3, 1.5, .5, 1); }
.nd-loot.nd-leave { animation: nd-loot-out .4s ease-in forwards; }
.nd-loot-from { width: 34px; height: 34px; border-radius: 50%; background: #f4e3c0; padding: 3px; }
.nd-loot-from svg, .nd-loot-it i svg { width: 100%; height: 100%; display: block; }
.nd-loot-it { display: flex; align-items: center; gap: 2px; font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
.nd-loot-it i { width: 26px; height: 26px; display: block; }
.nd-loot-it.nd-rare { padding: 0 6px; border-radius: 12px; background: #d9f6ff; box-shadow: 0 0 0 2px #7fe3ff; }
@keyframes nd-loot-in { from { opacity: 0; transform: translateX(-20px) scale(.8); } }
@keyframes nd-loot-out { to { opacity: 0; transform: translateX(-16px); } }

/* --- nagroda ze skrzyni --- */
.nd-reward {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 22;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 18px;
  border-radius: 28px;
  background: #fffaf0;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .12), 0 0 0 6px #ffd23f, 0 18px 40px rgba(0, 0, 0, .35);
  animation: nd-cel-in .4s cubic-bezier(.3, 1.6, .5, 1);
  max-width: calc(100% - 32px);
}
.nd-reward.nd-leave { animation: nd-cel-out .4s ease-in forwards; }
.nd-reward-ico { width: 70px; height: 70px; margin-top: -50px; filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .25)); }
.nd-reward-ico svg, .nd-reward-item span svg { width: 100%; height: 100%; display: block; }
.nd-reward-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.nd-reward-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px; border-radius: 18px; background: #f7e7b4; min-width: 72px; animation: nd-cel-in .4s backwards; }
.nd-reward-item:nth-child(2) { animation-delay: .1s; } .nd-reward-item:nth-child(3) { animation-delay: .2s; } .nd-reward-item:nth-child(4) { animation-delay: .3s; }
.nd-reward-item span { width: 50px; height: 50px; display: block; }
.nd-reward-item b { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.nd-reward-item.nd-rare { background: #d9f6ff; box-shadow: 0 0 0 3px #7fe3ff, 0 0 18px #9becff; }

@media (max-height: 430px) {
  .nd-shop-panel { top: calc(8px + var(--nd-safe-t)); max-height: calc(100% - 16px - var(--nd-safe-t) - var(--nd-safe-b)); width: min(620px, calc(100% - 20px)); }
  .nd-view-shop .nd-hud { opacity: 0; }
  .nd-sell-row, .nd-sell-quick, .nd-sell-go { min-height: 60px; }
  /* w poziomie wybór ilości w dwóch kolumnach, żeby wszystko mieściło się bez przewijania */
  .nd-qp { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "row presets" "slider sum"; gap: 8px 16px; padding: 10px 12px; align-items: center; }
  .nd-qp-row { grid-area: row; }
  .nd-qp-slider { grid-area: slider; }
  .nd-qp-presets { grid-area: presets; }
  .nd-qp-sum { grid-area: sum; }
  .nd-qp-step { width: 56px; height: 56px; }
  .nd-qp-val { font-size: 36px; }
  .nd-qp-preset { height: 48px; min-width: 48px; font-size: 18px; }
  .nd-shop-body { padding: 10px; gap: 10px; }
  .nd-pick { gap: 10px; }
  .nd-pick-back { width: 44px; height: 44px; }
  .nd-pick-ico { width: 44px; height: 44px; }
  .nd-pick-name { font-size: 20px; }
  .nd-tab { height: 48px; }
  .nd-cel-ico { width: 100px; height: 100px; }
  .nd-cel-text { font-size: 34px; }
}

/* ================= CL-3: widok domu, pokoje, remont ================= */
.nd-view-house .nd-hud { z-index: 17; left: calc(100px + var(--nd-safe-l)); }
.nd-view-house .nd-res { gap: 6px; }
.nd-view-house .nd-pill { height: 44px; min-width: 72px; padding-right: 12px; }
.nd-view-house .nd-pill-ico { width: 34px; height: 34px; }
.nd-view-house .nd-pill-num { font-size: 21px; }
.nd-btn-back { z-index: 18; }
.nd-btn-home.nd-hint { animation: nd-home-hint 1.3s ease-in-out infinite; }
@keyframes nd-home-hint { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); box-shadow: 0 5px 0 #1f6aa3, 0 0 0 10px rgba(255, 210, 63, .55); } }

.nd-house-svg .nd-item { cursor: pointer; }
.nd-house-svg.nd-mode-house .nd-item { cursor: inherit; }
.nd-house-svg .nd-item-art, .nd-house-svg .nd-item { transform-box: fill-box; transform-origin: 50% 100%; }
.nd-item.nd-pop-in .nd-item-art { animation: nd-item-pop .5s cubic-bezier(.3, 1.6, .5, 1); transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes nd-item-pop { from { transform: scale(.85); opacity: .3; } }
.nd-item.nd-wiggle .nd-item-art { animation: nd-wiggle .4s ease; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes nd-wiggle { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }

.nd-dim { opacity: 0; pointer-events: none; transition: opacity .35s; }
.nd-dim.nd-dim-on { opacity: .5; }
.nd-item-hl { opacity: 0; stroke: #ffd23f; stroke-width: 5; stroke-dasharray: 16 10; pointer-events: none; transition: opacity .2s; }
.nd-item-hl.nd-on { opacity: 1; animation: nd-dash 1s linear infinite; }
.nd-hint-ring { opacity: 0; stroke: #ffd23f; stroke-width: 7; pointer-events: none; }
.nd-hint-ring.nd-on { animation: nd-hint-ring 1.4s ease-in-out infinite; }
@keyframes nd-hint-ring { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.nd-badge { pointer-events: none; }
.nd-badge-in { animation: nd-badge-bob 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
.nd-badge-ok .nd-badge-in { animation: nd-badge-ok 1s ease-in-out infinite; }
@keyframes nd-badge-bob { 50% { transform: translateY(-3px); } }
@keyframes nd-badge-ok { 50% { transform: scale(1.18); } }

/* animacja remontu */
.nd-fx-layer { pointer-events: none; }
.nd-fx-hammer-in { animation: nd-fx-hammer .65s ease-in-out; transform-box: fill-box; transform-origin: 20% 80%; opacity: 0; }
@keyframes nd-fx-hammer { 0% { opacity: 0; transform: rotate(30deg); } 15% { opacity: 1; } 30% { transform: rotate(-35deg); } 50% { transform: rotate(25deg); } 70% { transform: rotate(-30deg); } 90% { opacity: 1; transform: rotate(10deg); } 100% { opacity: 0; } }
.nd-fx-puff { opacity: 0; animation: nd-fx-puff .9s ease-out forwards; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes nd-fx-puff { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: .9; } 100% { opacity: 0; transform: scale(2.2); } }
.nd-fx-bit { opacity: 0; animation: nd-fx-bit .8s ease-out forwards; }
@keyframes nd-fx-bit { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(200deg); } }

/* telewizor */
.nd-tv-pic, .nd-tv-glow { opacity: 0; transition: opacity .25s; }
.nd-item.nd-on .nd-tv-pic { opacity: 1; }
.nd-item.nd-on .nd-tv-glow { opacity: .8; }
.nd-item.nd-on .nd-tv-led { fill: #3fe07a; }
.nd-item.nd-on .nd-tv-sun { animation: nd-tv-sun 2s ease-in-out infinite alternate; }
.nd-item.nd-on .nd-tv-fish { animation: nd-tv-fish 3s linear infinite; }
.nd-item.nd-on .nd-tv-scan { animation: nd-tv-scan 1.6s linear infinite; }
@keyframes nd-tv-sun { to { transform: translateY(6px); } }
@keyframes nd-tv-fish { from { transform: translateX(-12px); } to { transform: translateX(40px); } }
@keyframes nd-tv-scan { from { transform: translateY(0); } to { transform: translateY(44px); } }

/* lodówka */
.nd-fridge-door { transform-box: fill-box; transform-origin: 0 50%; transition: transform .35s cubic-bezier(.3, 1.3, .5, 1); }
.nd-item.nd-on .nd-fridge-door { transform: scaleX(.12); }
.nd-fridge-inside { opacity: 0; transition: opacity .2s; }
.nd-item.nd-on .nd-fridge-inside { opacity: 1; }
.nd-fridge-light { animation: nd-fridge-light 1.6s ease-in-out infinite alternate; }
@keyframes nd-fridge-light { to { opacity: .25; } }
.nd-fridge-hum { animation: nd-hum 1.2s ease-in-out infinite; }
@keyframes nd-hum { 50% { opacity: .2; } }

/* łóżko */
.nd-zzz { opacity: 0; }
.nd-item.nd-pulse .nd-zzz { animation: nd-zzz 1.5s ease-out; }
@keyframes nd-zzz { 0% { opacity: 0; transform: translate(0, 10px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -26px); } }
.nd-item.nd-pulse .nd-bed-blanket { animation: nd-blanket .6s ease-in-out 2; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes nd-blanket { 50% { transform: scaleY(1.12); } }

/* karta naprawy otwarta na posesji: chowamy przycisk akcji (karta stoi w jego miejscu) */
.nd-card-open:not(.nd-view-house) .nd-btn-action { visibility: hidden; }

/* strzałki przesuwania przekroju (telefon pionowo) */
.nd-pan { position: absolute; top: 50%; width: 56px; height: 56px; margin-top: -28px; z-index: 18; background: rgba(47, 143, 216, .92); }
.nd-pan .nd-ico { width: 30px; height: 30px; }
.nd-pan-l { left: calc(8px + var(--nd-safe-l)); }
.nd-pan-r { right: calc(8px + var(--nd-safe-r)); }
.nd-pan-r .nd-ico { transform: scaleX(-1); }
.nd-pan:disabled { opacity: 0; pointer-events: none; }

/* karta naprawy */
.nd-icard {
  position: absolute;
  left: 50%;
  bottom: calc(12px + var(--nd-safe-b));
  transform: translateX(-50%);
  width: min(380px, calc(100% - 24px));
  z-index: 19;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 14px;
  border-radius: 24px;
  background: #fffaf0;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .12), 0 0 0 5px #ffd23f, 0 14px 34px rgba(0, 0, 0, .3);
}
.nd-icard.nd-in { animation: nd-icard-in .28s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes nd-icard-in { from { transform: translateX(-50%) translateY(24px) scale(.9); opacity: 0; } }
.nd-icard.nd-side { left: auto; right: calc(12px + var(--nd-safe-r)); bottom: auto; top: 50%; transform: translateY(-50%); width: min(360px, 38%); }
.nd-icard.nd-side.nd-in { animation: nd-icard-in-side .28s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes nd-icard-in-side { from { transform: translateY(-50%) translateX(24px) scale(.9); opacity: 0; } }
.nd-icard-x { position: absolute; right: -10px; top: -14px; width: 44px; height: 44px; border-radius: 50%; background: #e2574c; box-shadow: 0 4px 0 #b13d34; display: grid; place-items: center; }
.nd-icard-x .nd-ico { width: 22px; height: 22px; }
.nd-icard-title { font-size: 22px; font-weight: 900; text-align: center; padding: 0 30px; text-wrap: balance; }
.nd-icard-costs { display: flex; flex-direction: column; gap: 8px; }
.nd-cost { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 12px 4px 6px; border-radius: 16px; background: #f1ead9; }
.nd-cost-ico { width: 44px; height: 44px; flex: none; }
.nd-cost-ico svg, .nd-cost-st svg { width: 100%; height: 100%; display: block; }
.nd-cost-need { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; flex: 1; }
.nd-cost-st { width: 34px; height: 34px; flex: none; }
.nd-cost.nd-miss { background: #ffe1dc; box-shadow: inset 0 0 0 3px #f08a7c; }
.nd-cost-have { padding: 4px 10px; border-radius: 12px; background: #e2574c; color: #fff; font-size: 16px; font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nd-icard-go { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border-radius: 20px; background: var(--nd-green); box-shadow: 0 6px 0 #2b8042; color: #fff; font-size: 24px; font-weight: 900; }
.nd-icard-go .nd-ico { width: 36px; height: 36px; }
.nd-icard-go:disabled { background: #b8b2a3; box-shadow: 0 6px 0 #8f897b; cursor: default; }
@media (max-height: 430px) {
  .nd-icard { gap: 6px; padding: 10px 12px; }
  .nd-cost { min-height: 42px; }
  .nd-cost-ico { width: 34px; height: 34px; }
  .nd-icard-go { min-height: 52px; }
  .nd-icard-title { font-size: 18px; }
}

/* ================= CL-5: narzędzia, ustawienia ================= */
.nd-hud-right { display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
/* CL-12: kolumna przepuszcza dotyk w przerwach między przyciskami (świat pod spodem reaguje), przyciski - normalnie */
.nd-hud-right > * { pointer-events: auto; }
.nd-btn-settings { width: 48px; height: 48px; background: #6b7a86; box-shadow: 0 4px 0 #4c5862, 0 6px 14px rgba(0, 0, 0, .25); }
.nd-btn-settings .nd-ico { width: 30px; height: 30px; }
.nd-view-house .nd-hud-right { margin-left: auto; }
.nd-view-settings .nd-btn-action, .nd-view-settings .nd-btn-home { visibility: hidden; }
.nd-view-start .nd-btn-settings { visibility: hidden; }
.nd-cel-ico canvas { width: 100%; height: 100%; display: block; }

/* sklep: karty narzędzi */
.nd-tool-list { display: flex; flex-direction: column; gap: 12px; }
.nd-tool-card {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 0 #dccb9c;
}
.nd-tool-img { width: 72px; height: 72px; border-radius: 16px; background: #f1ead9; display: grid; place-items: center; }
.nd-tool-img canvas { width: 72px; height: 72px; display: block; }
.nd-tool-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nd-tool-name { font-size: 17px; font-weight: 900; overflow-wrap: anywhere; }
.nd-tool-gain { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 22px; font-variant-numeric: tabular-nums; }
.nd-tool-from { color: #9a8a6c; font-weight: 800; text-decoration: line-through; text-decoration-thickness: 2px; }
.nd-tool-arrow { color: #9a8a6c; font-weight: 900; }
.nd-tool-to { color: #2b8042; font-size: 28px; }
.nd-tool-unit { font-size: 13px; font-weight: 900; color: #6b5c45; }
.nd-tool-act { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.nd-tool-buy {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 96px; padding: 8px 12px; border-radius: 18px;
  background: var(--nd-green); box-shadow: 0 5px 0 #2b8042; color: #fff; font-size: 20px; font-weight: 900;
}
.nd-tool-buy:disabled { background: #b8b2a3; box-shadow: 0 5px 0 #8f897b; cursor: default; }
.nd-tool-price { display: flex; align-items: center; gap: 2px; font-size: 22px; }
.nd-tool-opens { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 8px 2px 4px; border-radius: 12px; background: #fde2d6; color: #a8432f; font-size: 13px; font-weight: 900; }
.nd-tool-cost { display: flex; align-items: center; gap: 2px; font-size: 18px; }
.nd-tool-owned { width: 44px; height: 44px; display: block; }
.nd-tool-owned svg { width: 100%; height: 100%; display: block; }
.nd-tool-max { background: #f4fbef; }
/* CL-10: brakujące zasoby pod przyciskiem mogą się zawinąć (nie poszerzają kolumny i nie łamią nazwy narzędzia) */
.nd-tool-act .nd-cost-have { max-width: 116px; white-space: normal; text-align: center; line-height: 1.1; }
.nd-tool-name { overflow-wrap: break-word; hyphens: none; }
@media (max-width: 440px) { .nd-tool-name { font-size: 14px; } .nd-tool-img, .nd-tool-img canvas { width: 56px; height: 56px; } .nd-tool-card { grid-template-columns: 56px 1fr auto; } }
@media (max-width: 400px) { .nd-tool-act .nd-cost-have { font-size: 12px; max-width: 86px; padding: 3px 6px; } .nd-tool-card { grid-template-columns: 60px 1fr auto; } .nd-tool-img, .nd-tool-img canvas { width: 58px; height: 58px; } .nd-tool-buy { min-width: 82px; } }

/* ustawienia */
.nd-settings { position: absolute; inset: 0; z-index: 30; }
.nd-set-panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(460px, calc(100% - 24px)); max-height: calc(100% - 24px - var(--nd-safe-t) - var(--nd-safe-b)); overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px; padding: 16px;
  background: #fffaf0; border-radius: 26px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .12), 0 16px 40px rgba(0, 0, 0, .35);
}
.nd-settings.nd-in .nd-set-panel { animation: nd-set-in .26s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes nd-set-in { from { transform: translate(-50%, -46%) scale(.94); opacity: 0; } }
.nd-set-head { display: flex; align-items: center; gap: 10px; }
.nd-set-close { width: 52px; height: 52px; background: #e2574c; box-shadow: 0 4px 0 #b13d34; flex: none; }
.nd-set-close .nd-ico { width: 26px; height: 26px; }
.nd-set-title-ico { width: 40px; height: 40px; border-radius: 50%; background: #6b7a86; padding: 5px; flex: none; }
.nd-set-title-ico svg, .nd-set-ico svg, .nd-confirm-ico svg { width: 100%; height: 100%; display: block; }
.nd-set-title { flex: 1; font-size: 24px; font-weight: 900; }
.nd-set-body { display: flex; flex-direction: column; gap: 14px; }
.nd-set-row { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; background: #f7e7b4; }
.nd-set-label { display: flex; align-items: center; gap: 10px; font-size: 21px; }
.nd-set-ico { width: 40px; height: 40px; flex: none; }
.nd-set-val { margin-left: auto; font-weight: 900; font-size: 22px; font-variant-numeric: tabular-nums; }
.nd-set-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 52px; margin: 0; background: transparent; touch-action: none;
  --nd-fill: 40%;
}
.nd-set-slider::-webkit-slider-runnable-track { height: 18px; border-radius: 9px; background: linear-gradient(90deg, #2f8fd8 var(--nd-fill), #e5dcc6 var(--nd-fill)); }
.nd-set-slider::-moz-range-track { height: 18px; border-radius: 9px; background: #e5dcc6; }
.nd-set-slider::-moz-range-progress { height: 18px; border-radius: 9px; background: #2f8fd8; }
.nd-set-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 48px; height: 48px; margin-top: -15px; border-radius: 50%; background: #ffd23f; border: 6px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); }
.nd-set-slider::-moz-range-thumb { width: 36px; height: 36px; border-radius: 50%; background: #ffd23f; border: 6px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); }
.nd-toggle {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  height: 60px; border-radius: 30px; background: #d9d2c2; box-shadow: inset 0 3px 6px rgba(0, 0, 0, .15);
  font-size: 20px; font-weight: 900; color: #8a8170; overflow: hidden;
}
.nd-toggle-opt { position: relative; z-index: 1; text-align: center; transition: color .2s; }
.nd-toggle-knob { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 25px; background: #e2574c; box-shadow: 0 3px 0 #b13d34; transition: transform .22s cubic-bezier(.3, 1.4, .5, 1), background .2s; transform: translateX(100%); }
.nd-toggle .nd-toggle-off { color: #fff; }
.nd-toggle.nd-on .nd-toggle-knob { transform: translateX(0); background: var(--nd-green); box-shadow: 0 3px 0 #2b8042; }
.nd-toggle.nd-on .nd-toggle-on { color: #fff; }
.nd-toggle.nd-on .nd-toggle-off { color: #8a8170; }
.nd-set-restart {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; margin-top: 4px;
  border-radius: 20px; background: #fff; color: #c0392b; font-size: 19px; font-weight: 900;
  box-shadow: inset 0 0 0 3px #e2574c, 0 4px 0 #e8c9c3;
}
.nd-set-restart .nd-ico { width: 30px; height: 30px; background: #e2574c; border-radius: 50%; padding: 3px; }
.nd-set-confirm { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 8px 4px 4px; }
.nd-confirm-ico { width: 72px; height: 72px; border-radius: 50%; background: #e2574c; padding: 12px; box-shadow: 0 5px 0 #b13d34; }
.nd-confirm-title { font-size: 26px; font-weight: 900; color: #c0392b; text-wrap: balance; }
.nd-confirm-text { margin: 0; font-size: 18px; color: #5b4a2f; max-width: 30ch; }
.nd-confirm-btns { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: 4px; }
.nd-confirm-cancel { min-height: 64px; border-radius: 20px; background: var(--nd-green); box-shadow: 0 6px 0 #2b8042; color: #fff; font-size: 22px; font-weight: 900; }
.nd-confirm-go { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border-radius: 20px; background: #e2574c; box-shadow: 0 6px 0 #b13d34; color: #fff; font-size: 20px; font-weight: 900; }
.nd-confirm-go .nd-ico { width: 30px; height: 30px; }
@media (max-height: 430px) {
  .nd-btn-settings { width: 42px; height: 42px; }
  .nd-hud-right { gap: 6px; }
  .nd-set-panel { gap: 10px; padding: 12px; }
  .nd-set-row { padding: 10px; gap: 6px; }
  .nd-confirm-btns { flex-direction: row; }
  .nd-confirm-btns > * { flex: 1; }
  .nd-confirm-ico { width: 52px; height: 52px; padding: 8px; }
}

/* ================= CL-6: eksploracja, mapa, znaleziska ================= */
.nd-btn-map { width: 52px; height: 52px; background: #3fae5a; box-shadow: 0 4px 0 #2b8042, 0 6px 14px rgba(0, 0, 0, .25); }
.nd-btn-map .nd-ico { width: 32px; height: 32px; }
.nd-btn-map.nd-pop { animation: nd-pop .5s ease; }
.nd-view-house .nd-btn-map, .nd-view-start .nd-btn-map, .nd-view-shop .nd-btn-map { visibility: hidden; }
.nd-view-card .nd-btn-action, .nd-view-card .nd-btn-home, .nd-view-journal .nd-btn-action, .nd-view-journal .nd-btn-home { visibility: hidden; }
@media (max-height: 430px) { .nd-btn-map { width: 44px; height: 44px; } .nd-btn-map .nd-ico { width: 28px; height: 28px; } }

/* karta znaleziska / "wróć później" */
.nd-info { position: absolute; inset: 0; z-index: 25; }
.nd-info-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(400px, calc(100% - 24px)); max-height: calc(100% - 24px - var(--nd-safe-t) - var(--nd-safe-b)); overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 16px 16px; text-align: center;
  background: #fffaf0; border-radius: 26px; box-shadow: 0 8px 0 rgba(0, 0, 0, .12), 0 16px 40px rgba(0, 0, 0, .35);
}
.nd-info.nd-in .nd-info-card { animation: nd-set-in .26s cubic-bezier(.3, 1.4, .5, 1); }
.nd-info-x { position: absolute; top: 10px; right: 10px; width: 48px; height: 48px; background: #e2574c; box-shadow: 0 4px 0 #b13d34; }
.nd-info-x .nd-ico { width: 24px; height: 24px; }
.nd-info-img { width: 180px; height: 180px; border-radius: 26px; background: radial-gradient(circle at 50% 60%, #fff6d6, #f1e3bd); display: grid; place-items: center; }
.nd-info[data-kind="later"] .nd-info-img { width: 150px; height: 150px; background: radial-gradient(circle at 50% 60%, #eef1f3, #d6dde2); }
.nd-info-img canvas { width: 100%; height: 100%; display: block; }
.nd-info-title { font-size: 26px; font-weight: 900; text-wrap: balance; }
.nd-info-text { margin: 0; font-size: 19px; color: #5b4a2f; font-weight: 700; max-width: 28ch; }
.nd-info-badge { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 22px; background: #fde3df; color: #c0392b; font-size: 17px; }
.nd-info-badge .nd-ico { width: 30px; height: 30px; }
.nd-info-hint { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 16px; background: #eef1f3; color: #55606a; font-size: 15px; font-weight: 800; font-style: italic; }
.nd-info-hint .nd-ico { width: 26px; height: 26px; flex: none; }
.nd-info-go {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 64px; margin-top: 4px;
  border-radius: 20px; background: var(--nd-green); box-shadow: 0 6px 0 #2b8042; color: #fff; font-size: 23px; font-weight: 900;
}
.nd-info-go .nd-ico { width: 36px; height: 36px; }
.nd-info-take .nd-ico { background: #fff; border-radius: 50%; padding: 2px; }
@media (max-height: 430px) {
  .nd-info-card { display: grid; grid-template-columns: 130px 1fr; grid-template-areas: "img title" "img text" "img badge" "img go"; justify-items: center; align-items: center; column-gap: 14px; row-gap: 6px; width: min(560px, calc(100% - 24px)); padding: 12px 14px; }
  .nd-info-img, .nd-info[data-kind="later"] .nd-info-img { grid-area: img; width: 130px; height: 130px; }
  .nd-info-title { grid-area: title; font-size: 22px; padding-right: 44px; }
  .nd-info-text { grid-area: text; font-size: 17px; }
  .nd-info-badge { grid-area: badge; }
  .nd-info-go { grid-area: go; min-height: 54px; }
  .nd-info-x { width: 42px; height: 42px; }
}

/* panel MAPA / ZNALEZISKA */
.nd-journal { position: absolute; inset: 0; z-index: 24; }
.nd-jr-panel {
  position: absolute; left: 50%; top: calc(var(--nd-hud-bottom, 64px) + 8px); transform: translateX(-50%);
  width: min(900px, calc(100% - 20px)); bottom: calc(10px + var(--nd-safe-b));
  display: flex; flex-direction: column; gap: 10px; padding: 12px;
  background: #fffaf0; border-radius: 26px; box-shadow: 0 8px 0 rgba(0, 0, 0, .12), 0 16px 40px rgba(0, 0, 0, .35);
}
.nd-journal.nd-in .nd-jr-panel { animation: nd-sheet .28s cubic-bezier(.3, 1.4, .5, 1); }
.nd-jr-head { display: flex; align-items: center; gap: 10px; }
.nd-jr-tabs { flex: 1; display: flex; gap: 8px; min-width: 0; }
.nd-jr-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 0 8px;
  border-radius: 18px; background: #efe3c2; color: #6b5c45; font-size: 17px; font-weight: 900; box-shadow: 0 4px 0 #d8c79a;
}
.nd-jr-tab .nd-ico { width: 30px; height: 30px; flex: none; }
.nd-jr-tab[data-tab="map"] .nd-ico svg path:first-child { fill: #fff; }
.nd-jr-tab.nd-on { background: #3fae5a; color: #fff; box-shadow: 0 4px 0 #2b8042; }
.nd-jr-count:not(:empty) { font-style: normal; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: #ffd23f; color: #23312a; display: grid; place-items: center; font-size: 15px; }
.nd-jr-close { width: 52px; height: 52px; background: #e2574c; box-shadow: 0 4px 0 #b13d34; flex: none; }
.nd-jr-close .nd-ico { width: 26px; height: 26px; }
.nd-jr-body { flex: 1; min-height: 0; position: relative; }
.nd-map-wrap, .nd-finds { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; }
.nd-journal[data-tab="map"] .nd-finds, .nd-journal[data-tab="finds"] .nd-map-wrap { display: none; }
.nd-map-wrap { background: #e9dcb8; box-shadow: inset 0 0 0 3px #d8c79a; }
.nd-map { display: block; touch-action: none; cursor: grab; }
.nd-finds { overflow-y: auto; background: #f7efd9; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.nd-finds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.nd-find-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 12px;
  border-radius: 20px; background: #fff; box-shadow: 0 4px 0 #dccb9c; color: inherit;
}
.nd-find-tile.nd-on { box-shadow: inset 0 0 0 4px #3fae5a, 0 4px 0 #2b8042; }
.nd-find-img { width: 110px; height: 110px; border-radius: 18px; background: #f1ead9; display: grid; place-items: center; }
.nd-find-img canvas { width: 110px; height: 110px; display: block; }
.nd-find-name { font-size: 16px; font-weight: 900; text-align: center; }
.nd-find-state { padding: 3px 10px; border-radius: 12px; background: #e2574c; color: #fff; font-size: 13px; font-weight: 900; letter-spacing: .03em; text-align: center; }
.nd-find-state.nd-ok { background: #3fae5a; }
.nd-find-count { position: absolute; top: 8px; right: 10px; font-style: normal; font-weight: 900; }
.nd-find-info { padding: 12px 14px; border-radius: 18px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.nd-find-info b { font-size: 19px; }
.nd-find-info p { margin: 0; font-size: 17px; font-weight: 700; color: #5b4a2f; }
.nd-finds-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #9a8a6c; font-size: 20px; }
.nd-finds-empty .nd-ico { width: 80px; height: 80px; opacity: .55; }
@media (max-width: 420px) { .nd-jr-tab b { font-size: 14px; } .nd-finds-grid { grid-template-columns: repeat(2, 1fr); } .nd-find-img, .nd-find-img canvas { width: 96px; height: 96px; } }
@media (max-height: 430px) {
  .nd-jr-panel { top: calc(8px + var(--nd-safe-t)); bottom: calc(8px + var(--nd-safe-b)); width: min(900px, calc(100% - 140px)); padding: 10px; gap: 8px; }
  .nd-jr-tab, .nd-jr-close { min-height: 46px; height: 46px; }
  .nd-jr-close { width: 46px; }
}

/* odkrycie miejsca, nazwa obszaru, lot znaleziska */
.nd-announce {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 20; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px; animation: nd-ann-in .5s cubic-bezier(.3, 1.5, .5, 1);
}
.nd-announce .nd-cel-rays { position: absolute; left: 50%; top: 50px; width: 260px; height: 260px; margin: -130px 0 0 -130px; }
.nd-ann-ico { position: relative; width: 96px; height: 96px; border-radius: 50%; background: #3fae5a; padding: 18px; box-shadow: 0 6px 0 #2b8042, 0 10px 24px rgba(0, 0, 0, .3); }
.nd-ann-ico svg { width: 100%; height: 100%; display: block; }
.nd-ann-title, .nd-ann-sub { position: relative; color: #fff; font-weight: 900; text-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 0 14px rgba(0, 0, 0, .35); white-space: nowrap; }
.nd-ann-title { font-size: 24px; margin-top: 8px; color: #ffe27a; }
.nd-ann-sub { font-size: 52px; line-height: 1; }
.nd-announce.nd-leave { animation: nd-ann-out .45s ease forwards; }
@keyframes nd-ann-in { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } }
@keyframes nd-ann-out { to { transform: translate(-50%, -70%) scale(.9); opacity: 0; } }
.nd-toast {
  position: absolute; left: 50%; top: calc(var(--nd-hud-bottom, 64px) + 14px); transform: translateX(-50%); z-index: 15; pointer-events: none;
  padding: 8px 22px; border-radius: 22px; background: rgba(35, 49, 42, .78); color: #fff; font-size: 22px; font-weight: 900; letter-spacing: .04em;
  max-width: calc(100% - 32px); text-align: center;
  animation: nd-toast 2.6s ease forwards;
}
@keyframes nd-toast { 0% { opacity: 0; transform: translate(-50%, -8px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.nd-fly-find { position: absolute; left: 0; top: 0; width: 120px; height: 120px; z-index: 40; pointer-events: none; }
.nd-fly-find canvas { width: 100%; height: 100%; display: block; }

/* ================= CL-7: warsztat, pojazdy ================= */
.nd-action-label {
  position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  padding: 2px 10px; border-radius: 12px; background: #23312a; color: #fff; font-size: 15px; font-weight: 900; letter-spacing: .03em; white-space: nowrap;
}
.nd-view-workshop .nd-btn-action, .nd-view-workshop .nd-btn-home, .nd-view-workshop .nd-btn-map { display: none; }
.nd-view-workshop .nd-hud { z-index: 17; left: calc(100px + var(--nd-safe-l)); }
.nd-view-workshop .nd-hud-right { margin-left: auto; }
.nd-announce.nd-solo .nd-ann-title { font-size: 34px; color: #fff; margin-top: 10px; }
.nd-announce.nd-solo .nd-ann-sub { display: none; }
@media (max-width: 420px) { .nd-announce.nd-solo .nd-ann-title { font-size: 28px; } }

/* karta budowy: obrazek + koszty */
.nd-info-costs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.nd-info-go:disabled { background: #b8b2a3; box-shadow: 0 6px 0 #8f897b; cursor: default; }
.nd-info.nd-has-costs .nd-info-text:empty { display: none; }
@media (max-height: 430px) {
  .nd-info.nd-has-costs .nd-info-card { grid-template-areas: "img title" "img costs" "img go"; }
  .nd-info.nd-has-costs .nd-info-costs { grid-area: costs; }
  /* CL-12: karty wózka (opis + odznaka + wskazówka + koszt) - wszystko w prawej kolumnie, zwięźlej */
  .nd-info[data-kind="cart"].nd-has-costs .nd-info-card, .nd-info[data-kind="ship"] .nd-info-card { grid-template-areas: "img title" "img text" "img badge" "img hint" "img costs" "img go"; row-gap: 4px; }
  .nd-info[data-kind="cart"] .nd-info-text, .nd-info[data-kind="ship"] .nd-info-text { font-size: 14px; margin: 0; }
  .nd-info[data-kind="ship"] .nd-info-hint, .nd-info[data-kind="cart"] .nd-info-hint { grid-area: hint; font-size: 13px; }
  .nd-info[data-kind="ship"] .nd-info-title, .nd-info[data-kind="cart"] .nd-info-title { font-size: 20px; }
}

/* widok warsztatu */
.nd-workshop { position: absolute; inset: 0; z-index: 15; background: #6e4423; display: flex; flex-direction: column; }
.nd-ws-scene { position: relative; flex: 0 0 auto; height: max(250px, calc(var(--nd-hud-bottom, 64px) + 180px)); overflow: hidden; --ws-bench: 90px; --ws-item: 150px; }
.nd-ws-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.nd-ws-glow { animation: nd-ws-lamp 3s ease-in-out infinite; }
@keyframes nd-ws-lamp { 50% { opacity: .75; } }
.nd-ws-bench { position: absolute; left: 50%; bottom: var(--ws-bench); width: var(--ws-item); height: var(--ws-item); transform: translateX(-50%); }
.nd-ws-item { position: absolute; inset: 0; display: grid; place-items: end center; transform-origin: 50% 90%; }
.nd-ws-item canvas { width: 100%; height: 100%; display: block; }
.nd-ws-item .nd-ws-icon { width: 62%; height: 62%; margin-bottom: 6%; filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .3)); }
.nd-ws-item.nd-work { animation: nd-ws-work .38s ease-in-out infinite; }
.nd-ws-item.nd-pop { animation: nd-ws-pop .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes nd-ws-work { 25% { transform: rotate(-3deg) translateY(-2px); } 75% { transform: rotate(3deg); } }
@keyframes nd-ws-pop { 0% { transform: scale(.7); filter: brightness(1.8); } 100% { transform: scale(1); filter: none; } }
.nd-ws-fx { position: absolute; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; }
.nd-ws-tool { position: absolute; left: 6px; top: -70px; width: 64px; height: 64px; transform-origin: 20% 90%; animation: nd-ws-hit .38s ease-in infinite; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .35)); }
@keyframes nd-ws-hit { 0% { transform: rotate(-50deg); } 70% { transform: rotate(14deg); } 100% { transform: rotate(-50deg); } }
.nd-ws-spark { position: absolute; left: 0; top: 0; width: 6px; height: 6px; border-radius: 50%; background: #ffe27a; box-shadow: 0 0 8px #ffd23f; animation: nd-ws-spark .5s ease-out infinite; }
@keyframes nd-ws-spark { 0% { transform: rotate(var(--a)) translateX(4px) scale(1); opacity: 1; } 100% { transform: rotate(var(--a)) translateX(var(--d)) scale(.3); opacity: 0; } }
.nd-ws-title { position: absolute; left: 50%; bottom: calc(var(--ws-bench) + var(--ws-item) + 6px); transform: translateX(-50%); display: none; }
.nd-ws-back { position: absolute; left: calc(14px + var(--nd-safe-l)); top: calc(14px + var(--nd-safe-t)); width: 72px; height: 72px; background: #3fae5a; box-shadow: 0 5px 0 #2b8042, 0 8px 18px rgba(0, 0, 0, .25); z-index: 18; }
.nd-ws-back .nd-ico { width: 40px; height: 40px; }
.nd-ws-panel {
  position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px;
  margin-top: -18px; padding: 12px 12px calc(12px + var(--nd-safe-b)); background: #fffaf0; border-radius: 24px 24px 0 0;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, .25);
}
.nd-ws-tabs { display: flex; gap: 8px; }
.nd-ws-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border-radius: 18px; background: #efe3c2; color: #6b5c45; font-size: 19px; font-weight: 900; box-shadow: 0 4px 0 #d8c79a; }
.nd-ws-tab .nd-ico { width: 32px; height: 32px; }
.nd-ws-tab.nd-on { background: #3fae5a; color: #fff; box-shadow: 0 4px 0 #2b8042; }
.nd-ws-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 2px 2px 8px; overscroll-behavior: contain; touch-action: pan-y; }
.nd-ws-card { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 20px; background: #fff; box-shadow: 0 4px 0 #dccb9c; }
.nd-ws-card.nd-sel { box-shadow: inset 0 0 0 4px #ffd23f, 0 4px 0 #d7b52e; }
.nd-ws-card.nd-done { background: #f4fbef; }
.nd-ws-img { width: 96px; height: 96px; border-radius: 16px; background: #f1ead9; display: grid; place-items: center; overflow: hidden; }
.nd-ws-img canvas { width: 96px; height: 96px; display: block; }
.nd-ws-img .nd-ws-icon { width: 64px; height: 64px; }
.nd-ws-icon svg { width: 100%; height: 100%; display: block; }
.nd-ws-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.nd-ws-name { font-size: 18px; font-weight: 900; overflow-wrap: break-word; hyphens: none; }
.nd-ws-state { padding: 3px 10px; border-radius: 12px; background: #e2574c; color: #fff; font-size: 13px; font-weight: 900; }
.nd-ws-state.nd-ok { background: #3fae5a; }
.nd-ws-have { font-size: 14px; font-weight: 900; color: #6b5c45; }
.nd-ws-costs { display: flex; flex-wrap: wrap; gap: 6px; }
.nd-ws-cost { display: flex; align-items: center; gap: 3px; padding: 3px 8px 3px 4px; border-radius: 14px; background: #f1ead9; font-size: 18px; font-variant-numeric: tabular-nums; }
.nd-ws-cost .nd-ico { width: 28px; height: 28px; }
.nd-ws-cost i.nd-ico { width: 20px; height: 20px; }
.nd-ws-cost.nd-miss { background: #ffe1dc; box-shadow: inset 0 0 0 2px #f08a7c; }
.nd-ws-miss { font-style: normal; padding: 1px 6px; border-radius: 8px; background: #e2574c; color: #fff; font-size: 12px; font-weight: 900; white-space: nowrap; }
.nd-ws-go { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 92px; padding: 8px 10px; border-radius: 18px; background: var(--nd-green); box-shadow: 0 5px 0 #2b8042; color: #fff; font-size: 17px; font-weight: 900; }
.nd-ws-go .nd-ico { width: 32px; height: 32px; }
.nd-ws-go:disabled { background: #b8b2a3; box-shadow: 0 5px 0 #8f897b; cursor: default; }
.nd-ws-ok { width: 44px; height: 44px; }
.nd-workshop.nd-working .nd-ws-go { pointer-events: none; opacity: .6; }
@media (max-width: 400px) { .nd-ws-card { grid-template-columns: 76px 1fr auto; } .nd-ws-img, .nd-ws-img canvas { width: 76px; height: 76px; } .nd-ws-go { min-width: 80px; } .nd-ws-name { font-size: 16px; } }
@media (min-aspect-ratio: 23/20) {
  .nd-workshop { flex-direction: row; }
  .nd-ws-scene { flex: 0 0 50%; height: 100%; }
  .nd-ws-panel { margin: 0 0 0 -18px; border-radius: 24px 0 0 24px; padding: calc(10px + var(--nd-safe-t)) calc(12px + var(--nd-safe-r)) calc(10px + var(--nd-safe-b)) 14px; box-shadow: -6px 0 18px rgba(0, 0, 0, .25); }
  .nd-view-workshop .nd-hud { right: calc(50% + 12px); }
  .nd-view-workshop .nd-hud-right { display: none; }
  .nd-ws-tab { min-height: 48px; }
}

/* radio w salonie: nutki */
.nd-placed-item { cursor: pointer; }
.nd-note { font-size: 22px; font-weight: 900; fill: #2f8fd8; animation: nd-note 2.2s ease-in-out infinite; }
.nd-note-b { animation-delay: .7s; fill: #e2574c; }
.nd-note-c { animation-delay: 1.4s; fill: #3fae5a; }
@keyframes nd-note { 0% { opacity: 0; transform: translate(0, 10px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(10px, -36px); } }

/* dużo liczników (CL-7: części) - mniejsze pigułki na wąskim ekranie */
@media (max-width: 520px) {
  .nd-res.nd-many { gap: 6px; }
  .nd-res.nd-many .nd-pill { height: 42px; min-width: 70px; padding: 3px 10px 3px 4px; gap: 4px; }
  .nd-res.nd-many .nd-pill-ico { width: 32px; height: 32px; }
  .nd-res.nd-many .nd-pill-num { font-size: 20px; }
}

/* ================= CL-7.1: HUD lżejszy, panel ZASOBY, celebracje ================= */
/* przycisk ZASOBY na końcu liczników */
.nd-hud .nd-res .nd-pouch { pointer-events: auto; }
.nd-pouch {
  position: relative; display: grid; place-items: center; width: 56px; height: 50px; border-radius: 25px;
  background: #fff3c4; box-shadow: 0 4px 0 rgba(0, 0, 0, .12), 0 6px 14px rgba(0, 0, 0, .18), inset 0 0 0 3px #ffd23f;
}
.nd-pouch-ico { width: 38px; height: 38px; display: block; }
.nd-pouch-ico svg { width: 100%; height: 100%; display: block; }
.nd-pouch.nd-pop { animation: nd-pouch-pop .55s ease; }
@keyframes nd-pouch-pop { 0% { transform: scale(1); } 35% { transform: scale(1.28); box-shadow: 0 0 0 8px rgba(255, 210, 63, .5); } 100% { transform: scale(1); } }
.nd-pouch-plus { position: absolute; left: 50%; top: 100%; display: flex; align-items: center; gap: 2px; padding: 2px 8px 2px 6px; border-radius: 14px; background: #23312a; color: #fff; font-size: 16px; font-weight: 900; white-space: nowrap; opacity: 0; transform: translate(-50%, 0); pointer-events: none; }
.nd-pouch-plus i { width: 22px; height: 22px; display: block; }
.nd-pouch-plus i svg { width: 100%; height: 100%; display: block; }
.nd-pouch-plus.nd-show { animation: nd-pouch-plus 1.6s ease forwards; }
@keyframes nd-pouch-plus { 0% { opacity: 0; transform: translate(-50%, -6px); } 15%, 75% { opacity: 1; transform: translate(-50%, 6px); } 100% { opacity: 0; transform: translate(-50%, 6px); } }
@media (min-width: 900px) and (min-height: 600px) { .nd-pouch { height: 58px; width: 64px; border-radius: 29px; } .nd-pouch-ico { width: 44px; height: 44px; } }
.nd-view-house .nd-pouch { height: 44px; width: 52px; }
/* CL-8 (poprawka CL-7.1): w domu na wąskim ekranie przycisk ZASOBY mieści się w 2. rzędzie liczników */
@media (max-width: 520px) { .nd-view-house .nd-res { gap: 5px; } .nd-view-house .nd-pouch { width: 44px; } }
.nd-view-house .nd-pouch-ico { width: 34px; height: 34px; }

/* panel ZASOBY */
.nd-pouch-panel-wrap { position: absolute; inset: 0; z-index: 26; }
.nd-pouch-panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(440px, calc(100% - 24px)); max-height: calc(100% - 24px - var(--nd-safe-t) - var(--nd-safe-b)); overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px;
  background: #fffaf0; border-radius: 26px; box-shadow: 0 8px 0 rgba(0, 0, 0, .12), 0 16px 40px rgba(0, 0, 0, .35);
}
.nd-pouch-panel-wrap.nd-in .nd-pouch-panel { animation: nd-set-in .26s cubic-bezier(.3, 1.4, .5, 1); }
.nd-pouch-title-ico { width: 44px; height: 44px; flex: none; }
.nd-pouch-title-ico svg { width: 100%; height: 100%; display: block; }
.nd-pouch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.nd-pouch-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border-radius: 20px; background: #f7e7b4; box-shadow: 0 4px 0 #dccb9c; }
.nd-pouch-tile.nd-rare { background: #e3f7ff; box-shadow: 0 4px 0 #9fd8ea; }
.nd-pouch-tile-ico { width: 60px; height: 60px; display: block; }
.nd-pouch-tile-ico svg { width: 100%; height: 100%; display: block; }
.nd-pouch-num { font-size: 32px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.nd-pouch-name { font-size: 13px; font-weight: 900; color: #6b5c45; letter-spacing: .03em; text-align: center; }
@media (max-height: 430px) { .nd-pouch-grid { grid-template-columns: repeat(3, 1fr); } .nd-pouch-tile-ico { width: 48px; height: 48px; } .nd-pouch-num { font-size: 26px; } }

/* warsztat: globalne liczniki schowane, potrzebne zasoby pokazane w panelu warsztatu */
.nd-view-workshop .nd-res { display: none; }
.nd-ws-res { display: flex; flex-wrap: wrap; gap: 6px; }
.nd-ws-chip { display: flex; align-items: center; gap: 4px; height: 40px; padding: 2px 12px 2px 4px; border-radius: 20px; background: #f1ead9; font-size: 20px; font-variant-numeric: tabular-nums; }
.nd-ws-chip .nd-ico { width: 32px; height: 32px; }
.nd-ws-chip.nd-pop { animation: nd-pop .45s ease; }
@media (max-width: 420px) { .nd-ws-chip { height: 36px; font-size: 18px; padding-right: 10px; } .nd-ws-chip .nd-ico { width: 28px; height: 28px; } }

/* wspólny komponent celebracji: mniejszy, zawsze w swoim polu, tekst się zawija */
.nd-announce { max-width: var(--ann-w, 460px); text-align: center; }
.nd-announce .nd-ann-ico { width: 84px; height: 84px; padding: 16px; }
.nd-announce .nd-cel-rays { top: 42px; width: 230px; height: 230px; margin: -115px 0 0 -115px; }
.nd-ann-title, .nd-ann-sub { white-space: normal; text-wrap: balance; }
.nd-announce.nd-solo .nd-ann-title { font-size: clamp(24px, 4.2vw, 32px); line-height: 1.1; margin-top: 10px; }
.nd-announce.nd-compact .nd-ann-ico { width: 62px; height: 62px; padding: 12px; }
.nd-announce.nd-compact .nd-cel-rays { top: 31px; width: 170px; height: 170px; margin: -85px 0 0 -85px; }
.nd-announce.nd-compact.nd-solo .nd-ann-title { font-size: 24px; margin-top: 6px; }
.nd-announce.nd-compact .nd-ann-sub { font-size: 40px; }
.nd-cel-text { font-size: clamp(28px, 6vw, 44px); max-width: 90vw; text-align: center; white-space: normal; text-wrap: balance; }

/* ================= CL-8: ulepszenia domu ================= */
/* znacznik ulepszenia: strzałka (inna niż młotek naprawy); bez pieniędzy - mniejszy i nieruchomy */
.nd-badge-calm .nd-badge-in { animation: none; opacity: .9; }
/* stary element "odchodzi" przed pojawieniem się nowego */
.nd-item.nd-upgrading .nd-item-art { animation: nd-up-out .9s ease forwards; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes nd-up-out {
  15% { transform: scale(1.04, .96); }
  35% { transform: rotate(-2deg); }
  55% { transform: rotate(2deg); opacity: 1; }
  100% { transform: scale(.88); opacity: .15; }
}
/* karta ULEPSZ: obecny -> następny poziom (miniatury z rysunków pokoju) */
.nd-icard-prev { display: flex; align-items: center; justify-content: center; gap: 6px; }
.nd-prev { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.nd-prev-cur { flex: 0 1 34%; }
.nd-prev-next { flex: 0 1 50%; }
.nd-prev-pic { width: 100%; height: 84px; border-radius: 14px; background: #f1ead9; padding: 5px; }
.nd-prev-cur .nd-prev-pic { height: 70px; opacity: .8; filter: saturate(.55); }
.nd-prev-next .nd-prev-pic { height: 116px; background: #fff3c4; box-shadow: 0 0 0 3px #ffd23f, 0 4px 12px rgba(255, 190, 40, .45); }
.nd-thumb { width: 100%; height: 100%; display: block; }
.nd-prev span { font-size: 12px; font-weight: 900; line-height: 1.15; text-align: center; color: #8a7a5f; text-wrap: balance; }
.nd-prev-next span { font-size: 15px; color: #2b8042; }
.nd-prev-arrow { flex: none; width: 30px; height: 30px; transform: rotate(90deg); }
.nd-prev-arrow svg { width: 100%; height: 100%; display: block; }
.nd-upcard .nd-icard-costs { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.nd-upcard .nd-cost { flex: 1 1 auto; min-height: 46px; }
.nd-upcard .nd-cost-ico { width: 36px; height: 36px; }
.nd-upcard .nd-cost-need { font-size: 23px; }
@media (max-height: 430px) {
  .nd-prev-pic { height: 60px; }
  .nd-prev-cur .nd-prev-pic { height: 46px; }
  .nd-prev-next .nd-prev-pic { height: 70px; }
  .nd-prev span { font-size: 11px; }
  .nd-prev-next span { font-size: 13px; }
  .nd-upcard .nd-cost { min-height: 38px; }
  .nd-upcard .nd-cost-ico { width: 30px; height: 30px; }
}
/* celebracja ulepszenia: zamiast ikony - obrazek nowego elementu */
.nd-announce.nd-ann-upgrade .nd-ann-ico { width: 132px; height: 112px; padding: 8px; border-radius: 24px; background: #fffaf0; box-shadow: 0 0 0 5px #ffd23f, 0 10px 24px rgba(0, 0, 0, .3); }
.nd-announce.nd-ann-upgrade.nd-compact .nd-ann-ico { width: 100px; height: 84px; }

/* ================= CL-9: walka ================= */
/* serca: pod licznikami, tylko gdy ma to znaczenie */
.nd-hearts { position: absolute; left: 0; top: calc(100% + 6px); display: flex; gap: 4px; padding: 5px 9px; border-radius: 18px; background: rgba(255, 250, 240, .92); box-shadow: 0 3px 0 rgba(0, 0, 0, .12); pointer-events: none; }
.nd-hearts:not([hidden]) { animation: nd-pop .3s ease; }
.nd-heart { width: 30px; height: 30px; display: block; position: relative; }
.nd-heart i { position: absolute; inset: 0; }
.nd-heart svg { width: 100%; height: 100%; display: block; }
.nd-heart .nd-he svg { filter: grayscale(1) opacity(.35); }
.nd-heart.nd-h0 .nd-hf { display: none; }
.nd-heart.nd-h1 .nd-hf { clip-path: inset(0 50% 0 0); }
.nd-hearts.nd-hurt { animation: nd-hearts-hurt .45s ease; }
@keyframes nd-hearts-hurt { 20% { transform: translateX(-5px) scale(1.12); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } }

/* ================= CL-8.2: rzadkie znaleziska ================= */
/* kafelek w ZASOBACH: kolor rzadkości, można dotknąć (karta przedmiotu) */
.nd-pouch-tile.nd-treasure { cursor: pointer; position: relative; }
.nd-pouch-tile.nd-r-common { background: #fde8d6; box-shadow: 0 4px 0 #e0a275, inset 0 0 0 3px #e08a4a; }
.nd-item-card.nd-r-common .nd-item-big { background: #fde8d6; box-shadow: 0 0 0 4px #e08a4a; }
.nd-item-card.nd-r-common .nd-item-rarity { background: #e08a4a; color: #fff; }
.nd-pouch-tile.nd-r-rare { background: #fff1c2; box-shadow: 0 4px 0 #e6c45a, inset 0 0 0 3px #ffd23f; }
.nd-pouch-tile.nd-r-very_rare { background: #efe6ff; box-shadow: 0 4px 0 #b9a0e8, inset 0 0 0 3px #b48cff; }
.nd-pouch-tile.nd-r-extreme { background: #e2fbf9; box-shadow: 0 4px 0 #8fd9d2, inset 0 0 0 3px #5ff0e6; }
.nd-pouch-tile.nd-treasure::after { content: 'i'; position: absolute; right: 8px; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #6b5c45; font-size: 14px; font-weight: 900; display: grid; place-items: center; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.nd-pouch-grid.nd-pouch-card { display: block; }
/* karta przedmiotu */
.nd-item-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px 4px; text-align: center; }
.nd-item-back { position: absolute; left: 0; top: 0; width: 46px; height: 46px; background: #2f8fd8; }
.nd-item-back .nd-ico { width: 24px; height: 24px; }
.nd-item-big { width: 110px; height: 110px; padding: 10px; border-radius: 28px; background: #fff3c4; box-shadow: 0 0 0 4px #ffd23f; }
.nd-item-card.nd-r-very_rare .nd-item-big { background: #efe6ff; box-shadow: 0 0 0 4px #b48cff; }
.nd-item-card.nd-r-extreme .nd-item-big { background: #1c2633; box-shadow: 0 0 0 4px #5ff0e6, 0 0 22px rgba(95, 240, 230, .55); }
.nd-item-big svg { width: 100%; height: 100%; display: block; }
.nd-item-name { font-size: 26px; font-weight: 900; margin-top: 6px; }
.nd-item-rarity { padding: 3px 12px; border-radius: 12px; background: #ffd23f; font-size: 14px; font-weight: 900; color: #5a4512; }
.nd-item-card.nd-r-very_rare .nd-item-rarity { background: #b48cff; color: #fff; }
.nd-item-card.nd-r-extreme .nd-item-rarity { background: #1c2633; color: #5ff0e6; }
.nd-item-text { margin: 2px 0 4px; font-size: 16px; font-weight: 700; color: #6b5c45; text-wrap: balance; }
.nd-item-rows { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.nd-item-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px 6px 6px; border-radius: 16px; background: #f1ead9; text-align: left; flex-wrap: wrap; }
.nd-item-row-ico { width: 40px; height: 40px; flex: none; border-radius: 50%; padding: 6px; background: #fff; }
.nd-item-row-ico svg { width: 100%; height: 100%; display: block; }
.nd-item-row-t { font-size: 14px; font-weight: 900; color: #6b5c45; }
.nd-item-row b { font-size: 20px; font-weight: 900; margin-left: auto; }
.nd-row-use .nd-item-row-ico { background: #dff1ff; }
.nd-row-sell { background: #fff1c2; }
.nd-row-nosell { background: #ffe1dc; }
.nd-row-nosell .nd-item-row-t { color: #b13d34; font-size: 16px; }
.nd-row-home { background: #e4f5dc; }
.nd-row-home .nd-item-row-t { color: #2b8042; font-size: 15px; }
@media (max-height: 430px) {
  .nd-item-card { display: grid; grid-template-columns: 96px 1fr; column-gap: 12px; text-align: left; align-items: start; }
  .nd-item-big { width: 92px; height: 92px; grid-row: span 4; margin-left: 52px; }
  .nd-item-card { grid-template-columns: 150px 1fr; }
  .nd-item-name { font-size: 22px; margin-top: 0; }
  .nd-item-rarity { justify-self: start; }
  .nd-item-rows { grid-column: 1 / -1; }
  .nd-item-row { min-height: 42px; }
  .nd-item-row-ico { width: 32px; height: 32px; padding: 4px; }
}
/* celebracja rzadkiego znaleziska: ikona przedmiotu na tle koloru rzadkości */
.nd-announce.nd-ann-rare .nd-ann-ico { background: #fff3c4; box-shadow: 0 0 0 5px #ffd23f, 0 10px 24px rgba(0, 0, 0, .3); padding: 12px; }
.nd-announce.nd-ann-rare.nd-r-very_rare .nd-ann-ico { background: #efe6ff; box-shadow: 0 0 0 5px #b48cff, 0 0 30px rgba(180, 140, 255, .7); }
.nd-announce.nd-ann-rare.nd-r-extreme .nd-ann-ico { background: #1c2633; box-shadow: 0 0 0 5px #5ff0e6, 0 0 30px rgba(95, 240, 230, .7); }

@media (prefers-reduced-motion: reduce) {
  .nd-game *, .nd-game *::before, .nd-game *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ================= CL-12: PRZYGODA ================= */
.nd-btn-quest { position: relative; width: 52px; height: 52px; background: #f08a24; box-shadow: 0 4px 0 #b8641a, 0 6px 14px rgba(0, 0, 0, .25); }
.nd-btn-quest .nd-ico { width: 32px; height: 32px; }
.nd-btn-quest.nd-pop { animation: nd-pop .5s ease; }
.nd-quest-dot { position: absolute; right: -2px; top: -2px; width: 16px; height: 16px; border-radius: 50%; background: #e2463d; box-shadow: 0 0 0 3px #fff; }
.nd-view-house .nd-btn-quest, .nd-view-start .nd-btn-quest, .nd-view-shop .nd-btn-quest, .nd-view-workshop .nd-btn-quest { display: none; }
@media (max-height: 430px) { .nd-btn-quest { width: 44px; height: 44px; } .nd-btn-quest .nd-ico { width: 28px; height: 28px; } }
.nd-quest-body { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.nd-quest-name { font-size: 18px; font-weight: 900; color: #a8432f; letter-spacing: .03em; text-align: center; }
.nd-quest-steps { display: flex; align-items: center; gap: 4px; }
.nd-quest-steps > i { width: 14px; height: 3px; border-radius: 2px; background: #dccb9c; }
.nd-quest-step { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #efe6cf; color: #9a8a6c; font-size: 16px; }
.nd-quest-step svg { width: 100%; height: 100%; display: block; }
.nd-quest-step.nd-cur { background: #f08a24; color: #fff; box-shadow: 0 0 0 4px #ffd8b0; }
.nd-quest-step.nd-done { background: transparent; }
.nd-quest-card { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: 22px; background: #f7e7b4; text-align: center; }
.nd-quest-big { width: 64px; height: 64px; }
.nd-quest-big svg { width: 100%; height: 100%; display: block; }
.nd-quest-n { font-size: 13px; font-weight: 900; color: #6b5c45; }
.nd-quest-goal { font-size: 21px; font-weight: 900; line-height: 1.2; }
.nd-quest-hint, .nd-quest-reward, .nd-quest-stat { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 10px; border-radius: 14px; background: #fffaf0; font-size: 15px; font-weight: 800; text-align: left; }
.nd-quest-reward { background: #e3f6e3; color: #2b6b3a; }
.nd-quest-hint i, .nd-quest-reward i { width: 28px; height: 28px; flex: none; }
.nd-quest-hint svg, .nd-quest-reward svg, .nd-quest-stat svg { width: 100%; height: 100%; display: block; }
.nd-quest-stat svg { width: 28px; height: 28px; }
.nd-quest-costs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.nd-quest-cost { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 12px; background: #fffaf0; font-size: 14px; font-weight: 900; }
.nd-quest-cost i { width: 24px; height: 24px; display: block; }
.nd-quest-cost svg { width: 100%; height: 100%; display: block; }
.nd-quest-cost.nd-miss { background: #fde2d6; color: #a8432f; }
/* baner postępu: u góry, pod licznikami, bez blokowania dotyku */
.nd-quest-banner { position: absolute; left: 50%; top: calc(var(--nd-hud-bottom, 64px) + 10px); transform: translateX(-50%); z-index: 16; pointer-events: none;
  display: flex; align-items: center; gap: 10px; max-width: min(460px, calc(100% - 140px)); padding: 6px 14px 6px 6px; border-radius: 24px;
  background: rgba(255, 250, 240, .96); box-shadow: 0 4px 0 rgba(0, 0, 0, .12), 0 0 0 3px #f08a24; animation: nd-qb-in .35s cubic-bezier(.3, 1.5, .5, 1); }
.nd-quest-banner.nd-leave { animation: nd-qb-out .4s ease-in forwards; }
.nd-qb-ico { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #fff3c4; padding: 4px; }
.nd-qb-ico svg { width: 100%; height: 100%; display: block; }
.nd-qb-txt { display: flex; flex-direction: column; min-width: 0; }
.nd-qb-txt b { font-size: 16px; font-weight: 900; color: #a8432f; }
.nd-qb-txt em { font-style: normal; font-size: 13px; font-weight: 800; color: #4a3a2a; line-height: 1.2; }
@keyframes nd-qb-in { from { opacity: 0; transform: translate(-50%, -14px); } }
@keyframes nd-qb-out { to { opacity: 0; transform: translate(-50%, -10px); } }
/* niski ekran (telefon w poziomie): baner w lewym dolnym rogu - nie nachodzi na postać na środku ekranu */
@media (max-height: 430px) {
  .nd-quest-banner { top: auto; bottom: calc(12px + var(--nd-safe-b)); left: calc(12px + var(--nd-safe-l, 0px)); transform: none; max-width: min(360px, 40%); animation-name: nd-qb-in2; }
  .nd-quest-banner.nd-leave { animation-name: nd-qb-out2; }
}
@keyframes nd-qb-in2 { from { opacity: 0; transform: translateY(14px); } }
@keyframes nd-qb-out2 { to { opacity: 0; transform: translateY(10px); } }

/* ================= CL-13 ================= */
.nd-offer { background: #fff6e6; box-shadow: 0 4px 0 #ecd7a8, inset 0 0 0 3px #f08a24; }
.nd-offer-gain { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #a8432f; line-height: 1.15; }
.nd-offer-note { background: #e9eef1; color: #3d454b; }

.nd-park-list { display: flex; flex-direction: column; gap: 10px; }
.nd-park-item { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px; padding: 10px; border-radius: 20px; background: #f7e7b4; }
.nd-park-item.nd-active { box-shadow: inset 0 0 0 3px #3fae5a; background: #e8f6e0; }
.nd-park-ico { width: 56px; height: 56px; } .nd-park-ico svg { width: 100%; height: 100%; display: block; }
.nd-park-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nd-park-info b { font-size: 19px; font-weight: 900; }
.nd-park-info em { font-style: normal; font-size: 13px; font-weight: 800; color: #6b5c45; }
.nd-park-speed { display: block; height: 8px; border-radius: 4px; background: #e2d4ae; overflow: hidden; } .nd-park-speed i { display: block; height: 100%; background: #f08a24; border-radius: 4px; }
.nd-park-go { display: flex; flex-direction: column; align-items: center; min-width: 78px; padding: 6px 10px; border-radius: 18px; background: var(--nd-green); box-shadow: 0 5px 0 #2b8042; color: #fff; font-size: 17px; font-weight: 900; }
.nd-park-go .nd-ico { width: 34px; height: 34px; } .nd-park-go:disabled { background: #b8b2a3; box-shadow: 0 5px 0 #8f897b; }
.nd-park-note { margin: 2px 0 0; font-size: 13px; font-weight: 800; color: #6b5c45; text-align: center; }

/* CL-14: TYTAN (rzadki metal z Gór) - metaliczny niebieski */
.nd-pouch-tile.nd-r-titan { background: #e6f2fb; box-shadow: 0 4px 0 #8fb7e0, inset 0 0 0 3px #8fd3ff; }
.nd-item-card.nd-r-titan .nd-item-big { background: #e6f2fb; box-shadow: 0 0 0 4px #8fb7e0, 0 0 18px rgba(143, 211, 255, .55); }
.nd-item-card.nd-r-titan .nd-item-rarity { background: #4a6fa5; color: #fff; }
/* CL-14: telewizor LED - podświetlenie za ekranem po włączeniu; znacznik budowy łazienki w przekroju */
.nd-tv-led-back { opacity: 0; transition: opacity .25s; }
.nd-item.nd-on .nd-tv-led-back { opacity: 1; }
.nd-bath-badge { animation: nd-bath-pulse 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes nd-bath-pulse { 50% { transform: scale(1.1); } }

/* ================= CL-14.1: rząd pod HUD (serca + boost MIĘSA), ZJEDZ ================= */
.nd-hud .nd-under { position: absolute; left: 0; top: calc(100% + 6px); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; pointer-events: none; }
.nd-under .nd-hearts { position: static; }
.nd-boost { display: flex; align-items: center; gap: 6px; height: 40px; padding: 3px 13px 3px 5px; border-radius: 20px; background: rgba(255, 250, 240, .94); box-shadow: 0 3px 0 rgba(0, 0, 0, .12), inset 0 0 0 3px #f2a65a; color: #4a3424; pointer-events: none; }
.nd-boost[hidden] { display: none; }
.nd-boost-ico { width: 32px; height: 32px; display: block; }
.nd-boost-ico svg { width: 100%; height: 100%; display: block; }
.nd-boost-k { font-size: 17px; font-weight: 900; color: #d2561f; }
.nd-boost-t { font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 42px; }
.nd-boost.nd-pop { animation: nd-pop .35s ease; }
.nd-boost.nd-boost-end { animation: nd-boost-blink 1s steps(2, start) infinite; }
@keyframes nd-boost-blink { 50% { opacity: .55; } }
.nd-eat { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; }
.nd-eat-btn { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 26px 6px 14px; border-radius: 28px; background: #ff8a3d; color: #fff; font-size: 22px; font-weight: 900; box-shadow: 0 5px 0 #c85e1c; }
.nd-eat-btn .nd-ico { width: 34px; height: 34px; }
.nd-eat-btn[disabled] { background: #c9bfb4; box-shadow: 0 5px 0 #a39a90; }
.nd-eat-note { font-size: 14px; font-weight: 800; color: #6b5c45; text-align: center; }
.nd-pouch-tile.nd-r-hunt { background: #fde3d8; box-shadow: 0 4px 0 #e0a68a, inset 0 0 0 3px #d9886a; }
.nd-item-card.nd-r-hunt .nd-item-big { background: #fde3d8; box-shadow: 0 0 0 4px #d9886a; }
.nd-item-card.nd-r-hunt .nd-item-rarity { background: #d9886a; color: #fff; }

/* ================= CL-14.1: STROJE ================= */
.nd-outfit-preview { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 20px; background: #eaf4e2; }
.nd-outfit-preview.nd-premium { background: linear-gradient(135deg, #2a2a31, #0d0d10); color: #e6e9ee; box-shadow: inset 0 0 0 2px #8e98a3; }
.nd-outfit-big { width: 84px; height: 84px; flex: none; }
.nd-outfit-cap { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nd-outfit-cap b { font-size: 17px; font-weight: 900; }
.nd-outfit-cap span { font-size: 13px; font-weight: 700; opacity: .85; }
.nd-outfit-list { display: flex; flex-direction: column; gap: 10px; }
.nd-outfit-item { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 20px; background: #f7e7b4; }
.nd-outfit-item.nd-st-equipped { background: #e8f6e0; box-shadow: inset 0 0 0 3px #3fae5a; }
.nd-outfit-item.nd-premium { background: linear-gradient(135deg, #2b2b33, #121216); color: #eef1f4; box-shadow: inset 0 0 0 2px #9aa3ad; }
.nd-outfit-item.nd-premium.nd-st-equipped { box-shadow: inset 0 0 0 3px #d9dee4; }
.nd-outfit-thumb { width: 64px; height: 64px; border-radius: 16px; background: rgba(255, 255, 255, .55); display: block; overflow: hidden; }
.nd-outfit-item.nd-premium .nd-outfit-thumb { background: #3a3a44; }
.nd-outfit-thumb canvas { width: 100%; height: 100%; display: block; }
.nd-outfit-info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.nd-outfit-info b { font-size: 17px; font-weight: 900; line-height: 1.1; }
.nd-outfit-status { font-style: normal; font-size: 12px; font-weight: 900; padding: 2px 8px; border-radius: 10px; background: #e2d4ae; color: #6b5c45; }
.nd-st-owned .nd-outfit-status { background: #cfe8ff; color: #23608f; }
.nd-st-equipped .nd-outfit-status { background: #3fae5a; color: #fff; }
.nd-outfit-item.nd-premium .nd-outfit-status { background: #4a4a55; color: #e6e9ee; }
.nd-outfit-costs { justify-content: flex-start; }
.nd-outfit-item.nd-premium .nd-quest-cost { background: #3a3a44; color: #eef1f4; }
.nd-outfit-item.nd-premium .nd-quest-cost.nd-miss { background: #5a3434; color: #ffd6cc; }
.nd-outfit-btn { display: flex; flex-direction: column; align-items: center; min-width: 82px; padding: 6px 10px; border-radius: 18px; background: var(--nd-green); box-shadow: 0 5px 0 #2b8042; color: #fff; font-size: 15px; font-weight: 900; }
.nd-outfit-btn .nd-ico { width: 30px; height: 30px; }
.nd-outfit-btn.nd-buy { background: #f08a24; box-shadow: 0 5px 0 #b9661a; }
.nd-outfit-btn.nd-wear { background: #2f8fd8; box-shadow: 0 5px 0 #1f6aa5; }
.nd-outfit-btn.nd-on { background: #e8f6e0; color: #2b8042; box-shadow: none; }
.nd-outfit-btn:disabled:not(.nd-on) { background: #b8b2a3; box-shadow: 0 5px 0 #8f897b; }
.nd-wardrobe { cursor: pointer; }
.nd-wardrobe-new { animation: nd-wardrobe-pulse 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes nd-wardrobe-pulse { 50% { transform: scale(1.35); } }
@media (max-width: 380px) { .nd-outfit-item { grid-template-columns: 52px 1fr auto; } .nd-outfit-thumb { width: 52px; height: 52px; } .nd-outfit-btn { min-width: 70px; } }

/* ================= CL-15: rząd aktywnych efektów (mięso, turbo...) ================= */
.nd-effects { display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.nd-boost.nd-boost-turbo { box-shadow: 0 3px 0 rgba(0, 0, 0, .12), inset 0 0 0 3px #5fd3f0; background: rgba(236, 251, 255, .95); }
.nd-boost.nd-boost-turbo .nd-boost-k { color: #1a7fa3; }
.nd-boost.nd-intro { padding-right: 16px; }
.nd-boost.nd-intro .nd-boost-t { display: none; }
.nd-boost.nd-boost-off { opacity: .55; filter: grayscale(.6); }
.nd-boost.nd-boost-turbo:not(.nd-boost-end) .nd-boost-ico { animation: nd-turbo-glow 1.2s ease-in-out infinite; }
@keyframes nd-turbo-glow { 50% { filter: drop-shadow(0 0 6px #5fd3f0); } }
@media (max-width: 380px) { .nd-boost { height: 36px; } .nd-boost-k { font-size: 15px; } .nd-boost-t { font-size: 17px; } }

/* ================= CL-15: AKCESORIA w panelu STROJE ================= */
.nd-outfit-sec { margin: 6px 0 0; font-size: 17px; font-weight: 900; color: #3a2a1c; }
.nd-outfit-sec span { font-size: 12px; font-weight: 800; color: #6b5c45; }
.nd-acc-thumb { display: grid; place-items: center; padding: 8px; box-sizing: border-box; }
.nd-acc-thumb svg { width: 100%; height: 100%; display: block; }
.nd-acc-item.nd-st-locked .nd-acc-thumb svg { filter: grayscale(1) opacity(.45); }
.nd-acc-from { font-size: 12px; font-weight: 700; color: #6b5c45; line-height: 1.25; }
/* CL-17: stała moc stroju / akcesorium */
.nd-power { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 11px; line-height: 1.2; color: #7a5410; }
.nd-power svg { width: 14px; height: 14px; flex: none; }
.nd-power b { font-weight: 900; }
.nd-power-on { justify-content: center; color: #8a5a00; background: #fff3c4; border-radius: 10px; padding: 3px 8px; margin-top: 6px; }
.nd-outfit-acc-on { font-style: normal; font-size: 13px; font-weight: 900; color: #7fd9ef; }
.nd-outfit-preview:not(.nd-premium) .nd-outfit-acc-on { color: #1a7fa3; }
.nd-outfit-btn.nd-off { background: #8a7f72; box-shadow: 0 5px 0 #615849; }
.nd-wardrobe-up { background: #eaf4e2; }

/* ================= CL-15: ROBOT ================= */
.nd-robot-toast { display: flex; align-items: center; gap: 6px; height: 36px; padding: 2px 12px 2px 4px; border-radius: 18px; background: rgba(255, 250, 240, .94); box-shadow: 0 3px 0 rgba(0, 0, 0, .12), inset 0 0 0 3px #b07a45; color: #4a3424; font-size: 13px; pointer-events: none; }
.nd-robot-toast[hidden] { display: none; }
.nd-robot-toast > b { font-size: 12px; font-weight: 900; }
.nd-rbt-item { display: flex; align-items: center; gap: 2px; }
.nd-rbt-item b { font-size: 16px; font-weight: 900; }
.nd-rbt-item i { width: 24px; height: 24px; display: block; }
.nd-rbt-item svg { width: 100%; height: 100%; display: block; }
.nd-robot-toast.nd-pop { animation: nd-pop .3s ease; }
.nd-robot-body { display: flex; flex-direction: column; gap: 12px; }
.nd-robot-hero { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; padding: 8px; border-radius: 20px; background: #f3ead6; }
.nd-robot-pic { width: 96px; height: 96px; display: block; }
.nd-robot-pic canvas { width: 100%; height: 100%; display: block; }
.nd-robot-cap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nd-robot-cap b { font-size: 19px; font-weight: 900; }
.nd-robot-cap span { font-size: 13px; font-weight: 700; color: #6b5c45; }
.nd-robot-speed { font-variant-numeric: tabular-nums; }
.nd-robot-status { padding: 10px 12px; border-radius: 16px; background: #e8f6e0; font-size: 14px; font-weight: 800; color: #2b5c33; }
.nd-robot-status b { font-size: 17px; font-weight: 900; }
.nd-robot-sec { display: flex; flex-direction: column; gap: 8px; }
.nd-robot-sec > b { font-size: 15px; font-weight: 900; color: #3a2a1c; }
.nd-robot-tasks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nd-robot-task { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; padding: 6px; border-radius: 16px; background: #f7e7b4; box-shadow: 0 4px 0 #dccb9c; color: #3a2a1c; font-size: 15px; font-weight: 900; }
.nd-robot-task .nd-ico { width: 30px; height: 30px; }
.nd-robot-task.nd-on { background: var(--nd-green); box-shadow: 0 4px 0 #2b8042; color: #fff; }
.nd-robot-gained { display: flex; flex-wrap: wrap; gap: 6px; }
.nd-robot-main { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border-radius: 18px; background: #f08a24; box-shadow: 0 5px 0 #b9661a; color: #fff; font-size: 18px; font-weight: 900; }
.nd-robot-main .nd-ico { width: 30px; height: 30px; }
.nd-robot-main:disabled { background: #b8b2a3; box-shadow: 0 5px 0 #8f897b; }
.nd-robot-up { padding: 10px; border-radius: 18px; background: #f3ead6; }
/* CL-16: zakładki ROBOT 1 / ROBOT 2 - duże, czytelne na telefonie */
.nd-robot-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nd-robot-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 6px 10px; border-radius: 16px; background: #f7e7b4; box-shadow: 0 4px 0 #dccb9c; color: #3a2a1c; text-align: left; }
.nd-robot-tab > b { font-size: 16px; font-weight: 900; }
.nd-robot-tab-sub { font-size: 11px; font-weight: 800; color: #6b5c45; line-height: 1.15; }
.nd-robot-tab.nd-empty { background: #ece6d8; box-shadow: 0 4px 0 #cfc6b2; }
.nd-robot-tab.nd-on { background: var(--nd-green); box-shadow: 0 4px 0 #2b8042; color: #fff; }
.nd-robot-tab.nd-on .nd-robot-tab-sub { color: #e8ffe8; }

/* CL-15: rząd efektów zaraz pod licznikami zasobów (z lewej), nie wchodzi pod kolumnę przycisków po prawej */
.nd-hud .nd-under { top: calc(var(--nd-res-bottom, 100%) + 8px); max-width: calc(100% - 84px); }
/* CL-15: wąski ekran (telefon pionowo) - niższe liczniki efektów, żeby kilka naraz zostało w górnej części ekranu */
@media (max-width: 480px) {
  .nd-robot-cap b { font-size: 16px; } /* CL-16: "ROBOT 2: DREWNIAK I" w jednej linii na telefonie */
  .nd-hud .nd-under { gap: 5px; }
  .nd-under .nd-hearts { padding: 3px 7px; }
  .nd-under .nd-heart { width: 24px; height: 24px; }
  .nd-boost { height: 32px; padding: 2px 10px 2px 4px; gap: 4px; }
  .nd-boost-ico { width: 26px; height: 26px; }
  .nd-boost-k { font-size: 14px; }
  .nd-boost-t { font-size: 16px; min-width: 36px; }
  .nd-robot-toast { height: 30px; }
}

/* ================= CL-16.1: wspólny pasek zakładek (js/ui/tabbar.js) =================
 * Zakładki mają naturalną szerokość (pełne nazwy, bez ucinania); gdy się nie mieszczą - pasek przewija się palcem
 * w poziomie (bez widocznego paska przewijania). Gdy się mieszczą (desktop) - rozciągają się jak dawniej. */
.nd-tabbar { position: relative; display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; touch-action: pan-x; scroll-snap-type: x proximity; padding: 2px 2px 7px; margin: -2px -2px -7px; scroll-padding-inline: 24px; }
.nd-tabbar::-webkit-scrollbar { display: none; }
.nd-tabbar > * { flex: 1 0 auto; min-width: max-content; white-space: nowrap; scroll-snap-align: start; }
.nd-tabbar > * b { white-space: nowrap; }
/* podpowiedź "przesuń": rozmyta krawędź po stronie, gdzie są jeszcze zakładki */
.nd-tabbar.nd-tb-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); }
.nd-tabbar.nd-tb-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 34px), transparent); }
.nd-tabbar.nd-tb-l.nd-tb-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 34px, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to right, transparent, #000 34px, #000 calc(100% - 34px), transparent); }
/* nieco większe zakładki z marginesem na tekst (telefon: bez ściskania czcionki) */
.nd-tabbar > .nd-ws-tab, .nd-tabbar > .nd-jr-tab { padding: 0 16px; }
.nd-tabbar > .nd-tab { padding: 0 18px; }
@media (max-width: 440px) { .nd-tabbar > .nd-tab { font-size: 17px; } .nd-tabbar > .nd-tab .nd-tab-ico { width: 30px; height: 30px; } }
.nd-robot-tabs.nd-tabbar { display: flex; }
/* zakładki robotów: tylko 2 - zawsze obie w kadrze; podpis (generacja · obszar · praca) zawija się do 2 linii */
.nd-robot-tabs.nd-tabbar > .nd-robot-tab { flex: 1 1 0; min-width: 0; white-space: normal; }
.nd-robot-tabs.nd-tabbar > .nd-robot-tab .nd-robot-tab-sub { white-space: normal; }

/* CL-16.1: komunikat o robocie (ATAKOWANY / USZKODZONY / ZNISZCZONY) - w rzędzie pod licznikami, bez okna */
.nd-robot-alert { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 2px 12px 2px 4px; border-radius: 18px; background: rgba(255, 244, 228, .96); box-shadow: 0 3px 0 rgba(0, 0, 0, .12), inset 0 0 0 3px #f08a24; color: #5a3010; font-size: 13px; pointer-events: none; }
.nd-robot-alert[hidden] { display: none; }
.nd-robot-alert > b { font-size: 13px; font-weight: 900; }
.nd-robot-alert .nd-boost-ico { width: 30px; height: 30px; flex: none; }
.nd-robot-alert[data-kind="resisted"] { box-shadow: 0 3px 0 rgba(0, 0, 0, .12), inset 0 0 0 3px #5ccf6a; color: #24502c; background: rgba(240, 252, 238, .96); }
.nd-robot-alert[data-kind="destroyed"] { background: #e2463d; color: #fff; box-shadow: 0 4px 0 #a52d26, 0 0 0 3px rgba(255, 255, 255, .7); min-height: 44px; font-size: 15px; }
.nd-robot-alert[data-kind="destroyed"] > b { font-size: 16px; }
.nd-robot-alert.nd-pop { animation: nd-pop .3s ease; }
/* CL-16.1: panel robota - STAN, OBSZAR, lekka mapa obszarów, wrak */
.nd-robot-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 16px; background: #f3ead6; }
.nd-robot-lbl { font-size: 13px; font-weight: 900; color: #6b5c45; min-width: 64px; }
.nd-robot-hp { flex: 1; height: 14px; border-radius: 7px; background: #d9cfba; overflow: hidden; }
.nd-robot-hp i { display: block; height: 100%; width: 0; border-radius: 7px; background: #5ccf6a; transition: width .3s; }
.nd-robot-hp i[data-lvl="mid"] { background: #ffc23d; }
.nd-robot-hp i[data-lvl="low"] { background: #f0523f; }
.nd-robot-hpv { font-size: 16px; font-weight: 900; min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
.nd-robot-areav { flex: 1; font-size: 17px; font-weight: 900; }
.nd-robot-areav em { font-style: normal; font-size: 12px; padding: 2px 7px; border-radius: 9px; background: #f08a24; color: #fff; vertical-align: 2px; }
.nd-robot-change { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border-radius: 16px; background: #2f8fd8; box-shadow: 0 4px 0 #1f6aa5; color: #fff; font-size: 16px; font-weight: 900; }
.nd-robot-change .nd-ico { width: 26px; height: 26px; }
.nd-robot-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; position: relative; }
.nd-robot-areatile { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 120px; padding: 10px 6px; border-radius: 18px; background: #e9dcb8; box-shadow: 0 4px 0 #cdbb8f, inset 0 0 0 3px #d8c79a; color: #3a2a1c; }
.nd-robot-areatile .nd-ico { width: 42px; height: 42px; }
.nd-robot-areatile > b { font-size: 16px; font-weight: 900; }
.nd-robot-areatile.nd-on { background: #dff3d6; box-shadow: 0 4px 0 #2b8042, inset 0 0 0 3px #3fae5a; }
.nd-robot-areatile:disabled:not(.nd-on) { opacity: .5; }
.nd-robot-cnt { display: flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 900; }
.nd-robot-cnt i { width: 20px; height: 20px; display: inline-block; }
.nd-robot-cnt i svg { width: 100%; height: 100%; display: block; }
.nd-robot-areatile em { font-style: normal; font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 9px; }
.nd-robot-areatile em.nd-safe { background: #3fae5a; color: #fff; }
.nd-robot-areatile em.nd-danger { background: #f08a24; color: #fff; }
.nd-robot-areatile em.nd-off { background: #8f897b; color: #fff; }
.nd-robot-back { background: #8f969e; box-shadow: 0 5px 0 #646b73; }
.nd-robot-wreck { display: grid; grid-template-columns: 40px 1fr; gap: 2px 10px; align-items: center; margin: 0; padding: 10px 12px; border-radius: 16px; background: #ffe1dc; box-shadow: inset 0 0 0 3px #f08a7c; color: #6a1f18; }
.nd-robot-wreck svg { width: 40px; height: 40px; grid-row: span 2; filter: grayscale(.6); }
.nd-robot-wreck b { font-size: 16px; font-weight: 900; }
.nd-robot-wreck span { font-size: 13px; font-weight: 700; }
/* CL-16.1: kuchenka - płomienie / rozgrzane pola po włączeniu (dotknięcie); kałuża pod kapiącym kranem */
.nd-stove-fire { opacity: 0; transition: opacity .25s; }
.nd-item.nd-on .nd-stove-fire { opacity: 1; animation: nd-stove-fire .35s ease-in-out infinite alternate; transform-origin: 973px 519px; }
@keyframes nd-stove-fire { to { transform: scaleY(1.18); } }
.nd-item.nd-on .nd-stove-hob ellipse { stroke: #ff5a2e; stroke-width: 3; filter: drop-shadow(0 0 3px #ff8a3d); }
.nd-drip-puddle { animation: nd-puddle 1.8s ease-in infinite; transform-origin: 1070px 547px; }
@keyframes nd-puddle { 0%, 78% { transform: scaleX(.85); } 90% { transform: scaleX(1.15); } 100% { transform: scaleX(.85); } }
/* CL-17: specjalne komponenty (rarity 'component') */
.nd-pouch-tile.nd-r-component { background: #fff1dc; box-shadow: 0 4px 0 #e2b47a, inset 0 0 0 3px #f2a33a; }
.nd-item-card.nd-r-component .nd-item-big { background: #2f3b45; box-shadow: 0 0 0 4px #f2a33a, 0 0 18px rgba(242, 163, 58, .5); }
.nd-outfit-cap .nd-power-on { font-size: 10px; padding: 3px 6px; }
