:root {
  --ink: #1d2533;
  --muted: #687386;
  --surface: #ffffff;
  --page: #f7f8fb;
  --line: #e6e9f0;
  --blue: #3269db;
  --blue-soft: #eaf0ff;
  --orange: #f28b45;
  --orange-soft: #fff0e5;
  --green: #24a871;
  --danger: #d9534f;
  --radius: 22px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { max-width: 620px; min-height: 100dvh; margin: 0 auto; padding: 20px 18px calc(28px + env(safe-area-inset-bottom)); }
.loading { color: var(--muted); text-align: center; padding-top: 32vh; }
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.brand { font-size: 25px; font-weight: 850; letter-spacing: -1px; }
.brand span { color: var(--blue); }
.stats { display: flex; gap: 7px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; font-size: 13px; font-weight: 750; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
h1 { font-size: clamp(29px, 8vw, 39px); line-height: 1.03; letter-spacing: -1.6px; margin: 0; }
h2 { font-size: 21px; letter-spacing: -.6px; margin: 0; }
.lead { color: var(--muted); line-height: 1.45; margin: 12px 0 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; box-shadow: 0 5px 22px rgba(28, 42, 69, .045); }
.daily { border-color: #d9e4ff; background: var(--blue-soft); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row + .row { margin-top: 15px; }
.label { color: var(--muted); font-size: 14px; }
.strong { font-weight: 800; }
.progress { height: 9px; background: #d7e2fa; border-radius: 999px; overflow: hidden; margin: 15px 0 17px; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.primary, .secondary, .answer { border: 0; min-height: 50px; border-radius: 15px; padding: 12px 16px; font-weight: 800; transition: transform .15s ease, background .15s ease; }
.primary { width: 100%; background: var(--blue); color: white; box-shadow: 0 5px 0 #1e53ba; }
.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #1e53ba; }
.secondary { background: var(--orange-soft); color: #a64f17; }
.section { display: flex; align-items: center; justify-content: space-between; margin: 29px 2px 13px; }
.path { display: grid; gap: 11px; }
.lesson { text-align: left; width: 100%; display: grid; grid-template-columns: 45px 1fr auto; gap: 13px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 13px; }
.lesson:hover { border-color: #b9cafd; }
.lesson-num { width: 39px; height: 39px; border-radius: 14px; display: grid; place-items: center; background: var(--orange-soft); color: #a64f17; font-weight: 850; }
.lesson.done .lesson-num { background: #e4f7ef; color: var(--green); }
.lesson-title { font-weight: 800; margin-bottom: 4px; }
.lesson-goal { font-size: 13px; color: var(--muted); line-height: 1.25; }
.lesson-xp { color: var(--orange); font-size: 13px; font-weight: 800; }
.tabs { position: sticky; bottom: 10px; display: flex; gap: 6px; margin: 28px auto 0; padding: 7px; max-width: 360px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 30px rgba(28, 42, 69, .12); backdrop-filter: blur(12px); }
.tab { flex: 1; padding: 10px 7px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; }
.tab.active { color: var(--blue); background: var(--blue-soft); }
.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.level { padding: 15px 5px; border: 1px solid var(--line); background: var(--surface); border-radius: 15px; color: var(--ink); font-weight: 800; }
.level.selected { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.exercise { min-height: calc(100dvh - 48px); display: flex; flex-direction: column; }
.exercise-top { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.close { border: 0; background: var(--surface); color: var(--muted); border-radius: 12px; width: 42px; height: 42px; font-size: 24px; }
.step-line { flex: 1; height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.step-line i { height: 100%; display: block; background: var(--green); }
.step { color: var(--muted); font-size: 13px; white-space: nowrap; font-weight: 700; }
.task-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px; }
.task-label { color: var(--orange); font-size: 13px; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.prompt { font-size: 25px; letter-spacing: -.7px; line-height: 1.2; margin: 13px 0 8px; }
.hint { color: var(--muted); margin: 0; line-height: 1.4; }
.answers { display: grid; gap: 10px; margin-top: 20px; }
.answer { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; box-shadow: 0 3px 0 #dde2ec; }
.answer:active { transform: translateY(2px); box-shadow: 0 1px 0 #dde2ec; }
.answer.wrong { background: #fff0ef; border-color: #f2b3b0; color: var(--danger); }
.text-answer { width: 100%; min-height: 56px; border: 1.5px solid var(--line); border-radius: 15px; padding: 13px; outline: none; }
.text-answer:focus { border-color: var(--blue); }
.feedback { min-height: 55px; margin-top: auto; margin-bottom: 15px; padding: 15px; border-radius: 16px; font-weight: 700; line-height: 1.35; }
.feedback.good { background: #e8f8f0; color: #177953; }
.feedback.bad { background: #fff0ef; color: #a53f3b; }
.hidden { display: none; }
.profile-card { margin-top: 23px; }
.error { max-width: 420px; margin: 20vh auto; text-align: center; }
@media (max-width: 360px) { .shell { padding-inline: 13px; } .stat { padding: 6px 8px; } .prompt { font-size: 23px; } }
