:root {
  --bg: #fffaf0;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --spark: #f59e0b;
  --spark-dark: #b45309;
  --ok: #16a34a;
  --bad: #dc2626;
  --line: #e5e7eb;
  --radius: 18px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; }
button { font: inherit; color: inherit; cursor: pointer; }
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; max-width: 720px; margin: 0 auto;
}
.logo { background: none; border: 0; font-weight: 800; font-size: 1.3rem; color: var(--spark-dark); padding: 4px 0; }
.who { color: var(--muted); font-size: .95rem; }
main { max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }
h1 { font-size: 1.6rem; margin: 12px 0 8px; }
h2 { font-size: 1.25rem; margin: 20px 0 8px; }
p { line-height: 1.5; }
.muted { color: var(--muted); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin: 12px 0;
}
.subjects { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.subject {
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 20px 12px; text-align: center; font-size: 1.15rem; font-weight: 700;
}
.subject .icon { font-size: 2.6rem; display: block; margin-bottom: 6px; }
.subject small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; font-size: .85rem; }
.primary, .secondary {
  border-radius: 999px; padding: 14px 24px; font-weight: 700; font-size: 1.1rem; border: 0;
}
.primary { background: var(--spark); color: #fff; }
.primary:disabled { opacity: .5; }
.secondary { background: transparent; border: 2px solid var(--line); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input[type=text] {
  font: inherit; font-size: 1.1rem; padding: 12px 14px; border-radius: 12px;
  border: 2px solid var(--line); width: 100%; max-width: 320px;
}
.profile-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 16px; }

/* Task */
.progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0 16px; }
.progress > div { height: 100%; background: var(--spark); transition: width .3s; }
.prompt { font-size: 1.3rem; font-weight: 700; text-align: center; margin: 8px 0 4px; }
.stage { text-align: center; margin: 12px 0 20px; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.picture { font-size: 5.5rem; line-height: 1; }
.word { font-size: 3rem; font-weight: 800; letter-spacing: .04em; }
.expression { font-size: 3rem; font-weight: 800; }
.objects { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.group { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; font-size: 2rem; padding: 8px; border: 2px dashed var(--line); border-radius: 14px; }
.speak { background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 1.1rem; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice {
  background: var(--card); border: 3px solid var(--line); border-radius: var(--radius);
  min-height: 96px; font-size: 2.4rem; font-weight: 800;
}
.choice.picture-choice { font-size: 3.4rem; }
.choice.correct { border-color: var(--ok); background: #f0fdf4; }
.choice.wrong { border-color: var(--bad); background: #fef2f2; }
.feedback { text-align: center; font-size: 1.3rem; font-weight: 700; min-height: 2em; margin: 14px 0; }
.feedback.ok { color: var(--ok); }
.feedback.bad { color: var(--bad); }
.next { display: flex; justify-content: center; }

/* Number line */
.numberline { position: relative; height: 90px; margin: 10px 8px 0; touch-action: manipulation; user-select: none; cursor: pointer; }
.numberline .bar { position: absolute; left: 0; right: 0; top: 40px; height: 6px; background: var(--ink); border-radius: 3px; }
.numberline .tick { position: absolute; top: 32px; width: 2px; height: 22px; background: var(--ink); transform: translateX(-1px); }
.numberline .tick.minor { top: 36px; height: 14px; background: var(--muted); }
.numberline .label { position: absolute; top: 60px; transform: translateX(-50%); font-weight: 700; font-size: 1.1rem; }
.numberline .marker { position: absolute; top: 4px; transform: translateX(-50%); font-size: 1.8rem; }
.numberline .marker.target { color: var(--ok); }

/* Parent view */
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.stars { font-size: 2.4rem; text-align: center; letter-spacing: .1em; }
