* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--lg-font); color: var(--lg-muc); background: #7fb85a; overflow: hidden;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
button { font-family: inherit; }

/* ---------- thanh trên ---------- */
.dau {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left));
  background: linear-gradient(rgba(70, 38, 16, .92), rgba(70, 38, 16, .78)); color: #fff7e6;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .25); border-bottom: 3px solid #b07a3c;
}
.logo { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; margin-right: auto; min-width: 0; }
.logo span { display: grid; line-height: 1.1; min-width: 0; }
.logo b { font-size: 20px; font-weight: 900; letter-spacing: .01em; color: #ffe08a; white-space: nowrap; }
.logo small { font-size: 11.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.the-loc, .nut-hoso {
  display: flex; align-items: center; gap: 6px; height: 40px; border-radius: 99px; cursor: pointer; color: #3a2314;
  background: #fff7e6; border: 2px solid #ffcf4a; padding: 0 12px 0 6px; font-weight: 800; font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}
.the-loc:active, .nut-hoso:active { transform: scale(.95); }
.the-loc.nay { animation: nay .6s ease-out; }
@keyframes nay { 30% { transform: scale(1.18); background: #ffe08a; } }
.nut-hoso { padding: 0 12px 0 3px; max-width: 42vw; }
.nut-hoso .lg-hinh { width: 32px; height: 32px; }
.ten-nho { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }

/* ---------- bản đồ ---------- */
#khung-ban-do {
  position: fixed; inset: var(--dau, 60px) 0 0 0; overflow: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; cursor: grab;
  background: #7fb85a; padding-bottom: 62px;
}
#khung-ban-do::-webkit-scrollbar { display: none; }
#khung-ban-do.dang-keo { cursor: grabbing; }
#khung-ban-do svg { display: block; user-select: none; -webkit-user-select: none; }

.dd { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.dd .vung { fill: transparent; }
.dd:focus-visible .vung { stroke: #2b7bd9; stroke-width: 6; stroke-dasharray: 14 10; }
.dd .hinh-dd { transition: transform .2s; transform-box: fill-box; transform-origin: 50% 100%; }
.dd:hover .hinh-dd, .dd.bam .hinh-dd { transform: scale(1.03); }
.dd-sap .hinh-dd { filter: saturate(.45) brightness(1.04); }
.hao-quang { fill: #fff3b0; opacity: .0; animation: hao 2.6s ease-in-out infinite; }
@keyframes hao { 50% { opacity: .35; } }
.chu-bang { font: 800 24px var(--lg-font); fill: #fff3d6; letter-spacing: .01em; }
.chu-huy { font: 800 16px var(--lg-font); fill: #fff; }
.chu-huy.sap { fill: #7d6a5c; font-size: 15px; }
.huy-hieu.mo { animation: phap 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes phap { 50% { scale: 1.08; } }

/* chuyển động nhỏ cho làng sống động */
.den { animation: lac 3s ease-in-out infinite; animation-delay: var(--tre); transform-box: fill-box; transform-origin: 50% 0; }
@keyframes lac { 0%, 100% { rotate: -4deg; } 50% { rotate: 4deg; } }
.co { animation: phat 1.8s ease-in-out infinite; animation-delay: var(--tre); transform-box: fill-box; transform-origin: 0 50%; }
@keyframes phat { 50% { transform: scaleX(.86) skewY(3deg); } }
.vit { animation: boi 2.4s ease-in-out infinite; animation-delay: var(--tre); }
@keyframes boi { 50% { translate: 6px -2px; } }
.ghe, .hoa-dang { animation: troi 3.6s ease-in-out infinite; animation-delay: var(--tre); }
@keyframes troi { 50% { translate: 0 4px; rotate: 1.5deg; } }
.lixi { animation: lac 2.2s ease-in-out infinite; animation-delay: var(--tre); transform-box: fill-box; transform-origin: 50% 0; }
.dieu { animation: dieu 4s ease-in-out infinite; }
@keyframes dieu { 50% { translate: 10px -12px; rotate: 6deg; } }
.gon { stroke-dasharray: 40 30; animation: gon 6s linear infinite; }
@keyframes gon { to { stroke-dashoffset: -140; } }
.lan { animation: lan 1.2s ease-in-out infinite; }
@keyframes lan { 50% { translate: 0 -5px; } }
.xe-chay { animation: xe 9s linear infinite; }
@keyframes xe { 0% { translate: -40px 0; } 100% { translate: 420px 0; } }
.dom-dom circle { animation: dom 4s ease-in-out infinite; animation-delay: var(--tre); opacity: 0; }
@keyframes dom { 50% { opacity: .9; translate: 8px -10px; } }

/* ---------- làng 3D: canvas WebGL + biển tên DOM đè lên ---------- */
#khung-ban-do.ba-chieu { overflow: hidden; padding: 0; touch-action: none; background: linear-gradient(#cfe6dc, #8fbf62 70%); user-select: none; -webkit-user-select: none; }
.ba-chieu canvas.lang3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; animation: lg-mo .5s; }
.dang-dung { position: absolute; inset: 0 0 62px; margin: 0; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #3f5a2a; }
.lop-bien { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lop-bien .dd { position: absolute; left: 0; top: 0; pointer-events: auto; touch-action: none; will-change: transform; }
.lop-bien .bang-ten { display: grid; justify-items: center; }
.lop-bien .chu-bang {
  font: 800 16.5px var(--lg-font); color: #fff3d6; letter-spacing: .01em; white-space: nowrap; padding: 5px 13px 6px; border-radius: 10px;
  background: #8f5a32; border: 3px solid #6b4226; box-shadow: 0 3px 0 #5e3b1e, 0 6px 12px rgba(0, 0, 0, .3);
}
.lop-bien .huy-hieu {
  display: inline-block; margin-top: -2px; font: 800 12.5px var(--lg-font); color: #fff; white-space: nowrap; padding: 2px 10px 3px; border-radius: 99px;
  background: #e3342f; border: 2px solid #ffcf4a; box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.lop-bien .dd-sap .chu-bang { background: #7d6a5c; }
.lop-bien .dd-sap .huy-hieu { background: #f3e2c0; color: #7d6a5c; border: 2px dashed #a89277; }
.lop-bien .dd:focus-visible .chu-bang { outline: 3px solid #2b7bd9; outline-offset: 2px; }
.lop-bien .dd:active .chu-bang { background: #a56a3c; }
.ten-nguoi {
  position: absolute; left: 0; top: 0; pointer-events: none; white-space: nowrap; font: 800 12px var(--lg-font); color: #fff7e6;
  background: rgba(58, 35, 20, .8); padding: 2px 9px 3px; border-radius: 99px; border: 1.5px solid #ffcf4a; will-change: transform;
}
.ten-nguoi:empty { display: none; }
.nut-ve-nguoi {
  position: absolute; right: calc(12px + env(safe-area-inset-right)); bottom: calc(74px + env(safe-area-inset-bottom)); width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--lg-do); background: var(--lg-giay); border: 2px solid var(--lg-vang); box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
}
.nut-ve-nguoi[hidden] { display: none; }

.goi-y-keo {
  position: fixed; z-index: 40; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: rgba(58, 35, 20, .88); color: #fff7e6; font-weight: 700; font-size: 14px; padding: 10px 16px;
  border-radius: 99px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); pointer-events: none;
  animation: lg-vao .4s ease-out;
}

/* ---------- tấm trượt (địa điểm, hồ sơ) ---------- */
.man-truot { position: fixed; inset: 0; z-index: 100; background: rgba(20, 8, 2, .45); animation: lg-mo .2s; }
.tam {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--lg-giay); border-radius: 22px 22px 0 0; border-top: 4px solid var(--lg-vang);
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0, 0, 0, .3);
  animation: len .28s cubic-bezier(.2, .9, .3, 1);
}
@keyframes len { from { transform: translateY(100%); } }
.tay-cam { width: 44px; height: 5px; border-radius: 3px; background: #d9c4a0; margin: 0 auto 10px; }
@media (min-width: 720px) and (orientation: landscape), (min-width: 900px) {
  .tam { left: auto; top: 0; width: 400px; max-height: none; border-radius: 22px 0 0 22px; border-top: 0; border-left: 4px solid var(--lg-vang); animation-name: sang-trai; padding-top: calc(18px + env(safe-area-inset-top)); }
  .tay-cam { display: none; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .tam { left: auto; top: 0; width: min(400px, 60vw); max-height: none; border-radius: 22px 0 0 22px; border-top: 0; border-left: 4px solid var(--lg-vang); animation-name: sang-trai; padding-top: 14px; }
  .tay-cam { display: none; }
}
@keyframes sang-trai { from { transform: translateX(100%); } }
.nut-dong {
  position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: #f1e2c4; color: var(--lg-muc); font-size: 22px; line-height: 1; display: grid; place-items: center;
}
.tam h2 { margin: 4px 48px 4px 0; font-size: 24px; font-weight: 900; }
.tam .loi { margin: 0 0 14px; color: var(--lg-muc-nhat); font-size: 15px; }

.the-game {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; padding: 14px;
  border-radius: 16px; background: #fff; border: 2px solid var(--lg-vien); margin-bottom: 10px;
}
.the-game h3 { margin: 0; font-size: 18px; font-weight: 800; }
.the-game p { margin: 0; grid-column: 1; font-size: 14px; color: var(--lg-muc-nhat); }
.the-game .phu { grid-column: 1; font-size: 13px; color: var(--lg-do); font-weight: 700; }
.the-game .lg-btn { grid-column: 2; grid-row: 1 / span 3; }
.the-game.sap { background: #f7efe0; border-style: dashed; }
.nhan-sap { grid-column: 2; grid-row: 1 / span 3; font-size: 13px; font-weight: 800; color: #8a7663; background: #ece0c8; border-radius: 99px; padding: 6px 12px; }
.lg-btn.lg-chinh.nho { flex-basis: auto; font-size: 16px; padding: 10px 18px; }

/* hồ sơ */
.hoso-dau { display: flex; align-items: center; gap: 14px; margin: 4px 48px 16px 0; }
.hoso-dau .lg-hinh { width: 72px; height: 72px; box-shadow: 0 0 0 4px #ffcf4a; }
.o-nhap { display: grid; gap: 6px; margin-bottom: 14px; }
.o-nhap label { font-weight: 800; font-size: 14px; }
.o-nhap input {
  font: 700 18px var(--lg-font); color: var(--lg-muc); padding: 11px 14px; border-radius: 12px; border: 2px solid var(--lg-vien);
  background: #fff; width: 100%;
}
.o-nhap input:focus { outline: none; border-color: #e5a52a; box-shadow: 0 0 0 3px #ffe08a; }
.luoi-hinh { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px; }
.luoi-hinh button { padding: 3px; border-radius: 50%; border: 3px solid transparent; background: none; cursor: pointer; aspect-ratio: 1; }
.luoi-hinh button .lg-hinh { width: 100%; height: 100%; }
.luoi-hinh button[aria-pressed="true"] { border-color: var(--lg-do); background: #ffe08a; }
.muc { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--lg-do); margin: 18px 0 8px; }
.tong-loc { display: flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 900; color: var(--lg-do-dam); }
.tong-loc small { font-size: 13px; font-weight: 600; color: var(--lg-muc-nhat); }
.ds { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ds li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; background: #fff; border-radius: 10px; font-size: 14px; border: 1px solid #f0e2c6; }
.ds li b { white-space: nowrap; }
.ds .am { color: #888; }
.trong { color: var(--lg-muc-nhat); font-size: 14px; margin: 0; }
.ghi-chu { font-size: 12.5px; color: var(--lg-muc-nhat); margin-top: 16px; }

/* chào người mới */
.chao .lg-the { text-align: left; }
.chao h2 { text-align: center; margin-bottom: 4px; }
.chao .loi { text-align: center; margin: 0 0 14px; color: var(--lg-muc-nhat); font-size: 15px; }
.chao .qua { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 800; color: var(--lg-do-dam); background: #ffe9e3; border-radius: 12px; padding: 8px; margin-bottom: 14px; }
.chao .luoi-hinh { grid-template-columns: repeat(5, 1fr); }
.chao .lg-btn.lg-chinh { width: 100%; }
.de-sau { display: block; margin: 10px auto 0; background: none; border: 0; color: var(--lg-muc-nhat); font: 700 14px var(--lg-font); text-decoration: underline; cursor: pointer; padding: 8px; }

@media (max-width: 380px) {
  .logo small { display: none; }
  .ten-nho { display: none; }
  .nut-hoso { padding: 0 3px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* thanh "đi tới" ở dưới: nhảy nhanh tới từng địa điểm */
.di-toi {
  position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 10px calc(12px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
  background: linear-gradient(transparent, rgba(40, 20, 6, .55));
}
.di-toi::-webkit-scrollbar { display: none; }
.di-toi button {
  flex: none; display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px 0 10px; border-radius: 99px; cursor: pointer;
  font: 800 14px var(--lg-font); color: var(--lg-muc); background: var(--lg-giay); border: 2px solid var(--lg-vien);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .25); -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.di-toi button.mo { border-color: var(--lg-vang); }
.di-toi button:active { transform: scale(.95); }
.di-toi i { width: 10px; height: 10px; border-radius: 50%; background: #b8a690; }
.di-toi .mo i { background: #e3342f; box-shadow: 0 0 0 3px #ffd9a0; }
.di-toi small { font-weight: 600; color: var(--lg-muc-nhat); }
@media (min-width: 900px) { .di-toi { justify-content: center; } }
.di-toi button.cai { background: var(--lg-do); color: #fff; border-color: var(--lg-vang); }
.buoc { margin: 0 0 6px; padding-left: 22px; display: grid; gap: 10px; font-size: 16px; line-height: 1.4; }
/* danh sách tất cả trò chơi */
.ds-tro h1 { margin: 4px 48px 6px 0; font-size: 22px; font-weight: 900; }
.ds-tro > p { margin: 0 0 6px; color: var(--lg-muc-nhat); font-size: 14px; }
.ds-tro h2 { margin: 16px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--lg-do); }
.ds-tro ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ds-tro li { display: grid; gap: 2px; padding: 11px 14px; background: #fff; border: 2px solid var(--lg-vien); border-radius: 14px; }
.ds-tro li a { font-weight: 800; font-size: 17px; color: var(--lg-muc); text-decoration: none; }
.ds-tro li a::after { content: " ›"; color: var(--lg-do); }
.ds-tro li span { font-size: 13.5px; color: var(--lg-muc-nhat); }

/* nút tròn trên thanh đầu, bảng xếp hạng, thử thách ngày */
.nut-tron { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: #fff7e6; border: 2px solid #ffcf4a; padding: 0; -webkit-tap-highlight-color: transparent; }
.nut-tron:active { transform: scale(.94); }
.bang-chon { display: grid; gap: 8px; margin: 6px 0 0; }
.bang-chon select { font: 800 16px var(--lg-font); color: var(--lg-muc); padding: 10px 12px; border-radius: 12px; border: 2px solid var(--lg-vien); background: #fff; width: 100%; }
.bang-ky { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bang-ky button { font: 800 14px var(--lg-font); padding: 9px 4px; border-radius: 10px; border: 2px solid var(--lg-vien); background: #fff; color: var(--lg-muc-nhat); cursor: pointer; }
.bang-ky button[aria-selected="true"] { background: var(--lg-do); border-color: var(--lg-do); color: #fff; }
.bang { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bang li { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 8px; background: #fff; border: 1px solid #f0e2c6; border-radius: 12px; font-size: 15px; }
.bang li.toi { background: #fff3c9; border-color: #ffcf4a; }
.bang .hang { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: #f1e2c4; color: var(--lg-muc); }
.bang .h1 { background: #ffcf4a; } .bang .h2 { background: #d9dde3; } .bang .h3 { background: #e7b58a; }
.bang .lg-hinh { width: 34px; height: 34px; }
.bang .ten { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bang .ten small { font-weight: 600; color: var(--lg-muc-nhat); }
.bang.rieng { margin-top: 10px; padding-top: 10px; border-top: 2px dashed var(--lg-vien); }
.the-thu-thach {
  max-width: min(270px, 72vw);
  display: grid; gap: 1px; padding: 9px 14px; border-radius: 14px; text-decoration: none; color: var(--lg-muc);
  background: var(--lg-giay); border: 2px solid var(--lg-vang); box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.the-thu-thach[hidden] { display: none; }
.the-thu-thach small { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--lg-do); }
.the-thu-thach b { font-size: 15px; line-height: 1.25; }
.the-thu-thach span { font-size: 12.5px; color: var(--lg-muc-nhat); display: flex; align-items: center; gap: 4px; }
.the-thu-thach.xong { border-color: #9ccf8a; background: #f1f9ea; }
.the-thu-thach.xong small { color: #2f6f3a; }
@media (max-width: 480px) { .ten-nho { display: none; } .nut-hoso { padding: 0 3px; } .logo small { display: none; } }
@media (max-width: 380px) { .nut-tron { width: 36px; height: 36px; } }

/* đồ trang trí mua ở cửa hàng, quà mỗi ngày, cửa hàng */
.phao-hoa .no { animation: no-phao 3.2s ease-out infinite; animation-delay: var(--tre); transform-box: fill-box; transform-origin: center; opacity: 0; }
@keyframes no-phao { 0% { scale: .1; opacity: 0; } 12% { opacity: 1; } 55% { scale: 1; opacity: 1; } 100% { scale: 1.25; opacity: 0; } }
.qua-ngay .lg-the { text-align: center; }
.day-ngay { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 14px 0; }
.day-ngay div { background: #fff; border: 2px solid var(--lg-vien); border-radius: 10px; padding: 6px 0 5px; font-size: 11px; font-weight: 700; color: var(--lg-muc-nhat); display: grid; gap: 2px; justify-items: center; }
.day-ngay div b { font-size: 15px; color: var(--lg-muc); }
.day-ngay .xong { background: #e9f6df; border-color: #9ccf8a; }
.day-ngay .nay { background: #fff3c9; border-color: var(--lg-vang); box-shadow: 0 0 0 3px #ffe9a8; transform: scale(1.08); }
.day-ngay .lon b { color: var(--lg-do); }
.ch-the { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 12px; }
.ch-the button { font: 800 14px var(--lg-font); padding: 9px 4px; border-radius: 10px; border: 2px solid var(--lg-vien); background: #fff; color: var(--lg-muc-nhat); cursor: pointer; }
.ch-the button[aria-selected="true"] { background: var(--lg-do); border-color: var(--lg-do); color: #fff; }
.ch-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.ch-mon { background: #fff; border: 2px solid var(--lg-vien); border-radius: 14px; padding: 10px 6px 8px; display: grid; gap: 5px; justify-items: center; text-align: center; }
.ch-mon.dang { border-color: var(--lg-vang); background: #fff8dc; }
.ch-mon .lg-hinh { width: 60px; height: 60px; }
.ch-mon svg.xem { width: 84px; height: 60px; }
.ch-mon b { font-size: 13.5px; line-height: 1.2; min-height: 2.4em; display: grid; align-items: center; }
.ch-mon button { font: 800 13px var(--lg-font); border-radius: 99px; padding: 6px 12px; border: 2px solid var(--lg-vien); background: #fff; color: var(--lg-muc); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; }
.ch-mon button.mua { background: var(--lg-do); border-color: var(--lg-do); color: #fff; }
.ch-mon button.thieu { opacity: .55; }
.ch-mon button.bat { background: #e9f6df; border-color: #9ccf8a; color: #2f6f3a; }
.ch-so-du { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 20px; color: var(--lg-do-dam); margin: 0 48px 2px 0; }
.ch-mon svg.xem .no { animation: none; opacity: 1; }
.kp-ma { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; background: #fff; border: 2px dashed var(--lg-vang); border-radius: 14px; padding: 10px 12px; }
.kp-ma[hidden] { display: none; }
.kp-ma span { grid-column: 1; font-size: 12.5px; color: var(--lg-muc-nhat); font-weight: 700; }
.kp-ma b { grid-column: 1; font-size: 26px; letter-spacing: .08em; color: var(--lg-do-dam); font-variant-numeric: tabular-nums; }
.kp-ma button { grid-column: 2; grid-row: 1 / span 2; }
.kp-hang { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.kp-hang input { text-transform: uppercase; letter-spacing: .06em; }
.thuong-tuan { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; background: #fff3c9; border: 1px solid #ffcf4a; font-size: 13px; line-height: 1.6; } .thuong-tuan[hidden] { display: none; } .thuong-tuan .lg-icon-loc { vertical-align: -2px; }

/* cột trái: thẻ thử thách + nút nhiệm vụ ngày */
.cot-trai { position: fixed; z-index: 44; left: calc(12px + env(safe-area-inset-left)); top: calc(var(--dau, 60px) + 10px); display: grid; gap: 7px; justify-items: start; pointer-events: none; }
.cot-trai > * { pointer-events: auto; }
.the-nhiem-vu { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; color: var(--lg-muc); background: var(--lg-giay); border: 2px solid var(--lg-vien); box-shadow: 0 3px 9px rgba(0, 0, 0, .22); cursor: pointer; }
.the-nhiem-vu b { color: var(--lg-do); }
.the-nhiem-vu .cham { display: inline-flex; gap: 3px; }
.the-nhiem-vu .cham i { width: 9px; height: 9px; border-radius: 50%; background: #e3d6bb; }
.the-nhiem-vu .cham i.dat { background: #4ea24b; }
.the-nhiem-vu.xong { border-color: #9ccf8a; background: #f1f9ea; }
.ds-nv { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.ds-nv li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 2px solid var(--lg-vien); }
.ds-nv li > div { flex: 1; display: grid; gap: 6px; text-align: left; }
.ds-nv .thanh { height: 8px; border-radius: 5px; background: #eadfc8; overflow: hidden; display: block; }
.ds-nv .thanh i { display: block; height: 100%; background: linear-gradient(90deg, #ffbe2e, #e5533d); border-radius: 5px; }
.ds-nv .thuong { display: grid; justify-items: end; font-weight: 800; font-size: 14px; }
.ds-nv .thuong small { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: #8a5a00; }
.ds-nv li.xong { background: #f1f9ea; border-color: #9ccf8a; }
.ds-nv li.xong .thanh i { background: #4ea24b; }
.ds-nv li.ruong { background: #fff6d6; border-color: var(--lg-vang); }
.ds-nv .am { font-size: 12.5px; color: var(--lg-muc-nhat); }
.xu-day { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }
.xu-day i { width: 13px; height: 13px; border-radius: 50%; background: #e3d6bb; border: 1.5px solid #cdbf9f; }
.xu-day i.dat { background: radial-gradient(circle at 35% 30%, #fff9, transparent 50%), var(--mau); border-color: color-mix(in srgb, var(--mau) 60%, #3a2412); }
.xu-day em { font-style: normal; font-size: 12px; color: var(--lg-muc-nhat); margin: 0 5px 0 1px; }
.the-game .xu-day { display: flex; }
.tong-hc { font-size: 15px; display: grid; gap: 4px; }
.tong-hc b { font-size: 22px; color: var(--lg-do-dam); }
.tong-hc small { color: var(--lg-muc-nhat); font-size: 12.5px; }

/* chơi game ngay trên làng: khung phủ kín (hub.js moGame) */
.lop-game { position: fixed; inset: 0; z-index: 500; background: #1d140e; animation: lg-mo .18s; }
.lop-game iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: transparent; opacity: 0; transition: opacity .18s; }
.lop-game.san iframe { opacity: 1; }
.lop-game.dong { opacity: 0; transition: opacity .2s; pointer-events: none; }
.lop-cho { position: absolute; inset: 0; display: grid; place-items: center; }
.lop-game.san .lop-cho { display: none; }
.vong-cho { width: 38px; height: 38px; border-radius: 50%; border: 4px solid rgba(255, 220, 160, .25); border-top-color: #ffcf4a; animation: vong-cho .8s linear infinite; }
@keyframes vong-cho { to { transform: rotate(360deg); } }
html.dang-choi-game, html.dang-choi-game body { overflow: hidden; }
