/* GAME5 — Pluto. 1rem = 1% bề ngang của khung 16:9 vừa màn hình → mọi thứ co giãn đồng đều trên iPad / laptop / điện thoại. */
:root { --navy: #121c4d; --panel: rgba(16, 24, 72, .84); --line: rgba(120, 214, 255, .75); --cyan: #4fd8ff; --gold: #ffd24a; --cream: #fff6dc; --ink: #2a1a0a; --ok: #4be07e; --bad: #ff5d5d; --team: #ef3b36; --team-dark: #8f1414; --team-glow: #ffd24a; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: calc(min(100vw, 177.78vh) / 100); height: 100%; }
body { margin: 0; height: 100%; overflow: hidden; background: #0c1440; color: #fff; font-family: 'Baloo 2', ui-rounded, 'SF Pro Rounded', 'Arial Rounded MT Bold', system-ui, sans-serif; font-weight: 600; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
#world, #fx { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#fx { pointer-events: none; z-index: 2; }
#ui { position: fixed; inset: 0; z-index: 3; pointer-events: none; font-size: 1.6rem; }
#ui > *, .stage > * { pointer-events: auto; }
.stage { position: absolute; inset: 0; pointer-events: none !important; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
img { -webkit-user-drag: none; }
.curtain { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, #fff, #bfe9ff); opacity: 0; transition: opacity .26s ease; pointer-events: none !important; z-index: 50; }
.curtain.on { opacity: 1; }
#rotate { display: none; position: fixed; inset: 0; z-index: 99; background: #121c4d; align-items: center; justify-content: center; text-align: center; font-size: 5vw; }
.rotate-phone { font-size: 18vw; animation: rot 1.8s ease-in-out infinite; }
@keyframes rot { 0%, 20% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (orientation: portrait) and (max-width: 700px) { body:not(.plain) #rotate { display: flex; } }

/* ---------- nút & thẻ ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; padding: .55em 1.3em; border-radius: 1.2em; font-size: 1.9rem; font-weight: 800; color: #5a3200; text-decoration: none;
  background: linear-gradient(#ffe98a, #ffc02e 60%, #ff9f1a); border: .22rem solid #fff; box-shadow: 0 .5rem 0 #b56a00, 0 .9rem 1.6rem rgba(0, 0, 0, .35); transition: transform .08s, box-shadow .08s, filter .2s; }
.btn:active { transform: translateY(.35rem); box-shadow: 0 .15rem 0 #b56a00, 0 .4rem .8rem rgba(0, 0, 0, .3); }
.btn:disabled { filter: grayscale(.8) brightness(.9); cursor: default; }
.btn.big { font-size: 2.4rem; padding: .55em 1.5em; }
.btn.ghost { background: linear-gradient(#ffffff, #dfeaff); color: #1c2f7a; box-shadow: 0 .5rem 0 #7f93cc, 0 .9rem 1.6rem rgba(0, 0, 0, .3); }
.btn.alt { background: linear-gradient(#8ff0ff, #35c3ff 60%, #1f8cff); color: #062a66; box-shadow: 0 .5rem 0 #0e56a8, 0 .9rem 1.6rem rgba(0, 0, 0, .35); }
.btn.pulse { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 58rem; max-width: 94vw; padding: 2.6rem 3rem 3rem; border-radius: 3rem; text-align: center; color: var(--ink);
  background: linear-gradient(#fffdf2, #ffeec4); border: .5rem solid #fff; box-shadow: 0 0 0 .35rem #e3a54a, 0 2rem 4rem rgba(0, 0, 0, .45); animation: cardin .35s cubic-bezier(.2, 1.4, .4, 1); }
.card.out { opacity: 0; transform: translate(-50%, -50%) scale(.9); transition: all .3s; }
@keyframes cardin { from { opacity: 0; transform: translate(-50%, -44%) scale(.86); } }
.card h1 { margin: 0 0 .3em; font-size: 3.2rem; line-height: 1.1; color: #7a3d00; }
.card h2 { margin: 0 0 .4em; font-size: 2.6rem; line-height: 1.15; color: #7a3d00; }
.card-badge { position: absolute; left: 50%; top: -4.2rem; transform: translateX(-50%); width: 8rem; height: 8rem; border-radius: 50%; font-size: 4.6rem; line-height: 7.6rem; background: linear-gradient(#5f7dff, #2b3fb8); border: .5rem solid #fff; box-shadow: 0 .8rem 1.6rem rgba(0, 0, 0, .35); }
.card.join { padding-top: 5rem; }
.sub { margin: 0 0 1.2rem; font-size: 1.7rem; color: #8a6a3c; font-weight: 600; }
.hint { margin: 1rem 0 1.4rem; font-size: 1.9rem; color: #5b4322; min-height: 2.6em; }
.hint small { font-size: .8em; opacity: .8; } .okc { color: #18a34c; }
.row { display: flex; gap: 1.6rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.field { display: block; text-align: left; margin: 1.2rem 0; } .field > span { display: block; font-size: 1.6rem; color: #8a5a1c; margin: 0 0 .4rem .6rem; }
.name-input, .code-input { width: 100%; font: inherit; font-size: 2.4rem; font-weight: 700; padding: .45em .8em; border-radius: 1.4rem; border: .3rem solid #e3a54a; background: #fff; color: #33210c; outline: none; user-select: text; -webkit-user-select: text; }
.name-input:focus, .code-input:focus { border-color: #ff8a1f; box-shadow: 0 0 0 .5rem rgba(255, 160, 40, .25); }
.shake { animation: shake .4s; } @keyframes shake { 20%, 60% { transform: translateX(-.8rem); } 40%, 80% { transform: translateX(.8rem); } }
.look-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: .9rem; margin-bottom: 1.8rem; }
.look { aspect-ratio: 1; border-radius: 50%; padding: 0; overflow: hidden; background: #cfe6ff; border: .35rem solid #fff; box-shadow: 0 .3rem .6rem rgba(0, 0, 0, .25); transition: transform .15s; }
.look img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.look.on { border-color: #ff8a1f; transform: scale(1.14); box-shadow: 0 0 0 .4rem rgba(255, 150, 30, .45), 0 .5rem 1rem rgba(0, 0, 0, .3); }

/* ---------- kiểm tra thiết bị ---------- */
.steps { display: flex; justify-content: center; gap: 1.2rem; margin: .6rem 0 1.6rem; }
.steps .step { display: flex; align-items: center; gap: .6rem; padding: .3rem 1.2rem .3rem .4rem; border-radius: 3rem; background: #f1dfb4; color: #9a7b45; font-size: 1.6rem; }
.steps .step i { font-style: normal; width: 2.6rem; height: 2.6rem; line-height: 2.6rem; border-radius: 50%; background: #d8c08a; color: #fff; }
.steps .step.on { background: #ffd24a; color: #5a3200; } .steps .step.on i { background: #ff8a1f; }
.steps .step.ok { background: #c8f0cf; color: #1b7a3a; } .steps .step.ok i { background: #28b455; }
.check-body { min-height: 20rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.speaker { position: relative; width: 11rem; height: 11rem; display: grid; place-items: center; }
.speaker-ico { font-size: 6rem; z-index: 1; }
.speaker i { position: absolute; inset: 0; border-radius: 50%; border: .4rem solid #ff9f1a; opacity: 0; }
.speaker.on i { animation: wave 1.2s ease-out infinite; } .speaker.on i:nth-child(3) { animation-delay: .3s; } .speaker.on i:nth-child(4) { animation-delay: .6s; }
@keyframes wave { from { transform: scale(.5); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.mic-big { font-size: 5.4rem; }
.meter { display: flex; gap: .5rem; align-items: flex-end; height: 5rem; margin-top: .6rem; }
.meter i { width: 1.5rem; height: 30%; border-radius: .5rem; background: #e4d2a6; transition: height .08s, background .08s; }
.meter i:nth-child(n+5) { height: 50%; } .meter i:nth-child(n+9) { height: 75%; } .meter i:nth-child(n+12) { height: 100%; }
.meter i.on { background: linear-gradient(#7be36f, #1fae4c); } .meter i.on:nth-child(n+9) { background: linear-gradient(#ffe14a, #ff9f1a); } .meter i.on:nth-child(n+12) { background: linear-gradient(#ff8a6b, #ff3d3d); }
.cam-frame { position: relative; width: 17rem; height: 17rem; border-radius: 50%; overflow: hidden; background: #2a3a8f; border: .6rem solid #fff; box-shadow: 0 0 0 .4rem #e3a54a, 0 1rem 2rem rgba(0, 0, 0, .3); }
.cam-frame video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: none; } .cam-frame.on video { display: block; } .cam-frame.on .cam-ph { display: none; }
.cam-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 6rem; }

/* ---------- sảnh chờ, thông báo ---------- */
.lobby { position: absolute; left: 50%; top: 9rem; transform: translateX(-50%); text-align: center; padding: 1.6rem 3.4rem 2rem; border-radius: 2.6rem; background: var(--panel); border: .25rem solid var(--line); box-shadow: 0 0 2rem rgba(79, 216, 255, .35), 0 1.4rem 3rem rgba(0, 0, 0, .4); animation: drop .5s cubic-bezier(.2, 1.3, .4, 1); min-width: 44rem; }
.lobby h2 { margin: 0; font-size: 3rem; } .lobby .sub { color: #cfe3ff; margin-bottom: 1.4rem; font-size: 1.8rem; }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -3rem); } }
.dots { display: flex; gap: 1rem; justify-content: center; } .dots i { width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--cyan); animation: dotb 1s infinite; } .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotb { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-1rem); opacity: 1; } }
.toast { position: absolute; left: 50%; top: 1rem; transform: translateX(-50%); padding: .5rem 1.6rem; border-radius: 2rem; background: #ff5d5d; font-size: 1.6rem; z-index: 60; }
.spot { position: absolute; left: 50%; top: 7.4rem; transform: translateX(-50%); padding: .7rem 2rem; border-radius: 2rem; background: linear-gradient(#ff7a7a, #e02d2d); border: .25rem solid #fff; font-size: 2rem; z-index: 40; animation: pulse 1s infinite; }
.tip { position: absolute; left: 50%; bottom: 9.6rem; transform: translateX(-50%); padding: .7rem 2rem; border-radius: 2rem; background: var(--panel); border: .2rem solid var(--line); font-size: 1.8rem; white-space: nowrap; animation: tipin .4s cubic-bezier(.2, 1.3, .4, 1); }
.tip.small { font-size: 1.5rem; bottom: 17rem; } .tip.up { bottom: auto; top: 13rem; } .tip.wait { bottom: 9.6rem; }
@keyframes tipin { from { opacity: 0; transform: translate(-50%, 1.5rem); } }

/* ---------- HUD ---------- */
.hud { position: absolute; inset: 0; pointer-events: none !important; }
.hud > * { pointer-events: auto; transition: transform .55s cubic-bezier(.2, 1.2, .3, 1), opacity .4s; }
.hud.pre .teambar { transform: translate(-50%, 14rem); opacity: 0; } .hud.pre .ranks { transform: translateX(26rem); opacity: 0; } .hud.pre .bag { transform: translateY(-9rem); opacity: 0; }
.hud.pre .teacher:not(.live):not(.talking) { transform: translateX(-16rem); opacity: 0; }
.track { height: .9rem; border-radius: 1rem; background: rgba(255, 255, 255, .2); overflow: hidden; } .track i { display: block; height: 100%; width: 0; border-radius: 1rem; background: linear-gradient(90deg, #35c3ff, #8ff0ff); transition: width .5s cubic-bezier(.3, .8, .3, 1); }
.emblem { width: 4rem; height: 4rem; flex: none; filter: drop-shadow(0 .25rem .3rem rgba(0, 0, 0, .35)); }
/* giáo viên */
.teacher { position: absolute; left: 1.4rem; top: 1.2rem; display: flex; align-items: flex-start; }
.teacher-frame { width: 9.6rem; height: 9.6rem; border-radius: 50%; padding: .45rem; background: linear-gradient(#ffe98a, #ff9f1a); box-shadow: 0 .6rem 1.4rem rgba(0, 0, 0, .4); }
.teacher-media { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #dff3e4; }
.teacher-media img, .teacher-media video { width: 100%; height: 100%; object-fit: cover; display: block; } .teacher-media video { transform: scaleX(-1); }
.teacher.talking .teacher-frame { animation: talk .45s ease-in-out infinite; box-shadow: 0 0 0 .5rem rgba(255, 210, 74, .45), 0 .6rem 1.4rem rgba(0, 0, 0, .4); }
@keyframes talk { 50% { transform: scale(1.05) rotate(-2deg); } }
.teacher-name { position: absolute; left: 4.8rem; top: 8.6rem; transform: translateX(-50%); padding: .1rem 1.2rem; border-radius: 1.4rem; background: #ff8a1f; border: .2rem solid #fff; font-size: 1.5rem; white-space: nowrap; }
.caption { margin: 1.2rem 0 0 1.2rem; max-width: 36rem; padding: .9rem 1.5rem; border-radius: .6rem 2rem 2rem 2rem; background: #fff; color: #1d2b6b; font-size: 1.75rem; line-height: 1.25; box-shadow: 0 .6rem 1.4rem rgba(0, 0, 0, .35); animation: tipin2 .3s ease; }
@keyframes tipin2 { from { opacity: 0; transform: translateX(-1rem); } }
/* trên cùng */
.topbar { position: absolute; left: 50%; top: 1.4rem; transform: translateX(-50%); display: flex; gap: 1rem; }
.pill { height: 4.6rem; display: flex; align-items: center; gap: .8rem; padding: 0 2rem; border-radius: 2.4rem; background: linear-gradient(#3458d6, #1a2a8a); border: .25rem solid #cfe3ff; font-size: 2.2rem; font-weight: 800; white-space: nowrap; box-shadow: 0 .6rem 1.2rem rgba(0, 0, 0, .35); text-shadow: 0 .15rem 0 rgba(0, 0, 0, .3); }
.pill.title::before { content: '🏁'; }
.pill.timer { background: linear-gradient(#8a5cf0, #4a1fa8); min-width: 9rem; justify-content: center; } .clock-ico::before { content: '⏱'; }
.pill.timer.warn { background: linear-gradient(#ff7a5c, #d42a2a); animation: pulse .5s infinite; }
.bag { position: absolute; right: 1.4rem; top: 1.4rem; display: flex; gap: .8rem; }
.bag-item { height: 4.6rem; display: flex; align-items: center; gap: .5rem; padding: 0 1.4rem 0 .8rem; border-radius: 2.4rem; background: var(--panel); border: .22rem solid var(--line); font-size: 2.1rem; }
.bag-item img { height: 3.6rem; } .bag-item.empty img { filter: grayscale(1) opacity(.55); } .star-ico { color: var(--gold); font-size: 2.6rem; line-height: 1; }
.bag-item.bump { animation: bump .5s; } @keyframes bump { 40% { transform: scale(1.3); } }
/* bảng các đội */
.ranks { position: absolute; right: 1.4rem; top: 7.4rem; width: 20rem; padding: .8rem; border-radius: 2rem; background: var(--panel); border: .25rem solid var(--line); box-shadow: 0 0 1.6rem rgba(79, 216, 255, .3), 0 1rem 2rem rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: .5rem; }
.rank { display: flex; align-items: center; gap: .6rem; padding: .45rem .7rem; border-radius: 1.3rem; background: rgba(255, 255, 255, .07); }
.rank.mine { background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 .18rem var(--gold); }
.rank-n { width: 2rem; text-align: center; font-size: 1.8rem; } .rank .emblem { width: 3.2rem; height: 3.2rem; }
.rank-body { flex: 1; min-width: 0; } .rank-row { display: flex; justify-content: space-between; font-size: 1.55rem; line-height: 1.2; } .rank-pct { font-weight: 800; }
.rank-score { position: absolute; display: none; }
/* thanh đội */
.teambar { position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%); height: 6.6rem; display: flex; align-items: center; gap: 1.4rem; padding: 0 2rem 0 1.2rem; border-radius: 3.4rem; background: var(--panel); border: .28rem solid var(--line); box-shadow: 0 0 2rem rgba(79, 216, 255, .35), 0 1rem 2rem rgba(0, 0, 0, .4); }
.tb-team { display: flex; align-items: center; gap: .8rem; } .tb-team .emblem { width: 4.8rem; height: 4.8rem; }
.tb-name small { display: block; font-size: 1.3rem; line-height: 1; opacity: .8; } .tb-name b { font-size: 2rem; line-height: 1.1; }
.tb-sep { width: .15rem; height: 4rem; background: rgba(255, 255, 255, .25); }
.tb-mates { display: flex; gap: 1.1rem; align-items: flex-start; }
.mate { position: relative; width: 4.6rem; text-align: center; }
.mate-face { width: 4.2rem; height: 4.2rem; margin: 0 auto; border-radius: 50%; overflow: hidden; background: #cfe6ff; border: .25rem solid #7fd4ff; }
.mate-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.mate.me .mate-face { border-color: var(--gold); box-shadow: 0 0 0 .25rem rgba(255, 210, 74, .4); }
.mate.done .mate-face { border-color: var(--ok); } .mate.done::after { content: '✔'; position: absolute; right: -.3rem; top: -.5rem; width: 1.9rem; height: 1.9rem; line-height: 1.9rem; border-radius: 50%; background: var(--ok); color: #063; font-size: 1.2rem; }
.mate-tag { position: absolute; left: 50%; top: 3.5rem; transform: translateX(-50%); padding: 0 .6rem; border-radius: .8rem; font-size: 1.05rem; line-height: 1.5; background: rgba(10, 16, 50, .85); white-space: nowrap; max-width: 6rem; overflow: hidden; text-overflow: ellipsis; }
.mate.me .mate-tag { background: var(--gold); color: #4a2a00; font-weight: 800; }
.mate-track { height: .45rem; margin-top: 1.25rem; border-radius: .4rem; background: rgba(255, 255, 255, .22); overflow: hidden; } .mate-track i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .4s; }
.tb-prog { width: 17rem; text-align: right; } .tb-prog b { font-size: 2.2rem; line-height: 1.1; display: block; } .tb-prog .track { height: 1.1rem; } .tb-prog .track i { background: linear-gradient(90deg, var(--team), var(--team-glow)); }

/* ---------- onboard ---------- */
.sign { position: absolute; left: 50%; top: 4.5rem; transform: translateX(-50%) rotate(-1.5deg); min-width: 46rem; max-width: 80rem; padding: 1.6rem 4.4rem 1.8rem; text-align: center; border-radius: 2.6rem; color: #6b2f00;
  background: linear-gradient(#fff3c9, #f6cf7c); border: .6rem solid #b9772b; box-shadow: inset 0 0 0 .3rem #ffe9ae, 0 1.2rem 2.4rem rgba(0, 0, 0, .45); font-size: 3.3rem; font-weight: 800; line-height: 1.15; }
.sign.pop { animation: signpop .45s cubic-bezier(.2, 1.5, .4, 1); } @keyframes signpop { from { transform: translateX(-50%) rotate(-5deg) scale(.6); opacity: 0; } }
.sign.danger { background: linear-gradient(#f3d9ff, #c99bf0); border-color: #5b2a96; color: #3d0a70; box-shadow: inset 0 0 0 .3rem #e9c8ff, 0 0 3rem rgba(180, 90, 255, .7); animation: signpop .45s cubic-bezier(.2, 1.5, .4, 1), shake .5s .45s 2; }
.sign-text { min-height: 1.15em; } .sign-text::after { content: '▍'; opacity: .5; animation: blink .7s steps(2) infinite; } @keyframes blink { 50% { opacity: 0; } }
.leaf { position: absolute; width: 5rem; height: 3rem; border-radius: 3rem 0 3rem 0; background: linear-gradient(#7be36f, #2e9a3f); top: -1.4rem; } .leaf.l { left: -1.6rem; transform: rotate(-20deg); } .leaf.r { right: -1.6rem; transform: scaleX(-1) rotate(-20deg); }
.picker { position: absolute; inset: 0; pointer-events: none !important; transition: opacity .6s, transform .6s; }
.picker.dock { opacity: 0; transform: translateY(18rem) scale(.6); }
.neon { position: absolute; left: 50%; top: 5.4rem; transform: translateX(-50%); padding: .9rem 3.2rem; font-size: 2.7rem; font-weight: 800; white-space: nowrap; background: linear-gradient(#12348f, #0a1a5c); border: .3rem solid #5fe1ff; border-radius: 1.2rem; box-shadow: 0 0 2.4rem #35c3ff, inset 0 0 1.2rem rgba(95, 225, 255, .5); clip-path: polygon(3% 0, 97% 0, 100% 50%, 97% 100%, 3% 100%, 0 50%); }
.spin { display: inline-block; margin-right: 1rem; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.reel { position: absolute; left: 50%; top: 15rem; transform: translateX(-50%); display: flex; gap: 2.2rem; }
.tcard { position: relative; width: 16rem; height: 19rem; border-radius: 2.4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; background: linear-gradient(160deg, var(--c), var(--d)); border: .4rem solid rgba(255, 255, 255, .6); opacity: .55; filter: saturate(.7); transform: scale(.92); transition: all .12s; box-shadow: 0 1rem 2rem rgba(0, 0, 0, .4); }
.tcard .emblem { width: 9rem; height: 9rem; } .tcard b { padding: .1rem 1.6rem; border-radius: 1.4rem; background: rgba(255, 255, 255, .92); color: var(--d); font-size: 2.2rem; }
.tcard.hot { opacity: 1; filter: none; transform: scale(1.06); border-color: #fff; box-shadow: 0 0 3rem var(--g), 0 1rem 2rem rgba(0, 0, 0, .4); }
.picker.done .reel { top: 9.5rem; }
.tcard.gone { display: none; }
.tcard.lose { opacity: .28; filter: grayscale(.6) blur(.12rem); transform: scale(.78); transition: all .5s; }
.tcard.win { opacity: 1; filter: none; z-index: 2; border-color: #fff; transition: all .5s cubic-bezier(.2, 1.5, .4, 1); transform: scale(1.22); box-shadow: 0 0 0 .5rem var(--g), 0 0 5rem var(--g), 0 1.4rem 3rem rgba(0, 0, 0, .5); animation: glowp 1.2s ease-in-out infinite .5s; }
@keyframes glowp { 50% { box-shadow: 0 0 0 .8rem var(--g), 0 0 8rem var(--g), 0 1.4rem 3rem rgba(0, 0, 0, .5); } }
.warrior { position: absolute; left: 9rem; bottom: 6.5rem; height: 30rem; filter: drop-shadow(0 1.4rem 1.4rem rgba(0, 0, 0, .45)); animation: warin .7s cubic-bezier(.2, 1.4, .4, 1), bob 1.6s ease-in-out infinite .7s; }
@keyframes warin { from { transform: translate(-30rem, 6rem) rotate(-14deg); opacity: 0; } } @keyframes bob { 50% { transform: translateY(-1rem) rotate(1.5deg); } }
.result { position: absolute; left: 36rem; bottom: 10.5rem; width: 50rem; padding: 1.6rem 3rem 2rem; text-align: center; border-radius: 3rem; color: #6b1a00; background: linear-gradient(#fff6d6, #ffd98a); border: .55rem solid #ffb52e; box-shadow: 0 0 0 .35rem #fff, 0 0 4rem var(--g), 0 1.4rem 3rem rgba(0, 0, 0, .5); animation: resin .6s cubic-bezier(.2, 1.5, .4, 1) .15s backwards; }
.result small { display: block; font-size: 2.8rem; line-height: 1.1; font-weight: 800; } .result b { display: block; font-size: 4.4rem; line-height: 1.1; color: var(--c); -webkit-text-stroke: .08rem var(--d); text-shadow: 0 .3rem 0 #fff; }
@keyframes resin { from { transform: scale(.3) rotate(6deg); opacity: 0; } }

/* ---------- đua ---------- */
.mission { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); padding: 1.8rem 4.4rem 2.2rem; text-align: center; border-radius: 3rem; background: linear-gradient(#ff8a3d, #d6311a); border: .5rem solid #ffe2a8; box-shadow: 0 0 4rem rgba(255, 130, 40, .7), 0 1.4rem 3rem rgba(0, 0, 0, .5); animation: resin .55s cubic-bezier(.2, 1.5, .4, 1); transition: all .5s; z-index: 5; }
.mission small { display: block; font-size: 2.2rem; letter-spacing: .1em; text-transform: uppercase; opacity: .92; } .mission b { display: block; font-size: 4.6rem; line-height: 1.1; text-shadow: 0 .35rem 0 rgba(0, 0, 0, .25); } .mission span { font-size: 1.9rem; }
.mission.out { top: 2rem; opacity: 0; transform: translate(-50%, 0) scale(.3); }
.how { position: absolute; left: 50%; top: 7.3rem; transform: translateX(-50%); display: flex; align-items: center; gap: 1rem; padding: .7rem 2.4rem .7rem 1.2rem; border-radius: 2.4rem; background: linear-gradient(#fffdf2, #ffeec4); color: #4a2a00; border: .3rem solid #ffb52e; font-size: 2.2rem; white-space: nowrap; box-shadow: 0 .8rem 1.6rem rgba(0, 0, 0, .35); transition: all .5s cubic-bezier(.2, 1.3, .4, 1); }
.how b { color: #e0331a; font-size: 1.15em; } .how.late { opacity: 0; transform: translate(-50%, -2rem) scale(.8); } .how-ico { font-size: 2.6rem; }
.alabel { position: absolute; left: 0; top: 0; padding: 0; z-index: 4; will-change: transform; }
.alabel b { display: block; padding: .15rem 1.7rem; border-radius: 1.6rem; font-size: 2.3rem; letter-spacing: .06em; background: #fff; color: #1d2b6b; border: .3rem solid #1d2b6b; box-shadow: 0 .45rem 0 #1d2b6b; }
.alabel.lion b { border-color: #c4571b; box-shadow: 0 .45rem 0 #c4571b; color: #9a3d0c; } .alabel.tiger b { border-color: #c21f2b; box-shadow: 0 .45rem 0 #c21f2b; color: #a3101c; }
.alabel.static { pointer-events: none; } .alabel::after { content: ''; position: absolute; left: -2rem; right: -2rem; top: -1rem; height: 26rem; }
.alabel.static::after { display: none; }
.alabel.on b { background: var(--gold); transform: scale(1.14); animation: pulse .6s infinite; }
.count { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: 20rem; line-height: 1; font-weight: 800; color: #fff; -webkit-text-stroke: .5rem #1d2b6b; paint-order: stroke fill; text-shadow: 0 1rem 0 rgba(0, 0, 0, .3); pointer-events: none !important; z-index: 30; white-space: nowrap; }
.count.go { font-size: 14rem; color: var(--gold); -webkit-text-stroke: .5rem #7a2a00; } .count.pop { animation: countpop .8s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes countpop { 0% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); } }
.orb { position: absolute; left: 2rem; bottom: 9.4rem; display: flex; align-items: center; gap: 1.2rem; padding: .7rem 2rem .7rem .7rem; border-radius: 5rem; background: var(--panel); border: .25rem solid var(--line); --lv: 0; opacity: .55; transition: opacity .3s; max-width: 34rem; }
.orb.on { opacity: 1; } .orb-mic { position: relative; width: 6rem; height: 6rem; line-height: 6rem; text-align: center; font-size: 3.2rem; border-radius: 50%; background: linear-gradient(#ff7a7a, #e02d2d); border: .3rem solid #fff; z-index: 1; flex: none; }
.orb-ring { position: absolute; left: .7rem; top: .7rem; width: 6rem; height: 6rem; border-radius: 50%; background: rgba(255, 110, 110, .55); transform: scale(calc(1 + var(--lv) * 1.5)); transition: transform .06s; }
.orb.hit .orb-mic { animation: bump .25s; } .orb-text { font-size: 1.7rem; line-height: 1.2; } .orb-text b { color: var(--gold); }
.chosen { position: absolute; left: 50%; bottom: 8.6rem; transform: translateX(-50%); padding: .3rem 1.8rem; border-radius: 2rem; font-size: 1.8rem; background: var(--panel); border: .2rem solid var(--gold); } .chosen b { color: var(--gold); }
.floater { position: absolute; transform: translate(-50%, -50%); font-weight: 800; pointer-events: none !important; white-space: nowrap; z-index: 20; animation: floatup 1s ease-out forwards; }
@keyframes floatup { 0% { transform: translate(-50%, -20%) scale(.4); opacity: 0; } 18% { transform: translate(-50%, -60%) scale(1.25); opacity: 1; } 100% { transform: translate(-50%, -260%) scale(1); opacity: 0; } }
.floater.plus { font-size: 3rem; color: #bfe9ff; -webkit-text-stroke: .22rem #12348f; paint-order: stroke fill; } .floater.plus.big { font-size: 4.2rem; color: var(--gold); -webkit-text-stroke: .26rem #8a3d00; }
.floater.plus.ghost { font-size: 2rem; opacity: .6; animation-duration: .8s; } .floater.plus.ten { font-size: 6rem; color: #7dff9a; -webkit-text-stroke: .32rem #0b6b2a; animation-duration: 1.4s; }
.floater.roar { font-size: 5rem; color: #fff; -webkit-text-stroke: .32rem #b3260f; paint-order: stroke fill; animation-duration: 1.7s; font-style: italic; }
.ring { position: absolute; width: 8rem; height: 8rem; margin: -4rem 0 0 -4rem; border-radius: 50%; border: .6rem solid rgba(255, 255, 255, .9); pointer-events: none !important; animation: ringout 1.2s ease-out forwards; opacity: 0; }
@keyframes ringout { 0% { transform: scale(.3); opacity: .95; } 100% { transform: scale(5); opacity: 0; } }
.winbanner { position: absolute; left: 50%; top: 7.4rem; transform: translateX(-50%); display: flex; align-items: center; gap: 1.6rem; padding: 1rem 3.4rem 1.2rem 1.6rem; border-radius: 3rem; white-space: nowrap; background: linear-gradient(#fff6d6, #ffd98a); border: .5rem solid #ffb52e; box-shadow: 0 0 0 .3rem #fff, 0 0 4rem var(--g), 0 1.2rem 2.6rem rgba(0, 0, 0, .45); color: #5a2a00; animation: resin .6s cubic-bezier(.2, 1.5, .4, 1) .4s backwards; z-index: 6; }
.winbanner .emblem { width: 7.4rem; height: 7.4rem; } .winbanner small { display: block; font-size: 2.6rem; line-height: 1.1; } .winbanner small b { color: var(--c); } .winbanner > div > b { display: block; font-size: 4rem; line-height: 1.05; color: #e0331a; }
.sentence { position: absolute; left: 2rem; top: 15.5rem; max-width: 32rem; padding: 1.1rem 1.8rem; border-radius: .6rem 2.2rem 2.2rem 2.2rem; background: #fff; color: #1d2b6b; font-size: 2.3rem; line-height: 1.25; box-shadow: 0 .8rem 1.8rem rgba(0, 0, 0, .4); animation: tipin2 .4s ease; }
.sentence b { color: #e0331a; } .sentence u { text-decoration: none; background: linear-gradient(transparent 60%, var(--gold) 60%); font-weight: 800; }
.claimslot { position: absolute; left: 50%; bottom: 9.6rem; transform: translateX(-50%); transition: all .5s cubic-bezier(.2, 1.4, .4, 1); } .claimslot.late { opacity: 0; transform: translate(-50%, 4rem) scale(.6); pointer-events: none !important; }
.btn.claim { font-size: 2.8rem; padding: .5em 1.6em .5em 1em; } .btn.claim img { height: 5.4rem; margin: -1rem 0; filter: drop-shadow(0 .3rem .3rem rgba(0, 0, 0, .3)); }
.claimed { padding: .8rem 2.4rem; border-radius: 2.4rem; background: linear-gradient(#5fe08a, #1f9f52); border: .3rem solid #fff; font-size: 2.2rem; white-space: nowrap; box-shadow: 0 .8rem 1.6rem rgba(0, 0, 0, .35); } .claimed.soft { background: var(--panel); border-color: var(--line); font-size: 1.9rem; }
.fly { position: fixed; width: 9rem; z-index: 70; pointer-events: none; transform: translate(-50%, -50%); }

/* ---------- từ vựng ---------- */
.how.center { top: 7.3rem; }
.qmark { position: absolute; left: 0; top: 0; width: 4.4rem; height: 4.4rem; line-height: 4.2rem; text-align: center; border-radius: 50%; font-size: 3rem; font-weight: 800; background: var(--gold); color: #7a3d00; border: .3rem solid #fff; box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .35); pointer-events: none !important; animation: qb 1s ease-in-out infinite; }
@keyframes qb { 50% { margin-top: -1rem; } }
.answer { position: absolute; left: 50%; bottom: 8.5rem; transform: translateX(-50%); width: 54rem; padding: .8rem 1rem 1rem; border-radius: 2.2rem; background: var(--panel); border: .25rem solid var(--line); box-shadow: 0 0 2rem rgba(79, 216, 255, .3), 0 1rem 2rem rgba(0, 0, 0, .4); transition: opacity .3s, transform .4s; }
.answer.locked { opacity: .0; transform: translate(-50%, 3rem); pointer-events: none !important; }
.answer-top { display: flex; align-items: center; gap: 1rem; height: 4.8rem; margin-bottom: .7rem; }
.replay { display: flex; align-items: center; gap: .5rem; height: 4.2rem; padding: 0 1.2rem 0 .8rem; border-radius: 2.2rem; background: linear-gradient(#8ff0ff, #35c3ff); color: #062a66; font-size: 1.6rem; font-weight: 800; border: .22rem solid #fff; box-shadow: 0 .35rem 0 #0e56a8; flex: none; }
.replay:active { transform: translateY(.25rem); box-shadow: 0 .1rem 0 #0e56a8; } .replay:disabled { filter: grayscale(1) brightness(.75); } .replay-ico { font-size: 2.2rem; }
.replay-dots { display: flex; gap: .3rem; } .replay-dots i { width: .9rem; height: .9rem; border-radius: 50%; background: rgba(6, 42, 102, .25); } .replay-dots i.on { background: #062a66; }
.listen { display: flex; gap: .3rem; align-items: center; height: 3rem; width: 3.2rem; flex: none; } .listen i { width: .4rem; height: .6rem; border-radius: .3rem; background: var(--cyan); opacity: .35; }
.listen.on i { opacity: 1; animation: eq .5s ease-in-out infinite; } .listen.on i:nth-child(2) { animation-delay: .1s; } .listen.on i:nth-child(3) { animation-delay: .2s; } .listen.on i:nth-child(4) { animation-delay: .3s; } .listen.on i:nth-child(5) { animation-delay: .15s; }
@keyframes eq { 50% { height: 2.6rem; } }
.slots { flex: 1; display: flex; justify-content: center; gap: .5rem; } .slots i { width: 3.7rem; height: 4.4rem; line-height: 4.2rem; text-align: center; font-style: normal; font-size: 2.8rem; font-weight: 800; border-radius: .9rem; background: rgba(255, 255, 255, .14); border: .22rem solid rgba(255, 255, 255, .4); }
.slots i.cur { border-color: var(--gold); animation: curb 1s infinite; } @keyframes curb { 50% { background: rgba(255, 210, 74, .3); } }
.slots i.on { background: #fff; color: #1d2b6b; border-color: #fff; } .slots i.ghost { color: rgba(255, 255, 255, .5); }
.slots.bad { animation: shake .4s; } .slots.bad i.on { background: #ffd6d6; color: #c21f2b; border-color: var(--bad); }
.slots.good i { background: var(--ok); color: #063; border-color: #fff; animation: bump .4s; }
.ring20 { position: relative; width: 4.6rem; height: 4.6rem; flex: none; } .ring20 svg { width: 100%; height: 100%; transform: rotate(-90deg); } .ring20 circle { fill: none; stroke-width: 5; } .ring20 .bg { stroke: rgba(255, 255, 255, .2); } .ring20 .fg { stroke: var(--ok); stroke-dasharray: 100; stroke-linecap: round; }
.ring20 b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.8rem; } .ring20.warn .fg { stroke: var(--bad); } .ring20.warn b { color: #ff9a9a; }
.kb { display: flex; flex-direction: column; gap: .45rem; } .kb-row { display: flex; justify-content: center; gap: .45rem; }
.key { width: 4.6rem; height: 3.5rem; border-radius: .9rem; font-size: 2.1rem; font-weight: 800; color: #1d2b6b; background: linear-gradient(#fff, #dbe7ff); box-shadow: 0 .3rem 0 #7f93cc; touch-action: none; }
.key:active, .key.down { transform: translateY(.25rem); box-shadow: 0 .05rem 0 #7f93cc; background: var(--gold); } .key.wide { width: 7rem; background: linear-gradient(#ffd0d0, #ff9a9a); box-shadow: 0 .3rem 0 #b84a4a; }
.note { position: absolute; left: 50%; top: 7.3rem; transform: translateX(-50%); padding: .6rem 2rem; border-radius: 2rem; background: var(--panel); border: .22rem solid var(--line); font-size: 1.9rem; white-space: nowrap; max-width: 76rem; overflow: hidden; text-overflow: ellipsis; animation: tipin .3s ease; z-index: 6; }
.note.good { background: linear-gradient(#35b86a, #157a3f); border-color: #fff; } .note.good b { color: var(--gold); font-size: 1.15em; } .note.warn { background: linear-gradient(#ff8a5c, #d44a1a); border-color: #fff; }
.modal { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); width: 52rem; padding: 3.6rem 2.6rem 2.4rem; border-radius: 3rem; text-align: center; color: var(--ink); background: linear-gradient(#fffdf2, #ffeec4); border: .5rem solid #fff; box-shadow: 0 0 0 .35rem #e3a54a, 0 2rem 4rem rgba(0, 0, 0, .5); animation: cardin .35s cubic-bezier(.2, 1.4, .4, 1); z-index: 25; }
.modal h2 { margin: 0 0 .3em; font-size: 2.8rem; color: #7a3d00; } .modal p { margin: 0 0 1.4rem; font-size: 2.1rem; color: #5b4322; }
.modal-badge { position: absolute; left: 50%; top: -3.8rem; transform: translateX(-50%); width: 7rem; height: 7rem; line-height: 6.6rem; font-size: 4rem; border-radius: 50%; background: linear-gradient(#ffe98a, #ff9f1a); border: .45rem solid #fff; }
.modal.small { width: 40rem; padding: 2rem; top: 34%; } .modal.small .modal-badge + h2 { margin-top: 2rem; }
.card.myscore { top: 36%; width: 56rem; transition: all .6s cubic-bezier(.3, .9, .3, 1); } .card.myscore.late { opacity: 0; transform: translate(-50%, -40%) scale(.8); }
.card.myscore.aside { left: 2rem; top: 15rem; width: 27rem; padding: 1.4rem; transform: none; border-radius: 2rem; } .card.myscore.aside h2 { font-size: 1.7rem; } .card.myscore.aside .rescued-a { width: 3.6rem; } .card.myscore.aside .rescued-a span { display: none; } .card.myscore.aside .pts { font-size: 1.4rem; }
.rescued { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin: .6rem 0 1rem; } .rescued-a { width: 7rem; text-align: center; font-size: 1.4rem; color: #7a3d00; } .rescued-a img { width: 100%; height: 6rem; object-fit: contain; display: block; }
.pts { font-size: 2.1rem; color: #5b4322; } .pts b { font-size: 1.5em; color: #1a9a4a; }
.card.board { top: 42%; width: 60rem; padding: 2rem 2.6rem 2.4rem; z-index: 8; }
.lb-row { display: flex; align-items: center; gap: 1.2rem; padding: .7rem 1.2rem; margin-top: .8rem; border-radius: 1.8rem; background: rgba(120, 80, 20, .1); animation: lbin .5s cubic-bezier(.2, 1.3, .4, 1) backwards; }
@keyframes lbin { from { opacity: 0; transform: translateX(-6rem); } }
.lb-row.mine { background: #fff; box-shadow: 0 0 0 .3rem var(--gold), 0 .6rem 1.2rem rgba(0, 0, 0, .15); }
.lb-rank { width: 3rem; font-size: 2.4rem; text-align: center; } .lb-emblem .emblem { width: 4.6rem; height: 4.6rem; display: block; } .lb-name { width: 11rem; text-align: left; font-size: 2.2rem; color: var(--d); }
.lb-track { flex: 1; height: 2rem; border-radius: 1rem; background: rgba(0, 0, 0, .1); overflow: hidden; } .lb-track i { display: block; height: 100%; border-radius: 1rem; background: linear-gradient(90deg, var(--d), var(--c)); animation: grow 1s cubic-bezier(.3, .8, .3, 1) backwards; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } } .lb-score { width: 6.5rem; text-align: right; font-size: 2.4rem; color: #7a3d00; }
.card.finale { width: 62rem; top: 44%; }
.stats { display: flex; justify-content: center; gap: 1.6rem; margin: 1.6rem 0 2rem; } .stat { width: 12rem; padding: 1rem .6rem; border-radius: 1.8rem; background: rgba(120, 80, 20, .1); } .stat img, .stat .emblem { height: 5rem; width: auto; display: block; margin: 0 auto; } .stat-ico { font-size: 3.6rem; line-height: 5rem; color: #ff9f1a; }
.stat b { display: block; font-size: 3rem; line-height: 1.1; color: #7a3d00; } .stat span { font-size: 1.4rem; color: #8a6a3c; }

/* ---------- trang đầu ---------- */
body.plain { overflow: auto; user-select: auto; -webkit-user-select: auto; }
body.home { background: #0c1440 url(/assets/img/bg_pluto.jpg) center / cover fixed; }
.home-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; font-size: 16px; }
.home-card { width: min(520px, 94vw); padding: 28px 28px 22px; border-radius: 28px; text-align: center; color: var(--ink); background: linear-gradient(#fffdf2, #ffeec4); border: 5px solid #fff; box-shadow: 0 0 0 4px #e3a54a, 0 24px 60px rgba(0, 0, 0, .5); }
.home-card .btn { font-size: 20px; border-width: 3px; box-shadow: 0 5px 0 #b56a00, 0 10px 18px rgba(0, 0, 0, .3); border-radius: 18px; } .home-card .btn.alt { box-shadow: 0 5px 0 #0e56a8, 0 10px 18px rgba(0, 0, 0, .3); width: 100%; }
.home-card .btn:active { transform: translateY(3px); }
.logo { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 20px; text-align: left; } .logo span { font-size: 56px; } .logo b { display: block; font-size: 38px; line-height: 1; color: #3a2fb8; letter-spacing: .06em; } .logo small { font-size: 15px; color: #8a6a3c; }
.join-row { display: flex; gap: 10px; } .home-card .code-input, .home-card input { flex: 1; min-width: 0; font: inherit; font-size: 20px; font-weight: 700; padding: 10px 16px; border-radius: 16px; border: 3px solid #e3a54a; background: #fff; color: #33210c; outline: none; width: 100%; }
.err { min-height: 1.4em; margin: 8px 0 0; color: #c21f2b; font-size: 15px; } .or { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; color: #b08d55; font-size: 14px; } .or::before, .or::after { content: ''; flex: 1; height: 2px; background: #ecd6a4; }
.home-card .sub { font-size: 14px; margin: 10px 0 14px; } .teacher-link { color: #3a2fb8; font-size: 14px; } .home-card .field span { font-size: 14px; margin-left: 6px; } .home-card .field { margin: 10px 0; }

/* ---------- bảng điều khiển giáo viên (px, không theo rem của game) ---------- */
body.teacher-page { background: #eef2fb; color: #1b2550; overflow: auto; }
.tc { font-size: 15px; min-height: 100vh; display: flex; flex-direction: column; font-weight: 600; }
.tc-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #1b2a7a; color: #fff; flex-wrap: wrap; }
.tc-room small { display: block; font-size: 11px; opacity: .7; line-height: 1; } .tc-room b { font-size: 24px; line-height: 1.1; letter-spacing: .08em; color: #ffd24a; }
.tc-link { font-size: 13px; opacity: .8; user-select: all; -webkit-user-select: all; } .grow { flex: 1; } .tc-count { font-size: 14px; }
.conn { color: #4be07e; } .conn.off { color: #ff5d5d; }
.tbtn { padding: 8px 14px; border-radius: 12px; background: #fff; color: #1b2a7a; font-size: 14px; font-weight: 700; border: 2px solid #c9d3f5; }
.tbtn:active { transform: translateY(1px); } .tbtn:disabled { opacity: .5; cursor: default; }
.tbtn.primary { background: linear-gradient(#ffd24a, #ff9f1a); border-color: #fff; color: #4a2a00; box-shadow: 0 3px 0 #b56a00; } .tbtn.xl { font-size: 22px; padding: 14px 28px; border-radius: 18px; }
.tbtn.danger { color: #c21f2b; } .tbtn.on { background: #4be07e; border-color: #1f9f52; color: #063; } .tbtn.offc { background: #ffd6d6; border-color: #ff8a8a; color: #a3101c; } .tbtn.mini { padding: 4px 9px; font-size: 12px; border-radius: 9px; }
.tc-body { flex: 1; display: grid; grid-template-columns: 210px minmax(0, 1fr) 340px; gap: 14px; padding: 14px; align-items: start; }
.tc-steps { display: flex; flex-direction: column; gap: 6px; } .tc-steps .step { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; background: #fff; text-align: left; font-size: 13.5px; border: 2px solid transparent; color: #1b2550; }
.tc-steps .step i { font-style: normal; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; background: #dde4fa; flex: none; font-size: 12px; }
.tc-steps .step.cur { border-color: #ff9f1a; background: #fff6dc; } .tc-steps .step.cur i { background: #ff9f1a; color: #fff; } .tc-steps .step.done { opacity: .6; } .tc-steps .step.done i { background: #4be07e; } .tc-steps .step:disabled { cursor: default; }
.tc-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tc-now, .tc-monitor, .tc-fx, .tc-me, .tgroup { background: #fff; border-radius: 18px; padding: 16px 18px; box-shadow: 0 2px 10px rgba(27, 42, 122, .08); }
.now-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; } .now-head small { color: #6a76a8; } .now-head h2 { margin: 0; font-size: 24px; flex: 1; } .tc-clock { font-size: 20px; font-weight: 800; color: #d44a1a; }
.say, .screen { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #f3f6ff; } .say p, .screen p { margin: 6px 0 0; font-size: 16px; line-height: 1.4; } .say p.en { font-size: 22px; line-height: 1.35; color: #14204f; }
.tag { display: inline-block; padding: 1px 10px; border-radius: 10px; background: #1b2a7a; color: #fff; font-size: 12px; } .screen { background: #fff6dc; } .screen .tag { background: #b56a00; }
.cheerhint { margin-top: 12px; padding: 12px 16px; border-radius: 14px; background: linear-gradient(#ff8a5c, #d44a1a); color: #fff; font-size: 24px; font-weight: 800; animation: bump .4s; }
.now-act { display: flex; gap: 12px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.duel { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 16px; } .duel-track { flex: 1; height: 18px; border-radius: 10px; background: #ff6b5c; overflow: hidden; } .duel-track i { display: block; height: 100%; background: #f5b42e; transition: width .3s; }
.win { margin: 0 0 10px; font-size: 16px; color: #157a3f; }
.tteams { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; } .tteam { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: #f3f6ff; } .tteam .emblem { width: 40px; height: 40px; }
.tteam-body { flex: 1; min-width: 0; } .tteam-row { display: flex; justify-content: space-between; } .tteam .track { height: 10px; background: #dde4fa; } .tteam .track i { background: var(--c); } .tteam small { color: #6a76a8; font-size: 12px; }
.tc-fx { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; }
.tc-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.me-video { aspect-ratio: 4 / 3; border-radius: 14px; background: #1b2a7a; overflow: hidden; display: grid; place-items: center; font-size: 44px; } .me-video video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.me-ctl { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; } .tc-me .note { position: static; transform: none; margin: 8px 0 0; padding: 0; background: none; border: 0; font-size: 12.5px; color: #6a76a8; white-space: normal; animation: none; max-width: none; }
.tc-students { display: flex; flex-direction: column; gap: 10px; } .tgroup { padding: 10px 12px; border-left: 6px solid var(--c); }
.tgroup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .tgroup-head .emblem { width: 26px; height: 26px; } .tgroup-head span { margin-left: auto; color: #6a76a8; font-size: 13px; }
.st { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 10px; } .st.offline { opacity: .45; } .st.spot { background: #fff1c9; } .st.talk .st-face { box-shadow: 0 0 0 3px #4be07e; }
.st-face { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: #dde4fa; flex: none; } .st-face img, .st-face video { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-info { flex: 1; min-width: 0; } .st-info b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .st-info small { color: #6a76a8; font-size: 12px; } .st-prog { font-size: 13px; white-space: nowrap; }
@media (max-width: 1000px) { .tc-body { grid-template-columns: 1fr; } .tc-steps { flex-direction: row; flex-wrap: wrap; } }

/* các khối căn giữa bằng left:50% phải có bề rộng theo nội dung, nếu không sẽ bị bó còn nửa màn hình */
.sign, .how, .tip, .note, .winbanner, .neon, .lobby, .chosen, .spot, .toast, .claimslot, .topbar, .teambar, .reel, .mission { width: max-content; max-width: 96vw; }
.sign { max-width: 84rem; } .note { max-width: 80rem; }

/* ---- chỉnh bố cục sau khi chạy thử ---- */
.teacher { display: block; }
.caption { position: absolute; left: 0; top: 11.8rem; margin: 0; width: max-content; max-width: 27rem; font-size: 1.6rem; border-radius: .6rem 1.8rem 1.8rem 1.8rem; }
.how { max-width: 54rem; white-space: normal; text-align: left; font-size: 2rem; line-height: 1.2; }
.orb { max-width: 31rem; } .orb-text { font-size: 1.6rem; }
.minitrack { position: absolute; left: 50%; top: 7.6rem; transform: translateX(-50%); width: 44rem; height: 5rem; padding: 0; border-radius: 2.5rem; background: var(--panel); border: .22rem solid var(--line); box-shadow: 0 .6rem 1.2rem rgba(0, 0, 0, .3); }
.minitrack-line { position: absolute; left: 3rem; right: 5rem; top: 50%; height: .5rem; margin-top: -.25rem; border-radius: .3rem; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 1.2rem, transparent 1.2rem 2.2rem); }
.minitrack-flag { position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-size: 2.8rem; }
.tok { position: absolute; top: 50%; left: 4%; height: 4.2rem; transform: translate(-50%, -50%); transition: left .28s linear; filter: drop-shadow(0 .2rem .2rem rgba(0, 0, 0, .4)); }
.winbanner { display: block; padding: 1rem 2.8rem 1.1rem 1.6rem; } .wb-row { display: flex; align-items: center; gap: 1.6rem; }
.winbanner .wb-row > div > b { display: block; font-size: 4rem; line-height: 1.05; color: #e0331a; }
.winbanner .sentence { position: static; max-width: none; margin: .8rem 0 0; padding: .6rem 1.6rem; border-radius: 1.6rem; text-align: center; font-size: 2.3rem; box-shadow: none; animation: none; background: #fff; color: #1d2b6b; max-height: 5rem; overflow: hidden; transition: all .5s cubic-bezier(.2, 1.3, .4, 1); }
.winbanner .sentence.late { max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; opacity: 0; }

.card.myscore.aside { left: 1.4rem; top: 15rem; width: 23rem; } .card.board { left: 53%; width: 50rem; }
.ranks { width: 21rem; } .rank-row { font-size: 1.45rem; } .rank-row b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cheerhint { animation: tipin2 .25s ease; }

/* điện thoại xoay ngang (màn hình rất rộng): còn thừa bề ngang → phím to hơn cho ngón tay */
@media (min-aspect-ratio: 2/1) {
  .answer { width: 66rem; } .key { width: 5.7rem; height: 3.8rem; font-size: 2.3rem; } .key.wide { width: 8.4rem; } .slots i { width: 4.4rem; }
}
