/* Tadaima Kids — giao diện Hành trình Cấp 1 (kids.js). Phần Khu phố giữ CSS cũ trong index.html. */
:root {
  --nen: #fff7ec; --nen2: #ffeedd; --chu: #3b2a1a; --mo: #8a7560; --vien: #f1dfc8;
  --cam: #ff8a2e; --cam-dam: #e06b00; --xanh: #2fa8f5; --xanh-dam: #1784cc; --la: #58c322; --la-dam: #3f9a12;
  --do: #ff5a6e; --vang: #ffc31f; --tim: #9b6bdf;
  --bong: 0 10px 30px rgba(120, 70, 20, .14); --bong-nho: 0 4px 12px rgba(120, 70, 20, .12);
}
body:not(.o-pho) { overflow: auto; }
body:not(.o-pho) #stage, body:not(.o-pho) #the, body:not(.o-pho) #do { visibility: hidden; }
.jp { font-family: 'M PLUS Rounded 1c', sans-serif; }

/* ---------- nút ---------- */
.nut { border: 0; border-radius: 18px; padding: 11px 18px; font: 800 16px 'Nunito', sans-serif; background: #fff; color: var(--chu);
  box-shadow: 0 4px 0 #e6d6c2, var(--bong-nho); transition: transform .08s; }
.nut:active { transform: translateY(3px); box-shadow: 0 1px 0 #e6d6c2; }
.nut:disabled { opacity: .45; pointer-events: none; }
.nut.cam { background: linear-gradient(#ffa24a, var(--cam)); color: #fff; box-shadow: 0 4px 0 var(--cam-dam), var(--bong-nho); }
.nut.cam:active { box-shadow: 0 1px 0 var(--cam-dam); }
.nut.do { background: #fff0f1; color: #d33a4c; box-shadow: 0 4px 0 #f6c9cf; }
.nut.to { font-size: 19px; padding: 14px 26px; border-radius: 22px; }
.nut.tron { width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 50%; font-size: 20px; flex: none; }
.hang-nut { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hang-nut.trai { justify-content: flex-start; }
.thanh { display: block; height: 10px; border-radius: 99px; background: rgba(0,0,0,.08); overflow: hidden; }
.thanh i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ffd34d, #ff9f2e); transition: width .8s cubic-bezier(.3,1.4,.5,1); }
.o-nhap { display: block; width: 100%; max-width: 340px; margin: 12px auto 0; border: 3px solid var(--vien); border-radius: 18px; padding: 13px 16px;
  font: 800 20px 'Nunito', sans-serif; text-align: center; color: var(--chu); background: #fff; outline: none; }
.o-nhap:focus { border-color: var(--cam); }
.lac { animation: lac .45s ease; }
.goi-y { color: var(--mo); font-weight: 700; font-size: 14px; }
.tieu-de { font: 800 26px 'Nunito', sans-serif; margin: 6px 0 14px; text-align: center; }
.mo { color: var(--mo); }

/* ---------- màn ---------- */
.mh { position: fixed; inset: 0; overflow: auto; -webkit-overflow-scrolling: touch; z-index: 3;
  background: radial-gradient(circle at 15% 10%, #fffaf3 0, transparent 40%), radial-gradient(circle at 90% 80%, #ffe9d2 0, transparent 45%), var(--nen);
  padding: calc(76px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
#mh-tao, #mh-bai { padding-top: calc(16px + env(safe-area-inset-top)); }
#mh-tao { background: linear-gradient(#9fdcff, #dff4ff 58%, #a7e07a 58%, #8fd16a); display: flex; align-items: center; justify-content: center; }

/* ---------- HUD ---------- */
#hud { position: fixed; top: 0; left: 0; right: 0; z-index: 6; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  background: rgba(255, 247, 236, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--vien); }
.hud-be { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; color: inherit; }
#hud-nv { width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: var(--bong-nho); overflow: hidden; flex: none; border: 3px solid #fff; }
#hud-nv svg { width: 100%; height: 160%; margin-top: 2px; }
.hud-chu { display: flex; flex-direction: column; min-width: 0; flex: 1; max-width: 260px; }
.hud-chu b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-chu > span { display: flex; align-items: center; gap: 8px; }
#hud-cap { font-style: normal; font-weight: 800; font-size: 12px; color: #fff; background: var(--tim); border-radius: 99px; padding: 1px 8px; white-space: nowrap; }
#hud-xp { flex: 1; height: 8px; }
.hud-o { background: #fff; border-radius: 99px; padding: 8px 13px; font-weight: 800; box-shadow: var(--bong-nho); white-space: nowrap; }
#hud-kc b { color: var(--xanh-dam); } #hud-lua b { color: var(--cam-dam); }
#hud-kc.nay { animation: nay2 .5s ease; }
@keyframes nay2 { 40% { transform: scale(1.25) } }
.kc-nho { font-weight: 800; background: rgba(255,255,255,.92); border-radius: 999px; padding: 8px 12px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }

/* ---------- tạo hồ sơ ---------- */
.tao { background: #fff; border-radius: 32px; box-shadow: var(--bong); padding: 22px 24px 26px; width: min(520px, 100%); text-align: center; }
.logo { margin: 0; font: 800 50px 'M PLUS Rounded 1c', sans-serif; color: var(--cam); letter-spacing: 1px; line-height: 1; }
.logo span { font: 800 26px 'Nunito', sans-serif; color: #fff; background: var(--xanh); border-radius: 12px; padding: 2px 10px; margin-left: 8px; vertical-align: middle; }
.tao-phu { margin: 8px 0 6px; font-weight: 800; color: var(--mo); }
.tao-chon { display: flex; justify-content: center; gap: 16px; }
.tao-be { width: 140px; height: 168px; border: 4px solid #f1e6d8; background: #fffaf2; border-radius: 26px; padding: 6px; cursor: pointer; transition: .15s; }
.tao-be svg { width: 100%; height: 100%; }
.tao-be.on { border-color: var(--cam); background: #fff1df; transform: translateY(-4px); box-shadow: 0 8px 18px rgba(255,138,46,.25); }
.tao-nhan { display: flex; justify-content: center; gap: 16px; font-size: 13px; font-weight: 800; color: var(--mo); }
.tao-nhan span { width: 140px; }

/* phiên âm La-tinh + tên kiểu bài + luyện tập (04/11, góp ý chị Ngân) */
.rj { display: block; color: #a08a72; font: 700 13px 'Nunito', sans-serif; letter-spacing: .5px; line-height: 1.2; }
.rj.to { font-size: 18px; margin-top: 2px; }
.o-chon .rj { font-size: 14px; }
#bai-hd { display: block; margin-top: 7px; font-size: 16px; color: var(--chu); }
#lt-luoi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.o-luyen small { line-height: 1.3; }
.hud-ph { border: 0; cursor: pointer; font: 800 15px 'Nunito', sans-serif; color: var(--chu); }

/* chọn tuổi + lớp học (04/11) */
.tao-dong { display: flex; justify-content: center; gap: 8px; margin: 4px 0 10px; }
.tao-dong button { border: 3px solid #f1e6d8; background: #fffaf2; border-radius: 99px; padding: 8px 16px; font: 800 15px 'Nunito', sans-serif; cursor: pointer; color: var(--chu); }
.tao-dong button.on { border-color: var(--cam); background: #fff1df; }
.hub-lop { margin-top: 14px; background: #fff; border-radius: 22px; padding: 14px 16px; box-shadow: var(--bong-nho); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-left: 6px solid var(--xanh); }
.hub-lop > div:first-child { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.hub-lop small { color: var(--mo); font-weight: 800; } .hub-lop b { font-size: 18px; } .hub-lop em { font-style: normal; font-weight: 800; color: #d33a4c; } .hub-lop em.xong { color: var(--la-dam); }
.hub-lop.nhac { border-left-color: #ff5a6e; background: #fff4f5; animation: nhip 2s ease-in-out 3; }
.hl-nut { display: flex; gap: 8px; } .hl-nut a.nut { text-decoration: none; }
.ph-lop { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; background: #fff; border-radius: 18px; padding: 12px 16px; box-shadow: var(--bong-nho); margin-bottom: 10px; font-weight: 700; }
.ph-lop b { width: 100%; font-size: 18px; } .ph-lop a.nut { text-decoration: none; }
.ph-bang td div { margin: 1px 0; }

/* ===== bản Teen 10–15: tông chàm / xanh ngọc, bớt "trẻ con" ===== */
body.teen { --cam: #5b6cff; --cam-dam: #3f4fd6; --nen: #f2f4ff; --nen2: #e6e9ff; --vien: #dde2f8; --xanh: #14b8a6; --xanh-dam: #0e8f81; --mo: #66708f; --chu: #1f2440; }
body.teen .mh { background: radial-gradient(circle at 15% 10%, #f8f9ff 0, transparent 40%), radial-gradient(circle at 90% 80%, #e3e7ff 0, transparent 45%), var(--nen); }
body.teen #hud { background: rgba(242,244,255,.9); }
body.teen .nut.cam { background: linear-gradient(#7a88ff, var(--cam)); box-shadow: 0 4px 0 var(--cam-dam), var(--bong-nho); }
body.teen .hub-tiep { background: linear-gradient(135deg, #7a88ff, #4352e6); box-shadow: 0 6px 0 #3140c4, var(--bong); }
body.teen .xc-so:not(.kt), body.teen .mat-sau { background: linear-gradient(#7a88ff, var(--cam)); box-shadow: 0 6px 0 var(--cam-dam); }
body.teen .the-hoc { border-bottom-color: #dfe3ff; } body.teen .kana-khong-lo { text-shadow: 0 6px 0 #dfe3ff; }
body.teen .khung-viet { border-color: #dfe3ff; } body.teen .hub-san { background: radial-gradient(circle at 50% 35%, #fff 0, #dfe3ff 70%); box-shadow: inset 0 -12px 0 rgba(91,108,255,.15), var(--bong); }
body.teen .hub-khach { background: #e9fbf8; } body.teen .tab-o.on { background: var(--cam); }
body.teen .o-chon, body.teen .o-do, body.teen .o-kana { box-shadow: 0 6px 0 #e0e4f5, var(--bong-nho); }

/* đăng nhập */
.hub-khach { width: 100%; margin-bottom: 14px; border: 3px dashed var(--xanh); background: #eaf7ff; border-radius: 22px; padding: 12px 16px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; text-align: left; color: var(--chu); font-family: inherit; }
.hub-khach > span:first-child { font-size: 32px; } .hub-khach > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.hub-khach b { font-size: 17px; } .hub-khach small { color: var(--mo); font-weight: 700; }
.hub-khach em { font-style: normal; font-weight: 800; color: #fff; background: var(--xanh); border-radius: 99px; padding: 9px 14px; white-space: nowrap; box-shadow: 0 3px 0 var(--xanh-dam); }
#mh-dn { padding-top: calc(16px + env(safe-area-inset-top)); background: linear-gradient(#9fdcff, #dff4ff 58%, #a7e07a 58%, #8fd16a); display: flex; align-items: center; justify-content: center; }
.dn .o-nhap { margin-top: 10px; }
.dn-nv { width: 120px; margin: 4px auto -4px; } .dn-nv svg { width: 100%; display: block; }
.dn-loi { min-height: 20px; margin: 8px 0; color: #d33a4c; font-weight: 800; }
.dn-thu { margin: 16px 0 0; line-height: 1.6; }
.lien-ket { border: 0; background: none; color: var(--xanh-dam); font: 800 15px 'Nunito', sans-serif; cursor: pointer; text-decoration: underline; padding: 4px; }
.ph-tk { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #fff; border-radius: 18px; padding: 12px 16px; box-shadow: var(--bong-nho); font-weight: 700; }

/* ---------- trang chính ---------- */
.hub { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 22px; align-items: start; }
.hub-trai { text-align: center; position: sticky; top: 0; }
.hub-san { position: relative; margin: 0 auto; width: min(300px, 70vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff 0, #ffe6c7 70%); box-shadow: inset 0 -12px 0 rgba(255,159,46,.18), var(--bong); display: flex; align-items: flex-end; justify-content: center; }
.hub-san > div { width: 82%; cursor: pointer; animation: tho 3.2s ease-in-out infinite; }
.hub-san svg { width: 100%; display: block; }
@keyframes tho { 50% { transform: translateY(-6px) } }
#hub-chao { margin: 14px 0 6px; font-size: 28px; }
.hub-tiendo { max-width: 260px; margin: 0 auto; }
.hub-tiendo .thanh { height: 12px; }
.hub-tiendo .thanh i { background: linear-gradient(90deg, #7be04a, var(--la)); }
.hub-tiendo small { display: block; margin-top: 6px; font-weight: 800; color: var(--mo); }
.hub-tiep { width: 100%; border: 0; cursor: pointer; display: flex; align-items: center; gap: 16px; text-align: left; color: #fff;
  background: linear-gradient(135deg, #ffad4d, #ff7a1a); border-radius: 28px; padding: 18px 20px; box-shadow: 0 6px 0 var(--cam-dam), var(--bong); }
.hub-tiep:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--cam-dam); }
.ht-so { width: 68px; height: 68px; flex: none; border-radius: 50%; background: #fff; color: var(--cam); display: flex; align-items: center; justify-content: center;
  font: 800 30px 'Nunito', sans-serif; box-shadow: inset 0 -5px 0 rgba(255,138,46,.25); }
.ht-chu { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ht-chu small { font-weight: 800; opacity: .9; } .ht-chu b { font-size: 24px; line-height: 1.2; } .ht-chu i { font-style: normal; font-size: 17px; opacity: .95; }
.ht-mui { font-size: 26px; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; animation: nhip 1.4s ease-in-out infinite; }
@keyframes nhip { 50% { transform: scale(1.12) } }
.hub-luoi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.o-hub { border: 0; cursor: pointer; background: #fff; border-radius: 24px; padding: 16px 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--m) 40%, #eee), var(--bong-nho); color: var(--chu); border-top: 6px solid var(--m); }
.o-hub:active { transform: translateY(3px); }
.o-hub span { font-size: 40px; line-height: 1.1; } .o-hub b { font-size: 17px; } .o-hub small { color: var(--mo); font-weight: 700; font-size: 12px; }

/* ---------- bản đồ ---------- */
.map { max-width: 560px; margin: 0 auto; }
.map-phan { margin: 26px 0 10px; background: var(--m); color: #fff; border-radius: 20px; padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  box-shadow: 0 5px 0 rgba(0,0,0,.12); }
.map-phan b { font-size: 17px; } .map-phan small { font-weight: 800; opacity: .9; white-space: nowrap; }
.map-duong { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 0; }
.map-duong::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 10px; margin-left: -5px; background: repeating-linear-gradient(#ead7bf 0 14px, transparent 14px 26px); border-radius: 9px; }
.nut-chang { position: relative; border: 0; background: none; cursor: pointer; padding: 8px 0; margin-left: var(--lech); display: flex; align-items: center; gap: 12px; z-index: 1; }
.nc-tron { width: 74px; height: 74px; border-radius: 50%; background: var(--m); color: #fff; display: flex; align-items: center; justify-content: center;
  font: 800 28px 'Nunito', sans-serif; box-shadow: 0 6px 0 color-mix(in srgb, var(--m) 70%, #000), 0 8px 18px rgba(0,0,0,.15); border: 4px solid #fff; flex: none; }
.nut-chang.kt .nc-tron { width: 88px; height: 88px; font-size: 36px; background: linear-gradient(#ffd85a, #ffb800); box-shadow: 0 6px 0 #d18f00, 0 8px 18px rgba(0,0,0,.15); }
.nut-chang.xong .nc-tron { background: linear-gradient(#ffd85a, #ffb800); box-shadow: 0 6px 0 #d18f00, 0 8px 18px rgba(0,0,0,.12); }
.nut-chang.khoa .nc-tron { background: #e4dbd0; box-shadow: 0 6px 0 #cbbfb1; font-size: 24px; }
.nut-chang.nay .nc-tron { animation: nhip 1.4s ease-in-out infinite; }
.nc-ten { position: absolute; left: calc(100% + 4px); top: 50%; transform: translateY(-50%); background: #fff; border-radius: 14px; padding: 6px 12px; text-align: left;
  box-shadow: var(--bong-nho); display: flex; flex-direction: column; white-space: nowrap; }
.nc-ten b { font-size: 14px; } .nc-ten i { font-style: normal; color: var(--mo); font-size: 13px; } .nc-ten em { font-style: normal; font-size: 12px; letter-spacing: 1px; }
.nut-chang.khoa .nc-ten { opacity: .55; }
.nc-be { position: absolute; right: calc(100% + 2px); top: -6px; width: 58px; height: 74px; animation: tho 2.4s ease-in-out infinite; }
.nc-be svg { width: 100%; height: 100%; }
.map-dich { margin: 18px auto 30px; text-align: center; font-weight: 800; color: var(--mo); }

/* ---------- popup ---------- */
.che.pop { z-index: 30; background: rgba(59,42,26,.5); animation: mo .2s ease; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.che.pop.tat { opacity: 0; transition: opacity .2s; }
.che.pop .hop { position: relative; animation: bat .35s cubic-bezier(.3,1.5,.5,1); border-radius: 30px; max-width: 460px; }
.che.pop .hop h2 { margin: 6px 0; font: 800 28px 'Nunito', sans-serif; color: var(--cam-dam); }
.che.pop .hop h3 { margin: 6px 0; font-size: 22px; }
@keyframes mo { from { opacity: 0 } } @keyframes bat { from { transform: scale(.7); opacity: 0 } }
.xc-so { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; background: linear-gradient(#ffad4d, #ff7a1a); color: #fff; font: 800 38px 'Nunito', sans-serif;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 0 var(--cam-dam); }
.xc-so.kt { background: linear-gradient(#ffd85a, #ffb800); box-shadow: 0 6px 0 #d18f00; }
.jp.to { font-size: 24px; font-weight: 800; color: var(--mo); margin: 4px 0; }
.xc-sao { font-size: 24px; letter-spacing: 2px; margin: 0; }
.lc-so { width: 110px; height: 110px; margin: 4px auto; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c9a6ff, var(--tim)); color: #fff;
  font: 800 54px 'Nunito', sans-serif; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px #efe4ff, 0 10px 30px rgba(155,107,223,.4); animation: xoay-nhe 2s ease-in-out infinite; }
.lc-so.kc { background: radial-gradient(circle at 35% 30%, #bfe6ff, var(--xanh)); box-shadow: 0 0 0 8px #e2f3ff; font-size: 50px; }
@keyframes xoay-nhe { 50% { transform: rotate(-6deg) scale(1.05) } }
.lc-qua { font-size: 22px; font-weight: 800; color: var(--xanh-dam); margin: 6px 0; }
.nv-to { width: 150px; margin: 0 auto; } .nv-to svg { width: 100%; display: block; }
.huy-to { font-size: 80px; animation: xoay-nhe 2s ease-in-out infinite; }
.dd-lua { font-size: 28px; letter-spacing: 2px; } .dd-lua span { filter: grayscale(1) opacity(.3); } .dd-lua span.co { filter: none; }
.hop-qua { width: 200px; margin: 6px auto; cursor: pointer; animation: rung 1.2s ease-in-out infinite; }
.hop-qua svg { width: 100%; display: block; overflow: visible; }
.hop-qua .nap { transition: transform .5s cubic-bezier(.3,1.6,.5,1); transform-origin: 100px 60px; }
.hop-qua.mo { animation: none; } .hop-qua.mo .nap { transform: translateY(-60px) rotate(-18deg); }
@keyframes rung { 0%, 60%, 100% { transform: rotate(0) } 70% { transform: rotate(-7deg) } 80% { transform: rotate(7deg) } 90% { transform: rotate(-4deg) } }
.qua-do, .od-xem { width: 150px; height: 170px; margin: 0 auto; border-radius: 26px; background: radial-gradient(circle, #fff 0, #ffeacc 75%); display: flex; align-items: center; justify-content: center;
  animation: bat .5s cubic-bezier(.3,1.6,.5,1); box-shadow: 0 0 0 6px #fff4e2; }
.qua-do svg, .od-xem svg { width: 88%; height: 88%; }
.dong-x { position: absolute; top: 12px; right: 14px; border: 0; background: #f4ece2; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; cursor: pointer; color: var(--mo); }

/* bằng khen */
.bang { position: relative; border: 6px double #d9a600; border-radius: 18px; padding: 18px 14px 14px; background: linear-gradient(#fffdf5, #fff4d6); }
.bang h2 { font: 800 30px 'Nunito', sans-serif; color: #c48a00 !important; letter-spacing: 3px; margin: 2px 0 !important; }
.bang h3 { font-size: 30px !important; color: var(--cam-dam); margin: 2px 0 !important; }
.bang small { color: var(--mo); font-weight: 800; letter-spacing: 1px; }
.bang-nv { width: 100px; margin: 0 auto; } .bang-nv svg { width: 100%; }
.bang-dau { position: absolute; right: 12px; top: 54px; width: 66px; height: 66px; border: 4px solid #e5484d; border-radius: 50%; color: #e5484d; transform: rotate(-14deg);
  display: flex; align-items: center; justify-content: center; font: 800 20px 'M PLUS Rounded 1c', sans-serif; opacity: .85; }

/* ---------- bài học ---------- */
#mh-bai { display: flex; flex-direction: column; align-items: center; }
.bai-dau { width: 100%; max-width: 760px; display: flex; align-items: center; gap: 12px; }
.bai-giua { flex: 1; min-width: 0; } .bai-giua small { display: block; font-weight: 800; color: var(--mo); margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bai-thanh { height: 16px; } #bai-thanh i { background: linear-gradient(90deg, #7be04a, var(--la)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.08); }
#bai-than { width: 100%; max-width: 760px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 0 70px; text-align: center; }
.bai-mo { background: #fff; border-radius: 30px; padding: 26px 24px; box-shadow: var(--bong); max-width: 480px; }
.bai-mo h2 { margin: 10px 0 0; font-size: 28px; }
#bai-pb { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%); padding: 12px 26px; border-radius: 99px;
  font-weight: 800; font-size: 19px; color: #fff; transition: transform .3s cubic-bezier(.3,1.5,.5,1); z-index: 8; white-space: nowrap; box-shadow: var(--bong); }
#bai-pb:not(.dung):not(.sai) { visibility: hidden; }
#bai-pb.dung { background: var(--la); transform: translate(-50%, 0); } #bai-pb.sai { background: var(--cam); transform: translate(-50%, 0); }

.the-hoc { background: #fff; border-radius: 34px; box-shadow: var(--bong); padding: 22px 30px; min-width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-bottom: 8px solid #ffe2bf; animation: bat .35s cubic-bezier(.3,1.5,.5,1); }
.kana-khong-lo { font: 800 min(150px, 26vh) 'M PLUS Rounded 1c', sans-serif; line-height: 1.05; color: var(--cam); text-shadow: 0 6px 0 #ffe2bf; }
.romaji { font-size: 22px; font-weight: 800; color: var(--mo); letter-spacing: 2px; }
.vd { display: flex; align-items: center; gap: 14px; margin-top: 10px; background: var(--nen); border-radius: 22px; padding: 10px 18px; }
.vd .hinh-o { width: 72px; height: 72px; } .vd b { font-size: 30px; display: block; } .vd b u { color: var(--cam); text-decoration-thickness: 3px; text-underline-offset: 4px; } .vd small { font-weight: 800; color: var(--mo); }
.tu-to { font-size: min(44px, 9vw); margin-top: 6px; } .nghia { font-size: 20px; font-weight: 800; color: var(--mo); }
.hinh-o { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; flex: none; }
.hinh-o svg { width: 100%; height: 100%; }
.hinh-o .emo { font-size: 72px; line-height: 1; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.hinh-o.to { width: 150px; height: 150px; } .hinh-o.to .emo { font-size: 116px; }
.hinh-o.nho { width: 56px; height: 56px; } .hinh-o.nho .emo { font-size: 42px; }
.hinh-o.dem { flex-wrap: wrap; align-content: center; gap: 2px; width: 120px; } .hinh-o.dem i { font-style: normal; font-size: 26px; line-height: 1.1; }
.hinh-o.to.dem { width: 220px; } .hinh-o.to.dem i { font-size: 40px; }
.so-to { font: 800 64px 'Nunito', sans-serif; color: var(--xanh-dam); line-height: 1; }
.hinh-o.to .so-to { font-size: 110px; }
.cham-trang { display: flex; gap: 6px; } .cham-trang i { width: 10px; height: 10px; border-radius: 50%; background: #e8dccd; } .cham-trang i.on { background: var(--cam); width: 24px; border-radius: 9px; } .cham-trang i.qua { background: #ffc58d; }

.hoi { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 18px; }
.hoi p { margin: 0; font-weight: 800; color: var(--mo); font-size: 17px; }
.loa-to { width: 104px; height: 104px; border-radius: 50%; border: 0; cursor: pointer; font-size: 46px; background: linear-gradient(#5cc4ff, var(--xanh)); color: #fff;
  box-shadow: 0 6px 0 var(--xanh-dam), 0 0 0 10px rgba(47,168,245,.15); animation: song 1.8s ease-out infinite; }
.loa-to:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--xanh-dam); }
@keyframes song { 0% { box-shadow: 0 6px 0 var(--xanh-dam), 0 0 0 0 rgba(47,168,245,.35) } 100% { box-shadow: 0 6px 0 var(--xanh-dam), 0 0 0 22px rgba(47,168,245,0) } }
.kana-de { font: 800 min(120px, 22vh) 'M PLUS Rounded 1c', sans-serif; color: var(--cam); line-height: 1.05; background: #fff; border-radius: 30px; padding: 4px 34px; box-shadow: var(--bong); margin-bottom: 8px; }
.cau-jp { font-size: 26px !important; color: var(--chu) !important; margin-top: 10px !important; }
.hoi-chu { font-weight: 800; color: var(--mo); font-size: 18px; margin: 0 0 14px; } .hoi-chu b { font-size: 26px; color: var(--cam); }
.luoi-chon { display: grid; gap: 14px; width: 100%; grid-template-columns: repeat(3, minmax(0, 190px)); justify-content: center; }
.luoi-chon.n2 { grid-template-columns: repeat(2, minmax(0, 200px)); } .luoi-chon.n4 { grid-template-columns: repeat(4, minmax(0, 170px)); }
.o-chon { border: 0; cursor: pointer; background: #fff; border-radius: 26px; padding: 16px 10px; min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 6px 0 #ecdcc8, var(--bong-nho); color: var(--chu); font-family: inherit; transition: transform .1s, background .2s; border: 3px solid transparent; }
.o-chon:active { transform: translateY(4px); box-shadow: 0 2px 0 #ecdcc8; }
.o-chon b { font-size: 16px; line-height: 1.25; } .o-chon small { color: var(--mo); font-weight: 700; font-size: 12px; }
.o-chon.kana { min-height: 150px; } .kana-to { font: 800 76px 'M PLUS Rounded 1c', sans-serif; line-height: 1; color: var(--chu); }
.o-chon.cau { flex-direction: row; min-height: 88px; text-align: left; justify-content: flex-start; padding: 12px 16px; }
.luoi-chon:has(.cau) { grid-template-columns: minmax(0, 520px); }
.o-chon.dung { background: #e9fbdc; border-color: var(--la); box-shadow: 0 6px 0 var(--la-dam); animation: nay2 .4s ease; }
.o-chon.sai { background: #fff0e6; border-color: #ffb27a; opacity: .6; }

.luoi-ghep { display: grid; grid-template-columns: repeat(4, minmax(0, 130px)); gap: 12px; justify-content: center; width: 100%; perspective: 800px; }
.the-lat { position: relative; aspect-ratio: 3/3.6; border: 0; background: none; cursor: pointer; padding: 0; transform-style: preserve-3d; transition: transform .4s; }
.the-lat > span { position: absolute; inset: 0; border-radius: 20px; display: flex; align-items: center; justify-content: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mat-sau { background: linear-gradient(135deg, #ffad4d, #ff7a1a); color: #fff; font: 800 44px 'Nunito', sans-serif; box-shadow: 0 5px 0 var(--cam-dam); }
.mat-truoc { background: #fff; transform: rotateY(180deg); box-shadow: 0 5px 0 #ecdcc8; }
.mat-truoc .kana-to { font-size: 56px; } .mat-truoc .hinh-o { width: 70px; height: 70px; } .mat-truoc .emo { font-size: 54px; }
.the-lat.lat, .the-lat.xong { transform: rotateY(180deg); }
.the-lat.xong .mat-truoc { background: #e9fbdc; box-shadow: 0 5px 0 var(--la-dam); }

.khung-viet { position: relative; width: min(320px, 78vw, 46vh); aspect-ratio: 1; margin: 0 auto; background: #fff; border-radius: 28px; box-shadow: var(--bong); touch-action: none; border: 4px solid #ffe2bf; }
.khung-viet canvas { position: absolute; inset: 0; border-radius: 24px; } .cv-be { cursor: crosshair; }
.khung-viet.dat { border-color: var(--vang); animation: nay2 .5s ease; }
.viet-sao { position: absolute; right: -10px; top: -14px; font-size: 44px; animation: bat .4s cubic-bezier(.3,1.6,.5,1); }

.xep-dich { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.xep-o { width: 70px; height: 70px; border-radius: 18px; border: 3px dashed #e3cfb6; display: flex; align-items: center; justify-content: center; font: 800 24px 'Nunito', sans-serif; color: #d9c2a6; }
.xep-o.co { border: 3px solid var(--la); background: #e9fbdc; } .xep-o .hinh-o.nho { width: 50px; height: 50px; }
.luoi-chon.xep { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); max-width: 740px; }
.luoi-chon.xep .o-chon { min-height: 130px; } .luoi-chon.xep .o-chon b { font-size: 14px; }

.ghiam { width: 100%; max-width: 560px; }
.bong-noi { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 26px; padding: 14px 18px; box-shadow: var(--bong); text-align: left; }
.bong-noi p { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.6; }
.ten-be { color: var(--cam); border-bottom: 3px dashed var(--cam); }
.nv-nho { width: 74px; flex: none; } .nv-nho svg { width: 100%; }
.mic { position: relative; width: 120px; height: 120px; margin: 18px auto 6px; display: block; border: 0; border-radius: 50%; cursor: pointer; background: linear-gradient(#ff7a8a, var(--do)); color: #fff; font-size: 50px;
  box-shadow: 0 6px 0 #d93a4f, 0 10px 24px rgba(255,90,110,.35); }
.mic svg { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); fill: none; stroke: var(--do); stroke-width: 4; stroke-dasharray: 289; stroke-dashoffset: 289; transform: rotate(-90deg); }
.mic.dang { animation: nhip 1s ease-in-out infinite; } .mic.dang svg { animation: vong 15s linear forwards; }
@keyframes vong { to { stroke-dashoffset: 0 } }
.ga-tt { font-weight: 800; color: var(--mo); margin: 4px 0; }

.ket { background: #fff; border-radius: 34px; padding: 18px 26px 24px; box-shadow: var(--bong); width: min(460px, 100%); }
.ket h2 { margin: 2px 0; font-size: 30px; color: var(--cam-dam); }
.ket-sao { display: flex; justify-content: center; gap: 4px; margin-top: -8px; }
.ket-sao span { width: 64px; height: 64px; display: block; } .ket-sao svg { width: 100%; height: 100%; fill: #ece2d5; stroke: #e2d4c2; }
.ket-sao span.co { animation: bat .5s cubic-bezier(.3,1.8,.5,1) both; animation-delay: var(--d); } .ket-sao span.co svg { fill: var(--vang); stroke: #e0a400; filter: drop-shadow(0 3px 0 #e0a400); }
.ket-sao span:nth-child(2) { width: 80px; height: 80px; transform: translateY(-10px); }
.ket-qua { display: flex; justify-content: center; gap: 12px; margin: 8px 0; } .ket-qua span { background: var(--nen); border-radius: 99px; padding: 8px 16px; font-weight: 800; font-size: 18px; }
.ket-cap { display: flex; align-items: center; gap: 10px; max-width: 300px; margin: 8px auto 0; } .ket-cap b { color: var(--tim); white-space: nowrap; } .ket-cap .thanh { flex: 1; height: 12px; }

/* ---------- tủ đồ ---------- */
.tudo { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 22px; align-items: start; }
.td-trai { position: sticky; top: 0; text-align: center; }
.hang-tab { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: none; }
.tab-o { flex: none; border: 0; border-radius: 99px; padding: 9px 15px; font: 800 14px 'Nunito', sans-serif; background: #fff; color: var(--chu); box-shadow: var(--bong-nho); cursor: pointer; }
.tab-o.on { background: var(--do); color: #fff; }
#td-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.o-do { border: 3px solid transparent; background: #fff; border-radius: 22px; padding: 8px 6px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: 0 5px 0 #ecdcc8, var(--bong-nho); color: var(--chu); font-family: inherit; }
.o-do.mac { border-color: var(--la); background: #f3fdeb; } .o-do.chua .od-hinh { filter: saturate(.85); }
.od-hinh { width: 92px; height: 104px; display: flex; align-items: center; justify-content: center; }
.od-hinh svg { width: 100%; height: 100%; }
.mau-tron { width: 64px; height: 64px; border-radius: 50%; display: block; box-shadow: inset 0 -6px 0 rgba(0,0,0,.15), 0 0 0 5px #fff, 0 0 0 7px #eee; }
.o-do b { font-size: 13px; line-height: 1.2; } .o-do em { font-style: normal; font-weight: 800; font-size: 12px; color: var(--mo); }
.o-do em.gia { color: var(--xanh-dam); background: #e6f5ff; border-radius: 99px; padding: 2px 9px; } .o-do em.dang-mac { color: var(--la-dam); } .o-do em.khoa { color: #c48a00; }

/* ---------- vở tập viết, huy hiệu ---------- */
.viet { max-width: 860px; margin: 0 auto; text-align: center; }
#vv-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; }
.o-kana { border: 0; aspect-ratio: 1; border-radius: 20px; background: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 5px 0 #ecdcc8; color: var(--chu); position: relative; }
.o-kana b { font: 800 38px 'M PLUS Rounded 1c', sans-serif; line-height: 1; } .o-kana small { color: var(--mo); font-weight: 800; }
.o-kana.xong { background: #fff6d6; box-shadow: 0 5px 0 #f2cf63; } .o-kana.xong::after { content: '⭐'; position: absolute; top: -6px; right: -4px; font-size: 18px; }
.o-kana.khoa { opacity: .35; }
.viet-pop .hop { max-width: 420px; } .viet-pop h2 small { font-size: 18px; color: var(--mo); }
#hh-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.o-huy { background: #fff; border-radius: 22px; padding: 14px 10px; box-shadow: var(--bong-nho); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.o-huy span { font-size: 46px; filter: grayscale(1) opacity(.35); } .o-huy.co span { filter: none; }
.o-huy b { font-size: 14px; } .o-huy small { color: var(--mo); font-weight: 700; font-size: 12px; }
.o-huy.co { box-shadow: 0 0 0 3px var(--vang), var(--bong-nho); }

/* ---------- phụ huynh ---------- */
.ph { max-width: 760px; margin: 0 auto; }
.ph h3 { margin: 22px 0 10px; }
.ph-the { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 24px; padding: 14px 18px; box-shadow: var(--bong-nho); }
.ph-the h2 { margin: 0; } .ph-the p { margin: 4px 0 0; color: var(--mo); font-weight: 700; }
.ph-nv { width: 80px; flex: none; } .ph-nv svg { width: 100%; }
.ph-so { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.ph-so div { background: #fff; border-radius: 18px; padding: 12px 8px; text-align: center; box-shadow: var(--bong-nho); }
.ph-so b { display: block; font-size: 24px; color: var(--cam-dam); } .ph-so small { color: var(--mo); font-weight: 700; }
.ph-cuon { overflow-x: auto; }
.ph-bang { width: 100%; border-collapse: collapse; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--bong-nho); font-size: 14px; }
.ph-bang th, .ph-bang td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #f3e9dc; } .ph-bang th { background: #fff4e6; } .ph-bang tr.mo td { color: #b9a58f; }
.ph-am > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: 16px; padding: 10px 14px; margin-bottom: 8px; box-shadow: var(--bong-nho); }
.ph-am span { display: flex; flex-direction: column; font-weight: 800; } .ph-am small { color: var(--mo); font-weight: 600; }

/* ---------- màn hẹp / thấp ---------- */
@media (max-width: 760px) {
  .hub, .tudo { grid-template-columns: 1fr; }
  .hub-trai, .td-trai { position: static; }
  .hub-san { width: min(220px, 60vw); }
  .td-trai .hub-san { width: 170px; }
  .hub-luoi { grid-template-columns: repeat(2, 1fr); }
  #lt-luoi { grid-template-columns: repeat(2, 1fr); }
  #bai-hd { font-size: 14px; }
  .hud-o { padding: 7px 10px; font-size: 14px; }
  .luoi-chon { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .luoi-chon.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .o-chon { min-height: 112px; padding: 10px 6px; } .kana-to { font-size: 58px; }
  .hinh-o { width: 76px; height: 76px; } .hinh-o .emo { font-size: 58px; }
  .hinh-o.dem { width: 100%; height: auto; min-height: 76px; } .hinh-o.dem i { font-size: 20px; } .so-to { font-size: 50px; }
  .luoi-ghep { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .mat-truoc .kana-to { font-size: 40px; } .mat-truoc .hinh-o { width: 52px; height: 52px; } .mat-truoc .emo { font-size: 40px; }
  .ph-so { grid-template-columns: repeat(2, 1fr); }
  .map-duong { align-items: flex-start; padding-left: 21%; }
  .map-duong::before { left: calc(21% + 37px); }
  .nut-chang { margin-left: calc(var(--lech) * .35); }
  .nut-chang.kt { margin-left: -7px; }
  .nc-ten { white-space: normal; width: max-content; max-width: 46vw; }
  .nc-ten b { font-size: 13px; }
  .the-hoc { padding: 18px 16px; }
}
@media (max-width: 420px) { .hub-tiep { padding: 14px; gap: 12px; } .ht-so { width: 54px; height: 54px; font-size: 24px; } .ht-chu b { font-size: 20px; } .ht-mui { display: none; } .hud-chu { max-width: 130px; } }
@media (max-height: 520px) and (orientation: landscape) {
  .mh { padding-top: calc(66px + env(safe-area-inset-top)); }
  #hud { padding-top: 6px; padding-bottom: 6px; } #hud-nv { width: 40px; height: 40px; }
  .kana-khong-lo { font-size: 100px; } .the-hoc { padding: 10px 20px; } .hinh-o.to { width: 100px; height: 100px; } .hinh-o.to .emo { font-size: 80px; }
  .loa-to { width: 76px; height: 76px; font-size: 32px; } .o-chon { min-height: 100px; } .hoi { margin-bottom: 10px; }
  .kana-de { font-size: 80px; }
}

/* ===== 06/11 · sửa theo sheet "Feedback app" (DMR.LỚP KID) ===== */
/* 1.1 điện thoại: trang đặt user-select:none → iPhone không gõ được vào ô nhập; màn căn giữa bằng flex bị cắt đầu khi bàn phím bật lên */
input, textarea, select { -webkit-user-select: text; user-select: text; font-size: 16px; }
#mh-dn, #mh-tao { align-items: flex-start; }
#mh-dn > .tao, #mh-tao > .tao { margin: auto; }
.o-nhap { font-size: 20px; }
/* 2.2 chữ dài không tràn khung */
.hop, .the-hoc, .o-chon, .o-hub, .o-do, .bai-mo, .ket, .nc-ten, .ph-bang td { overflow-wrap: anywhere; }
.tu-to { font-size: clamp(26px, 8vw, 44px); }
/* HUD: sao + kim cương bấm được */
button.hud-o { border: 0; cursor: pointer; font: 800 15px 'Nunito', sans-serif; color: var(--chu); }
#hud-sao b { color: #c48a00; }
/* 1.2 ba lựa chọn nhân vật */
.tao-chon { gap: 10px; } .tao-be { width: min(140px, 27vw); height: auto; aspect-ratio: 140 / 168; }
.tao-nhan { gap: 10px; } .tao-nhan span { width: min(140px, 27vw); }
/* 2.4 làm quen: nhiều ví dụ cho một chữ */
.vd-hang { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; margin-top: 12px; width: 100%; }
.vd-hang.n1 { --n: 1; max-width: 220px; } .vd-hang.n2 { --n: 2; } .vd-hang.n3 { --n: 3; }
.vd-o { border: 0; background: var(--nen); border-radius: 20px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--chu); font-family: inherit; }
.vd-o .hinh-o { width: 64px; height: 64px; } .vd-o .emo { font-size: 50px; }
.vd-o b { font-size: 22px; } .vd-o b u { color: var(--cam); text-decoration-thickness: 3px; text-underline-offset: 4px; } .vd-o small { font-weight: 800; color: var(--mo); font-size: 13px; }
/* 2.5 ghép: chữ một hàng, hình một hàng */
.ghep-hang { display: grid; grid-template-columns: repeat(4, minmax(0, 130px)); gap: 12px; justify-content: center; width: 100%; }
.ghep-giua { margin: 10px 0; font-size: 20px; opacity: .5; }
.o-ghep { border: 3px solid transparent; background: #fff; border-radius: 22px; min-height: 110px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 5px 0 #ecdcc8, var(--bong-nho); color: var(--chu); font-family: inherit; transition: transform .12s; }
.o-ghep.chu { background: #fff8ef; } .o-ghep .kana-to { font-size: 60px; }
.o-ghep.chon { border-color: var(--cam); transform: translateY(-5px); box-shadow: 0 9px 0 var(--cam-dam), var(--bong-nho); }
.o-ghep.xong { background: #e9fbdc; border-color: var(--la); box-shadow: 0 5px 0 var(--la-dam); opacity: .75; cursor: default; }
/* trò chơi bóng bay */
.bong-dau { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; } .bong-dau p { margin: 0; font-weight: 800; color: var(--mo); flex: 1; text-align: left; }
.bong-dau b { font-weight: 800; background: #fff; border-radius: 99px; padding: 6px 12px; box-shadow: var(--bong-nho); }
.loa-to.nho { width: 64px; height: 64px; font-size: 28px; flex: none; }
.bong-san { position: relative; width: 100%; height: min(56vh, 460px); overflow: hidden; border-radius: 28px; background: linear-gradient(#a8ddff, #e6f6ff 70%, #c9efb0); box-shadow: inset 0 -10px 0 rgba(0,0,0,.05); }
.bong { position: absolute; bottom: -170px; border: 0; background: none; padding: 0; cursor: pointer; transform: translateX(-50%); animation: bay var(--t) linear both; }
@keyframes bay { from { transform: translate(-50%, 0) } to { transform: translate(-50%, calc(-1 * var(--h))) } }
.bong-qua { display: flex; align-items: center; justify-content: center; width: 96px; height: 114px; border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.75) 0, rgba(255,255,255,0) 26%), var(--m); box-shadow: inset -9px -11px 0 rgba(0,0,0,.13); }
.bong-qua b { font: 800 54px 'M PLUS Rounded 1c', sans-serif; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.2); }
.bong-qua .hinh-o.nho { width: 64px; height: 64px; } .bong-qua .emo { font-size: 50px; }
.bong-day { display: block; width: 2px; height: 50px; margin: -2px auto 0; background: rgba(80,90,110,.5); }
.bong.no { animation-play-state: paused; } .bong.no .bong-qua { animation: no-bong .3s ease-out forwards; } .bong.no .bong-day { opacity: 0; }
@keyframes no-bong { to { transform: scale(1.7); opacity: 0 } }
.bong.sai { opacity: .3; filter: grayscale(.6); }
/* thử thách 60 giây */
.nh-dau { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 560px; margin-bottom: 14px; } .nh-gio { flex: 1; height: 16px; } .nh-gio i { transition: width .2s linear; background: linear-gradient(90deg, #ff5a6e, #ffb703); }
.nh-dau b { font-size: 24px; } .nh-cau { width: 100%; }
.kana-de.nho { font-size: 72px; padding: 0 26px; }
/* màn hướng dẫn lần đầu */
.che.tut .hop { max-width: 420px; } .tut-icon { position: relative; font-size: 84px; line-height: 1; margin: 4px auto 6px; width: 130px; }
.tut-tay { position: absolute; right: -6px; bottom: -14px; font-size: 44px; animation: tay 1.1s ease-in-out infinite; }
@keyframes tay { 50% { transform: translate(-10px, -12px) scale(.92) } }
.tut-chu { font-size: 18px; font-weight: 700; line-height: 1.5; } .tut-thanh { margin: 4px auto 0; max-width: 220px; height: 6px; } .tut-thanh i { width: 100%; animation: tut-het 7s linear forwards; }
@keyframes tut-het { from { width: 100% } to { width: 0 } }
/* 2.3 sao từng phần */
.ket-phan { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; text-align: left; }
.kp { display: flex; align-items: center; gap: 8px; background: var(--nen); border-radius: 14px; padding: 7px 10px; font-weight: 800; }
.kp > span { flex: 1; } .kp em { font-style: normal; } .kp-sao { letter-spacing: 1px; } .kp .nut { padding: 5px 10px; font-size: 13px; }
.nut.nho { padding: 6px 11px; font-size: 13px; }
/* 2.7 giải thích sao, kim cương */
.lc-so.sao { background: radial-gradient(circle at 35% 30%, #ffe68a, #ffb800); box-shadow: 0 0 0 8px #fff3c4; font-size: 52px; }
.gt-bang { text-align: left; background: var(--nen); border-radius: 16px; padding: 10px 14px; margin: 8px 0; display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 15px; }
.gt-bang b { font-size: 16px; color: var(--cam-dam); }
.tab-o.qua { background: #fff4d6; } .tab-o.qua.on { background: #ffb800; }
#td-luoi.qua-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.qt-chu, .qt-ds { grid-column: 1 / -1; margin: 0; }
.o-qua { border: 3px solid transparent; background: #fff; border-radius: 22px; padding: 14px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 5px 0 #ecdcc8, var(--bong-nho); color: var(--chu); font-family: inherit; }
.o-qua.du { border-color: #ffb800; } .qt-icon { font-size: 48px; } .o-qua small { color: var(--mo); font-weight: 700; } .o-qua em.gia { font-style: normal; font-weight: 800; color: var(--xanh-dam); background: #e6f5ff; border-radius: 99px; padding: 2px 10px; }
.o-qua > .thanh { width: 100%; height: 8px; margin-top: 4px; } .qt-to { font-size: 72px; }
.qt-dong { display: flex; justify-content: space-between; gap: 10px; background: #fff; border-radius: 14px; padding: 10px 14px; margin-bottom: 6px; box-shadow: var(--bong-nho); font-weight: 800; } .qt-dong small { color: var(--mo); }
/* luyện tập: ôn lại + trò chơi */
.lt-tieu { margin: 22px 0 10px; font-size: 20px; } .lt-tieu small { font-size: 13px; color: var(--mo); font-weight: 700; }
#lt-game { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.o-luyen.khoa { opacity: .8; filter: grayscale(.5); } .o-luyen.on-lai { border-top-color: #ff5a6e; background: #fff6f7; }
.hub-on { border-color: #ff8a9b; background: #fff4f5; margin-top: 14px; margin-bottom: 0; } .hub-on em { background: #ff5a6e; box-shadow: 0 3px 0 #d93a4f; }
.hub-on small { font-family: 'M PLUS Rounded 1c', sans-serif; }
/* 2.1 + 2.11 tập viết theo nét */
.viet-goi { min-height: 22px; margin: 10px 0 0; font-weight: 800; color: var(--mo); }
.viet-goi b { color: var(--cam-dam); }
.viet-sao { font-size: 30px !important; right: -8px; top: -18px; background: #fff; border-radius: 99px; padding: 2px 8px; box-shadow: var(--bong-nho); letter-spacing: 1px; }
.o-kana .ok-sao { position: absolute; bottom: 3px; font-style: normal; font-size: 9px; letter-spacing: 0; }
.o-kana.xong::after { content: none; } .o-kana.xong small { margin-bottom: 8px; } .o-kana.ba { background: #fff0b8; }
.nguon { margin-top: 16px; font-size: 12px; }
/* 3.2 PIN, 3.3 báo cáo tuần + liên hệ trung tâm */
.o-nhap.pin { letter-spacing: 10px; font-size: 26px; max-width: 220px; }
.ph-tuan { background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--bong-nho); }
.pt-cot { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 90px; align-items: end; }
.pt-cot div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.pt-cot i { width: 70%; min-height: 3px; border-radius: 6px 6px 2px 2px; background: linear-gradient(#ffc46b, var(--cam)); }
.pt-cot small { font-weight: 800; color: var(--mo); font-size: 12px; }
.pt-so { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 4px; font-weight: 700; } .pt-so b { color: var(--cam-dam); }
.ph-lh { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--bong-nho); }
.ph-lh label { display: flex; flex-direction: column; gap: 4px; font-weight: 800; font-size: 14px; } .ph-lh .rong { grid-column: 1 / -1; margin: 0; }
.ph-lh select, .ph-lh textarea { border: 2px solid var(--vien); border-radius: 12px; padding: 9px 10px; font: 600 16px 'Nunito', sans-serif; background: #fffdf9; color: var(--chu); }
.ph-lh textarea { min-height: 70px; resize: vertical; }
#lh-ds { margin-top: 10px; }
@media (max-width: 760px) {
  .ghep-hang { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; } .o-ghep { min-height: 84px; } .o-ghep .kana-to { font-size: 44px; }
  .o-ghep .hinh-o { width: 58px; height: 58px; } .o-ghep .emo { font-size: 44px; }
  .vd-o .hinh-o { width: 50px; height: 50px; } .vd-o .emo { font-size: 40px; } .vd-o b { font-size: 18px; }
  #lt-game { grid-template-columns: repeat(2, 1fr); }
  .bong-qua { width: 78px; height: 92px; } .bong-qua b { font-size: 44px; }
  .ph-lh { grid-template-columns: 1fr; }
}
.td-phai, .hub-phai, .hub-trai, .td-trai { min-width: 0; }
@media (max-width: 440px) {
  #hud { gap: 6px; } .hud-o { padding: 6px 8px; font-size: 13px; } button.hud-o { font-size: 13px; }
  #hud-lua { display: none; } #hud-nv { width: 40px; height: 40px; }
  #td-luoi.qua-luoi { grid-template-columns: 1fr 1fr; } .o-qua { padding: 10px 8px; } .qt-icon { font-size: 38px; }
}
.ph-cuon .ph-bang { min-width: 560px; }
