/* ================= Nền tảng ================= */
:root {
  --ink: #2d1b4e;
  --muted: #7a6d96;
  --font: 'Baloo 2', 'Segoe UI Rounded', 'Comic Sans MS', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
html, body {
  margin: 0; height: 100%; overflow: hidden; touch-action: manipulation;
  background: radial-gradient(circle at 50% 40%, #4a3699, #170c33);
  font-family: var(--font); color: var(--ink);
}
input { user-select: text; -webkit-user-select: text; font-family: var(--font); }
button { font-family: var(--font); color: inherit; }

#stage {
  position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px;
  transform-origin: center center; overflow: hidden; background: #8fd6ff;
  box-shadow: 0 0 60px rgba(0, 0, 0, .5);
}
#screen, .screen { position: absolute; inset: 0; }
#overlay { position: absolute; inset: 0; pointer-events: none; z-index: 50; }
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
#rotate { display: none; }
@media (orientation: portrait) and (max-width: 900px) {
  #rotate {
    display: flex; position: fixed; inset: 0; z-index: 999; background: #3b2a80; color: #fff;
    font: 800 30px/1.5 var(--font); align-items: center; justify-content: center; text-align: center;
  }
}
.hidden { display: none !important; }
.avatar-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.spacer { flex: 1; }
.muted { color: var(--muted); font-size: 20px; line-height: 1.35; margin: 4px 0; }
.err { color: #e03131; font-size: 21px; min-height: 30px; font-weight: 700; line-height: 1.3; }
.lbl { display: inline-flex; flex-direction: column; line-height: 1.05; text-align: left; }
.lbl small { font-size: .58em; opacity: .8; font-weight: 600; }

/* ================= Nút bấm ================= */
.btn {
  --c: #ff9f1c; --d: #c76d00;
  font: 800 28px/1 var(--font); color: #fff; background: var(--c); border: none; border-radius: 999px;
  padding: 14px 28px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 7px 0 var(--d), 0 10px 18px rgba(0, 0, 0, .18);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .18); transition: transform .08s, box-shadow .08s, filter .15s; position: relative;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--d), 0 4px 8px rgba(0, 0, 0, .18); }
.btn:disabled { filter: grayscale(.8); opacity: .7; }
.btn.green { --c: #40c057; --d: #2b8a3e; }
.btn.blue { --c: #339af0; --d: #1864ab; }
.btn.pink { --c: #f06595; --d: #c2255c; }
.btn.purple { --c: #845ef7; --d: #5f3dc4; }
.btn.gray { --c: #a5aebb; --d: #7b8594; }
.btn.red { --c: #fa5252; --d: #c92a2a; }
.btn.white { --c: #fff; --d: #c9d2e3; color: var(--ink); text-shadow: none; }
.btn.small { font-size: 21px; padding: 10px 18px; }
.btn.big { font-size: 34px; padding: 18px 36px; }
.btn.icon { width: 64px; height: 64px; padding: 0; font-size: 30px; flex: none; }
.btn.small-ico { width: 54px; height: 54px; font-size: 26px; }

/* ================= Hộp thoại ================= */
.modal-bg {
  position: absolute; inset: 0; background: rgba(28, 14, 70, .5); display: flex; align-items: center; justify-content: center;
  pointer-events: auto; animation: fadeIn .2s ease;
}
.modal-bg.out { animation: fadeOut .2s ease forwards; }
.modal {
  position: relative; background: #fff; border-radius: 36px; padding: 30px 42px 34px; min-width: 460px; max-width: 1080px;
  text-align: center; box-shadow: 0 14px 0 rgba(0, 0, 0, .12), 0 24px 60px rgba(0, 0, 0, .35);
  border: 6px solid #ffe8a3; animation: popIn .4s cubic-bezier(.2, 1.6, .4, 1);
  max-height: 690px; overflow: auto;
}
.modal.wide { min-width: 700px; }
.modal-title { font-size: 38px; font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.modal-body { font-size: 24px; line-height: 1.35; margin: 6px 0 10px; }
.modal-btns { display: flex; gap: 18px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.modal-x {
  position: absolute; top: 10px; right: 14px; width: 48px; height: 48px; border-radius: 50%; border: none;
  background: #f1f0f7; font-size: 24px; cursor: pointer; color: var(--muted);
}

.toast {
  position: absolute; left: 50%; top: 96px; transform: translateX(-50%); background: #fff; color: var(--ink);
  padding: 12px 28px; border-radius: 999px; font-size: 26px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .12), 0 10px 30px rgba(0, 0, 0, .2); animation: dropIn .35s cubic-bezier(.2, 1.5, .4, 1);
  z-index: 5; max-width: 1100px;
}
.toast.out { animation: fadeOut .4s forwards; }

/* ================= Hiệu ứng ================= */
.confetti { position: absolute; top: 0; border-radius: 3px; animation: fall linear forwards; }
.spark { position: absolute; transform: translate(-50%, -50%); animation: spark .9s ease-out forwards; }
.float-text {
  position: absolute; transform: translate(-50%, 0); font-size: 40px; font-weight: 800; color: #fff; white-space: nowrap;
  -webkit-text-stroke: 2px #6b3fd1; paint-order: stroke fill; text-shadow: 0 4px 0 #6b3fd1;
  animation: floatUp 1.6s ease-out forwards;
}
.float-text small { font-size: 28px; -webkit-text-stroke: 1.5px #c2255c; text-shadow: 0 3px 0 #c2255c; }
.projectile { position: absolute; left: 0; top: 0; font-size: 70px; margin: -40px 0 0 -40px; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popIn { 0% { scale: .5; opacity: 0; } 100% { scale: 1; opacity: 1; } }
@keyframes dropIn { from { transform: translate(-50%, -40px); opacity: 0; } }
@keyframes fall { from { transform: translate(0, -40px) rotate(0); } to { transform: translate(var(--dx), 790px) rotate(var(--r)); } }
@keyframes spark {
  0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.1); opacity: 0; }
}
@keyframes floatUp {
  0% { transform: translate(-50%, 0) scale(.5); opacity: 0; }
  15% { transform: translate(-50%, -24px) scale(1.12); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translate(-50%, -100px) scale(1); opacity: 0; }
}
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes shakeX { 0%, 100% { translate: 0; } 20% { translate: -14px; } 40% { translate: 12px; } 60% { translate: -8px; } 80% { translate: 5px; } }
@keyframes jumpY { 0%, 100% { translate: 0 0; } 40% { translate: 0 -30px; } 70% { translate: 0 4px; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.18); opacity: .4; } }
@keyframes drift { from { transform: translateX(-200px); } to { transform: translateX(1480px); } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 6px #ffe066); } 50% { filter: drop-shadow(0 0 22px #ffd43b); } }
@keyframes spin { to { transform: rotate(360deg); } }
.pop-in { animation: popIn .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.shake { animation: shakeX .45s ease; }
.jump { animation: jumpY .5s ease; }
.jiggle { animation: wiggle .4s ease 2; }
.cloud { position: absolute; left: 0; animation: drift 60s linear infinite; opacity: .95; pointer-events: none; }
.decor { position: absolute; transform: translate(-50%, -100%); pointer-events: none; filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .12)); }

/* ================= Màn hình chào ================= */
.title-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 900px 260px at 25% 112%, #6fcf55 60%, transparent 61%),
    radial-gradient(ellipse 900px 300px at 85% 115%, #5ec24c 60%, transparent 61%),
    linear-gradient(#6ec8ff, #c9efff 70%);
}
.sun { position: absolute; right: 70px; top: 40px; font-size: 110px; animation: spin 40s linear infinite; }
.title-castle { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); font-size: 200px; opacity: .25; }
.logo {
  position: absolute; top: 26px; left: 0; right: 0; margin: 0; text-align: center; font-size: 104px; font-weight: 800; letter-spacing: 4px;
  -webkit-text-stroke: 6px #fff; paint-order: stroke fill; filter: drop-shadow(0 8px 0 rgba(60, 30, 120, .35));
}
.logo span { display: inline-block; animation: bob 2.2s ease-in-out infinite; }
.subtitle {
  position: absolute; top: 160px; left: 0; right: 0; text-align: center; font-size: 34px; font-weight: 700; color: #fff;
  text-shadow: 0 3px 0 #5f3dc4, 0 0 12px rgba(95, 61, 196, .5);
}
.profiles {
  position: absolute; top: 230px; left: 40px; right: 40px; height: 270px; display: flex; gap: 24px; justify-content: center;
  align-items: center; overflow-x: auto; padding: 10px;
}
.pcard {
  position: relative; width: 190px; height: 240px; flex: none; background: #fff; border-radius: 30px; cursor: pointer; text-align: center;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .12), 0 12px 24px rgba(0, 0, 0, .15); border: 5px solid #ffe8a3; padding-top: 6px;
  transition: transform .15s;
}
.pcard:hover { transform: translateY(-6px) rotate(-1deg); }
.pc-av { width: 150px; height: 150px; margin: 0 auto; }
.pc-name { font-size: 28px; font-weight: 800; line-height: 1.1; padding: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pc-stars { font-size: 20px; color: var(--muted); }
.pc-del {
  position: absolute; top: -12px; right: -12px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff;
  background: #ffc9c9; color: #c92a2a; font-size: 18px; cursor: pointer; opacity: .75;
}
.title-btns { position: absolute; top: 525px; left: 0; right: 0; display: flex; gap: 30px; justify-content: center; }
.title-foot, .map-foot {
  position: absolute; bottom: 10px; left: 16px; right: 16px; display: flex; gap: 16px; align-items: center; font-size: 18px; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.map-foot { left: auto; right: 16px; }
.sync-badge { background: rgba(0, 0, 0, .25); border-radius: 999px; padding: 3px 14px; }
.tip { background: rgba(255, 255, 255, .92); color: var(--ink); text-shadow: none; padding: 4px 14px; border-radius: 14px; }

/* Đăng ký / đăng nhập */
.name-input {
  display: block; margin: 16px auto 4px; width: 460px; font-size: 40px; font-weight: 700; text-align: center; padding: 10px 20px;
  border: 5px solid #d0bfff; border-radius: 24px; outline: none; color: var(--ink);
}
.name-input:focus { border-color: #845ef7; box-shadow: 0 0 0 6px rgba(132, 94, 247, .2); }
.hero-pick { display: flex; gap: 22px; justify-content: center; margin: 18px 0; }
.hp-card { width: 170px; height: 200px; border-radius: 28px; background: #f3f0ff; border: 5px solid #e5dbff; cursor: pointer; padding: 10px; transition: transform .15s; }
.hp-card:hover { transform: translateY(-8px); border-color: #845ef7; }
.pin-picker { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 14px 0 6px; }
.pin-slots { display: flex; gap: 16px; }
.pin-slot {
  width: 84px; height: 84px; border-radius: 22px; border: 5px dashed #d0bfff; display: flex; align-items: center; justify-content: center;
  font-size: 50px; background: #faf8ff;
}
.pin-slot.filled { border-style: solid; border-color: #845ef7; background: #fff; animation: popIn .3s; }
.pin-grid { display: grid; grid-template-columns: repeat(9, 72px); gap: 10px; }
.pin-btn { width: 72px; height: 72px; border-radius: 20px; border: none; background: #fff4e6; font-size: 44px; cursor: pointer; box-shadow: 0 5px 0 #ffd8a8; }
.pin-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #ffd8a8; }
.code-card { background: #fff9db; border: 4px dashed #ffd43b; border-radius: 24px; padding: 14px 24px; margin: 12px auto; max-width: 600px; }
.code-card.small { padding: 10px 18px; }
.cc-name { font-size: 34px; font-weight: 800; }
.cc-pin { font-size: 56px; letter-spacing: 10px; }

/* ================= Thanh trên ================= */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 84px; display: flex; align-items: center; gap: 12px; padding: 10px 16px; z-index: 20;
  background: linear-gradient(rgba(40, 20, 90, .35), transparent);
}
.me { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 2px 18px 2px 4px; cursor: pointer; box-shadow: 0 5px 0 rgba(0, 0, 0, .15); }
.me-av { width: 56px; height: 62px; }
.me-name { font-size: 24px; font-weight: 800; max-width: 170px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chip {
  display: inline-flex; align-items: center; gap: 2px; background: #fff; border-radius: 999px; padding: 6px 18px; font-size: 26px; font-weight: 700;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .15);
}
.chip.big { font-size: 34px; padding: 8px 26px; }
.bar-title {
  font-size: 32px; font-weight: 800; color: #fff; text-shadow: 0 3px 0 rgba(60, 30, 120, .5); display: flex; align-items: center; gap: 10px;
}
.bar-title .lbl small { font-size: .55em; }
.tb-btn {
  width: 92px; height: 72px; border: none; border-radius: 22px; background: #fff; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; box-shadow: 0 5px 0 rgba(0, 0, 0, .15); padding: 2px;
}
.tb-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.tb-ico { font-size: 32px; line-height: 1; }
.tb-lbl { font-size: 15px; font-weight: 700; line-height: 1; }
.tb-lbl .lbl { text-align: center; }
.tb-lbl .lbl small { display: none; }

/* ================= Bản đồ ================= */
.map-bg { position: absolute; inset: 0; }
.node { position: absolute; width: 0; height: 0; cursor: pointer; z-index: 3; }
.node > * { position: absolute; }
.node .bld {
  left: 0; top: 0; transform: translate(-50%, -80%); font-size: 100px; line-height: 1; transition: transform .2s, filter .6s;
  filter: drop-shadow(0 6px 3px rgba(0, 0, 0, .22));
}
.node:hover .bld { transform: translate(-50%, -86%) scale(1.06); }
.node.locked .bld { filter: grayscale(1) brightness(.85) drop-shadow(0 6px 3px rgba(0, 0, 0, .22)) !important; opacity: .8; }
.node-ring {
  left: 0; top: 0; width: 170px; height: 60px; transform: translate(-50%, 0); margin-top: -10px; border-radius: 50%;
  background: rgba(255, 255, 255, .45); border: 4px solid rgba(255, 255, 255, .8);
}
.node.next .node-ring { background: rgba(255, 224, 102, .7); border-color: #ffd43b; animation: pulse 1.4s ease-in-out infinite; }
.node.done .node-ring { background: rgba(255, 255, 255, .7); }
.node-icon {
  left: 40px; top: -112px; width: 52px; height: 52px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 30px; box-shadow: 0 4px 0 rgba(0, 0, 0, .15);
}
.node .flag { left: -70px; top: -120px; font-size: 48px; animation: wiggle 2s ease-in-out infinite; transform-origin: bottom left; }
.node .lock { left: 0; top: -60px; transform: translate(-50%, 0); font-size: 46px; }
.node-chest { left: 52px; top: -40px; font-size: 44px; animation: bob 1s ease-in-out infinite, glow 1.2s infinite; }
.node-label {
  left: 0; top: 34px; transform: translateX(-50%); background: #fff; border-radius: 16px; padding: 4px 14px; white-space: nowrap;
  font-size: 22px; font-weight: 800; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); text-align: center;
}
.node-label .lbl { text-align: center; }
.node-label .lbl small { font-size: 15px; }
.node.locked .node-label { background: #e9e6f2; color: #8a84a0; }
.node-stars { left: 0; top: 92px; transform: translateX(-50%); font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 2px 2px rgba(0, 0, 0, .5); white-space: nowrap; }

.walker {
  position: absolute; width: 130px; height: 130px; transform: translate(-100%, -88%); z-index: 6; cursor: pointer;
  transition: left .52s linear, top .52s linear; pointer-events: auto;
}
.village-screen .walker { transform: translate(-50%, -100%); }
.walker svg { width: 100%; height: 100%; transition: transform .2s; }
.walker.face-left svg { transform: scaleX(-1); }
.walker.walking { animation: jumpY .26s ease-in-out infinite; }
.pet-bob { animation: bob 1.2s ease-in-out infinite; transform-box: fill-box; }

/* ================= Làng ================= */
.vscene { position: absolute; inset: 0; }
.v-banner {
  position: absolute; top: 92px; left: 50%; transform: translateX(-50%); background: #fff; border-radius: 999px; padding: 6px 30px;
  font-size: 32px; font-weight: 800; display: flex; align-items: center; gap: 10px; box-shadow: 0 6px 0 rgba(0, 0, 0, .14); z-index: 4; white-space: nowrap;
}
.v-banner .lbl small { font-size: 18px; }
.house { position: absolute; width: 150px; height: 150px; transform: translate(-50%, -100%); cursor: pointer; z-index: 3; }
.house.boss { width: 170px; height: 230px; }
.house .h-img { width: 100%; height: 100%; transition: transform .2s, filter .3s; transform-origin: bottom center; }
.house:hover .h-img { transform: scale(1.06); }
.house.locked .h-img { filter: grayscale(1) brightness(.9); }
.house.next .h-img { animation: glow 1.4s ease-in-out infinite; }
.house .h-badge {
  position: absolute; top: -20px; left: -12px; width: 56px; height: 56px; border-radius: 50%; background: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 32px; box-shadow: 0 4px 0 rgba(0, 0, 0, .15);
}
.house .h-num {
  position: absolute; top: -14px; right: -6px; background: #845ef7; color: #fff; font-weight: 800; font-size: 20px; border-radius: 12px;
  padding: 0 10px; box-shadow: 0 3px 0 #5f3dc4;
}
.house .lock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -30%); font-size: 50px; }
.house .h-stars { position: absolute; bottom: -38px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.stars .st { font-size: 34px; color: rgba(255, 255, 255, .7); -webkit-text-stroke: 2px #b08a00; paint-order: stroke fill; }
.stars .st.on { color: #ffd43b; }
.v-chest { position: absolute; width: 120px; height: 110px; transform: translate(-50%, -100%); cursor: pointer; z-index: 3; }
.v-chest.ready { animation: bob 1s ease-in-out infinite, glow 1.2s ease-in-out infinite; }

.lvl-pop { min-width: 420px; }
.lp-icon { font-size: 110px; line-height: 1.1; animation: bob 2s ease-in-out infinite; }
.lp-name { font-size: 36px; font-weight: 800; }
.lp-name .lbl { text-align: center; }
.lp-stars .st { font-size: 50px; }
.lp-words { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; padding: 10px; background: #f8f6ff; border-radius: 20px; }
.lp-words .pic { width: 52px !important; height: 52px !important; font-size: 40px !important; }
.lp-words .pic.num { font-size: 36px !important; }

.chest-pop .cp-items { display: flex; gap: 30px; justify-content: center; margin: 10px 0; }
.cp-item { text-align: center; }
.cp-ico { width: 130px; height: 130px; margin: 0 auto; border-radius: 30px; background: #fff9db; display: flex; align-items: center; justify-content: center; animation: glow 1.2s infinite; }
.cp-name { font-size: 26px; font-weight: 800; }
.cp-name .lbl { text-align: center; }
.reward-coins { font-size: 40px; font-weight: 800; color: #e67700; }
.buy-pop { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* ================= Màn chơi ================= */
.game-screen .g-bg { position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg2), var(--bg1)); }
.game-screen .g-bg::after {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .7) 2px, transparent 3px); background-size: 46px 46px;
}
.ghead { position: absolute; top: 10px; left: 16px; right: 16px; display: flex; align-items: center; gap: 14px; z-index: 10; }
.gtitle {
  display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 4px 20px; font-size: 24px; font-weight: 800;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .12);
}
.gtitle .lbl small { font-size: 14px; }
.glv { font-size: 16px; color: var(--muted); margin-left: 6px; }
.dots { display: flex; gap: 8px; margin-left: 10px; }
.dot { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .6); border: 4px solid #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, .1); transition: all .3s; }
.dot.now { transform: scale(1.2); border-color: #ffd43b; }
.dot.done { background: #ffd43b; border-color: #fff; }

.guide { position: absolute; top: 84px; left: 20px; right: 20px; height: 112px; display: flex; align-items: center; justify-content: center; gap: 12px; z-index: 9; pointer-events: none; }
.owl { font-size: 84px; line-height: 1; pointer-events: auto; cursor: pointer; filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .2)); }
.owl.talk { animation: wiggle .5s ease-in-out infinite; }
.bubble {
  position: relative; background: rgba(255, 255, 255, .96); border-radius: 30px; padding: 10px 30px; max-width: 1000px; min-height: 72px;
  display: flex; flex-direction: column; justify-content: center; box-shadow: 0 6px 0 rgba(0, 0, 0, .1); border: 4px solid #e5dbff;
}
.bubble::before {
  content: ''; position: absolute; left: -20px; top: 50%; margin-top: -12px; border: 12px solid transparent; border-right: 14px solid #e5dbff;
}
.b-main { font-size: 36px; font-weight: 800; line-height: 1.2; }
.b-sub { font-size: 22px; color: var(--muted); font-weight: 600; line-height: 1.2; }
.b-sub:empty { display: none; }
.kw { display: inline-block; color: #e8590c; background: #fff3bf; padding: 0 10px; border-radius: 12px; }
.area { position: absolute; left: 0; right: 0; top: 200px; bottom: 0; }
.center-box { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding-bottom: 30px; }

.cards { display: flex; gap: 36px; justify-content: center; align-items: center; }
.card {
  width: 210px; height: 210px; background: #fff; border-radius: 34px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 9px 0 rgba(0, 0, 0, .13), 0 14px 26px rgba(0, 0, 0, .12); border: 5px solid #fff; transition: transform .15s, box-shadow .15s;
  touch-action: none;
}
.card:hover { transform: translateY(-6px); }
.card.good { background: #d3f9d8; border-color: #51cf66; animation: jumpY .5s ease; }
.card.bad { opacity: .45; filter: grayscale(.7); pointer-events: none; }
.cards.small .card { width: 160px; height: 160px; border-radius: 28px; }
.pic { line-height: 1; display: flex; align-items: center; justify-content: center; }
.pic.emo { filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .12)); }
.pic.blob svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .15)); }
.pic.num { font-weight: 800; color: #4263eb; -webkit-text-stroke: 3px #fff; paint-order: stroke fill; text-shadow: 0 5px 0 #bac8ff; }
.pic.q { opacity: .35; }
.readword {
  display: flex; align-items: center; gap: 18px; background: #fff; border-radius: 28px; padding: 6px 18px 6px 40px; font-size: 64px; font-weight: 800;
  box-shadow: 0 7px 0 rgba(0, 0, 0, .12); border: 5px dashed #ffc078; letter-spacing: 2px;
}

/* Bong bóng */
.sky { position: absolute; inset: 0; overflow: hidden; z-index: 1; }
.balloon { position: absolute; left: 0; top: 0; width: 140px; height: 230px; cursor: pointer; touch-action: none; will-change: transform; }
.bbody {
  position: relative; width: 140px; height: 165px; border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .85) 0 10%, transparent 26%), var(--bc);
  display: flex; align-items: center; justify-content: center; box-shadow: inset -10px -14px 0 rgba(0, 0, 0, .1);
}
.bbody::after {
  content: ''; position: absolute; bottom: -12px; left: 50%; margin-left: -10px; border: 10px solid transparent; border-bottom: 14px solid var(--bc);
  transform: rotate(180deg);
}
.balloon.white .bbody { box-shadow: inset -10px -14px 0 rgba(0, 0, 0, .08), 0 0 0 3px #d0d4e0; }
.bbody .pic { background: rgba(255, 255, 255, .85); border-radius: 50%; width: 96px; height: 96px; }
.bbody .pic.blob { padding: 10px; }
.bstring { width: 2px; height: 70px; margin: 10px auto 0; background: rgba(60, 60, 60, .5); }
.balloon.wobble .bbody { animation: wiggle .35s ease 2; }
.balloon.popped .bbody, .balloon.popped .bstring { animation: popOut .3s ease forwards; }
@keyframes popOut { to { transform: scale(1.6); opacity: 0; } }

/* Kéo thả */
.drag-wrap { position: absolute; inset: 0; }
.basket {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 300px; height: 230px; border-radius: 40px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; transition: background .2s;
}
.basket.hover { background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 6px #ffd43b; }
.bk-friend { font-size: 90px; line-height: 1; margin-bottom: -24px; z-index: 0; }
.bk { font-size: 150px; line-height: 1; z-index: 1; filter: drop-shadow(0 6px 3px rgba(0, 0, 0, .2)); }
.drag-row { position: absolute; left: 0; right: 0; bottom: 50px; }
.card.drag { width: 180px; height: 180px; cursor: grab; }
.card.drag.dragging { cursor: grabbing; z-index: 30; transition: none; box-shadow: 0 24px 40px rgba(0, 0, 0, .25); }
.card.drag.back { transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), opacity .35s; }

/* Lật thẻ */
.mem-grid { display: grid; gap: 22px; perspective: 1000px; }
.mcard { width: 150px; height: 160px; cursor: pointer; }
.mc-inner { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.mcard.flipped .mc-inner { transform: rotateY(180deg); }
.mc-front, .mc-back {
  position: absolute; inset: 0; border-radius: 26px; display: flex; align-items: center; justify-content: center; backface-visibility: hidden;
  -webkit-backface-visibility: hidden; box-shadow: 0 7px 0 rgba(0, 0, 0, .14); border: 5px solid #fff;
}
.mc-front { font-size: 60px; background: repeating-linear-gradient(45deg, #9775fa 0 16px, #845ef7 16px 32px); }
.mc-back { background: #fff; transform: rotateY(180deg); }
.mcard.matched .mc-back { background: #d3f9d8; border-color: #51cf66; }

/* Đếm */
.count-field { position: absolute; left: 0; right: 0; top: 0; height: 260px; }
.cobj { position: absolute; transform: translateX(-50%); font-size: 84px; line-height: 1; cursor: pointer; filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .15)); }
.cobj .cnum {
  position: absolute; right: -14px; top: -10px; width: 42px; height: 42px; border-radius: 50%; background: #ff922b; color: #fff;
  font-size: 26px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 3px solid #fff; animation: popIn .3s;
}
.count-cards { position: absolute; left: 0; right: 0; bottom: 30px; }

/* Đánh trùm */
.arena { position: absolute; left: 0; right: 0; top: 0; height: 290px; }
.arena-hero { position: absolute; left: 130px; top: 10px; width: 270px; height: 270px; }
.arena-monster { position: absolute; right: 170px; top: 0; width: 300px; text-align: center; }
.monster { font-size: 190px; line-height: 1; animation: bob 1.6s ease-in-out infinite; filter: drop-shadow(0 10px 4px rgba(0, 0, 0, .25)); }
.monster.final { font-size: 210px; }
.monster.hit { animation: hitFlash .45s ease; }
.monster.friend { animation: spin 1s ease, bob 1.6s ease-in-out 1s infinite; filter: drop-shadow(0 0 30px #ff8cc6); }
@keyframes hitFlash { 0%, 100% { transform: none; filter: none; } 30% { transform: translateX(16px) rotate(8deg) scale(.92); filter: brightness(2.2); } 60% { transform: translateX(-10px); } }
.hp { display: flex; justify-content: center; gap: 2px; font-size: 30px; }
.hp span { transition: all .3s; }
.hp span.lost { filter: grayscale(1); opacity: .3; transform: scale(.7); }
.mname { display: inline-block; background: #fff; border-radius: 999px; padding: 2px 18px; font-size: 22px; font-weight: 800; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.friend-hearts { position: absolute; left: 50%; top: 40px; font-size: 60px; animation: floatUp 2s ease-out infinite; }
.qbox { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qbox .cards { gap: 26px; }
.qbox .card { width: 150px; height: 150px; border-radius: 26px; }
.qbox .readword { font-size: 44px; padding: 2px 12px 2px 30px; }

/* Kết quả */
.result { display: flex; flex-direction: column; align-items: center; }
.result-hero { width: 130px; height: 130px; animation: bob 1.4s ease-in-out infinite; }
.big-stars { display: flex; gap: 10px; margin-top: 4px; line-height: 1; }
.result-modal { padding-top: 22px; padding-bottom: 26px; }
.result-modal .modal-btns { margin-top: 12px; }
.result .reward-coins { font-size: 34px; }
.bst { font-size: 72px; color: #e9ecef; -webkit-text-stroke: 4px #ced4da; paint-order: stroke fill; transition: all .3s; }
.bst.on { color: #ffd43b; -webkit-text-stroke-color: #f08c00; animation: popIn .45s cubic-bezier(.2, 1.8, .4, 1); }
.big-stars .bst:nth-child(2) { transform: translateY(-14px); font-size: 88px; }
.new-stickers { margin-top: 6px; }
.ns-title { font-size: 22px; font-weight: 800; color: #c2255c; }
.ns-title .lbl { text-align: center; }
.ns-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; max-width: 600px; }
.ns { width: 68px; height: 68px; background: #fff0f6; border-radius: 18px; display: flex; align-items: center; justify-content: center; border: 3px solid #fcc2d7; }
.ns .pic { width: 52px !important; height: 52px !important; }
.ns .pic.num { font-size: 40px !important; }
.finale .result-hero { margin: 0 auto; }

/* ================= Tủ đồ ================= */
.wr-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #ffdeeb, #e5dbff 50%, #d0ebff); }
.wr-left { position: absolute; left: 30px; top: 100px; width: 400px; bottom: 30px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wr-avatar {
  width: 380px; height: 400px; background: radial-gradient(ellipse at 50% 92%, #fff 0 30%, transparent 31%), radial-gradient(circle, rgba(255, 255, 255, .6), transparent 70%);
  border-radius: 40px;
}
.wr-name { font-size: 36px; font-weight: 800; }
.wr-right { position: absolute; left: 450px; right: 30px; top: 100px; bottom: 24px; background: #fff; border-radius: 36px; box-shadow: 0 10px 0 rgba(0, 0, 0, .1); padding: 16px 20px; display: flex; flex-direction: column; }
.wr-tabs { display: flex; gap: 10px; margin-bottom: 14px; }
.wr-tab {
  flex: 1; border: none; border-radius: 20px; background: #f1edff; padding: 6px 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 20px; font-weight: 800; box-shadow: 0 4px 0 #d9d0ff;
}
.wr-tab .t-ico { font-size: 30px; }
.wr-tab .lbl small { font-size: 13px; }
.wr-tab.on { background: #845ef7; color: #fff; box-shadow: 0 4px 0 #5f3dc4; }
.wr-grid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; overflow-y: auto; align-content: start; padding: 4px; }
.item {
  position: relative; background: #fbfaff; border: 4px solid #ece6ff; border-radius: 26px; padding: 8px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .12s;
}
.item:hover { transform: translateY(-4px); }
.item.worn { border-color: #51cf66; background: #ebfbee; }
.item.notown .it-prev { opacity: .75; }
.it-prev { width: 90px; height: 90px; display: flex; align-items: center; justify-content: center; }
.ip-emo { font-size: 66px; line-height: 1; }
.cp-ico .ip-emo { font-size: 90px; }
.ip-color { width: 74px; height: 74px; border-radius: 22px; border: 4px solid #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.ip-color.cape { border-radius: 10px 10px 40px 40px; }
.cp-ico .ip-color { width: 100px; height: 100px; }
.it-name { font-size: 18px; font-weight: 800; line-height: 1.05; min-height: 38px; }
.it-name .lbl { text-align: center; }
.it-name .lbl small { font-size: 12px; }
.it-foot { font-size: 18px; font-weight: 800; background: #e5dbff; border-radius: 999px; padding: 0 14px; }
.it-foot.worn { background: #51cf66; color: #fff; }
.it-foot.price { background: #fff3bf; color: #e67700; }
.it-foot.price.poor { opacity: .6; }
.it-foot.chest { background: #ffe8cc; color: #d9480f; }

/* ================= Sổ sưu tập ================= */
.al-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #fff4e6, #ffe8cc); }
.al-book {
  position: absolute; left: 40px; right: 40px; top: 96px; bottom: 24px; background: #fffdf7; border-radius: 30px; border: 8px solid #e8b06a;
  box-shadow: 0 10px 0 #b9773a; display: flex; padding: 16px;
}
.al-tabs { display: grid; grid-template-columns: repeat(2, 64px); grid-auto-rows: 58px; gap: 6px; margin-right: 16px; align-content: start; }
.al-tab { width: 64px; height: 58px; border: none; border-radius: 18px; background: #ffe8cc; font-size: 36px; cursor: pointer; box-shadow: 0 4px 0 #ffc078; }
.al-tab.on { background: #ff922b; box-shadow: 0 4px 0 #d9480f; }
.al-grid { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-content: start; overflow-y: auto; padding: 4px; }
.al-title { grid-column: 1 / -1; font-size: 34px; font-weight: 800; }
.al-title .lbl { flex-direction: row; align-items: baseline; gap: 14px; }
.al-title .lbl small { font-size: 22px; }
.al-count { margin-right: 4px; }
.sticker {
  background: #f1f3f5; border-radius: 22px; padding: 10px 6px; text-align: center; cursor: pointer; border: 4px dashed #ced4da;
  display: flex; flex-direction: column; align-items: center; transform: rotate(var(--rot));
}
.sticker.got { background: #fff; border: 4px solid #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .1), 0 0 0 3px #ffd8a8; }
.sticker .pic { width: 74px; height: 74px; }
.sticker .pic.num { font-size: 60px; }
.s-en { font-size: 26px; font-weight: 800; line-height: 1.1; }
.s-vi { font-size: 17px; color: var(--muted); line-height: 1.1; }

/* ================= Cài đặt ================= */
.settings { text-align: left; min-width: 560px; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 4px 0; border-bottom: 2px dashed #eee; font-size: 26px; font-weight: 700; }
.set-ico { font-size: 34px; width: 46px; text-align: center; }
.set-lbl { flex: 1; }
.toggle { border: none; border-radius: 999px; padding: 6px 22px; font-size: 22px; font-weight: 800; background: #dee2e6; color: #495057; cursor: pointer; min-width: 100px; }
.toggle.on { background: #40c057; color: #fff; }
.settings .code-card { text-align: center; margin: 8px auto; }
.settings .cc-pin { font-size: 40px; }
.settings .cc-name { font-size: 26px; }
.settings .sync-badge { background: #f1f3f5; color: var(--ink); }

/* ================= Chọn giọng đọc ================= */
.voice-picker { text-align: left; width: 760px; }
.voice-picker .set-row .toggle { margin-left: 8px; }
.vp-sec { margin-top: 12px; }
.vp-head { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.vp-list { display: flex; flex-direction: column; gap: 6px; max-height: 190px; overflow-y: auto; padding: 2px; }
.vp-item {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 16px; border-radius: 16px; background: #f8f6ff;
  border: 3px solid #ece6ff; cursor: pointer; font-size: 20px; font-weight: 700;
}
.vp-item.on { border-color: #51cf66; background: #ebfbee; }
.vp-item.on .vp-name::before { content: '✔ '; color: #2b8a3e; }
.vp-name { flex: 1; }
.vp-lang { font-size: 15px; color: var(--muted); }
.vp-good { font-size: 14px; background: #ffd43b; color: #7a5300; border-radius: 999px; padding: 0 10px; }
.vp-play { border: none; background: #fff; border-radius: 50%; width: 40px; height: 40px; font-size: 20px; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.title-foot .btn.small { font-size: 18px; padding: 6px 14px; box-shadow: 0 4px 0 var(--d); }
.rec-row { background: #fff9db; border-radius: 16px; padding: 6px 10px !important; border: none !important; }

/* ================= Vùng đất 2 ================= */
.world-bar {
  position: absolute; top: 90px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; z-index: 8;
}
.world-name {
  background: #fff; border-radius: 999px; padding: 4px 26px; font-size: 28px; font-weight: 800; white-space: nowrap;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .14); display: flex; align-items: center; gap: 8px;
}
.world-name .lbl small { font-size: 15px; }
.w-arrow { font-size: 22px; padding: 8px 16px; }
.pulse-btn { animation: glow 1.2s ease-in-out infinite; }
.world-new { font-size: 40px; margin: 6px 0; line-height: 1.1; }
.world-new small { font-size: 24px; color: var(--muted); }
.al-tab.dim { opacity: .45; }

.pic.letter { font-weight: 800; color: #e8590c; -webkit-text-stroke: 3px #fff; paint-order: stroke fill; text-shadow: 0 5px 0 #ffd8a8; gap: 2px; align-items: baseline; }
.pic.letter small { font-size: .62em; color: #f08c00; }
.phon-prompt {
  display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 30px; padding: 4px 18px 4px 28px;
  box-shadow: 0 7px 0 rgba(0, 0, 0, .12); border: 5px dashed #74c0fc;
}
.pp-emo { font-size: 92px; line-height: 1.1; }
.qbox .phon-prompt { padding: 0 10px 0 18px; }
.qbox .pp-emo { font-size: 60px; }
.readword.sent { font-size: 52px; letter-spacing: 0; }
.qbox .readword.sent { font-size: 36px; }

.cobj.small { font-size: 60px; }
.cobj.small .cnum { width: 34px; height: 34px; font-size: 20px; right: -10px; top: -8px; }

.order-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding-bottom: 30px; }
.o-top { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 30px; padding: 6px 18px 6px 24px; box-shadow: 0 7px 0 rgba(0, 0, 0, .12); }
.o-pic .pic { width: 100px; height: 100px; }
.o-line { display: flex; align-items: flex-end; gap: 12px; min-height: 84px; }
.o-slot {
  min-width: 110px; height: 76px; border-radius: 20px; border: 5px dashed #c5b6ff; background: rgba(255, 255, 255, .5);
  display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800; padding: 0 16px;
}
.o-slot.filled { border-style: solid; border-color: #51cf66; background: #ebfbee; animation: popIn .3s; }
.o-end { font-size: 52px; font-weight: 800; line-height: 1; }
.o-pool { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; max-width: 1100px; }
.o-tile {
  border: none; border-radius: 22px; background: #fff; font: 800 40px/1 var(--font); color: var(--ink); padding: 16px 28px; cursor: pointer;
  box-shadow: 0 7px 0 #c5b6ff, 0 10px 16px rgba(0, 0, 0, .1);
}
.o-tile:active { transform: translateY(5px); box-shadow: 0 2px 0 #c5b6ff; }
.o-tile.used { visibility: hidden; }
.theme-island .cloud { opacity: .8; }

/* ================= Phần thưởng nâng cao ================= */
.rank-chip { border: 3px solid var(--rc); font-size: 20px; padding: 4px 14px; cursor: pointer; font-family: var(--font); color: var(--ink); }
.rank-chip .lbl small { font-size: 12px; }
.tb-btn { position: relative; }
.tb-dot {
  position: absolute; top: -6px; right: -6px; min-width: 26px; height: 26px; border-radius: 13px; background: #fa5252; color: #fff;
  font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 3px solid #fff; animation: pulse 1.2s infinite;
}

/* Hào quang + thú cưng */
.aura-p { animation: auraFloat 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes auraFloat { 0%, 100% { translate: 0 0; opacity: .5; } 50% { translate: 0 -10px; opacity: 1; } }
.aura-glow { animation: auraPulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes auraPulse { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
.pet-glow { filter: drop-shadow(0 0 6px #ffd43b); }

/* Lên cấp */
.rankup { text-align: center; }
.ru-icon { font-size: 110px; line-height: 1.1; animation: popIn .6s cubic-bezier(.2, 1.8, .4, 1), bob 1.6s ease-in-out .6s infinite; }
.ru-name { font-size: 42px; font-weight: 800; -webkit-text-stroke: 1px rgba(0, 0, 0, .15); }
.ru-name .lbl { text-align: center; }
.ru-list { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.ru-item { background: #f8f6ff; border-radius: 22px; padding: 8px 14px; min-width: 150px; font-size: 20px; font-weight: 800; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ru-item small { font-size: 15px; color: var(--muted); font-weight: 600; }
.ru-av { width: 100px; height: 120px; }
.ru-big { font-size: 56px; line-height: 1.1; }

/* Quà mỗi ngày */
.daily-row { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.dg { width: 84px; border-radius: 18px; background: #f1f3f5; padding: 6px 4px; text-align: center; border: 4px solid transparent; }
.dg.got { opacity: .45; }
.dg.got .dg-ico::after { content: '✔'; position: absolute; margin-left: -18px; color: #2b8a3e; }
.dg.now { background: #fff9db; border-color: #fab005; animation: bob 1.2s ease-in-out infinite; }
.dg-day { font-size: 15px; font-weight: 700; color: var(--muted); }
.dg-ico { font-size: 34px; line-height: 1.2; }
.dg-c { font-size: 20px; font-weight: 800; color: #e67700; }
.dg-item { display: inline-flex; align-items: center; gap: 10px; background: #f3f0ff; border-radius: 18px; padding: 6px 18px; font-size: 22px; font-weight: 800; }
.dg-item-e { font-size: 44px; }

/* Nhiệm vụ */
.quests, .ranks { text-align: left; min-width: 640px; }
.q-row { display: flex; align-items: center; gap: 14px; padding: 10px 6px; border-bottom: 2px dashed #eee; }
.q-ico { font-size: 40px; width: 52px; text-align: center; }
.q-main { flex: 1; }
.q-name { font-size: 24px; font-weight: 800; }
.q-bar { height: 16px; background: #e9ecef; border-radius: 8px; overflow: hidden; margin: 4px 0; }
.q-fill { height: 100%; background: linear-gradient(90deg, #51cf66, #94d82d); border-radius: 8px; transition: width .4s; }
.q-num { font-size: 15px; color: var(--muted); font-weight: 700; }
.q-reward { font-size: 20px; font-weight: 800; color: #adb5bd; }
.q-done { font-size: 34px; color: #2b8a3e; font-weight: 800; }

/* Bảng cấp bậc */
.rk-next { font-size: 22px; font-weight: 800; margin-bottom: 8px; text-align: center; }
.rk-row { display: flex; align-items: center; gap: 14px; padding: 6px 10px; border-radius: 16px; }
.rk-row.now { background: #fff9db; box-shadow: 0 0 0 3px #fab005 inset; }
.rk-row.locked { opacity: .55; }
.rk-ico { font-size: 40px; width: 52px; text-align: center; }
.rk-name { font-size: 22px; font-weight: 800; }
.rk-name .lbl { flex-direction: row; align-items: baseline; gap: 8px; }
.rk-name small { font-size: 15px; color: var(--muted); }
.rk-unl { font-size: 17px; color: var(--muted); }

/* Kỹ năng khi đánh trùm */
.skills { position: absolute; left: 420px; top: 40px; display: flex; flex-direction: column; gap: 10px; }
.sk-btn {
  position: relative; display: flex; align-items: center; gap: 8px; border: none; border-radius: 20px; background: #fff; padding: 6px 16px 6px 10px;
  font-family: var(--font); font-size: 18px; font-weight: 800; cursor: pointer; box-shadow: 0 5px 0 #c5b6ff, 0 8px 14px rgba(0, 0, 0, .1); color: var(--ink);
}
.sk-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #c5b6ff; }
.sk-btn.used { opacity: .4; filter: grayscale(1); pointer-events: none; }
.sk-ico { font-size: 30px; }
.sk-name .lbl small { font-size: 12px; }
.sk-n { position: absolute; top: -8px; right: -8px; background: #845ef7; color: #fff; border-radius: 12px; min-width: 24px; height: 24px; font-size: 15px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.sk-locked { background: rgba(255, 255, 255, .8); border-radius: 16px; padding: 6px 14px; font-size: 16px; font-weight: 700; color: var(--muted); max-width: 220px; }
.arena-hero.shielded { filter: drop-shadow(0 0 14px #4dabf7) drop-shadow(0 0 4px #fff); }
.arena-hero.shielded::after { content: '🛡️'; position: absolute; right: 20px; top: 80px; font-size: 54px; animation: bob 1s ease-in-out infinite; }
.arena-hero.charged { filter: drop-shadow(0 0 16px #ffd43b); }
.arena-hero.charged::before { content: '⚡'; position: absolute; left: 10px; top: 20px; font-size: 54px; animation: wiggle .4s infinite; }
.card.gone { opacity: 0 !important; transform: scale(.4); transition: all .4s; }

/* Tủ đồ: độ hiếm, khoá, nhân vật */
.item { overflow: visible; }
.item.rar-rare { border-color: #a5d8ff; }
.item.rar-epic { border-color: #e599f7; background: linear-gradient(160deg, #fff, #f8f0fc); }
.item.rar-legend { border-color: #ffc078; background: linear-gradient(160deg, #fff9db, #fff4e6); animation: glow 2s ease-in-out infinite; }
.item.worn { border-color: #51cf66 !important; }
.item.locked { filter: grayscale(.7); opacity: .75; }
.rar-tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 12px; font-weight: 800; padding: 0 10px; border-radius: 999px; white-space: nowrap; }
.it-foot.lock { background: #e9ecef; color: #495057; font-size: 14px; }
.pet-lv { font-size: 13px; font-weight: 800; color: #9c36b5; }
.cls-card .cls-av { width: 96px; height: 110px; }
.ip-aura {
  width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 40px;
  background: radial-gradient(circle, var(--ac) 0, transparent 70%);
}
.ip-wing { width: 76px; height: 76px; border-radius: 40% 40% 50% 50%; display: flex; align-items: center; justify-content: center; font-size: 44px; border: 4px solid #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.cp-ico .ip-aura, .cp-ico .ip-wing { width: 100px; height: 100px; font-size: 56px; }

/* Kết quả: thú cưng lớn, nhiệm vụ xong */
.pet-evolved { display: flex; align-items: center; gap: 10px; background: #fff0f6; border-radius: 18px; padding: 4px 16px; font-size: 20px; font-weight: 800; color: #c2255c; margin-top: 4px; }
.pe-e { font-size: 40px; animation: bob 1s ease-in-out infinite; }
.quest-done { margin-top: 6px; background: #ebfbee; color: #2b8a3e; border-radius: 999px; padding: 2px 16px; font-size: 17px; font-weight: 800; }
.wr-tabs { gap: 6px; }
.wr-tab { font-size: 16px; padding: 4px 2px; gap: 4px; }
.wr-tab .t-ico { font-size: 24px; }

/* ================= Ngoại hình ================= */
.wr-grid.look-grid { display: block; }
.look-sec { margin-bottom: 12px; }
.look-title { font-size: 20px; font-weight: 800; margin: 2px 0 6px; }
.look-title .lbl { flex-direction: row; align-items: baseline; gap: 8px; }
.look-title .lbl small { font-size: 14px; }
.look-row { display: flex; flex-wrap: wrap; gap: 8px; }
.look-hair { width: 84px; border-radius: 18px; background: #fbfaff; border: 4px solid #ece6ff; text-align: center; cursor: pointer; padding: 2px; }
.look-hair.on { border-color: #f06595; background: #fff0f6; }
.lh-av { width: 74px; height: 86px; margin: 0 auto; }
.lh-name { font-size: 13px; font-weight: 800; line-height: 1.05; }
.lh-name .lbl { text-align: center; }
.lh-name .lbl small { font-size: 10px; }
.dot-btn { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px #dee2e6, 0 3px 0 rgba(0, 0, 0, .15); cursor: pointer; }
.dot-btn.on { box-shadow: 0 0 0 4px #f06595, 0 3px 0 rgba(0, 0, 0, .15); transform: scale(1.1); }
.acc-btn { display: inline-flex; align-items: center; gap: 6px; border: 4px solid #ece6ff; background: #fbfaff; border-radius: 999px; padding: 4px 14px 4px 8px; font: 800 16px var(--font); color: var(--ink); cursor: pointer; }
.acc-btn span { font-size: 26px; }
.acc-btn .lbl small { font-size: 11px; }
.acc-btn.on { border-color: #f06595; background: #fff0f6; }
.hero-pick { flex-wrap: wrap; max-width: 760px; gap: 14px; margin-left: auto; margin-right: auto; }
.hero-pick .hp-card { width: 150px; height: 175px; }


/* ================= Học từ mới, cổng làng, cửa ôn tập ================= */
.lesson-screen .g-bg { position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg2), var(--bg1)); }
.ls-dots { margin-right: 10px; }
.ls-card {
  position: absolute; left: 50%; top: 104px; transform: translateX(-50%); width: 760px; min-height: 470px; background: #fff; border-radius: 40px;
  box-shadow: 0 12px 0 rgba(0, 0, 0, .1), 0 20px 40px rgba(0, 0, 0, .12); border: 6px solid #ffe8a3; display: flex; flex-direction: column;
  align-items: center; padding: 14px 30px 20px; gap: 6px; text-align: center;
}
.ls-num { font-size: 18px; font-weight: 800; color: var(--muted); }
.ls-pic { width: 200px; height: 190px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ls-pic .pic.num { font-size: 120px !important; }
.ls-word { display: flex; align-items: center; gap: 14px; font-size: 64px; font-weight: 800; line-height: 1; color: #1864ab; }
.ls-vi { font-size: 36px; font-weight: 700; color: #c2255c; }
.ls-vi-l { font-size: 20px; color: var(--muted); margin-right: 10px; font-weight: 700; }
.ls-ex { background: #f8f9fa; border-radius: 22px; padding: 8px 22px; margin-top: 4px; }
.ls-ex-en { font-size: 28px; font-weight: 800; }
.ls-ex-vi { font-size: 21px; color: var(--muted); font-weight: 600; }
.ls-nav { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; gap: 24px; }
.lesson-screen .btn:disabled { opacity: .35; }

.card.text-card { width: 240px; }
.pic.vi-text { font-size: 30px; font-weight: 800; color: #c2255c; line-height: 1.15; padding: 0 10px; text-align: center; }
.qbox .card.text-card { width: 200px; }

.gate-words { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 620px; margin-top: 8px; }
.gw { display: flex; align-items: center; gap: 6px; background: #f8f6ff; border-radius: 14px; padding: 2px 10px 2px 4px; }
.gw .pic { width: 44px !important; height: 44px !important; }
.gw .pic.num { font-size: 30px !important; }
.gw-en { font-weight: 800; font-size: 17px; }
.gw-vi { font-size: 14px; color: var(--muted); }

.v-gate {
  position: absolute; left: 40px; top: 250px; width: 140px; text-align: center; z-index: 4; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.vg-ico { font-size: 72px; line-height: 1; filter: drop-shadow(0 5px 3px rgba(0, 0, 0, .25)); }
.v-gate.closed .vg-ico { animation: wiggle 1.6s ease-in-out infinite; }
.vg-label { background: #fff; border-radius: 12px; padding: 0 10px; font-size: 16px; font-weight: 800; box-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.vg-label .lbl { text-align: center; }
.vg-label .lbl small { font-size: 11px; }
.v-gate .btn.small { font-size: 15px; padding: 5px 12px; margin-top: 2px; }

.review-node { position: absolute; transform: translate(-50%, -50%); z-index: 4; display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.rv-ico {
  width: 74px; height: 74px; border-radius: 50%; background: #fff3bf; border: 5px solid #f08c00; display: flex; align-items: center; justify-content: center;
  font-size: 40px; box-shadow: 0 5px 0 rgba(0, 0, 0, .18);
}
.review-node.open .rv-ico { animation: glow 1.2s ease-in-out infinite, bob 1.4s ease-in-out infinite; }
.review-node.locked .rv-ico { background: #e9ecef; border-color: #adb5bd; }
.review-node.done .rv-ico { background: #d3f9d8; border-color: #2f9e44; }
.rv-label { margin-top: 4px; background: #fff; border-radius: 12px; padding: 0 10px; font-size: 16px; font-weight: 800; white-space: nowrap; box-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.rv-label .lbl { text-align: center; }
.rv-label .lbl small { font-size: 11px; }
.rv-stars .st { font-size: 22px; }

/* ================= Nghe và nói lại ================= */
.speak-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 40px; padding-bottom: 30px; }
.sp-card {
  width: 520px; min-height: 400px; background: #fff; border-radius: 36px; border: 6px solid #ffe8a3; box-shadow: 0 10px 0 rgba(0, 0, 0, .1);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 24px; gap: 4px; text-align: center;
}
.sp-pic { width: 170px; height: 160px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sp-text { font-size: 54px; font-weight: 800; color: #1864ab; line-height: 1.1; }
.sp-text.sent { font-size: 36px; }
.sp-zh { font-size: 40px; font-weight: 700; color: #c92a2a; letter-spacing: 4px; }
.sp-vi { font-size: 22px; color: #c2255c; font-weight: 700; }
.sp-tools { display: flex; gap: 14px; margin-top: 6px; }
.sp-side { width: 320px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.mic-btn {
  width: 170px; height: 170px; border-radius: 50%; border: 8px solid #fff; background: radial-gradient(circle at 35% 30%, #ff8787, #e03131);
  box-shadow: 0 10px 0 #a61e4d, 0 16px 30px rgba(0, 0, 0, .25); display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font); cursor: pointer; transition: transform .1s;
}
.mic-btn:active { transform: translateY(6px); box-shadow: 0 4px 0 #a61e4d; }
.mic-ico { font-size: 72px; line-height: 1; }
.mic-lbl { font-size: 18px; font-weight: 800; }
.mic-btn.listening { animation: micPulse 1s ease-in-out infinite; background: radial-gradient(circle at 35% 30%, #69db7c, #2b8a3e); box-shadow: 0 10px 0 #1b5e20, 0 0 0 0 rgba(64, 192, 87, .6); }
@keyframes micPulse { 0% { box-shadow: 0 10px 0 #1b5e20, 0 0 0 0 rgba(64, 192, 87, .6); } 100% { box-shadow: 0 10px 0 #1b5e20, 0 0 0 30px rgba(64, 192, 87, 0); } }
.sp-status { font-size: 20px; font-weight: 800; color: var(--ink); background: rgba(255, 255, 255, .85); border-radius: 14px; padding: 4px 14px; }
.sp-result { min-height: 90px; }
.sp-score { font-size: 72px; font-weight: 800; line-height: 1; -webkit-text-stroke: 3px #fff; paint-order: stroke fill; }
.sp-score.great { color: #f08c00; }
.sp-score.good { color: #2b8a3e; }
.sp-score.low { color: #e8590c; }
.sp-emo { font-size: 54px; margin-left: 8px; }
.sp-heard { font-size: 15px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.ls-zh { font-size: 40px; font-weight: 700; color: #c92a2a; letter-spacing: 4px; line-height: 1; }

/* Nút chuyển môn học */
.course-btn.to-zh { background: #fff5f5; box-shadow: 0 5px 0 #ffa8a8; }
.course-btn.to-zh .tb-lbl { color: #c92a2a; }
.course-btn.to-en { background: #e7f5ff; box-shadow: 0 5px 0 #74c0fc; }
.course-btn.to-en .tb-lbl { color: #1864ab; }
.course-btn .tb-lbl { font-size: 13px; }

/* ================= Nông Trại Foxy ================= */
.course-btn.to-farm { background: #ebfbee; box-shadow: 0 5px 0 #8ce99a; }
.course-btn.to-farm .tb-lbl { color: #2b8a3e; }
.course-pick { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.cp-course {
  width: 250px; padding: 16px 14px; border-radius: 26px; background: #fff; border: 5px solid #e9ecef; box-shadow: 0 6px 0 rgba(0, 0, 0, .1);
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer; transition: transform .15s;
}
.cp-course:hover { transform: translateY(-4px); }
.cp-course.to-farm { border-color: #8ce99a; }
.cp-course.to-zh { border-color: #ffa8a8; }
.cp-course.to-en { border-color: #74c0fc; }
.cp-course.on { border-color: #ffd43b; background: #fff9db; }
.cpc-ico { font-size: 64px; line-height: 1; }
.cpc-name { font-size: 26px; font-weight: 800; display: flex; flex-direction: column; line-height: 1.1; }
.cpc-name small { font-size: 15px; color: var(--muted); }
.cpc-desc { font-size: 15px; color: #495057; }
.cpc-on { font-size: 15px; font-weight: 800; color: #2b8a3e; }

.farm-map .mill-blades { transform-origin: 0 0; animation: spin 9s linear infinite; }
.plot-node .plot-img { left: 0; top: 0; width: 190px; height: 120px; transform: translate(-50%, -78%); transition: transform .2s, filter .6s; filter: drop-shadow(0 6px 3px rgba(0, 0, 0, .2)); }
.plot-node:hover .plot-img { transform: translate(-50%, -82%) scale(1.05); }
.plot-node.locked .plot-img { filter: grayscale(.8) brightness(.95); opacity: .85; }
.plot-node .node-icon { top: -120px; }
.plot-node .flag { animation: bob 1.4s ease-in-out infinite; }
.plot-node .thirst { left: -88px; top: -96px; font-size: 40px; animation: bob 1s ease-in-out infinite; }
.plot-node.thirsty .plot-img { filter: saturate(.7) drop-shadow(0 6px 3px rgba(0, 0, 0, .2)); }
.farm-animal { pointer-events: auto; cursor: pointer; z-index: 2; animation: bob 2.4s ease-in-out infinite; }
.farm-animal:nth-of-type(2n) { animation-delay: -1.2s; }
.farm-deco { z-index: 2; }
.water-btn {
  position: absolute; right: 22px; top: 96px; z-index: 8; display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 22px;
  background: #fff; border: 4px solid #a5d8ff; box-shadow: 0 5px 0 rgba(0, 0, 0, .15); font-family: var(--font); font-size: 18px; font-weight: 800; cursor: pointer;
}
.water-btn.due { background: #e7f5ff; border-color: #339af0; color: #1864ab; }
.water-btn .wb-ico { font-size: 32px; line-height: 1; }
.water-btn .lbl small { font-size: 12px; }
.plot-water { top: 150px; }

.bed { width: 150px; height: 110px; }
.bed .h-stars { bottom: -34px; }
.stage-bed { width: 170px; height: 200px; }
.bed-plant { transform-box: fill-box; transform-origin: bottom center; animation: sway 2.4s ease-in-out infinite; }
.bed-plant.grow { animation: grow .9s ease-out both, sway 2.4s ease-in-out .9s infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes grow { from { transform: scale(.1); } to { transform: scale(1); } }
.fence-gate .fg-img { width: 120px; height: 104px; filter: drop-shadow(0 5px 3px rgba(0, 0, 0, .25)); }
.fence-gate.closed .fg-img { animation: wiggle 1.6s ease-in-out infinite; }

/* Hỏi – đáp */
.talk-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 30px; padding: 0 30px 30px; }
.tk-host { display: flex; align-items: flex-end; gap: 6px; }
.tk-fox { font-size: 150px; line-height: 1; cursor: pointer; animation: bob 2s ease-in-out infinite; filter: drop-shadow(0 8px 4px rgba(0, 0, 0, .2)); }
.tk-bubble {
  position: relative; width: 430px; min-height: 230px; background: #fff; border-radius: 34px; border: 6px solid #ffc078; padding: 18px 22px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; margin-bottom: 60px;
}
.tk-bubble::before { content: ""; position: absolute; left: -36px; bottom: 40px; border: 16px solid transparent; border-right: 20px solid #ffc078; }
.tk-pic { font-size: 70px; line-height: 1; }
.tk-q { font-size: 40px; font-weight: 800; color: #d9480f; line-height: 1.1; }
.tk-qvi { font-size: 20px; color: var(--muted); font-weight: 700; }
.tk-tools { display: flex; gap: 12px; margin-top: 4px; }
.tk-right { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.tk-hint { width: 360px; background: #ebfbee; border: 4px dashed #8ce99a; border-radius: 22px; padding: 10px 14px; text-align: center; cursor: pointer; }
.tk-hl { font-size: 15px; font-weight: 800; color: #2b8a3e; }
.tk-hl .lbl small { font-size: 11px; }
.tk-a { font-size: 30px; font-weight: 800; color: #1864ab; line-height: 1.15; }
.tk-avi { font-size: 16px; color: #c2255c; font-weight: 700; }
.tk-side { width: 360px; gap: 8px; }
.tk-side .mic-btn { width: 140px; height: 140px; }
.tk-side .mic-ico { font-size: 58px; }
.tk-side .sp-result { min-height: 70px; }
.tk-side .sp-score { font-size: 56px; }

/* Sân khấu: lồng tiếng */
.show-mode .guide { top: 70px; height: 90px; }
.show-mode .area { top: 172px; }
.dub-wrap { position: absolute; inset: 0 20px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dub-title { font-size: 24px; font-weight: 800; color: #5c3a1a; }
.dub-steps { display: flex; gap: 10px; }
.dub-steps .chip { opacity: .55; font-size: 16px; }
.dub-steps .chip.on { opacity: 1; background: #ffd43b; }
.dub-stage {
  position: relative; width: 1000px; height: 280px; border-radius: 28px; overflow: hidden; border: 6px solid #fff; box-shadow: 0 10px 0 rgba(0, 0, 0, .12);
  background: linear-gradient(180deg, var(--sky) 0 62%, var(--ground) 62% 100%);
}
.dub-prop { position: absolute; font-size: 48px; transform: translate(-50%, 0); opacity: .9; }
.dub-actor { position: absolute; bottom: 14px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.dub-actor .da-body { font-size: 130px; line-height: 1; filter: drop-shadow(0 6px 3px rgba(0, 0, 0, .25)); }
.dub-actor.me .da-body { width: 170px; height: 170px; font-size: 0; }
.dub-actor.me .da-body svg { width: 100%; height: 100%; }
.dub-actor .da-name { background: #fff; border-radius: 12px; padding: 0 12px; font-size: 16px; font-weight: 800; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.dub-actor.talking { animation: talkBounce .45s ease-in-out infinite; }
.dub-actor.talking .da-name { background: #ffd43b; }
@keyframes talkBounce { 0%, 100% { transform: translateX(-50%) translateY(0) scale(1); } 50% { transform: translateX(-50%) translateY(-10px) scale(1.04); } }
.dub-sub {
  width: 1000px; min-height: 130px; background: rgba(255, 255, 255, .95); border-radius: 24px; padding: 8px 20px; box-shadow: 0 6px 0 rgba(0, 0, 0, .1);
  display: flex; align-items: center; gap: 14px; text-align: center;
}
.ds-text { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ds-who { font-size: 16px; font-weight: 800; color: var(--muted); }
.ds-who.me { color: #e8590c; }
.ds-en { font-size: 38px; font-weight: 800; color: #adb5bd; line-height: 1.15; }
.ds-en .kk { transition: color .15s; }
.ds-en .kk.on { color: #1864ab; }
.ds-en.mine .kk.on { color: #e8590c; }
.ds-vi { font-size: 18px; color: #c2255c; font-weight: 700; }
.ds-mic { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; width: 250px; }
.ds-mic:empty { display: none; }
.ds-mic .mic-btn.small { width: 96px; height: 96px; border-width: 5px; }
.ds-mic .mic-btn.small .mic-ico { font-size: 40px; }
.ds-mic .mic-btn.small .mic-lbl { font-size: 12px; }
.ds-info { font-size: 20px; font-weight: 800; }
.ds-info .sp-score { font-size: 44px; }

/* Sân khấu: hát theo */
.song-wrap { position: absolute; inset: 0 20px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.song-head { text-align: center; }
.song-title { font-size: 30px; font-weight: 800; color: #5c3a1a; }
.song-sub { font-size: 16px; font-weight: 700; color: #8a6d4b; }
.song-phase { font-size: 18px; font-weight: 800; background: #fff; border-radius: 14px; padding: 2px 14px; }
.song-stage { position: relative; width: 600px; height: 170px; display: flex; align-items: flex-end; justify-content: space-around; }
.song-fox { font-size: 130px; line-height: 1; filter: drop-shadow(0 6px 3px rgba(0, 0, 0, .25)); }
.song-fox.dance { animation: dance .5s ease-in-out infinite alternate; }
@keyframes dance { from { transform: rotate(-8deg) translateY(0); } to { transform: rotate(8deg) translateY(-12px); } }
.song-me { width: 160px; height: 160px; }
.song-me svg { width: 100%; height: 100%; }
.song-notes { position: absolute; left: 50%; top: 10px; font-size: 44px; opacity: 0; transform: translateX(-50%); }
.song-notes.on { opacity: 1; animation: floatNote 1.2s ease-in-out infinite; }
@keyframes floatNote { 0% { transform: translate(-50%, 20px); opacity: 0; } 50% { opacity: 1; } 100% { transform: translate(-50%, -30px); opacity: 0; } }
.song-linewrap {
  position: relative; width: 1100px; min-height: 92px; background: rgba(255, 255, 255, .95); border-radius: 26px; box-shadow: 0 6px 0 rgba(0, 0, 0, .1);
  display: flex; align-items: center; justify-content: center; padding: 26px 20px 10px;
}
.song-line { position: relative; font-size: 42px; font-weight: 800; color: #adb5bd; text-align: center; line-height: 1.15; }
.song-line .syl { transition: color .1s; }
.song-line .syl.on { color: #e8590c; }
.song-line .syl.now { color: #d6336c; }
.song-ball {
  position: absolute; top: 2px; left: -40px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe066, #f59f00); box-shadow: 0 2px 4px rgba(0, 0, 0, .3); transition: left .12s linear;
}
.song-ball.bounce1 { animation: ballHop .3s ease-out; }
@keyframes ballHop { 0% { transform: translateY(-14px); } 100% { transform: translateY(0); } }
.song-vi { font-size: 20px; font-weight: 700; color: #c2255c; }
.song-next { font-size: 20px; font-weight: 700; color: #868e96; min-height: 26px; }
.song-ctrl { min-height: 40px; }

/* Tưới cây xong */
.water-done { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 420px; }
.water-done .wd { background: #e7f5ff; border-radius: 12px; padding: 2px 6px; }

/* Báo cáo cho bố mẹ */
.report-screen .g-bg { position: absolute; inset: 0; background: linear-gradient(180deg, #e7f5ff, #fff9db); }
.rp-body { position: absolute; top: 84px; left: 20px; right: 20px; bottom: 14px; display: flex; gap: 18px; }
.rp-col { flex: 1; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding-right: 4px; }
.rp-sec { background: #fff; border-radius: 22px; padding: 12px 16px; box-shadow: 0 5px 0 rgba(0, 0, 0, .08); }
.rp-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.rp-course { display: grid; grid-template-columns: 44px 140px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; margin: 4px 0; }
.rpc-ico { font-size: 34px; grid-row: span 2; }
.rpc-name { font-weight: 800; font-size: 18px; }
.rpc-bar { height: 14px; background: #f1f3f5; border-radius: 8px; overflow: hidden; }
.rpc-bar > div { height: 100%; background: linear-gradient(90deg, #69db7c, #40c057); border-radius: 8px; }
.rpc-num { grid-column: 2 / 4; font-size: 14px; color: var(--muted); font-weight: 700; }
.rp-chart { display: flex; align-items: flex-end; justify-content: space-around; height: 160px; padding-top: 6px; }
.rp-bar { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rpb-n { font-size: 14px; font-weight: 800; }
.rpb-col { width: 34px; min-height: 4px; background: #d0ebff; border-radius: 8px 8px 0 0; display: flex; align-items: flex-end; overflow: hidden; }
.rpb-ok { width: 100%; background: #339af0; }
.rpb-d { font-size: 13px; color: var(--muted); font-weight: 700; }
.rp-srs { display: flex; gap: 14px; flex-wrap: wrap; font-size: 17px; }
.rp-srs b { font-size: 26px; color: #2b8a3e; }
.rp-srs .due b { color: #1c7ed6; }
.rp-list { display: flex; flex-direction: column; gap: 4px; }
.rp-item { display: flex; justify-content: space-between; gap: 10px; padding: 5px 10px; border-radius: 12px; cursor: pointer; font-size: 17px; }
.rp-item.weak { background: #fff4e6; }
.rp-item.strong { background: #ebfbee; }
.rp-s { font-size: 14px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.muted.small { font-size: 13px; }

/* Trò chuyện (Năm 2) */
.chat-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 30px; padding: 0 30px 24px; }
.chat-phone {
  width: 560px; height: 480px; background: #f8f9fa; border-radius: 34px; border: 8px solid #343a40; box-shadow: 0 12px 0 rgba(0, 0, 0, .12);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-top { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #ff922b; color: #fff; font-size: 20px; }
.chat-ava { font-size: 30px; line-height: 1; }
.chat-on { margin-left: auto; font-size: 13px; color: #d3f9d8; font-weight: 800; }
.chat-log { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; }
.chat-msg { display: flex; align-items: flex-end; gap: 6px; max-width: 88%; cursor: pointer; }
.chat-msg.fox { align-self: flex-start; }
.chat-msg.me { align-self: flex-end; }
.cm-ava { font-size: 34px; line-height: 1; flex: none; }
.cm-ava.me { width: 46px; height: 46px; }
.cm-ava.me svg { width: 100%; height: 100%; }
.cm-body { padding: 8px 14px; border-radius: 20px; box-shadow: 0 3px 0 rgba(0, 0, 0, .08); position: relative; }
.chat-msg.fox .cm-body { background: #fff; border-bottom-left-radius: 6px; }
.chat-msg.me .cm-body { background: #d3f9d8; border-bottom-right-radius: 6px; text-align: right; }
.cm-en { font-size: 24px; font-weight: 800; color: #343a40; line-height: 1.2; }
.cm-vi { font-size: 15px; color: var(--muted); font-weight: 700; }
.cm-pic { font-size: 46px; line-height: 1; }
.cm-score { font-size: 14px; font-weight: 800; color: #e8590c; }
.cm-score.good { color: #2b8a3e; }
.cm-score.great { color: #f08c00; }
.chat-msg.hl .cm-body { outline: 4px solid #ffd43b; }
.chat-msg.typing .cm-body { background: #fff; }
.dots3 { font-size: 22px; letter-spacing: 2px; color: #adb5bd; animation: pulse 1s ease-in-out infinite; display: inline-block; }

/* Thanh âm lượng khi bé nói */
.mic-meter { width: 170px; height: 14px; border-radius: 8px; background: rgba(255, 255, 255, .8); border: 3px solid #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); overflow: hidden; }
.mic-meter .mm-fill { height: 100%; width: 0; background: linear-gradient(90deg, #ffd43b, #69db7c); transition: width .08s linear; border-radius: 6px; }
.mic-meter.loud .mm-fill { background: linear-gradient(90deg, #69db7c, #2b8a3e); }
.ds-mic .mic-btn.listening { transform: scale(calc(1 + var(--lv, 0) * .25)); }
