/* ---------- Level maps (all games) ---------- */
.lv { width: 100%; max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.lv-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.lv-head > :last-child { justify-self: end; }
.lv-title { margin: 0; font-family: "Fredoka"; font-size: clamp(24px, 3.4vw, 38px); line-height: 1; text-align: center; }
.lv-back { justify-self: start; background: #fff; color: var(--ink); font-family: "Fredoka"; font-weight: 600; font-size: 16px; padding: 7px 14px; border-radius: 999px; box-shadow: 0 4px 0 rgba(0,0,0,.15); }
.lv-total { font-family: "Fredoka"; font-weight: 700; font-size: 18px; color: #ffb800; background: #fff; padding: 5px 12px; border-radius: 999px; box-shadow: 0 4px 0 rgba(0,0,0,.12); white-space: nowrap; }
.lv-path { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.lv-node { position: relative; width: clamp(118px, 15vw, 150px); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px 10px; border-radius: 24px; background: #fff; color: var(--ink); box-shadow: 0 6px 0 rgba(0,0,0,.14), 0 10px 22px rgba(40,20,90,.12); transition: transform .15s; }
.lv-node:nth-child(even) { transform: translateY(18px); }
.lv-node:not(.locked):hover { transform: translateY(-4px); }
.lv-node:nth-child(even):not(.locked):hover { transform: translateY(14px); }
.lv-node:not(.locked):active { transform: translateY(3px); }
.lv-num { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-family: "Fredoka"; font-weight: 700; font-size: 28px; color: #fff; background: linear-gradient(160deg, #ff8a3d, #ff3d5a); box-shadow: inset 0 -5px 0 rgba(0,0,0,.18); }
.lv-node.full .lv-num { background: linear-gradient(160deg, #ffd23f, #ffa600); }
.lv-node.next .lv-num { animation: lvpulse 1.3s ease-in-out infinite; }
.lv-node.next { box-shadow: 0 0 0 4px #ffd23f, 0 6px 0 rgba(0,0,0,.14), 0 10px 22px rgba(40,20,90,.12); }
.lv-node.locked { background: rgba(255,255,255,.55); color: rgba(30,20,60,.55); box-shadow: none; cursor: not-allowed; }
.lv-node.locked .lv-num { background: #cfc8e0; font-size: 22px; box-shadow: none; }
.lv-name { font-family: "Fredoka"; font-weight: 600; font-size: 16px; line-height: 1.1; text-align: center; }
.lv-goal { font-size: 12px; font-weight: 800; color: var(--muted); text-align: center; line-height: 1.2; }
.lv-stars { display: inline-flex; gap: 2px; font-size: 20px; line-height: 1; }
.lv-stars i { font-style: normal; color: #ddd6ea; }
.lv-stars i.on { color: #ffc21a; text-shadow: 0 2px 0 #e08a00; }
.lv-stars.big { font-size: clamp(34px, 6vw, 56px); gap: 6px; }
.lv-stars.big i.on { animation: lvstar .5s cubic-bezier(.3,1.6,.5,1) both; animation-delay: var(--d); }
.lv-endless { align-self: center; background: #fff; color: var(--ink); font-family: "Fredoka"; font-weight: 600; font-size: 18px; padding: 9px 22px; border-radius: 999px; box-shadow: 0 5px 0 rgba(0,0,0,.15); margin-top: 14px; }
@keyframes lvpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes lvstar { from { transform: scale(0) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* inside the canvas games: light text on the purple overlay */
.dash-screen[data-screen="levels"] { justify-content: center; padding: 14px 18px 26px; }
.dash-screen .lv-title { color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.25); }
.dash-screen .lv-node { width: clamp(96px, 15%, 150px); }
.dash-level-tag { display: inline-block; background: rgba(255,255,255,.95); color: var(--ink); font-family: "Fredoka"; font-weight: 700; font-size: 15px; padding: 3px 12px; border-radius: 999px; }
.dash-hud .hud-lv { font-size: 15px; color: var(--muted); margin-right: 2px; }
.dash-progress { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); width: min(46%, 380px); height: 14px; border-radius: 999px; background: rgba(255,255,255,.55); box-shadow: inset 0 2px 3px rgba(0,0,0,.15); overflow: visible; pointer-events: none; }
.dash-progress[hidden] { display: none; }
.dash-progress i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #ffd23f, #ff7a2f); width: 0; }
.dash-progress b { position: absolute; right: -10px; top: 50%; transform: translateY(-50%); font-size: 20px; }

/* learning games: level map inside the game card */
.m-game .lv { padding: 6px 0 22px; }
.m-game .lv-title { color: var(--ink); }
.game .lv-tag { display: inline-block; margin-left: 6px; font-size: 14px; font-weight: 800; color: #fff; background: #8e5cf7; padding: 2px 10px; border-radius: 999px; vertical-align: middle; }
.win .lv-stars.big { margin: 4px 0 2px; }
.win-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.win-btns .btn.alt { background: #fff; color: var(--ink); }

@media (max-width: 680px) {
  .dash-screen[data-screen="levels"] { padding: 6px 8px 14px; gap: 4px; }
  .dash-screen .lv { gap: 6px; }
  .dash-screen .lv-title { font-size: 18px; }
  .dash-screen .lv-back, .dash-screen .lv-total { font-size: 12px; padding: 3px 9px; box-shadow: 0 2px 0 rgba(0,0,0,.15); }
  .dash-screen .lv-path { gap: 5px; flex-wrap: nowrap; }
  .dash-screen .lv-node { width: 19%; padding: 5px 2px 4px; border-radius: 14px; gap: 1px; }
  .dash-screen .lv-node:nth-child(even) { transform: translateY(8px); }
  .dash-screen .lv-num { width: 30px; height: 30px; font-size: 16px; }
  .dash-screen .lv-node.locked .lv-num { font-size: 13px; }
  .dash-screen .lv-stars { font-size: 11px; }
  .dash-screen .lv-name { font-size: 10px; }
  .dash-screen .lv-goal, .dash-screen .lv-endless { display: none; }
  .dash-level-tag { font-size: 11px; padding: 2px 8px; }
  .dash-progress { top: 34px; height: 8px; } .dash-progress b { font-size: 12px; right: -6px; }
  .lv-node { width: 42%; } .lv-node:nth-child(even) { transform: translateY(10px); }
}
.m-game .lv-node:not(.locked) { background: #f7f3ff; }
.m-game .lv-node.locked { background: #f1eef6; }
@media (max-width: 680px) {
  .dash-screen .lv-head { padding-right: 40px; }
  .dash-screen[data-screen="over"] .lv-stars.big { font-size: 22px; }
  .dash-screen[data-screen="over"] .dash-level-tag { display: none; }
}
