
:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --primary:#2563eb;
  --green:#22c55e;
  --yellow:#f59e0b;
  --red:#ef4444;
  --blue:#3b82f6;
  --shadow:0 8px 30px rgba(17,24,39,.06);
  --radius:24px;
  --ring:0 0 0 3px rgba(37,99,235,.15);
  --font-head:'Kanit', system-ui, -apple-system, Segoe UI, Roboto, 'Noto Sans Thai', sans-serif;
  --font-body:'Kanit', system-ui, -apple-system, Segoe UI, Roboto, 'Noto Sans Thai', sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:linear-gradient(180deg,#f8fafc, #f2f6ff);
  color:var(--text);
  font-family:var(--font-body);
  -webkit-font-smoothing:antialiased;
  line-height:1.45;
}
.container{
  max-width: 1024px;
  margin: 28px auto 80px;
  padding: 0 16px;
}
.header{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:16px;
}
.h1{
  font-size: 32px;
  font-weight: 800;
  letter-spacing:.2px;
}
.avatar{
  width:56px;height:56px;border-radius:50%;
  background: radial-gradient(circle at 30% 30%, #ffd6a1, #f7b16a);
  border:4px solid #fff;
  box-shadow:var(--shadow);
  position:relative;
}
.avatar:before, .avatar:after{
  content:'';position:absolute;border-radius:50%;background:#fff;
  top:16px;width:10px;height:10px;border:2px solid #222;
}
.avatar:before{left:14px}
.avatar:after{right:14px}
.kid-meta{display:flex; flex-direction:column; gap:2px}
.kid-name{font-size:20px;font-weight:800}
.kid-grade{font-size:14px;color:var(--muted)}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:16px;
}
.card{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card-title{
  font-size:18px;font-weight:800;margin:0 0 12px;
}
.card-subtle{color:var(--muted);font-size:13px;margin-top:6px}
.legend{display:flex; flex-direction:column; gap:8px; font-size:14px}
.legend .row{display:flex; align-items:center; gap:8px;}
.dot{width:10px;height:10px;border-radius:50%}
.badges{display:flex; gap:12px; flex-wrap:wrap}
.badge{
  display:flex;align-items:center;gap:8px;
  background:#fff7ed; color:#b45309;
  padding:10px 12px; border-radius:14px; font-weight:700; font-size:14px;
  border:1px solid #fde68a;
}
.badge .emoji{font-size:18px}
.pill{
  padding:6px 12px; border-radius:999px; background:#e0ecff; color:#1d4ed8; font-weight:800; font-size:14px;
}
.row-flex{display:flex;align-items:center;justify-content:space-between;gap:12px}
.item{display:flex;gap:12px;align-items:center}
.item .icon{
  width:40px;height:40px;border-radius:12px;background:linear-gradient(180deg,#e9f0ff,#d7e3ff);display:flex;align-items:center;justify-content:center;font-size:20px;
  border: 1px solid #e5edff;
}
.stars{display:flex; gap:4px}
.star{font-size:18px;color:#f59e0b}
.sep{height:1px;background:#eef2ff;margin:12px 0}
.footer-note{color:var(--muted); font-size:12px; margin-top:12px}

/* Summary page */
.center{ text-align:center }
.big-score{ font-size:76px; font-weight:900; letter-spacing:.5px; margin: 12px 0 2px; }
.progress{
  width:100%; height:14px; background:#f1f5f9; border-radius:999px; overflow:hidden; box-shadow: inset 0 0 0 1px #e5e7eb;
}
.progress .green{height:100%; background:var(--green)}
.progress .red{height:100%; background:var(--red)}
.stars-lg{display:flex; gap:8px; justify-content:center; margin:14px 0}
.star-lg{font-size:28px;color:#f59e0b; filter:drop-shadow(0 3px 0 rgba(0,0,0,.06))}
.feedback{font-size:20px; font-weight:800; margin: 8px 0 18px}
.cta-grid{display:grid; grid-template-columns: repeat(3, 1fr); gap:12px; margin-top:8px}
.cta{
  background:var(--card); border-radius:18px; box-shadow: var(--shadow); padding:18px; text-align:center;
  border:1px solid #eef2ff;
}
.cta .ico{font-size:28px; display:block; margin-bottom:6px}
.cta .lbl{font-size:16px; font-weight:800}

/* Responsive */
@media (max-width: 880px){
  .grid{grid-template-columns: 1fr; }
}
