/* Học cùng Bo – giao diện. Màu chủ đạo theo cú Bo: cam san hô #FF7A59, nền kem #FFF7EF */
:root{
  --bg:#fff7ef;--ink:#3a3340;--card:#fff;--bo:#ff7a59;--bo-dark:#f2603c;--bo-soft:#ffe3d3;
  --pri:#ff7a59;--alt:#4d96ff;--ok:#2bb673;--bad:#e8543f;--r:22px;
  --safe-b:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:"Baloo 2","Nunito","Comic Sans MS","Segoe UI",system-ui,sans-serif;background:var(--bg);color:var(--ink);font-size:20px;line-height:1.5;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
a{color:inherit}
img{max-width:100%}

/* ---- Thanh trên ---- */
.top{position:sticky;top:0;z-index:20;display:flex;gap:8px;justify-content:space-between;align-items:center;padding:10px 20px;padding-top:max(10px,env(safe-area-inset-top));background:linear-gradient(90deg,#ffb067,var(--bo) 55%,#ff6b8b);color:#fff;box-shadow:0 3px 10px rgba(242,96,60,.25)}
.logo{display:flex;align-items:center;gap:10px;font-size:28px;font-weight:800;text-decoration:none;text-shadow:0 2px 0 rgba(0,0,0,.12);white-space:nowrap}
.logo img{width:44px;height:44px;background:#fff;border-radius:50%;padding:3px;box-shadow:0 2px 0 rgba(0,0,0,.12)}
.nav{display:flex;gap:10px}
.nav a{display:flex;align-items:center;gap:6px;font-weight:700;text-decoration:none;background:rgba(255,255,255,.25);padding:6px 16px;border-radius:999px}
.nav a:hover{background:rgba(255,255,255,.4)}

main{flex:1;width:100%;max-width:1000px;margin:0 auto;padding:20px 16px 40px}
.foot{text-align:center;font-size:14px;padding:14px;color:#7a6f7f}
.foot a{color:var(--bo-dark);font-weight:700}
h1{font-size:34px;line-height:1.25;margin:.2em 0}
h2{font-size:26px;line-height:1.3}

/* ---- Cú Bo ---- */
.bo{display:inline-block;vertical-align:middle}
.bo-hero{width:110px;height:110px;filter:drop-shadow(0 6px 0 rgba(242,96,60,.18));animation:bob 2.6s ease-in-out infinite}
.bo-sm{width:44px;height:44px;flex:none;margin-right:10px}
@keyframes bob{50%{transform:translateY(-6px) rotate(-3deg)}}
.bubble{display:inline-block;position:relative;background:#fff;border:3px solid var(--bo);border-radius:18px;padding:6px 16px;font-weight:800;margin:6px 0 2px}
.bubble:before{content:"";position:absolute;top:-11px;left:50%;margin-left:-9px;border:9px solid transparent;border-top:0;border-bottom-color:var(--bo)}
.bo-say{display:flex;align-items:center;background:var(--bo-soft);border-radius:18px;padding:10px 14px;margin:14px 0;font-weight:600}

.hero{text-align:center}
.hero p{font-size:22px}

/* ---- Thẻ ---- */
.grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));margin:20px 0}
.card{display:block;background:var(--card);border-radius:var(--r);padding:20px;text-align:center;text-decoration:none;box-shadow:0 6px 0 rgba(0,0,0,.1);border:4px solid var(--c,#f1ddd0);transition:transform .15s;cursor:pointer;font:inherit;color:inherit}
.card:hover,.card:focus-visible{transform:translateY(-4px) rotate(-1deg);outline:none}
.card:active{transform:translateY(2px)}
.card .big{font-size:56px;line-height:1.1}
.card .name{font-size:24px;font-weight:800;line-height:1.25}
.card small{display:block;color:#776b7c;font-size:16px}

.crumb{font-size:17px;margin-bottom:6px}
.crumb a{color:var(--bo-dark);font-weight:700}

/* ---- Lý thuyết ---- */
.theory{background:#e8f7ff;border:4px dashed #5bc0eb;border-radius:var(--r);padding:16px 22px;margin:16px 0;overflow-wrap:anywhere}
.theory h2,.theory h3{margin:.2em 0}
.theory ul{padding-left:24px}
.theory table{border-collapse:collapse;margin:8px 0;display:block;overflow-x:auto;max-width:100%}
.theory td,.theory th{border:2px solid #5bc0eb;padding:4px 12px;background:#fff}
main ul{padding-left:26px}
main li{margin:4px 0}
main li a{color:#1d4ed8;font-weight:700}

/* ---- Nút ---- */
.btn{display:inline-block;font:inherit;font-weight:800;font-size:22px;padding:12px 26px;border:0;border-radius:999px;background:var(--pri);color:#fff;cursor:pointer;box-shadow:0 5px 0 rgba(0,0,0,.18);text-decoration:none;margin:6px 6px 6px 0;text-align:center}
.btn:active{transform:translateY(3px);box-shadow:0 2px 0 rgba(0,0,0,.18)}
.btn.alt{background:var(--alt)}.btn.ok{background:var(--ok)}
.btn[disabled]{opacity:.5;cursor:not-allowed}

/* ---- Bài tập ---- */
.bar{height:16px;background:#f1e4da;border-radius:99px;overflow:hidden;margin:8px 0 16px}
.bar i{display:block;height:100%;background:linear-gradient(90deg,#ffd166,var(--ok));transition:width .3s}
.qbox{background:#fff;border-radius:var(--r);padding:22px;box-shadow:0 6px 0 rgba(0,0,0,.08)}
.q{font-size:26px;font-weight:700;margin:0 0 14px;white-space:pre-line;overflow-wrap:anywhere}
.opts{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.opt{font:inherit;font-size:22px;font-weight:700;min-height:56px;padding:12px 14px;border-radius:16px;border:4px solid #e2d6cd;background:#fffdfb;cursor:pointer;text-align:center;color:inherit;overflow-wrap:anywhere;touch-action:manipulation}
.opt:hover:not([disabled]){border-color:var(--alt);background:#eaf3ff}
.opt.right{border-color:var(--ok);background:#dcf7e8}.opt.wrong{border-color:var(--bad);background:#ffe3df}
.opt.sel{border-color:var(--alt);background:#dbeaff}.opt.done{border-color:var(--ok);background:#dcf7e8;opacity:.7}
.opt[disabled]{color:inherit;cursor:default}
.fill-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
input.ans{font:inherit;font-size:26px;padding:10px 14px;border:4px solid #e2d6cd;border-radius:16px;width:min(100%,320px)}
input.ans:focus{outline:none;border-color:var(--alt)}
.fb{display:flex;flex-wrap:wrap;align-items:center;margin-top:14px;font-size:22px;font-weight:700;padding:12px 16px;border-radius:14px}
.fb.ok{background:#dcf7e8;color:#126b3f}.fb.bad{background:#ffe3df;color:#9b2c1c}
.fb small{display:block;flex-basis:100%;font-weight:400;font-size:18px;color:#333;margin-top:4px}
.match{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.stars{font-size:48px;letter-spacing:6px}
.result{text-align:center;background:#fff;border-radius:var(--r);padding:24px;box-shadow:0 6px 0 rgba(0,0,0,.08)}

/* ---- Tiến độ ---- */
.badge{display:inline-block;background:#fff3b0;border:3px solid #ffd166;border-radius:999px;padding:4px 14px;margin:4px;font-weight:700;font-size:18px}
.badge.off{filter:grayscale(1);opacity:.45}
table.prog{width:100%;border-collapse:collapse;background:#fff;border-radius:16px;overflow:hidden}
table.prog th,table.prog td{padding:8px 12px;border-bottom:2px solid #f4e6da;text-align:left;font-size:18px}
table.prog th{background:var(--bo-soft)}
.tag{font-size:15px;color:#6b6070}
code{background:#fff;border-radius:8px;padding:2px 8px}

.confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:50}
.confetti span{position:absolute;top:-30px;font-size:30px;animation:fall 2.5s linear forwards}
@keyframes fall{to{transform:translateY(110vh) rotate(360deg)}}

/* ---- Tính năng mới: streak, nhiệm vụ, Bo, thử thách, phụ huynh, in phiếu ---- */
.btn.sm{font-size:17px;padding:8px 16px;box-shadow:0 3px 0 rgba(0,0,0,.18)}
.btn.ghost{background:#fff;color:var(--ink);border:3px solid #e2d6cd;box-shadow:0 4px 0 rgba(0,0,0,.08)}
.nav a{position:relative}
.nbadge{position:absolute;top:-4px;right:-4px;background:#e8543f;color:#fff;border-radius:999px;font-size:12px;line-height:1;padding:3px 6px;font-weight:800}
.stats{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin:14px 0}
.stat{display:block;background:#fff;border-radius:18px;padding:10px 14px;text-align:center;text-decoration:none;box-shadow:0 4px 0 rgba(0,0,0,.08)}
.stat b{display:block;font-size:24px;line-height:1.3}
.stat small{display:block;color:#776b7c;font-size:15px;line-height:1.3}
.missions{background:#fff;border-radius:var(--r);padding:12px 18px;box-shadow:0 6px 0 rgba(0,0,0,.08);margin:16px 0}
.missions h2{margin:.2em 0 .4em}
.mission{display:flex;align-items:center;gap:12px;padding:8px 0;border-top:2px dashed #f4e6da}
.mission:first-of-type{border-top:0}
.mission .mi{font-size:30px}
.mission .mt{flex:1;font-weight:700;font-size:18px}
.mission.done .mt{color:#126b3f}
.bar.thin{height:8px;margin:6px 0 0}
.grid.quick .card{padding:14px}
.reward{font-size:22px;font-weight:800;color:#a0522d}
.fb .coin{margin-left:auto;font-size:18px;color:#a0522d}
.speak{font:inherit;font-size:20px;line-height:1;border:0;background:var(--bo-soft);border-radius:999px;padding:6px 9px;cursor:pointer;vertical-align:middle}
.speak:hover{background:#ffd0b8}
.ai{flex-basis:100%;margin-top:8px}
.ai-out{font-weight:500;font-size:18px;color:#3a3340;margin-top:6px;white-space:pre-line}
.ai-out:empty{display:none}
.ai-out .speak{font-size:16px;margin-left:6px}
.toast{position:fixed;left:50%;bottom:calc(90px + var(--safe-b));transform:translateX(-50%);z-index:60;background:#3a3340;color:#fff;padding:10px 20px;border-radius:999px;font-weight:700;font-size:17px;box-shadow:0 6px 18px rgba(0,0,0,.2);transition:opacity .5s;max-width:92vw;text-align:center}
.toast.out{opacity:0}
.timer{position:sticky;top:74px;z-index:15;display:inline-block;background:#fff;border:3px solid var(--alt);border-radius:999px;padding:2px 16px;font-weight:800;font-size:22px;margin:4px 0}
.timer.low{border-color:var(--bad);color:var(--bad);animation:pulse .8s infinite}
@keyframes pulse{50%{transform:scale(1.08)}}
/* Bo kèm phụ kiện */
.bo-av{position:relative;display:inline-block;line-height:0}
.bo-av .bo{width:100%;height:100%}
.bo-av.bo-hero{width:110px;height:110px}
.bo-av.bo-big{width:170px;height:170px}
.bo-av .acc{position:absolute;line-height:1;pointer-events:none}
.bo-av .acc-head{top:-14%;left:50%;transform:translateX(-50%);font-size:44%}
.bo-av .acc-face{top:53%;left:50%;transform:translate(-50%,-50%);font-size:34%}
.bo-av .acc-hand{bottom:2%;right:-12%;font-size:36%;transform:rotate(12deg)}
.bo-av.bo-hero .acc{font-size:44px}.bo-av.bo-hero .acc-face{font-size:36px}.bo-av.bo-hero .acc-hand{font-size:38px}
.bo-av.bo-big .acc{font-size:68px}.bo-av.bo-big .acc-face{font-size:56px}.bo-av.bo-big .acc-hand{font-size:58px}
.hero .bo-av,.result .bo-av{display:block;margin:0 auto 4px}
.bo-av.lv0 .bo{filter:grayscale(.3) brightness(1.05)}
.bo.sleepy{transform:rotate(-12deg);opacity:.85;animation:none}
.shop .card.item{padding:12px}
.shop .card.worn{background:#eaf3ff}
.shop .btn{margin:8px 0 0}
/* Luyện phát âm */
.qbox.word{text-align:center}
.big-word{font-size:54px;font-weight:800;color:var(--alt);line-height:1.2;margin:8px 0;overflow-wrap:anywhere}
/* Góc phụ huynh */
.chart{display:flex;align-items:flex-end;gap:8px;height:180px;background:#fff;border-radius:var(--r);padding:12px 12px 8px;box-shadow:0 6px 0 rgba(0,0,0,.08)}
.chart .col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%}
.chart i{display:block;width:70%;max-width:46px;background:linear-gradient(180deg,#ffb067,var(--bo));border-radius:10px 10px 4px 4px}
.chart .v{font-size:14px;font-weight:700;color:#776b7c}
.chart .d{font-size:13px;color:#776b7c;margin-top:4px}
pre.report{white-space:pre-wrap;background:#fff;border-radius:16px;padding:12px 16px;font:inherit;font-size:17px;border:3px dashed #e2d6cd}
.sel{font:inherit;font-size:18px;padding:8px 12px;border:3px solid #e2d6cd;border-radius:14px;background:#fff;max-width:100%}
.picker{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.picker .btn{margin:0}
.toggle{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:2px dashed #cfe9f7;cursor:pointer}
.toggle input[type=checkbox]{width:28px;height:28px;flex:none;order:2;accent-color:var(--ok)}
.toggle span{flex:1}
.toggle small{display:block;font-size:15px;color:#6b6070}
.chk{font-size:18px;font-weight:700;display:inline-flex;gap:6px;align-items:center}
.chk input{width:22px;height:22px}
/* Phiếu bài tập */
.sheet{background:#fff;border-radius:var(--r);padding:24px 28px;box-shadow:0 6px 0 rgba(0,0,0,.08);font-size:18px}
.sheet-head{display:flex;gap:12px;align-items:center;border-bottom:3px solid var(--bo);padding-bottom:8px;font-size:18px}
.sheet-head b{font-size:22px}
.sheet-name{margin:14px 0}
ol.ws{padding-left:28px}
ol.ws li{margin:0 0 16px;break-inside:avoid}
.wq{font-weight:700;margin:0 0 6px;white-space:pre-line}
.wopts{display:flex;flex-wrap:wrap;gap:6px 26px}
.wopts .box{border:2px solid #999;border-radius:8px;padding:2px 10px}
table.wmatch td{padding:3px 10px}
table.wmatch .dots{color:#bbb;white-space:pre}
.sheet-foot{color:#776b7c;font-size:15px;text-align:center;border-top:2px dashed #ddd;padding-top:8px}
.key{break-before:page;page-break-before:always;margin-top:24px;border-top:3px solid var(--bo);padding-top:8px}
/* ---- Mầm non: thẻ hình lật + Bé tìm hình ---- */
.center{text-align:center;justify-content:center}
.fc{display:block;width:min(100%,440px);height:min(64vh,470px);min-height:340px;margin:8px auto 0;padding:0;border:0;background:none;cursor:pointer;font:inherit;color:inherit;perspective:1400px;touch-action:pan-y}
.fc-in{position:relative;width:100%;height:100%;transition:transform .55s;transform-style:preserve-3d}
.fc.flip .fc-in{transform:rotateY(180deg)}
.fc-face{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:18px;text-align:center;background:#fff;border:6px solid var(--c,#ffb067);border-radius:30px;box-shadow:0 8px 0 rgba(0,0,0,.1);backface-visibility:hidden;-webkit-backface-visibility:hidden}
.fc-back{transform:rotateY(180deg);background:#fffaf2}
.fc-emoji{font-size:clamp(110px,30vw,190px);line-height:1.1}
.fc-emoji.sm{font-size:clamp(70px,18vw,110px)}
.fc-x{font-size:clamp(22px,6vw,32px);letter-spacing:2px;max-width:100%;overflow-wrap:anywhere}
.fc-word{font-size:clamp(30px,8vw,44px);font-weight:800;line-height:1.2}
.fc-word.sm{font-size:24px;color:#776b7c}
.fc-en{font-size:clamp(36px,10vw,56px);font-weight:800;color:var(--alt);line-height:1.15}
.fc-s{font-size:20px;margin:6px 0 0;max-width:30em}
.fc-nav{display:flex;justify-content:center;align-items:center;gap:12px;margin:14px 0 4px}
.fc-nav .btn{font-size:30px;padding:8px 26px;margin:0}
.fc-count{font-weight:800;font-size:20px;color:#776b7c}
.prompt{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;font-size:clamp(24px,6vw,32px);font-weight:800;margin:6px 0 16px;text-align:center}
.prompt .bo-sm{margin:0}
.pick{display:grid;grid-template-columns:1fr 1fr;gap:14px;max-width:520px;margin:0 auto}
.pick button{font:inherit;font-size:clamp(64px,19vw,104px);line-height:1.25;padding:12px 0;background:#fff;border:5px solid #e2d6cd;border-radius:26px;cursor:pointer;box-shadow:0 6px 0 rgba(0,0,0,.08);touch-action:manipulation}
.pick button:hover:not([disabled]){border-color:var(--alt)}
.pick button[disabled]{cursor:default}
.pick .right{border-color:var(--ok);background:#dcf7e8;transform:scale(1.04)}
.pick .wrong{border-color:var(--bad);background:#ffe3df;opacity:.6;animation:shake .4s}
@keyframes shake{25%{transform:translateX(-8px)}75%{transform:translateX(8px)}}
.pcards{display:grid;grid-template-columns:repeat(3,1fr);margin-top:12px}
.pcard{border:2px dashed #bbb;padding:14px 8px;text-align:center;break-inside:avoid;page-break-inside:avoid}
.pcard .e{font-size:76px;line-height:1.15}
.pcard .x{font-size:20px;overflow-wrap:anywhere}
.pcard b{display:block;font-size:24px}
.pcard small{display:block;font-size:19px;color:#2f6fd6}
.fc-pic{flex:1 1 auto;min-height:0;width:100%;display:flex;align-items:center;justify-content:center}
.fc-pic.sm{flex:0 1 42%}
.mn-photo{display:block;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:cover;border-radius:20px;background:#f4ece4;-webkit-user-drag:none;user-select:none}
.mn-photo.mn-svg{object-fit:contain;background:none;border-radius:0}
.fc-pic.sm .mn-photo{width:auto;max-width:80%;aspect-ratio:4/3}
.fc-pic.sm .mn-photo.mn-svg{aspect-ratio:1}
.mn-swatch{display:block;width:min(56vw,230px);aspect-ratio:1;border-radius:50%;border:6px solid #3a3340;box-shadow:inset 0 -10px 0 rgba(0,0,0,.08)}
.mn-swatch.small{width:min(30vw,120px)}
.mn-swatch.pick{width:70%;margin:0 auto}
.mn-swatch.print{width:90px;margin:0 auto}
.mn-swatch.tile{width:90px}
.fc-pic .fc-emoji{font-size:clamp(110px,30vw,190px);line-height:1.1}
.fc-pic.sm .fc-emoji{font-size:clamp(70px,18vw,110px)}
.credit-box{min-height:22px;text-align:center}
.credit{font-size:12px;color:#8a7f8e;margin:6px 0 0;overflow-wrap:anywhere}
.credit a{color:inherit}
.pick button{aspect-ratio:4/3;padding:6px;overflow:hidden;display:flex;align-items:center;justify-content:center}
.pick .mn-photo{border-radius:18px}
.pick .fc-emoji{font-size:inherit}
.mn-tile{padding:10px 10px 14px}
.tile-pic{position:relative;aspect-ratio:4/3;margin-bottom:6px}
.tile-pic .mn-photo{border-radius:14px}
.tile-ic{position:absolute;right:6px;bottom:6px;font-size:28px;background:#fff;border-radius:50%;width:44px;height:44px;line-height:44px;box-shadow:0 2px 6px rgba(0,0,0,.15)}
.pcard .e .mn-photo{width:100%;height:auto;aspect-ratio:4/3;border-radius:10px}
.pcard .e .mn-photo.mn-svg{aspect-ratio:1;max-height:140px}
/* ---- Khu vui chơi Mầm non (js/kids.js) ---- */
.big-start{font-size:28px;padding:16px 40px}
.big-play{font-size:22px;padding:8px 18px;margin:0}
.reward-btn{background:linear-gradient(90deg,#ff4f4f,#ff9f1c);animation:pulse 1.6s infinite}
.pick.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.pick.three button{aspect-ratio:auto;flex-direction:column;padding:6px 6px 8px}
.pick.three .mn-photo{aspect-ratio:4/3;height:auto}
.pick-name{display:block;font-size:17px;font-weight:800;margin-top:4px;line-height:1.2}
/* sticker */
.sticker-pop{position:fixed;left:50%;top:84px;transform:translateX(-50%);z-index:70;display:flex;gap:12px;align-items:center;background:#fff;border:4px solid #ffd166;border-radius:22px;padding:8px 18px 8px 8px;box-shadow:0 10px 30px rgba(0,0,0,.2);animation:pop .45s cubic-bezier(.2,1.6,.4,1);transition:opacity .5s}
.sticker-pop.out{opacity:0}
.sticker-pop .sp-pic{width:74px;height:56px;border-radius:12px;overflow:hidden;transform:rotate(-6deg);border:3px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.2);display:flex;align-items:center;justify-content:center;font-size:40px}
.sticker-pop .sp-pic .mn-photo{border-radius:0}
.sticker-pop b{display:block;font-size:18px;white-space:nowrap}.sticker-pop span{font-weight:700}.sticker-pop small{display:block;color:#a0522d;font-weight:700}
@keyframes pop{0%{transform:translateX(-50%) scale(.3)}100%{transform:translateX(-50%) scale(1)}}
.album{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:14px;margin:14px 0;background:#fff8e1;border:4px dashed #ffd166;border-radius:var(--r);padding:16px}
.stk{position:relative;aspect-ratio:4/3;border:0;border-radius:16px;background:#efe6d8;cursor:pointer;padding:0;overflow:visible;font:inherit}
.stk.have{background:#fff;padding:5px;transform:rotate(var(--r));box-shadow:0 4px 10px rgba(0,0,0,.18)}
.stk.have .mn-photo{border-radius:11px}
.stk.have .fc-emoji{font-size:54px}
.stk-q{font-size:40px;font-weight:800;color:#c9b9a4}
.stk-name{position:absolute;left:50%;bottom:-12px;transform:translateX(-50%);background:#fff;border-radius:999px;padding:0 10px;font-size:14px;font-weight:800;white-space:nowrap;box-shadow:0 2px 4px rgba(0,0,0,.15)}
.album-tile.full{background:#fffbe6}
/* trang chủ kiểu YouTube Kids */
.yt-hero{display:flex;align-items:center;gap:14px}
.yt-hero h1{margin:4px 0 0}
.yt-cats{display:flex;gap:12px;overflow-x:auto;padding:6px 2px 12px;scroll-snap-type:x mandatory}
.yt-cat{flex:0 0 auto;scroll-snap-align:start;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:118px;height:110px;border-radius:24px;background:var(--c);color:#fff;font-weight:800;text-decoration:none;box-shadow:0 6px 0 rgba(0,0,0,.15);text-align:center;font-size:16px;line-height:1.15;padding:6px}
.yt-cat-ic{font-size:44px;line-height:1.1}
.yt-cat:active{transform:translateY(3px)}
.yt-row{margin:10px 0 6px}
.yt-row-head{display:flex;align-items:baseline;justify-content:space-between}
.yt-row-head h2{margin:.3em 0}
.yt-row-head a{font-weight:800;color:var(--bo-dark)}
.yt-scroll{display:flex;gap:12px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x mandatory}
.yt-tile{flex:0 0 200px;scroll-snap-align:start;text-decoration:none}
.yt-thumb,.ep-thumb{position:relative;aspect-ratio:16/9;border-radius:16px;overflow:hidden;background:var(--c,#ffe3d3);display:flex;align-items:center;justify-content:center;box-shadow:0 4px 0 rgba(0,0,0,.1)}
.yt-thumb img,.ep-thumb img{width:100%;height:100%;object-fit:cover}
.yt-ic,.ep-ic{font-size:56px}
.yt-title,.ep-title{font-weight:800;font-size:16px;line-height:1.25;margin-top:6px}
.ep-dur{position:absolute;right:6px;bottom:6px;background:rgba(0,0,0,.75);color:#fff;font-size:13px;font-weight:700;border-radius:6px;padding:1px 6px}
.ep-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:52px;height:52px;border-radius:50%;background:rgba(255,79,79,.92);color:#fff;font-size:24px;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,.3)}
.eps{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;margin:14px 0}
.ep{text-decoration:none}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-block;background:#fff;border:3px solid #e2d6cd;border-radius:999px;padding:6px 14px;font-weight:800;text-decoration:none;font-size:17px}
.chip:hover{border-color:var(--alt)}
/* Bo TV */
.tv-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tv-head h1{margin:0}
.tv{position:relative;aspect-ratio:16/10;max-height:72vh;width:100%;background:#111;border-radius:22px;overflow:hidden;box-shadow:0 8px 0 rgba(0,0,0,.15);color:#fff}
.tv-stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.tv-stage .kb{width:100%;height:100%;object-fit:cover;animation:kb0 9s ease-out forwards, fadein .6s}
.tv-stage .kb.svg{object-fit:contain;background:#fff;padding:8%}
.tv-stage .kb1{animation-name:kb1,fadein}.tv-stage .kb2{animation-name:kb2,fadein}.tv-stage .kb3{animation-name:kb3,fadein}
@keyframes kb0{from{transform:scale(1)}to{transform:scale(1.15) translate(-2%,-1%)}}
@keyframes kb1{from{transform:scale(1.15) translate(2%,0)}to{transform:scale(1)}}
@keyframes kb2{from{transform:scale(1.05) translate(-3%,2%)}to{transform:scale(1.18) translate(3%,-2%)}}
@keyframes kb3{from{transform:scale(1.2)}to{transform:scale(1.05) translate(0,2%)}}
@keyframes fadein{from{opacity:0}to{opacity:1}}
.kb-color{width:60%;aspect-ratio:1;border-radius:50%;border:8px solid #fff}
.kb-emoji{font-size:min(30vw,200px)}
.tv-logo{position:absolute;left:12px;top:10px;display:flex;align-items:center;gap:6px;background:rgba(0,0,0,.45);border-radius:999px;padding:3px 12px 3px 4px;font-weight:800;font-size:16px}
.tv-logo .bo{width:30px;height:30px;background:#fff;border-radius:50%}
.tv-cap{position:absolute;left:0;right:0;bottom:52px;text-align:center;text-shadow:0 2px 6px rgba(0,0,0,.8)}
.tv-cap b{display:inline-block;font-size:clamp(28px,7vw,52px);background:rgba(0,0,0,.35);border-radius:16px;padding:0 18px}
.tv-cap span{display:block;font-size:clamp(20px,4.5vw,30px);font-weight:800;color:#ffd166}
.tv-credit{font-size:11px;color:#ddd;margin:2px 0 0;text-shadow:none}.tv-credit a{color:#ddd}
.tv-ctrl{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:center;gap:8px;padding:6px 10px;background:linear-gradient(transparent,rgba(0,0,0,.7))}
.tv-btn{font:inherit;font-size:22px;background:rgba(255,255,255,.18);color:#fff;border:0;border-radius:12px;min-width:44px;height:40px;cursor:pointer;text-decoration:none;display:flex;align-items:center;justify-content:center}
.tv-prog{flex:1;display:flex;gap:4px}
.tv-prog i{flex:1;height:7px;border-radius:4px;background:rgba(255,255,255,.3)}
.tv-prog i.done{background:#ff4f4f}.tv-prog i.cur{background:#ffd166}
.tv-over{position:absolute;inset:0;display:none;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:rgba(0,0,0,.55);padding:14px;z-index:2}
.tv-over.on{display:flex}
.tv-q{display:flex;align-items:center;gap:8px;font-size:clamp(22px,5vw,32px);font-weight:800;background:#fff;color:var(--ink);border-radius:999px;padding:6px 20px 6px 8px}
.tv-q .bo-sm{margin:0}
.tv-pick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:min(100%,640px)}
.tv-pick button{aspect-ratio:4/3;padding:5px;background:#fff;border:5px solid #fff;border-radius:18px;cursor:pointer;overflow:hidden;display:flex;align-items:center;justify-content:center;font-size:60px}
.tv-pick .right{border-color:var(--ok)}.tv-pick .wrong{border-color:var(--bad);opacity:.5;animation:shake .4s}
.tv-start{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.tv-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:brightness(.7)}
.tv-bigplay{position:relative;width:110px;height:110px;border-radius:50%;border:0;background:#ff4f4f;color:#fff;font-size:50px;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.4);animation:pulse 1.6s infinite}
.tv-end{background:#fff;color:var(--ink);border-radius:22px;padding:16px;text-align:center;max-width:94%;max-height:96%;overflow:auto}
.tv-end h2{margin:.2em 0}
.tv.paused .kb{animation-play-state:paused}
.tv-title{font-size:24px}
/* truyện */
.story{background:#fff;border-radius:var(--r);padding:14px;box-shadow:0 6px 0 rgba(0,0,0,.08);text-align:center}
.scene{width:min(100%,520px,calc(30vh * 1.67));margin:0 auto 6px;border-radius:18px;overflow:hidden}
.story{padding:10px}
.story .prompt{font-size:clamp(19px,4.6vw,26px);margin:4px 0 10px;flex-wrap:nowrap;text-align:left}
.story .prompt .bo-sm{flex:none}
.scene svg{display:block;width:100%;height:auto}
.emoji-scene{font-size:clamp(60px,15vh,110px);background:#e8f7ff;padding:10px 0;line-height:1.2}
/* mini game */
.mem{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-width:560px;margin:10px auto}
.mem-card{aspect-ratio:3/4;border:0;padding:0;background:none;perspective:800px;cursor:pointer}
.mem-in{position:relative;width:100%;height:100%;transition:transform .45s;transform-style:preserve-3d}
.mem-card.flip .mem-in{transform:rotateY(180deg)}
.mem-back,.mem-front{position:absolute;inset:0;border-radius:16px;backface-visibility:hidden;-webkit-backface-visibility:hidden;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 4px 0 rgba(0,0,0,.12)}
.mem-back{background:repeating-linear-gradient(45deg,#ff7a59,#ff7a59 12px,#ff9a7a 12px,#ff9a7a 24px);border:4px solid #fff}
.mem-back .bo{width:60%;background:#fff;border-radius:50%;padding:4px}
.mem-front{transform:rotateY(180deg);background:#fff;border:4px solid #fff}
.mem-front .mn-photo{border-radius:10px}
.mem-card.ok .mem-front{border-color:var(--ok)}
.pz-wrap{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap;justify-content:center}
.pz{display:grid;grid-template-columns:repeat(var(--n),1fr);gap:4px;width:min(92vw,440px);aspect-ratio:1;background:#3a3340;border:4px solid #3a3340;border-radius:16px;overflow:hidden}
.pz-tile{position:relative;overflow:hidden;border:0;padding:0;cursor:pointer;background:#ddd}
.pz-tile img{position:absolute;object-fit:cover;max-width:none;pointer-events:none;-webkit-user-drag:none}
.pz-tile.sel{outline:5px solid #ffd166;outline-offset:-5px;z-index:1}
.pz.done{gap:0}
.pz-hint{width:110px;text-align:center}
.pz-hint img{width:110px;aspect-ratio:1;object-fit:cover;border-radius:12px;border:3px solid #fff;box-shadow:0 3px 8px rgba(0,0,0,.15)}
.pz-full{max-width:420px;margin:0 auto;aspect-ratio:4/3}
.palette{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:8px 0}
.pcol{width:46px;height:46px;border-radius:50%;border:4px solid #fff;box-shadow:0 0 0 2px #cfc3b8;cursor:pointer;font-size:20px}
.pcol.on{box-shadow:0 0 0 4px var(--ink);transform:scale(1.12)}
.color-art{background:#fff;border-radius:var(--r);padding:8px;box-shadow:0 6px 0 rgba(0,0,0,.08);max-width:640px;margin:0 auto}
.color-art svg{display:block;width:100%;height:auto;touch-action:manipulation}
.color-art .r{cursor:pointer;transition:fill .15s}
/* video thưởng */
.rv-modal{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.85);display:flex;flex-direction:column;padding:10px;padding-top:max(10px,env(safe-area-inset-top))}
.rv-bar{display:flex;align-items:center;gap:12px;color:#fff;font-size:18px;margin-bottom:8px}
.rv-bar b{flex:1}.rv-bar .btn{margin:0}
.rv-timer{font-weight:800;background:#ff4f4f;border-radius:999px;padding:2px 12px}
.rv-frame{flex:1;display:flex;align-items:center;justify-content:center}
.rv-frame iframe{width:100%;max-width:960px;aspect-ratio:16/9;height:auto;max-height:100%;border:0;border-radius:14px;background:#000}
.rv-end{background:#fff;border-radius:22px;padding:20px;text-align:center}
.rv-list{list-style:none;padding:0}
.rv-list li{display:flex;align-items:center;gap:10px;margin:6px 0}
.rv-list img{border-radius:6px}
.rv-list span{flex:1;font-weight:700}
/* ---- Bố cục & khoảng cách hình – chữ (rà soát 2026-11) ---- */
.mn-tile{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:10px 10px 14px}
.mn-tile .tile-pic{margin:0 0 10px}
.mn-tile .name{line-height:1.2;margin:0 2px;min-height:2.4em;display:flex;align-items:center;justify-content:center}
.mn-tile small{margin-top:4px;line-height:1.3}
.mn-tile .bar.thin{margin-top:8px}
.tile-pic.ph{display:flex;align-items:center;justify-content:center;border-radius:14px;background:#fff4ea;background:color-mix(in srgb,var(--c,#ffb067) 16%,#fff)}
.ep-thumb.ph{background:#fff4ea;background:color-mix(in srgb,var(--c,#ffb067) 16%,#fff)}
.ep-thumb.ph .ph-row{height:60%}
.ph-row{display:flex;gap:6%;align-items:center;justify-content:center;width:86%;height:70%}
.ph-row img{height:100%;max-width:30%;object-fit:contain}
.ph-dot{width:20%;aspect-ratio:1;border-radius:50%;border:3px solid #3a3340}
.ph-emoji{font-size:clamp(30px,8vw,46px);letter-spacing:4px}
.yt-cats,.yt-scroll{scrollbar-width:none;-ms-overflow-style:none}
.yt-cats::-webkit-scrollbar,.yt-scroll::-webkit-scrollbar{display:none}
.yt-row{margin:14px 0 4px}
.yt-row-head h2{margin:.2em 0 .45em}
.yt-title,.ep-title{margin-top:8px}
.yt-hero{margin-bottom:6px}
.yt-hero .bubble{margin:0 0 4px}
.yt-hero .bubble:before{top:50%;left:-11px;margin:-9px 0 0;border:9px solid transparent;border-left:0;border-right-color:var(--bo)}
#mn-cards{margin-top:6px}
.fc{height:min(54vh,460px);min-height:320px}
.fc-face{gap:10px;padding:16px 16px 14px}
.fc-front .fc-word{margin-top:2px}
.fc-front .tag{margin:0}
.fc-back .fc-en{margin-top:4px}
.fc-s{margin-top:2px}
.credit-box{margin-top:10px}
.credit{margin:0}
.fc-nav{margin:12px 0 2px}
.pick button{gap:6px}
.pick.three .pick-name{margin-top:6px}
.pcard b{margin-top:8px}
@media print{
  body{background:#fff;font-size:15px}
  .top,.foot,.nav,.noprint,.toast,.confetti{display:none!important}
  main{max-width:none;padding:0}
  .sheet{box-shadow:none;padding:0;font-size:15px}
  .theory{border:2px solid #999;background:#fff}
}

/* ================= Điện thoại ================= */
@media (max-width:640px){
  body{font-size:18px}
  .top{padding:8px 14px;padding-top:max(8px,env(safe-area-inset-top))}
  .logo{font-size:22px;gap:8px}
  .logo img{width:36px;height:36px}
  /* Thanh điều hướng chuyển xuống đáy màn hình */
  .nav{position:fixed;left:0;right:0;bottom:0;z-index:30;display:grid;grid-template-columns:repeat(4,1fr);gap:0;background:#fff;border-top:2px solid #f4e6da;padding:6px 8px calc(6px + var(--safe-b));box-shadow:0 -4px 14px rgba(58,51,64,.08)}
  .nav a{flex-direction:column;gap:0;background:none;color:var(--ink);padding:4px 0;border-radius:12px;font-size:13px}
  .nav a .ni{font-size:24px;line-height:1.2}
  .nav a:active{background:var(--bo-soft)}
  main{padding:14px 12px 16px}
  .foot{padding-bottom:calc(86px + var(--safe-b))}
  h1{font-size:26px}
  h2{font-size:22px}
  .hero p{font-size:18px}
  .bo-hero{width:84px;height:84px}
  .bo-sm{width:38px;height:38px}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}
  .card{padding:14px 10px;border-width:3px;box-shadow:0 4px 0 rgba(0,0,0,.1)}
  .card .big{font-size:42px}
  .card .name{font-size:19px}
  .card small{font-size:14px}
  .crumb{font-size:15px}
  .theory{padding:12px 14px;border-width:3px}
  .btn{font-size:19px;padding:12px 20px}
  .qbox,.result{padding:16px 14px}
  .qbox .btn,.result .btn{display:block;width:100%;margin:10px 0 0}
  .q{font-size:21px}
  .opts{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}
  .opt{font-size:19px;min-height:52px;padding:10px;border-width:3px}
  .fill-row .btn{margin:0}
  input.ans{width:100%;font-size:22px}
  .fb{font-size:19px}
  .match{gap:8px}
  .match .opt{font-size:16px;padding:8px 6px;min-height:48px}
  .stars{font-size:38px}
  table.prog th,table.prog td{font-size:15px;padding:6px 8px}
  .nbadge{top:0;right:calc(50% - 26px)}
  .stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .stat{padding:8px 6px}
  .stat b{font-size:18px}
  .stat small{font-size:12px}
  .mission .mt{font-size:16px}
  .mission .mi{font-size:24px}
  .timer{top:62px;font-size:19px}
  .bo-av.bo-hero{width:84px;height:84px}
  .bo-av.bo-hero .acc{font-size:34px}.bo-av.bo-hero .acc-face{font-size:28px}.bo-av.bo-hero .acc-hand{font-size:30px}
  .bo-av.bo-big{width:130px;height:130px}
  .bo-av.bo-big .acc{font-size:52px}.bo-av.bo-big .acc-face{font-size:42px}.bo-av.bo-big .acc-hand{font-size:44px}
  .big-word{font-size:40px}
  .chart{gap:4px;height:150px}
  .sheet{padding:14px}
  .toast{bottom:calc(84px + var(--safe-b))}
  .picker .sel{flex:1 1 100%}
  .pcards{grid-template-columns:repeat(2,1fr)}
  .eps{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .ep-title{font-size:15px}
  .mn-tile{padding:8px 8px 12px}
  .mn-tile .tile-pic{margin-bottom:8px}
  .fc{height:min(52vh,420px);min-height:300px}
  .yt-hero .bo-av.bo-hero{width:72px;height:72px}
  .yt-cat{width:96px;height:96px;font-size:14px}.yt-cat-ic{font-size:36px}
  .yt-tile{flex-basis:160px}
  .tv{aspect-ratio:3/4;max-height:70vh}
  .tv-cap{bottom:56px}
  .mem{gap:7px}
  .pz-hint{display:none}
  .album{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px}
  .pick.three{gap:8px}
  .pick-name{font-size:14px}
  .sticker-pop{top:70px}
  .fc-nav .btn{font-size:26px;padding:8px 20px}
  .pick{gap:10px}
}
@media (min-width:641px){.toast{bottom:30px}}
@media (max-width:360px){
  .logo span{font-size:19px}
  .card .name{font-size:17px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
