/* Giao diện cho bé lớp 4: chữ to, nút to, màu rõ, ít chữ.
   Ngón tay bé nhỏ nhưng bấm không chính xác — mọi nút tối thiểu 56px. */

:root {
  --xanh: #2563eb;
  --xanh-dam: #1d4ed8;
  --la: #16a34a;
  --do: #dc2626;
  --vang: #f59e0b;
  --nen: #f0f9ff;
  --the: #ffffff;
  --chu: #0f172a;
  --chu-nhat: #64748b;
  --vien: #cbd5e1;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0 16px 40px;
  background: var(--nen);
  color: var(--chu);
  font: 18px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  /* Bé hay bấm hai lần liên tiếp — tắt phóng to bằng chạm đúp */
  touch-action: manipulation;
  user-select: none;
}

.trang {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.tieu-de-to {
  font-size: 30px;
  margin: 4px 0;
}
.tieu-de {
  font-size: 22px;
  margin: 8px 0 0;
}
.ghi-chu {
  color: var(--chu-nhat);
  margin: 0;
  max-width: 560px;
}
.ghi-chu.nho {
  font-size: 15px;
}
.nhan-tien-do {
  color: var(--chu-nhat);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ── Hình minh hoạ: điều quan trọng nhất là TO và RÕ ── */
.hinh-to {
  font-size: 130px;
  line-height: 1.1;
}
.hinh-vua {
  font-size: 84px;
}

/* ── Nút ── */
.nut {
  min-height: 56px;
  padding: 14px 28px;
  border: none;
  border-radius: 16px;
  font: 600 19px/1.2 inherit;
  cursor: pointer;
  background: #e2e8f0;
  color: var(--chu);
}
.nut.chinh {
  background: var(--xanh);
  color: #fff;
  box-shadow: 0 4px 0 var(--xanh-dam);
}
.nut.chinh:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--xanh-dam);
}
.nut.chinh.to {
  font-size: 22px;
  padding: 18px 40px;
  min-width: 260px;
}
.nut.phu {
  background: #fff;
  border: 2px solid var(--vien);
}
.nut.nho {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 16px;
  background: transparent;
  color: var(--chu-nhat);
}
.nut:disabled {
  opacity: 0.55;
}

.nut-loa {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: none;
  background: var(--xanh);
  color: #fff;
  font-size: 52px;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--xanh-dam);
}
.nut-loa:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--xanh-dam);
}
.nut-loa.nho {
  width: auto;
  height: 52px;
  border-radius: 14px;
  font-size: 18px;
  padding: 0 22px;
}

/* ── Chọn hồ sơ bé ── */
.hang-the {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.the-be {
  background: var(--the);
  border: 3px solid var(--vien);
  border-radius: 22px;
  padding: 22px 30px;
  min-width: 180px;
  cursor: pointer;
  font: inherit;
}
.the-be:active {
  border-color: var(--xanh);
}
.be-mat {
  font-size: 64px;
}
.be-ten {
  font-size: 22px;
  font-weight: 700;
}
.be-phu {
  color: var(--chu-nhat);
  font-size: 15px;
}

.dau-trang {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.o-nhap {
  width: min(360px, 100%);
  min-height: 56px;
  padding: 12px 18px;
  font: 20px inherit;
  border: 3px solid var(--vien);
  border-radius: 16px;
}
.o-nhap:focus {
  outline: none;
  border-color: var(--xanh);
}

.hang-chon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.nut-chon {
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 3px solid var(--vien);
  background: #fff;
  font: 600 17px inherit;
  cursor: pointer;
}
.nut-chon.dang-chon {
  border-color: var(--xanh);
  background: #dbeafe;
}

/* ── Số liệu ── */
.hang-so {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.o-so {
  background: var(--the);
  border-radius: 16px;
  padding: 12px 20px;
  min-width: 104px;
}
.o-so b {
  display: block;
  font-size: 28px;
  color: var(--xanh);
}
.o-so span {
  font-size: 14px;
  color: var(--chu-nhat);
}

/* ── Lưới trò chơi ── */
.luoi-tro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  width: 100%;
}
.the-tro {
  background: var(--the);
  border: 3px solid var(--vien);
  border-radius: 20px;
  padding: 18px 12px;
  cursor: pointer;
  font: inherit;
}
.the-tro:active {
  border-color: var(--xanh);
  background: #eff6ff;
}
.tro-hinh {
  font-size: 46px;
}
.tro-ten {
  font-weight: 700;
  font-size: 17px;
  margin-top: 4px;
}
.tro-mo {
  font-size: 14px;
  color: var(--chu-nhat);
}

/* ── Trò nghe → chọn hình ── */
.luoi-hinh {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 560px;
}
.the-hinh {
  background: var(--the);
  border: 4px solid var(--vien);
  border-radius: 22px;
  padding: 18px 8px;
  cursor: pointer;
  font: inherit;
}
.the-hinh .hinh {
  display: block;
  font-size: 88px;
  line-height: 1.1;
}
.the-hinh .chu-nho {
  display: block;
  min-height: 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--chu-nhat);
}
.the-hinh.dung {
  border-color: var(--la);
  background: #dcfce7;
}
.the-hinh.sai {
  border-color: var(--do);
  background: #fee2e2;
}

/* ── Lật thẻ ── */
.luoi-bai {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 560px;
}
.quan-bai {
  aspect-ratio: 1;
  border: 4px solid var(--vien);
  border-radius: 18px;
  background: var(--xanh);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  cursor: pointer;
}
.quan-bai.mo {
  background: var(--the);
  color: var(--chu);
}
.quan-bai.dung {
  border-color: var(--la);
  background: #dcfce7;
}
.quan-bai .hinh {
  font-size: 40px;
}
.quan-bai .chu-bai {
  font-size: 17px;
}

/* ── Ghép chữ cái ── */
.o-xep {
  min-height: 62px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 8px;
  border-radius: 14px;
}
.o-xep.dung {
  background: #dcfce7;
}
.o-xep.sai {
  background: #fee2e2;
}
.o-chu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 56px;
  background: var(--the);
  border: 3px solid var(--xanh);
  border-radius: 12px;
  font-size: 26px;
  font-weight: 700;
}
.kho-chu {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.nut-chu {
  width: 56px;
  height: 56px;
  border: 3px solid var(--vien);
  border-radius: 12px;
  background: var(--the);
  font: 700 24px inherit;
  cursor: pointer;
}

/* ── Ghép câu ── */
.o-cau {
  min-height: 70px;
  width: 100%;
  max-width: 600px;
  padding: 14px;
  border-radius: 14px;
  background: var(--the);
  border: 3px dashed var(--vien);
  font-size: 22px;
}
.o-cau.dung {
  background: #dcfce7;
  border-color: var(--la);
}
.o-cau.sai {
  background: #fee2e2;
  border-color: var(--do);
}
.kho-tu {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.nut-tu {
  min-height: 52px;
  padding: 10px 16px;
  border: 3px solid var(--vien);
  border-radius: 12px;
  background: var(--the);
  font: 600 19px inherit;
  cursor: pointer;
}

/* ── Nhập vai ── */
.bong-may {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--the);
  border-radius: 20px;
  padding: 18px;
  font-size: 21px;
  text-align: left;
  max-width: 620px;
}
.mat-may {
  font-size: 42px;
}
.goi-y {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(560px, 100%);
}
.nut-goi-y {
  min-height: 48px;
  padding: 10px 16px;
  border: 2px dashed var(--vien);
  border-radius: 12px;
  background: #fff;
  font: 17px inherit;
  color: var(--chu-nhat);
  cursor: pointer;
}

/* ── Kết quả nói ── */
.ket-qua {
  min-height: 40px;
}
.dung-chu {
  color: var(--la);
  font-weight: 700;
  font-size: 22px;
  margin: 4px 0;
}
.sai-chu {
  color: var(--vang);
  font-weight: 700;
  font-size: 22px;
  margin: 4px 0;
}
.loi {
  color: var(--do);
  margin: 4px 0;
}

.the-bao-cao {
  background: var(--the);
  border-radius: 20px;
  padding: 18px;
  width: 100%;
  text-align: left;
}
.the-bao-cao .hang-so {
  justify-content: flex-start;
  margin: 10px 0;
}

.canh-bao {
  background: #fef3c7;
  color: #78350f;
  padding: 12px 16px;
  border-radius: 0 0 14px 14px;
  font-size: 15px;
  max-width: 760px;
  margin: 0 auto;
}

@media (max-width: 420px) {
  .hinh-to {
    font-size: 96px;
  }
  .luoi-bai {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Học âm (phonics) ── */
.am-to {
  font-size: 76px;
  font-weight: 700;
  color: var(--xanh);
  letter-spacing: 2px;
}
.meo-doc {
  background: #fef3c7;
  color: #78350f;
  padding: 12px 16px;
  border-radius: 14px;
  max-width: 560px;
  margin: 0;
  font-size: 16px;
}
.nut-tu.to {
  font-size: 24px;
  padding: 16px 26px;
}
.nut-tu.dung {
  border-color: var(--la);
  background: #dcfce7;
}
.nut-tu.sai {
  border-color: var(--do);
  background: #fee2e2;
}

/* ── Đọc truyện ── */
.khung-truyen {
  background: var(--the);
  border-radius: 18px;
  padding: 20px 18px;
  max-width: 620px;
  font-size: 24px;
  line-height: 1.9;
  text-align: left;
}
.tu-truyen {
  border: none;
  background: none;
  font: inherit;
  padding: 2px 3px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--chu);
}
.tu-truyen.co-nghia {
  border-bottom: 3px dotted var(--vien);
}
.tu-truyen.hien-nghia {
  background: #dbeafe;
  position: relative;
}
.tu-truyen.hien-nghia::after {
  content: attr(data-nghia);
  display: block;
  font-size: 13px;
  color: var(--xanh);
  font-weight: 600;
}
.cau-hoi-truyen {
  font-size: 24px;
  font-weight: 600;
  max-width: 600px;
  margin: 0;
}
.nut-goi-y.to {
  font-size: 20px;
  min-height: 60px;
  color: var(--chu);
  border-style: solid;
}
.nut-goi-y.dung {
  border-color: var(--la);
  background: #dcfce7;
}
.nut-goi-y.sai {
  border-color: var(--do);
  background: #fee2e2;
}
