:root {
  --bg-top: #fff4e0;
  --bg-bottom: #ffe8f0;
  --ink: #2b2338;
  --card: #ffffff;
  --card-edge: #ffe0b0;
  --accent: #ff9f43;
  --pink: #ff6b9d;
  --pink-edge: #d94d7d;
  --purple: #6c4ad6;
  --purple-edge: #4d33a0;
  --answer-edge: #c9bdf0;
  --ok: #2e9e5b;
  --ok-edge: #237945;
  --muted: #8a7fa8;
  --star: #f5a623;
  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Noto Sans Hebrew', system-ui, sans-serif;
  background: linear-gradient(170deg, var(--bg-top), var(--bg-bottom));
  color: var(--ink);
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}

.screen { max-width: 520px; margin: 0 auto; padding: 16px; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

.pill {
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
}

.icon-btn {
  background: none; border: 0; font-size: 22px; padding: 4px 8px;
  cursor: pointer; color: var(--ink); line-height: 1;
}

.card {
  background: var(--card); border: 2px solid var(--card-edge);
  border-radius: 18px; padding: 16px; margin-bottom: 14px;
}

.sentence { font-size: 19px; line-height: 1.85; margin: 0; }

.en-word {
  display: inline-block; background: var(--pink); color: #fff;
  padding: 2px 10px; border-radius: 10px; font-weight: 700;
  box-shadow: 0 3px 0 var(--pink-edge);
}
.en-word.is-solved { background: var(--ok); box-shadow: 0 3px 0 var(--ok-edge); }

.prompt-word {
  text-align: center; font-size: 34px; font-weight: 700;
  color: var(--purple); margin: 4px 0 0;
}

.translit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 18px; color: var(--muted); font-weight: 700; margin-bottom: 16px;
}

.streak { text-align: center; font-size: 21px; font-weight: 700; color: #e07a1f; margin: 0 0 10px; }

.answers { display: flex; flex-direction: column; gap: 10px; }

.answer {
  background: #fff; border: 3px solid var(--answer-edge); border-bottom-width: 6px;
  border-radius: var(--radius); padding: 14px; font: inherit; font-size: 20px;
  font-weight: 700; color: var(--ink); cursor: pointer; width: 100%;
  transition: transform .08s, opacity .25s, background .2s, border-color .2s;
}
.answer:active { transform: translateY(3px); border-bottom-width: 3px; }
.answer.is-wrong { opacity: .32; pointer-events: none; }
.answer.is-correct { background: var(--ok); border-color: var(--ok); color: #fff; }

.cta {
  display: block; width: 100%; background: var(--purple); color: #fff;
  border: 0; border-bottom: 5px solid var(--purple-edge); border-radius: var(--radius);
  padding: 15px; font: inherit; font-size: 19px; font-weight: 700;
  cursor: pointer; margin-top: 14px;
}
.cta:active { transform: translateY(3px); border-bottom-width: 2px; }
.cta.is-secondary { background: #fff; color: var(--ink); border-bottom-color: var(--answer-edge); }

.map { position: relative; height: 420px; margin-top: 8px; }
.node {
  position: absolute; width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 700; border: 3px solid; border-bottom-width: 6px;
  background: #ece8f5; border-color: var(--answer-edge); color: #a79ec4;
  font-family: inherit; cursor: pointer;
}
.node.is-done { background: #ffd76e; border-color: #e0a52e; color: #5b3d00; }
.node.is-now { background: var(--pink); border-color: var(--pink-edge); color: #fff;
  box-shadow: 0 0 0 6px rgba(255,107,157,.22); }
.node.is-locked { pointer-events: none; opacity: .7; }
.node-stars {
  position: absolute; font-size: 11px; color: var(--star); width: 58px;
  text-align: center; letter-spacing: -1px;
}

.stars { text-align: center; font-size: 40px; letter-spacing: 4px; color: var(--star); margin: 8px 0; }

.settings-row {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border: 2px solid var(--card-edge); border-radius: 14px;
  padding: 13px 15px; margin-bottom: 10px; font-size: 16px; font-weight: 700;
}
.settings-row.is-danger { border-color: #f5b5b5; color: #a33; }
.settings-row.is-muted { opacity: .6; font-weight: 400; font-size: 14px; }

.word-row {
  display: flex; justify-content: space-between; padding: 5px 0; font-size: 15px;
}

.confetti {
  position: fixed; width: 10px; height: 15px; border-radius: 2px; top: -20px;
  pointer-events: none; animation: fall 1.8s linear forwards; z-index: 50;
}
@keyframes fall { to { transform: translateY(105vh) rotate(600deg); opacity: .2; } }

@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
  .answer, .cta { transition: none; }
}
