/* Spiele: Rechenmauer zum Ziehen und Zahlen-Ninja */

/* ---- Rechenmauer zum Ziehen ---- */
.wg-area { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 16px max(18px, env(safe-area-inset-bottom)); overflow: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.wg-info { display: flex; gap: 8px; font-size: 1.6rem; min-height: 2rem; }
.wg-dot { width: 2.2rem; text-align: center; opacity: .45; font-weight: 900; }
.wg-dot.on { opacity: 1; }
.wg-wall { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: auto 0 0; }
.wg-row { display: flex; gap: 8px; justify-content: center; }
.wg-brick {
  width: clamp(96px, 16vw, 140px); height: clamp(68px, 9vh, 88px); border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 900;
  background: linear-gradient(180deg, #ffb27a, #f0884a); color: #3b1d06; box-shadow: inset 0 -5px 0 rgba(0,0,0,.15), 0 3px 8px rgba(0,0,0,.12);
}
.wg-gap { background: rgba(255,255,255,.75); border: 4px dashed #c9b8ff; box-shadow: none; color: var(--primary-dark, #5a2fd6); }
.wg-gap.filled { background: linear-gradient(180deg, #b9f3c6, #79d68f); border: none; color: #10461f; animation: pop .35s ease; }
.wg-hint { min-height: 1.6em; font-weight: 800; font-size: 1.15rem; color: var(--ink-soft, #6b6390); }
.wg-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 0 0 auto; padding: 14px; background: rgba(255,255,255,.6); border-radius: 22px; min-height: 110px; }
.wg-tile {
  width: clamp(88px, 14vw, 120px); height: clamp(72px, 9vh, 88px); border-radius: 16px; touch-action: none; cursor: grab;
  display: flex; align-items: center; justify-content: center; font-size: clamp(1.6rem, 3.6vw, 2.2rem); font-weight: 900;
  background: #fff; color: var(--ink, #2b2350); box-shadow: 0 5px 0 #d8cff5, 0 8px 16px rgba(0,0,0,.10); position: relative;
}
.wg-tile.dragging { z-index: 50; box-shadow: 0 12px 24px rgba(0,0,0,.25); }
.wg-tile.picked { outline: 5px solid var(--primary, #7c4dff); outline-offset: 2px; }

/* ---- Zahlen-Ninja ---- */
.nj-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 0 16px 10px; }
.nj-task { font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 800; background: #fff; border-radius: 18px; padding: 10px 16px; box-shadow: var(--shadow); }
.nj-task b { font-size: 1.35em; color: var(--primary, #7c4dff); }
.nj-task.nj-new { animation: pop .45s ease; }
.nj-info { display: flex; gap: 18px; font-weight: 900; font-size: 1.25rem; }
.nj-field {
  position: relative; flex: 1; min-height: 0; overflow: hidden; margin: 0 16px max(16px, env(safe-area-inset-bottom)); border-radius: 26px;
  background: linear-gradient(180deg, #2c2a6b 0%, #4b3f9e 60%, #6a55c2 100%); touch-action: none; user-select: none; -webkit-user-select: none;
}
.nj-trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.nj-fruit {
  position: absolute; left: 0; top: 0; border-radius: 50%; pointer-events: none; z-index: 2; will-change: transform;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px; box-sizing: border-box;
  font-weight: 900; font-size: clamp(1.25rem, 2.7vw, 1.6rem); color: #2b2350; line-height: 1.1;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.12), 0 6px 14px rgba(0,0,0,.25);
}
.nj-fruit.c0 { background: radial-gradient(circle at 35% 30%, #fff3b0, #ffd23f); }
.nj-fruit.c1 { background: radial-gradient(circle at 35% 30%, #ffd1dc, #ff7aa2); }
.nj-fruit.c2 { background: radial-gradient(circle at 35% 30%, #d4ffd0, #6fdc7a); }
.nj-fruit.c3 { background: radial-gradient(circle at 35% 30%, #d3f0ff, #5ec2ff); }
.nj-fruit.c4 { background: radial-gradient(circle at 35% 30%, #ffe2c4, #ff9f4a); }
.nj-fruit.nj-pop { transition: opacity .3s ease, filter .3s ease; opacity: 0; filter: blur(2px) brightness(1.4); }
.nj-plus { position: absolute; transform: translate(-50%, -50%); z-index: 4; pointer-events: none; color: #fff; font-weight: 900; font-size: 1.6rem; text-shadow: 0 2px 6px rgba(0,0,0,.4); animation: nj-up .8s ease forwards; }
@keyframes nj-up { from { opacity: 1; margin-top: 0; } to { opacity: 0; margin-top: -50px; } }
