/* teach.css · tab Dạy: trình chiếu thẻ và game cả lớp (máy chiếu, khổ ngang) */
.tc-ov{position:fixed;inset:0;z-index:200;background:radial-gradient(circle at 50% 0,#24357e,#0b1440 70%);color:#fff;display:flex;flex-direction:column;overflow:hidden;font-size:clamp(14px,1.25vw,20px)}
.tc-bar{flex:none;height:3.4em;display:flex;align-items:center;gap:.8em;padding:0 1.4em;background:rgba(6,12,44,.6);border-bottom:1px solid rgba(248,221,133,.25);font-weight:800}
.tc-wm b{color:#f8dd85}.tc-wm i{font-style:normal;color:#d6dcf0}.tc-u{color:#f8dd85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tc-g{flex:1}
.tc-pill{background:rgba(255,255,255,.1);border-radius:99px;padding:.35em .9em;white-space:nowrap}
.tc-btn{font:inherit;font-weight:900;border:0;border-radius:99px;padding:.5em 1.2em;background:linear-gradient(180deg,#f8dd85,#e0b762);color:#101d54;cursor:pointer;white-space:nowrap}
.tc-btn.ghost{background:rgba(255,255,255,.12);color:#fff}.tc-btn.big{font-size:1.3em;padding:.6em 2em}.tc-btn:disabled{opacity:.4;cursor:default}
.tc-x{font:inherit;font-size:1.5em;width:1.7em;height:1.7em;border-radius:50%;border:0;background:rgba(255,255,255,.12);color:#fff;cursor:pointer;line-height:1}
.tc-ov .d{fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.tc-ov svg text{fill:#fff}
/* trình chiếu */
.tc-card{flex:1;margin:2.2em 7vw 1em;background:#101d54;border:2px solid rgba(248,221,133,.45);border-radius:1.6em;display:flex;align-items:center;gap:3vw;padding:2em 3.5vw;box-shadow:0 20px 50px rgba(0,0,0,.4);cursor:pointer;min-height:0}
.tc-pic{flex:0 0 46%;display:flex;align-items:center;justify-content:center;max-height:100%}.tc-pic svg{width:100%;height:auto;max-height:62vh}
.tc-nopic{background:rgba(255,255,255,.04);border-radius:1em;align-self:stretch;padding:1em;text-align:center}
.tc-txt{flex:1;display:flex;flex-direction:column;gap:.55em;min-width:0}
.tc-term{font-size:3.3em;font-weight:900;line-height:1.05}.tc-ipa{font-size:1.3em;color:#aab3d6;font-weight:600}
.tc-pos{display:inline-block;font-size:.85em;font-weight:800;background:rgba(248,221,133,.15);color:#f8dd85;border-radius:99px;padding:.2em .8em;width:max-content}
.tc-mean{font-size:1.75em;font-weight:800;color:#f8dd85}.tc-mean.big{font-size:2.2em}
.tc-ex{font-size:1.35em;color:#d6dcf0;line-height:1.45}.tc-exvi{font-size:1.05em;color:#aab3d6}
.tc-col{font-size:1em;color:#c3cae6;border-top:1px solid rgba(255,255,255,.12);padding-top:.5em}
.tc-guess{font-size:2.6em;font-weight:900;color:#aab3d6;letter-spacing:.1em}.tc-hint2{color:#aab3d6;font-size:1.15em}
.tc-spk{font:inherit;border:0;background:rgba(255,255,255,.12);border-radius:99px;padding:.1em .5em;cursor:pointer;color:#fff}.tc-spk.sm{font-size:.8em}
.tc-keys{flex:none;display:flex;justify-content:center;align-items:center;gap:1em;padding:0 0 1.2em;color:#aab3d6;font-weight:700;font-size:.9em}
.tc-keys b{background:rgba(255,255,255,.12);border-radius:.4em;padding:.15em .55em;color:#fff;margin-right:.2em}
.tc-keys button{font:inherit;font-size:1.6em;width:1.8em;height:1.8em;border-radius:50%;border:0;background:rgba(255,255,255,.12);color:#fff;cursor:pointer}
/* game: câu hỏi */
.tc-q{flex:none;margin:1.2em 2.4em 0;height:30vh;background:#101d54;border:2px solid rgba(248,221,133,.4);border-radius:1.3em;display:flex;align-items:center;gap:2em;padding:.8em 1.8em}
.tc-qp{width:30%;flex:none;height:100%;display:flex;align-items:center}.tc-qp svg{width:100%;height:100%}
.tc-qt{flex:1;font-size:1.9em;font-weight:800;line-height:1.35}.tc-qt u{text-decoration:none;border-bottom:3px solid #f8dd85;padding:0 1.6em}
.tc-qk{display:block;font-size:.55em;color:#aab3d6;font-weight:700;margin-bottom:.2em}
.tc-timer{width:4.6em;height:4.6em;border-radius:50%;border:.35em solid #f8dd85;display:grid;place-items:center;font-size:1.9em;font-weight:900;flex:none}
.tc-timer.low{border-color:#ff7a5a;color:#ffb3a3}
.tc-ansbox{flex:none;background:linear-gradient(180deg,#5fd08a,#2f9a5a);color:#fff;font-weight:900;font-size:2em;border-radius:.6em;padding:.35em .8em;max-width:40%;text-align:center}
.tc-foot{flex:none;display:flex;justify-content:center;align-items:center;gap:1em;padding:.8em 0 1.2em}
/* phòng chờ */
.tc-lobby{flex:1;display:flex;flex-direction:column;align-items:center;padding-top:2em;min-height:0}
.tc-lh{font-size:1.5em;color:#d6dcf0;font-weight:700}.tc-lh b{color:#f8dd85}
.tc-code{font-size:7em;font-weight:900;letter-spacing:.18em;color:#f8dd85;text-shadow:0 0 30px rgba(248,221,133,.4);line-height:1.2}
.tc-kids{display:flex;flex-wrap:wrap;gap:1.4em;justify-content:center;margin-top:1.5em;padding:0 3em;overflow-y:auto}
.tc-kid{width:7em;text-align:center;animation:tcIn .4s ease}.tc-kid img{height:5.5em;image-rendering:pixelated}.tc-kid b{display:block;font-size:.95em}
@keyframes tcIn{from{transform:scale(.4);opacity:0}to{transform:none;opacity:1}}
.tc-wait{color:#aab3d6;font-size:1.2em}
/* đua thú */
.tc-race{flex:1;margin:1em 2.4em 0 1.4em;display:flex;flex-direction:column;justify-content:center;min-height:0}
.tc-lane{flex:1;max-height:3.4em;display:flex;align-items:center;border-bottom:2px dashed rgba(255,255,255,.12)}
.tc-ln{width:8em;font-weight:800;text-align:right;padding-right:.8em;color:#d6dcf0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tc-tr{flex:1;position:relative;height:100%}
.tc-tr img{position:absolute;bottom:2px;height:90%;max-height:3.2em;transform:translateX(-50%);transition:left 1.2s cubic-bezier(.3,1.3,.5,1);image-rendering:pixelated}
.tc-fin{position:absolute;right:0;top:0;bottom:0;width:.6em;background:repeating-linear-gradient(0deg,#fff 0 .5em,#101d54 .5em 1em)}
.tc-mk{position:absolute;top:-2px;font-style:normal;font-weight:900;transform:translateX(-50%);font-size:.9em}.tc-mk.ok{color:#5fd08a}.tc-mk.no{color:#ff8a7a}.tc-mk.dot{color:#f8dd85}
/* đánh boss */
.tc-boss{flex:1;display:grid;grid-template-columns:14em 1fr 17em;gap:1em;padding:1em 2em 0;min-height:0}
.tc-bl{display:flex;flex-direction:column;gap:.3em;overflow:hidden}.tc-bk{display:flex;align-items:center;gap:.4em;font-weight:700;font-size:.9em}
.tc-bk img{height:2.2em;image-rendering:pixelated}.tc-bk.hit img{animation:tcAtk .5s ease}
@keyframes tcAtk{40%{transform:translateX(.6em) scale(1.15)}}
.tc-bc{display:flex;flex-direction:column;align-items:center;min-height:0}
.tc-bname{font-weight:900;font-size:1.1em}.tc-hp{width:80%;height:1.3em;border-radius:99px;background:rgba(0,0,0,.4);border:2px solid #fff;overflow:hidden;margin:.3em 0}
.tc-hp i{display:block;height:100%;background:linear-gradient(90deg,#ff5a5a,#ffb347);transition:width .6s ease}
.tc-bimg{position:relative;flex:1;width:100%;display:flex;justify-content:center;align-items:flex-end;min-height:0}
.tc-bimg img{height:100%;max-height:36vh;image-rendering:pixelated}.tc-bimg img.shake{animation:tcShake .4s}.tc-bimg img.dead{filter:grayscale(1) brightness(.6);transform:rotate(80deg) translateY(20%);transition:all .8s}
@keyframes tcShake{25%{transform:translateX(-6px)}50%{transform:translateX(6px)}75%{transform:translateX(-3px)}}
.tc-dmg{position:absolute;font-size:2em;font-weight:900;color:#ffd84a;text-shadow:0 3px 0 #a33;animation:tcUp 1.5s ease forwards;white-space:nowrap}.tc-dmg.crit{font-size:2.6em;color:#ff9a3d}
@keyframes tcUp{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-2em)}}
.tc-br{background:rgba(6,12,44,.6);border:1px solid rgba(255,255,255,.15);border-radius:1em;padding:.8em;align-self:start}
.tc-br h4{margin:0 0 .4em;color:#f8dd85}.tc-br div{display:flex;align-items:center;gap:.4em;font-weight:700;padding:.2em 0}.tc-br img{height:1.8em;image-rendering:pixelated}.tc-br b{margin-left:auto;color:#ffd84a}
/* kết quả */
.tc-done{flex:1;display:flex;flex-direction:column;align-items:center;min-height:0;padding-top:1.4em}
.tc-dh{font-size:2.4em;font-weight:900;color:#f8dd85}
.tc-pods{flex:1;display:flex;align-items:flex-end;gap:1.2em;min-height:0}
.tc-pod{display:flex;flex-direction:column;align-items:center;width:11em}.tc-pod img{height:8em;image-rendering:pixelated}.tc-pod.p1 img{height:10em}
.tc-pod b{font-size:1.3em;margin-top:.2em}.tc-pod small{color:#d6dcf0}
.tc-st{width:100%;margin-top:.4em;border-radius:.8em .8em 0 0;display:grid;place-items:center;font-size:2.6em;font-weight:900;color:#101d54}
.tc-pod.p1 .tc-st{height:5em;background:linear-gradient(180deg,#f8dd85,#c48f25)}.tc-pod.p2 .tc-st{height:3.6em;background:linear-gradient(180deg,#e6ecf7,#8a96b0)}.tc-pod.p3 .tc-st{height:2.6em;background:linear-gradient(180deg,#e2ae80,#8a5530)}
.tc-pod.empty{width:11em}
.tc-rest{display:flex;flex-wrap:wrap;gap:.4em 1.4em;justify-content:center;color:#d6dcf0;font-weight:700;margin-top:.8em;padding:0 2em}
.tc-gift{color:#aab3d6;margin-top:.5em;font-weight:700}
.tc-ov .hop{animation:hopL .7s ease infinite}
.tc-lane{max-height:5em}.tc-tr img{max-height:4.4em}
.tc-mk{top:50%;transform:translate(-50%,-50%);font-size:1.5em;z-index:2;background:rgba(6,12,44,.7);border-radius:99px;padding:0 .3em}
.tc-mk.dot{color:#aab3d6;font-size:1em}
.tc-qp.drawn .d{stroke-dashoffset:0!important;animation:none!important}
.tc-qp.drawn .show{opacity:1!important;animation:none!important}
/* màn chiếu: nút biểu tượng, lưới mọi thẻ */
.tc-ic{font:inherit;width:2.3em;height:2.3em;border-radius:50%;border:0;background:rgba(255,255,255,.12);color:#fff;display:grid;place-items:center;cursor:pointer;flex:none}
.tc-ic.on{background:#f8dd85;color:#101d54}
.tc-gh{flex:none;display:flex;gap:1em;align-items:baseline;padding:1.2em 2.4em .5em}.tc-gh b{font-size:1.4em;color:#f8dd85}.tc-gh span{color:#aab3d6}
.tc-gg{flex:1;min-height:0;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(10.5em,1fr));gap:.8em;padding:.4em 2.4em 1.6em;align-content:start}
.tc-gl{position:relative;font:inherit;background:#101d54;border:2px solid rgba(255,255,255,.15);border-radius:.8em;color:#fff;padding:.5em .4em .45em;display:flex;flex-direction:column;align-items:center;gap:.25em;cursor:pointer;min-width:0}
.tc-gl:hover{border-color:rgba(248,221,133,.6)}
.tc-gp{height:4.8em;width:100%;display:flex;justify-content:center;align-items:center;overflow:hidden}.tc-gp svg{height:100%;width:auto;max-width:100%}
.tc-gp i{font-style:normal;color:#f8dd85;font-size:.8em;text-align:center;line-height:1.25;overflow:hidden;max-height:100%}
.tc-gl b{font-size:.85em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.tc-gl.seen{opacity:.45}.tc-gl.cur{border-color:#f8dd85;box-shadow:0 0 0 3px rgba(248,221,133,.35)}
.tc-gn{position:absolute;left:.45em;top:.25em;font-size:.72em;color:#aab3d6;font-weight:800}
/* trang giáo viên: bảng mở Starter Pack */
.tc-opn{margin-left:auto;color:#b07d10;font-weight:800}
.tc-ulist{margin-top:6px}
.tc-ur{display:flex;align-items:center;gap:10px;padding:8px 2px;border-top:1px solid var(--line,#eef0f6);font-weight:600}
.tc-ur .grow{flex:1;min-width:0}.tc-ur small{color:var(--ink-2,#8a92b2);font-weight:500;white-space:nowrap}
.tc-sw{width:42px;height:24px;border-radius:12px;background:#cfd5e8;position:relative;flex:none;border:0;padding:0;cursor:pointer;transition:.2s}
.tc-sw:after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.tc-sw.on{background:#2fb36a}.tc-sw.on:after{left:21px}.tc-sw:disabled{opacity:.4;cursor:default}
.tc-gp .d{stroke-dashoffset:0!important;stroke-dasharray:none!important;animation:none!important}.tc-gp .show{opacity:1!important;animation:none!important}
.tc-tabs{display:flex;gap:6px;margin-top:14px}.tc-tabs button{flex:1;font:inherit;font-weight:700;border:0;border-radius:10px;padding:9px;background:#eef1f9;color:#101d54;cursor:pointer}.tc-tabs button.on{background:#101d54;color:#fff}
.tc-pr{display:flex;align-items:center;gap:10px;padding:9px 2px;border-top:1px solid var(--line,#eef0f6)}
.tc-pr .grow{flex:1;min-width:0}.tc-pr b{display:block;font-weight:700}.tc-pr small{display:block;color:var(--ink-2,#8a92b2);font-size:12.5px}
.tc-ur{padding-left:20px;border-top:1px dashed var(--line,#eef0f6)}
.tc-chev{font:inherit;border:0;background:none;color:var(--ink-2,#5b6488);cursor:pointer;width:28px;height:28px;border-radius:8px;transition:transform .2s}.tc-chev.open{transform:rotate(180deg)}.tc-chev:hover{background:#eef1f9}
.tc-sw.part{background:#9fd8b8}.tc-sw.part:after{left:12px}
.tc-in{animation:tcFade .45s ease both}@keyframes tcFade{from{opacity:0;transform:translateY(.35em)}to{opacity:1;transform:none}}

/* mã QR mở ghi chú trên điện thoại */
.tc-qr{position:absolute;inset:0;z-index:5;background:rgba(5,10,36,.75);display:grid;place-items:center}
.tc-qrc{position:relative;background:#fff;color:#101d54;border-radius:1em;padding:1.4em 1.6em;display:flex;flex-direction:column;align-items:center;gap:.6em;max-width:24em;text-align:center}
.tc-qrc .tc-x{position:absolute;top:.4em;right:.4em;background:#eef0f8;color:#101d54}
.tc-qri svg{width:15em;height:15em;display:block}
.tc-qrc small{font-size:.75em;color:#5a6390;word-break:break-all}
.tc-qrc span{font-size:.8em;color:#5a6390}

/* màn điện thoại của thầy */
body.tcr-on>*:not(.tcr){display:none!important}
.tcr{position:fixed;inset:0;z-index:9999;background:#101d54;color:#fff;display:flex;flex-direction:column;font-size:17px;font-family:inherit}
.tcr-b{flex:1;overflow-y:auto;padding:1.1em 1.1em 1em;display:flex;flex-direction:column;gap:.7em}
.tcr-m{margin:auto;text-align:center;color:#c3cae6;max-width:18em;line-height:1.5}
.tcr-h{display:flex;justify-content:space-between;align-items:center;font-size:.85em;color:#aab3d6}
.tcr-s{border-radius:99px;padding:.25em .8em;background:rgba(255,255,255,.12);color:#fff;font-weight:700}
.tcr-s.s2{background:#f8dd85;color:#101d54}
.tcr-t{font-size:1.9em;font-weight:900;line-height:1.15}
.tcr-ipa{color:#aab3d6;margin-top:-.4em}
.tcr-mean{color:#f8dd85;font-weight:800;font-size:1.15em}
.tcr-ex{color:#d6dcf0;line-height:1.45}
.tcr-ex small{display:block;color:#aab3d6;font-size:.88em;margin-top:.2em}
.tcr-box{background:rgba(255,255,255,.08);border-radius:.7em;padding:.7em .85em;line-height:1.45}
.tcr-box b{display:block;font-size:.78em;color:#aab3d6;text-transform:uppercase;letter-spacing:.04em;margin-bottom:.15em}
.tcr-box.n{background:rgba(248,221,133,.14)}
.tcr-nx{font-size:.85em;color:#aab3d6}
.tcr-nx b{color:#fff}
.tcr-k{flex:none;display:flex;gap:.6em;padding:.8em 1em calc(.8em + env(safe-area-inset-bottom));background:rgba(6,12,44,.6)}
.tcr-k button{font:inherit;font-size:1.5em;font-weight:900;border:0;border-radius:.6em;height:2.4em;min-width:2.6em;background:rgba(255,255,255,.14);color:#fff}
.tcr-k button.w{flex:1;font-size:1.2em;background:linear-gradient(180deg,#f8dd85,#e0b762);color:#101d54}
.tcr-l,.tcr-r{display:flex;flex-direction:column;gap:.7em}
/* điện thoại nằm ngang: 2 cột chữ, nút dọc bên phải */
@media (orientation:landscape) and (max-height:560px){
  .tcr{flex-direction:row;font-size:15px}
  .tcr-b{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto 1fr;gap:.5em 1.2em;padding:.7em 1em .7em calc(1em + env(safe-area-inset-left));align-content:start}
  .tcr-h{grid-column:1/-1}
  .tcr-l,.tcr-r{gap:.5em;min-width:0}
  .tcr-t{font-size:1.7em}
  .tcr-m{grid-column:1/-1;grid-row:1/-1}
  .tcr-k{flex-direction:column;width:6.2em;padding:.6em calc(.6em + env(safe-area-inset-right)) .6em .6em}
  .tcr-k button{height:auto;min-width:0;flex:1;font-size:1.3em}
  .tcr-k button.w{flex:1.4;font-size:1.05em}
}
