
#lt-the {
  position: fixed; z-index: 40; top: 12px; right: 190px; width: 184px;
  font-family: var(--font-serif, serif); pointer-events: auto;
}
#lt-the.hidden { display: none; }
#lt-the .lt-icon { color: #9be7b0; }
#lt-the .tmc-act { grid-column: 1 / -1; }
#lt-hud {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 8px);
  transform: translateX(-50%); z-index: 30; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
  column-gap: 10px; width: min(500px, calc(100vw - 32px));
  padding: 5px 10px 6px; border-radius: 8px;
  color: #f1e3c0; background: rgba(16, 24, 18, 0.86);
  border: 1px solid rgba(120, 200, 140, 0.6);
  font: 700 11px/1.2 var(--font-serif, serif); text-shadow: 0 1px 2px #000;
}
#lt-hud.hidden { display: none; }
#lt-hud .lt-ben { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 6px; min-width: 0; }
#lt-hud .lt-ben.d1 { direction: rtl; }
#lt-hud .lt-ten { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; direction: ltr; }
#lt-hud .lt-ben.d0 .lt-ten { color: #9fd2ff; }
#lt-hud .lt-ben.d1 .lt-ten { color: #ffb3a8; }
#lt-hud .lt-diem { font-size: 15px; font-variant-numeric: tabular-nums; direction: ltr; }
#lt-hud .lt-thanh { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.55); overflow: hidden; }
#lt-hud .lt-thanh i { display: block; height: 100%; width: 0; transition: width 0.3s; }
#lt-hud .lt-ben.d0 .lt-thanh i { background: linear-gradient(90deg, #1f6fd1, #6fc0ff); }
#lt-hud .lt-ben.d1 .lt-thanh i { background: linear-gradient(90deg, #d1301f, #ff8a7a); }
#lt-hud .lt-giua { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 96px; }
#lt-hud .lt-gio { font-size: 14px; font-variant-numeric: tabular-nums; color: #f6e7b0; }
#lt-hud .lt-cay { font-weight: 700; font-size: 10px; padding: 1px 6px; border-radius: 9px; white-space: nowrap; }
#lt-hud .lt-cay.d0 { background: rgba(47, 140, 255, 0.35); color: #d8ecff; }
#lt-hud .lt-cay.d1 { background: rgba(255, 58, 44, 0.35); color: #ffe0da; }
#lt-hud .lt-cay.tranh { background: rgba(255, 200, 60, 0.4); color: #fff4c8; animation: lt-tho 0.8s ease-in-out infinite alternate; }
#lt-hud .lt-cay.trong { background: rgba(255, 255, 255, 0.12); color: #d8e6dc; }
@keyframes lt-tho { from { opacity: 0.65; } to { opacity: 1; } }
#lt-hud .lt-an { font-size: 10px; padding: 0 6px; border-radius: 9px; white-space: nowrap; color: #cfe8d8; }
#lt-hud .lt-an.hidden { display: none; }
#lt-hud .lt-an.chin { color: #ffe79a; background: rgba(255, 210, 90, 0.18); animation: lt-tho 0.9s ease-in-out infinite alternate; }
#lt-hud .lt-an.niem.d0 { color: #d8ecff; background: rgba(47, 140, 255, 0.35); }
#lt-hud .lt-an.niem.d1 { color: #ffe0da; background: rgba(255, 58, 44, 0.35); }
#lt-hud .lt-phu { grid-column: 1 / -1; direction: ltr; font-size: 9px; font-weight: 400; color: #cfe0d4; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
#lt-hud .lt-ben.d1 .lt-phu { text-align: right; }
#lt-hud .lt-re { letter-spacing: 1px; font-size: 10px; }
#lt-hud .lt-ben.d0 .lt-re b { color: #6fc0ff; }
#lt-hud .lt-ben.d1 .lt-re b { color: #ff8a7a; }
#lt-hud .lt-re i { font-style: normal; color: #7a8580; }
#lt-hud .lt-re .nhay { animation: lt-tho 0.35s ease-in-out infinite alternate; color: #ffd75a; }
#lt-hud .lt-ab { color: #ffe39a; }
#lt-hud .lt-tam { font-size: 10px; padding: 0 6px; border-radius: 9px; white-space: nowrap; color: #ffe8a8; }
#lt-hud .lt-tam.hidden { display: none; }
#lt-hud .lt-tam.co { background: rgba(255, 200, 70, 0.22); animation: lt-tho 0.9s ease-in-out infinite alternate; }
#lt-hud .lt-tam.d0 { color: #d8ecff; background: rgba(47, 140, 255, 0.35); }
#lt-hud .lt-tam.d1 { color: #ffe0da; background: rgba(255, 58, 44, 0.35); }
#lt-hud .lt-co { font-size: 10px; padding: 0 6px; border-radius: 9px; white-space: nowrap; color: #e2d6ff; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; }
#lt-hud .lt-co.hidden { display: none; }
.lt-bia-nut {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 92px); transform: translateX(-50%); z-index: 30;
  padding: 3px 10px; border-radius: 12px; cursor: pointer; white-space: nowrap;
  font: 700 10px/1.3 var(--font-serif, serif); color: #fff1c8; text-shadow: 0 1px 2px #000;
  background: rgba(38, 30, 12, 0.88); border: 1px solid rgba(255, 210, 110, 0.7);
}
.lt-bia-nut.nha { color: #d8e6dc; border-color: rgba(160, 200, 170, 0.6); background: rgba(16, 24, 18, 0.86); }
.lt-bia-nut.hidden { display: none; }
#lt-giua-man {
  position: fixed; left: 50%; top: 32%; transform: translate(-50%, -50%); z-index: 31; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  color: #fff4d0; font-family: var(--font-serif, serif); text-shadow: 0 2px 4px #000, 0 0 10px rgba(0, 0, 0, 0.6);
}
#lt-giua-man.hidden { display: none; }
#lt-giua-man b { font-size: 26px; letter-spacing: 1px; }
#lt-giua-man small { font-size: 13px; color: #d8f0dc; }
#lt-giua-man .lt-baoho { font-size: 13px; color: #bfe6ff; }
#lt-khai {
  --v: clamp(84px, 21vmin, 170px);
  position: fixed; left: 50%; top: 25%; z-index: 33; transform: translate(-50%, -50%); pointer-events: none;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  font-family: var(--font-serif, serif);
}
#lt-khai.hidden { display: none; }
#lt-khai .lt-khai-so {
  position: relative; font-size: clamp(64px, 17vmin, 132px); line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums;
  color: #f4ffe9; text-shadow: 0 0 18px rgba(120, 255, 190, 0.85), 0 3px 0 #0b3a2a, 0 6px 14px rgba(0, 0, 0, 0.8);
  animation: lt-khai-so 1s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes lt-khai-so {
  0% { transform: scale(2.3); opacity: 0; }
  22% { transform: scale(0.92); opacity: 1; }
  34% { transform: scale(1); }
  78% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.82); opacity: 0; }
}
#lt-khai .lt-khai-vong {
  position: absolute; left: 50%; top: 50%; width: var(--v); height: var(--v); margin: calc(var(--v) / -2) 0 0 calc(var(--v) / -2);
  border-radius: 50%; border: 3px solid rgba(150, 255, 205, 0.9);
  box-shadow: 0 0 14px rgba(120, 255, 190, 0.7), inset 0 0 10px rgba(120, 255, 190, 0.5);
  animation: lt-khai-vong 0.9s ease-out both;
}
#lt-khai.khai .lt-khai-vong { border-color: rgba(255, 222, 140, 0.95); box-shadow: 0 0 18px rgba(255, 210, 110, 0.8); animation-duration: 1.1s; }
@keyframes lt-khai-vong { 0% { transform: scale(0.4); opacity: 0; } 15% { opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }
#lt-khai .lt-khai-chu {
  position: relative; font-size: clamp(40px, 11vmin, 96px); line-height: 1.05; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(180deg, #fffbe0 0%, #f6d26a 45%, #c48a22 75%, #8a5a10 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #2a1600) drop-shadow(0 0 16px rgba(255, 200, 90, 0.65));
  animation: lt-khai-chu 2.4s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes lt-khai-chu {
  0% { transform: scale(2.6); opacity: 0; }
  10% { transform: scale(0.94); opacity: 1; }
  15% { transform: scale(1.03); }
  20% { transform: scale(1); }
  80% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.12); opacity: 0; }
}
#lt-khai .lt-khai-chem {
  position: absolute; left: -12%; width: 124%; top: calc(50% - 16px); height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fffef0 40%, #ffe08a 60%, rgba(255, 224, 138, 0));
  box-shadow: 0 0 10px rgba(255, 230, 150, 0.9); transform-origin: 0 50%;
  animation: lt-khai-chem 0.7s 0.1s ease-out both;
}
@keyframes lt-khai-chem {
  0% { transform: rotate(-5deg) scaleX(0); opacity: 1; }
  45% { transform: rotate(-5deg) scaleX(1); opacity: 1; }
  100% { transform: rotate(-5deg) scaleX(1); opacity: 0; }
}
#lt-khai small {
  margin-top: 6px; font-size: clamp(12px, 2.6vmin, 18px); letter-spacing: 0.06em; color: #e4ffef; text-shadow: 0 2px 4px #000;
  animation: lt-khai-phu 2.4s ease-out both;
}
@keyframes lt-khai-phu { 0%, 14% { opacity: 0; transform: translateY(6px); } 24% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
#lt-khai .lt-khai-tia, #lt-khai .lt-khai-loe {
  position: absolute; left: 50%; top: 50%; width: 150vmax; height: 150vmax; margin: -75vmax 0 0 -75vmax; border-radius: 50%;
}
#lt-khai .lt-khai-tia {
  background: repeating-conic-gradient(from 0deg, rgba(255, 240, 190, 0) 0deg 7deg, rgba(255, 240, 190, 0.5) 7deg 8deg);
  -webkit-mask-image: radial-gradient(circle, transparent 9%, #000 16%, rgba(0, 0, 0, 0.6) 30%, transparent 46%);
  mask-image: radial-gradient(circle, transparent 9%, #000 16%, rgba(0, 0, 0, 0.6) 30%, transparent 46%);
  animation: lt-khai-tia 0.75s ease-out both;
}
@keyframes lt-khai-tia { 0% { transform: scale(0.5) rotate(0deg); opacity: 0; } 15% { opacity: 1; } 100% { transform: scale(1.35) rotate(8deg); opacity: 0; } }
#lt-khai .lt-khai-loe {
  background: radial-gradient(circle, rgba(255, 250, 225, 0.8), rgba(255, 236, 180, 0.22) 16%, rgba(255, 236, 180, 0) 34%);
  animation: lt-khai-loe 0.6s ease-out both;
}
@keyframes lt-khai-loe { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
html.gfx-sieu-lo #lt-khai .lt-khai-tia { display: none; }
@media (prefers-reduced-motion: reduce) {
  #lt-khai .lt-khai-tia, #lt-khai .lt-khai-loe, #lt-khai .lt-khai-chem, #lt-khai .lt-khai-vong { display: none; }
  #lt-khai .lt-khai-so, #lt-khai .lt-khai-chu, #lt-khai small { animation: none; }
}
#lt-tin {
  position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 64px);
  z-index: 29; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font: 700 11px/1.3 var(--font-serif, serif); text-shadow: 0 1px 2px #000;
}
#lt-tin .lt-tin-dong { padding: 1px 8px; border-radius: 9px; background: rgba(0, 0, 0, 0.55); }
#lt-tin .lt-tin-dong.d0 { color: #9fd2ff; }
#lt-tin .lt-tin-dong.d1 { color: #ffb3a8; }
#lt-bang {
  position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 60px);
  z-index: 32; width: min(520px, calc(100vw - 24px)); max-height: 60vh; overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 8px 10px;
  background: rgba(14, 20, 16, 0.94); border: 1px solid rgba(120, 200, 140, 0.6); border-radius: 8px;
  color: #efe6cc; font: 12px/1.3 var(--font-serif, serif);
}
#lt-bang.hidden { display: none; }
#lt-bang .lt-bang-cot > b { display: block; margin-bottom: 3px; }
#lt-bang .lt-bang-cot.d0 > b { color: #9fd2ff; }
#lt-bang .lt-bang-cot.d1 > b { color: #ffb3a8; }
#lt-bang .lt-bang-dong { display: flex; justify-content: space-between; gap: 6px; }
#lt-bang .lt-bang-dong.guc { opacity: 0.55; }
#lt-bang .lt-bang-dong.rot .lt-bang-ten::after { content: ' ⚡'; }
#lt-bang .lt-bang-dong.roi { text-decoration: line-through; opacity: 0.45; }
#lt-bang .lt-bang-ten { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#lt-bang .lt-bang-so { font-variant-numeric: tabular-nums; color: #cfc3a0; flex: none; }
#lt-bang .lt-bang-chu { grid-column: 1 / -1; color: #9c9378; }
#lt-ket {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}
#lt-ket.hidden { display: none; }
#lt-ket .lt-ket-hop {
  width: min(380px, calc(100vw - 32px)); padding: 14px 16px; text-align: center;
  color: #f1e3c0; font: 13px/1.4 var(--font-serif, serif);
  background: linear-gradient(180deg, rgba(30, 44, 32, 0.97), rgba(14, 20, 16, 0.97));
  border: 1px solid #8fcf9f; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
#lt-ket h3 { margin: 0 0 4px; font-size: 26px; letter-spacing: 3px; }
#lt-ket .thang h3 { color: #ffe08a; }
#lt-ket .thua h3 { color: #c9c9c9; }
#lt-ket .hoa h3 { color: #bfe6ff; }
#lt-ket p { margin: 4px 0; }
#lt-ket .lt-ket-ti { font-size: 15px; font-weight: 700; }
#lt-ket .lt-ket-mvp { color: #ffd77a; }
#lt-ket .lt-ket-qua { color: #b8f0c4; }
#lt-ket .lt-ket-nut { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
#lt-ket .lt-ket-chu { display: block; margin-top: 6px; color: #9c9378; }
.tm-tong .lt-tab-dau { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.tm-tong .lt-tab-ten { color: #9be7b0; font-size: 14px; }
.tm-tong .lt-tab-dau small { color: #b9ad8c; }
.tm-tong .lt-o { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 8px; }
.tm-tong .lt-dong { display: flex; justify-content: space-between; gap: 8px; }
.tm-tong .lt-dong b { text-align: right; font-variant-numeric: tabular-nums; }
.tm-tong .lt-dong.xanh b { color: #9be7b0; }
.tm-tong .lt-huy { color: #ffb38a; margin: 6px 0; }
.tm-tong .lt-muc { margin: 10px 0 4px; color: #e6cf95; font-weight: 700; }
.tm-tong .lt-doi-hinh { display: flex; flex-wrap: wrap; gap: 4px; }
.tm-tong .lt-nguoi { padding: 1px 7px; border-radius: 9px; background: rgba(120, 200, 140, 0.18); border: 1px solid rgba(120, 200, 140, 0.4); font-size: 12px; }
.tm-tong .lt-nguoi.huy { opacity: 0.45; text-decoration: line-through; }
.tm-tong .lt-tran { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin: 8px 0; }
.tm-tong .lt-tran-ben { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.25); text-align: center; }
.tm-tong .lt-tran-ben.d0 { border: 1px solid rgba(74, 168, 255, 0.55); }
.tm-tong .lt-tran-ben.d1 { border: 1px solid rgba(255, 90, 74, 0.55); }
.tm-tong .lt-tran-ben.ta { box-shadow: 0 0 0 2px rgba(155, 231, 176, 0.5) inset; }
.tm-tong .lt-tran-ben small { color: #b9ad8c; font-size: 11px; }
.tm-tong .lt-tran-diem { font-size: 18px; font-variant-numeric: tabular-nums; }
.tm-tong .lt-tran-vs { color: #b9ad8c; font-size: 11px; }
.tm-tong .lt-ket-dong { margin: 3px 0; color: #e8dcc0; }
.tm-tong .lt-luat { margin-top: 10px; }
.tm-tong .lt-luat summary { cursor: pointer; color: #e6cf95; }
.tm-tong .lt-luat p { margin: 4px 0; color: #cfc3a0; font-size: 12px; }
@media (max-width: 640px) {
  #lt-the { right: 8px; top: calc(env(safe-area-inset-top, 0px) + 150px); }
  #lt-hud { top: calc(env(safe-area-inset-top, 0px) + 4px); font-size: 10px; }
  #lt-hud .lt-giua { min-width: 80px; }
  #lt-hud .lt-ab .dai { display: none; }
}
