/* ══════════ Mua Noel 圣诞节 cho nong trai (public/js/nong-trai-noel.js) ══════════
   Moi trang tri mua le nam duoi body.nt-noel (bo class la mat het); do trang tri tren cay thong thi luon ve. */

/* ---------- do trang tri tren cay thong cua nong trai (SVG phu, % theo o vat -> phong to van khop) ---------- */
.nt-noel-tr { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; transition: transform 0.15s; }
.nt-vat.nt-k-noel-thong .nt-hinh, .nt-vat.nt-k-noel-thong .nt-noel-tr { transform-origin: 50% 90%; animation: nt-noel-gio 4.2s ease-in-out infinite alternate; animation-delay: var(--lech, 0s); }
.nt-vat.nt-k-noel-thong:hover .nt-noel-tr { transform: translateY(-3px) scale(1.04); }
@keyframes nt-noel-gio { from { rotate: -1.2deg; } to { rotate: 1.2deg; } }
.nt-noel-tr.du { filter: drop-shadow(0 0 5px rgba(255, 214, 90, 0.75)); }

.nt-ntr-o { transform-box: fill-box; transform-origin: 50% 0; animation: nt-ntr-lac 2.8s ease-in-out infinite alternate; }
@keyframes nt-ntr-lac { from { rotate: -8deg; } to { rotate: 8deg; } }
.nt-ntr-chuong { animation: nt-ntr-chuong 2.6s ease-in-out infinite; }
@keyframes nt-ntr-chuong { 0%, 55%, 100% { rotate: 0deg; } 65% { rotate: 16deg; } 75% { rotate: -13deg; } 85% { rotate: 7deg; } 93% { rotate: -3deg; } }
.nt-ntr-no { transform-origin: 50% 40%; animation: nt-ntr-no 2.4s ease-in-out infinite; }
@keyframes nt-ntr-no { 0%, 100% { scale: 1; } 50% { scale: 1.1; } }
.nt-ntr-tuyet { transform-origin: 50% 50%; animation: nt-ntr-xoay 9s linear infinite; }
@keyframes nt-ntr-xoay { to { rotate: 360deg; } }
.nt-ntr-qua { transform-box: fill-box; transform-origin: 50% 100%; }
.nt-ntr-day { fill: none; stroke: #173a26; stroke-width: 0.9; stroke-linecap: round; }
.nt-ntt-tr .nt-ntr-day { stroke-width: 1.4; }
.nt-ntr-bong { stroke: #2b1d3a; stroke-width: 0.55; }
.nt-ntr-bong.sang { animation: nt-ntr-nhay 1.8s steps(1, end) infinite; }
@keyframes nt-ntr-nhay { 0% { opacity: 1; } 50% { opacity: 0.4; } }
.nt-ntr-sao-h { transform-box: fill-box; transform-origin: 50% 55%; }
.nt-ntr-sao.sang .nt-ntr-sao-h { animation: nt-ntr-sao 2.4s ease-in-out infinite; }
@keyframes nt-ntr-sao { 0%, 100% { scale: 1; } 50% { scale: 1.13; } }
.nt-ntr-sao:not(.sang) .nt-ntr-sao-h { filter: grayscale(0.85) brightness(0.92); opacity: 0.72; }
.nt-ntr-hao { transform-box: fill-box; transform-origin: center; animation: nt-ntr-hao 2.4s ease-in-out infinite; }
@keyframes nt-ntr-hao { 0%, 100% { scale: 0.85; opacity: 0.75; } 50% { scale: 1.2; opacity: 1; } }
.nt-ntr-lap { fill: #fffbe0; transform-box: fill-box; transform-origin: center; animation: nt-ntr-lap 2.6s ease-in-out infinite; }
@keyframes nt-ntr-lap { 0%, 100% { scale: 0.2; opacity: 0; } 50% { scale: 1; opacity: 1; } }
/* thu nho tren thi tran: dung yen cho nhe may */
.nt-noel-nho { position: absolute; pointer-events: none; }
.nt-noel-nho .nt-noel-tr, .nt-noel-nho .nt-noel-tr * { animation: none !important; }

/* ---------- bong noi cua cay ---------- */
.nt-noel-noi { margin-top: 8px; padding-top: 8px; border-top: 2px dashed #e7c9a0; }
.nt-noel-noi p { margin: 0 0 6px; font-weight: 700; font-size: 0.9rem; }
.nt-noel-noi-ds { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-noel-noi-ds span { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 3px; border-radius: 99px; background: #fff; border: 2px solid var(--vien); font-size: 0.82rem; }
.nt-noel-noi-ds img { width: 22px; height: 22px; }
.nt-noel-noi-ds b { font-family: 'Noto Serif SC', serif; }
.nt-noel-noi-phu { color: var(--mo); font-size: 0.8rem !important; font-weight: 600 !important; }
.nt-nut.nt-noel-nut { width: 100%; background: linear-gradient(180deg, #e8473f, #c8363a); color: #fff8ec; text-shadow: 0 1px 0 var(--vien); }

/* ---------- bang trang tri cay thong ---------- */
.nt-noel-bang { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 16px; align-items: start; }
.nt-noel-xem {
  position: relative; padding: 10px 10px 12px; border: 3px solid var(--vien); border-radius: 20px; box-shadow: 0 4px 0 var(--vien); overflow: hidden; text-align: center;
  background:
    radial-gradient(circle at 14% 12%, #fff 1.2px, transparent 1.8px) 0 0 / 46px 40px,
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.8) 1px, transparent 1.6px) 0 0 / 34px 30px,
    linear-gradient(180deg, #162f55 0%, #2a5a8c 72%, #e6f2ff 72.1%, #f7fbff 100%);
}
.nt-noel-xem-cay { position: relative; width: 100%; aspect-ratio: 1; }
.nt-noel-xem-hinh { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(3px 5px 2px rgba(43, 29, 58, 0.25)); }
.nt-noel-xem-ten { margin-top: 4px; padding: 4px 12px; border-radius: 99px; border: 2px solid var(--vien); background: #fff8ec; font-weight: 700; font-size: 0.85rem; }
.nt-noel-xem-ten b { font-family: 'Noto Serif SC', serif; color: #c62828; font-size: 1.05rem; }
.nt-noel-tien { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; margin-bottom: 10px; font-weight: 800; }
.nt-noel-tien span { color: #2e7d32; }
.nt-noel-tien i, .nt-ntt-thanh { grid-column: 1 / -1; display: block; height: 14px; border-radius: 99px; border: 2.5px solid var(--vien); background: #f1e3c8; overflow: hidden; }
.nt-noel-tien u, .nt-ntt-thanh u { display: block; height: 100%; text-decoration: none; background: repeating-linear-gradient(-45deg, #e53935 0 8px, #fff 8px 14px, #2fa866 14px 22px, #fff 22px 28px); transition: width 0.4s; }
.nt-noel-het { margin: 0 0 10px; padding: 8px 10px; border-radius: 12px; background: #eef4ff; border: 2px solid #9cc7ea; font-weight: 600; font-size: 0.88rem; }
.nt-noel-ds { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 10px; }
.nt-noel-mon {
  display: grid; grid-template-columns: 46px 1fr auto; grid-template-areas: 'h t c' 'n n n' 's s s'; gap: 4px 8px; align-items: center;
  padding: 8px 10px 10px; background: #fff; border: 3px solid var(--vien); border-radius: 16px; box-shadow: 0 3px 0 var(--vien);
}
.nt-noel-mon.du { background: #f1fbef; }
.nt-noel-mon-h { grid-area: h; width: 46px; height: 46px; }
.nt-noel-mon-ten { grid-area: t; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 0; border: 0; background: none; text-align: left; line-height: 1.2; }
.nt-noel-mon-ten b { font-family: 'Noto Serif SC', serif; font-size: 1.15rem; color: #b71c1c; }
.nt-noel-mon-ten span { font-size: 0.78rem; font-weight: 700; color: var(--mo); }
.nt-noel-mon-ten i { font-style: normal; font-size: 0.8rem; font-weight: 600; }
.nt-noel-mon-co { grid-area: c; align-self: start; padding: 1px 7px; border-radius: 99px; background: #fff3c4; border: 2px solid var(--vien); font-weight: 800; font-size: 0.78rem; }
.nt-noel-mon .nt-mua { grid-area: n; width: 100%; }
.nt-noel-mon small { grid-area: s; text-align: center; color: #c62828; font-weight: 700; font-size: 0.76rem; }

/* ---------- cay thong lon cua thi tran ---------- */
.nt-noel-tt {
  position: relative; display: flex; gap: 20px; align-items: center;
  max-width: 1240px; margin: 0 auto 16px; padding: 14px 18px; overflow: hidden;
  border: 4px solid var(--vien); border-radius: 22px; box-shadow: 0 6px 0 rgba(43, 29, 58, 0.35); color: #fff8ec;
  background:
    radial-gradient(circle at 10% 20%, #fff 1.3px, transparent 2px) 0 0 / 70px 60px,
    radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.75) 1px, transparent 1.7px) 0 0 / 46px 52px,
    radial-gradient(ellipse at 30% 110%, rgba(255, 214, 90, 0.28), transparent 60%),
    linear-gradient(180deg, #13284a 0%, #1f4473 100%);
}
.nt-ntt-cay { position: relative; flex: none; width: min(360px, 42%); aspect-ratio: 200 / 240; }
.nt-ntt-nen, .nt-ntt-tr { position: absolute; inset: 0; width: 100%; height: 100%; }
.nt-ntt-nen { filter: drop-shadow(4px 6px 3px rgba(0, 0, 0, 0.25)); }
.nt-ntt-tr { overflow: visible; }
.nt-ntt-mon { cursor: pointer; }
.nt-ntt-mon.em image { filter: drop-shadow(0 0 1.6px #ffe066) drop-shadow(0 0 1px #ffe066); }
.nt-ntt-hao { fill: rgba(255, 220, 110, 0.16); filter: blur(10px); animation: nt-ntr-hao 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.nt-ntt-tr.cap-5 .nt-ntr-bong.sang { animation: nt-ntr-mau 3s linear infinite; }
@keyframes nt-ntr-mau { 0% { filter: hue-rotate(0deg) brightness(1.3) drop-shadow(0 0 2px #fff3b0); } 100% { filter: hue-rotate(360deg) brightness(1.3) drop-shadow(0 0 2px #fff3b0); } }
.nt-ntt-ben { flex: 1; min-width: 0; }
.nt-ntt-ben h3 { margin: 10px 0 4px; font-size: 1.25rem; font-weight: 900; text-shadow: 0 2px 0 var(--vien); }
.nt-ntt-ben h3 small { font-family: 'Noto Serif SC', serif; font-size: 1rem; color: #ffd54f; }
.nt-ntt-chuc {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 8px 16px; border-radius: 16px;
  border: 3px solid var(--vien); box-shadow: 0 4px 0 var(--vien); color: #fff8ec; text-align: left;
  background: repeating-linear-gradient(90deg, #d84339 0 26px, #c4352f 26px 52px);
}
.nt-ntt-chuc b { font-family: 'Noto Serif SC', serif; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 900; color: #ffe066; text-shadow: 0 2px 0 var(--vien); }
.nt-ntt-chuc span { font-weight: 800; }
.nt-ntt-chuc i { font-style: normal; font-weight: 600; font-size: 0.85rem; opacity: 0.95; }
.nt-ntt-tien { margin: 4px 0 6px; font-weight: 600; }
.nt-ntt-tien b { color: #ffe066; }
.nt-ntt-thanh { max-width: 420px; border-color: #0b1830; }
.nt-ntt-phu { margin: 10px 0 8px; font-size: 0.9rem; font-weight: 600; }
.nt-ntt-mien { color: #9cffb6; }
.nt-ntt-phu .nt-ntt-mien, .nt-ntt-phu b { white-space: normal; }
.nt-ntt-phu img { width: 18px; height: 18px; vertical-align: -3px; }
.nt-ntt-treo { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-width: 680px; }
@media (max-width: 1000px) { .nt-ntt-treo { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 360px; } }
.nt-ntt-treo button {
  display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 4px 7px; border-radius: 14px;
  border: 3px solid var(--vien); box-shadow: 0 3px 0 var(--vien); background: #fff8ec; color: var(--chu); line-height: 1.15;
  transition: transform 0.12s;
}
.nt-ntt-treo button:hover:not(:disabled) { transform: translateY(-2px); background: #fff; }
.nt-ntt-treo button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--vien); }
.nt-ntt-treo button:disabled { opacity: 0.55; cursor: default; }
.nt-ntt-treo img { width: 34px; height: 34px; }
.nt-ntt-treo b { font-family: 'Noto Serif SC', serif; font-size: 1.05rem; color: #b71c1c; }
.nt-ntt-treo span { font-size: 0.72rem; font-weight: 700; color: var(--mo); }
.nt-ntt-treo i { font-style: normal; font-size: 0.74rem; font-weight: 600; }
.nt-ntt-ai-t { margin: 12px 0 4px; font-weight: 700; font-size: 0.85rem; }
.nt-ntt-ai { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; max-height: 92px; overflow: auto; }
.nt-ntt-ai span { padding: 2px 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); border: 1.5px solid rgba(255, 255, 255, 0.35); font-size: 0.8rem; font-weight: 600; }
.nt-ntt-ai span.em { background: rgba(255, 224, 102, 0.25); border-color: #ffe066; }
.nt-ntt-ai b { color: #ffe066; }

/* ---------- giao dien chung mua le (body.nt-noel) ---------- */
.nt-noel-tuyet, .nt-noel-day, .nt-noel-mu { display: none; }
body.nt-noel .nt-noel-tuyet { display: block; position: fixed; inset: 0; z-index: 38; pointer-events: none; overflow: hidden; }
body.nt-noel.o-thi-tran .nt-noel-tuyet { z-index: 49; }
body.nt-noel.co-bang .nt-noel-tuyet { display: none; }
.nt-noel-tuyet .nt-tuyet-hat { opacity: 0.8; }
.nt-noel-tuyet .nt-tuyet-hat.bong-tuyet { font-size: 16px; opacity: 0.75; }
/* day den nho treo doc mep tren man hinh (sau cac chip, khong che nut) */
body.nt-noel .nt-noel-day { display: block; position: fixed; left: 0; right: 0; top: 0; height: 30px; z-index: 49; pointer-events: none; overflow: hidden; }
body.nt-noel.o-thi-tran .nt-noel-day { z-index: 49; }
.nt-noel-day svg { display: block; }
.nt-noel-day-day { fill: none; stroke: #2f6b3f; stroke-width: 2.2; stroke-linecap: round; }
.nt-noel-day-b ellipse { stroke: #2b1d3a; stroke-width: 1.2; }
.nt-noel-day-b { animation: nt-ntr-nhay 2s steps(1, end) infinite; }
/* mu ong gia Noel tren chip cap */
body.nt-noel .nt-noel-mu { display: block; position: absolute; left: -13px; top: -17px; width: 34px; height: 34px; rotate: -22deg; pointer-events: none; z-index: 2; }
/* thanh duoi: vong la thong + qua chau tren mep */
body.nt-noel .nt-duoi { border-color: var(--vien); background: linear-gradient(180deg, #fffdf6, #fff3df); }
body.nt-noel .nt-duoi::before {
  content: ''; position: absolute; left: 18px; right: 18px; top: -9px; height: 13px; border-radius: 99px; pointer-events: none;
  border: 2.5px solid var(--vien);
  background:
    radial-gradient(circle at 9px 6px, #e53935 3.2px, transparent 3.8px) 0 0 / 36px 100%,
    radial-gradient(circle at 27px 6px, #ffc93c 3.2px, transparent 3.8px) 0 0 / 36px 100%,
    repeating-linear-gradient(115deg, #2f9e5c 0 5px, #237a47 5px 9px);
}
/* bang: dau do-trang soc keo + vien tuyet */
body.nt-noel .nt-bang-dau { position: relative; background: repeating-linear-gradient(90deg, #d84339 0 28px, #c4352f 28px 56px); }
body.nt-noel .nt-bang-dau h2 { color: #fff8ec; text-shadow: 0 2px 0 var(--vien); }
body.nt-noel .nt-bang-dau::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 7px; pointer-events: none;
  background: radial-gradient(circle at 10px 0, #fff 7px, transparent 7.5px) 0 0 / 20px 7px;
}
body.nt-noel .nt-tab button.bat { background: #2f9e5c; }
/* cua hang: nhan mua Noel */
.nt-noel-nhan { color: #c62828; }
.nt-noel-loi { grid-column: 1 / -1; margin: 0; padding: 8px 12px; border-radius: 14px; border: 2.5px solid var(--vien); background: #fdeceb; font-weight: 600; font-size: 0.9rem; }
.nt-noel-loi [lang="zh"] { font-family: 'Noto Serif SC', serif; font-weight: 700; color: #c62828; }
/* thi tran: bien ten co mu tuyet */
body.nt-noel .nt-tt-bien::before {
  content: ''; position: absolute; left: -6px; right: -6px; top: -9px; height: 14px; border-radius: 12px 12px 6px 6px; pointer-events: none;
  background: #fff; border: 3px solid var(--vien); border-bottom: 0;
  -webkit-mask: radial-gradient(circle at 10px 100%, transparent 5px, #000 5.5px) 0 0 / 20px 100%;
          mask: radial-gradient(circle at 10px 100%, transparent 5px, #000 5.5px) 0 0 / 20px 100%;
}

/* ---------- bang chao mua Noel (dong duoc) ---------- */
.nt-noel-ban {
  position: fixed; left: 50%; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 104px); transform: translateX(-50%); z-index: 46;
  width: min(560px, calc(100vw - 24px)); display: flex; gap: 10px; align-items: center; padding: 10px 40px 10px 10px;
  border: 3px solid var(--vien); border-radius: 18px; box-shadow: 0 5px 0 var(--vien); color: #fff8ec;
  background: radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.5) 1px, transparent 1.6px) 0 0 / 26px 24px, linear-gradient(135deg, #d43c3a, #a82a2f);
  animation: nt-len 0.35s cubic-bezier(0.2, 1.2, 0.4, 1);
}
body:has(#ntThuHet:not([hidden])) .nt-noel-ban { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 166px); }
body:not(.nt-noel) .nt-noel-ban, body.co-bang .nt-noel-ban, body.o-thi-tran .nt-noel-ban, body.dang-dat .nt-noel-ban { display: none; }
.nt-noel-ban-cay { flex: none; width: 58px; height: 58px; }
.nt-noel-ban-cay img { width: 100%; height: 100%; }
.nt-noel-ban-chu { min-width: 0; line-height: 1.3; }
.nt-noel-ban-chu > b { font-size: 1.05rem; text-shadow: 0 1px 0 var(--vien); }
.nt-noel-ban-zh { padding: 0 6px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.16); color: #ffe066; font-weight: 800; }
.nt-noel-ban-zh span { font-family: 'Noto Serif SC', serif; font-size: 1.05rem; }
.nt-noel-ban-chu small { display: block; margin: 2px 0 6px; font-size: 0.8rem; font-weight: 600; }
.nt-noel-ban-nut { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-noel-ban-nut .nt-nut { color: var(--chu); }
.nt-noel-ban-dong { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--vien); background: #fff8ec; color: var(--chu); font-weight: 900; font-size: 0.8rem; line-height: 1; }

@media (max-width: 640px) {
  .nt-noel-bang { grid-template-columns: 1fr; gap: 12px; }
  .nt-noel-xem { padding: 8px; }
  .nt-noel-xem-cay { width: min(210px, 62vw); margin: 0 auto; }
  .nt-noel-ds { grid-template-columns: 1fr 1fr; gap: 8px; }
  .nt-noel-mon { grid-template-columns: 38px 1fr; grid-template-areas: 'h t' 'c c' 'n n' 's s'; padding: 7px 8px 9px; }
  .nt-noel-mon-h { width: 38px; height: 38px; }
  .nt-noel-mon-co { justify-self: start; }
  .nt-noel-mon-ten b { font-size: 1.05rem; }
  .nt-noel-tt { flex-direction: column; gap: 10px; padding: 12px 12px 14px; margin: 0 -8px 14px; border-radius: 18px; }
  .nt-ntt-cay { width: min(300px, 82vw); }
  .nt-ntt-ben { width: 100%; text-align: center; }
  .nt-ntt-thanh { margin: 0 auto; }
  .nt-ntt-treo { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 auto; max-width: 100%; }
  .nt-ntt-ai { justify-content: center; }
  /* tren nut tro ly goc phai + nut "thu hoach tat ca" */
  .nt-noel-ban, body:has(#ntThuHet:not([hidden])) .nt-noel-ban { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 166px); padding: 8px 36px 8px 8px; }
  .nt-noel-ban-cay { width: 44px; height: 44px; }
  .nt-noel-ban-chu small { display: none; }
  body.nt-noel .nt-noel-mu { width: 28px; height: 28px; left: -10px; top: -14px; }
}
body.nt-noel.tuyet-tat .nt-noel-tuyet { display: none; }
.nt-noel-nut-tuyet.tat { opacity: 0.55; text-decoration: line-through; }
@media (prefers-reduced-motion: reduce) {
  /* may tat hieu ung: tuyet van roi nhung cham gap doi (co giao muon thay tuyet) */
  body.nt-noel .nt-noel-tuyet .nt-tuyet-hat { animation-duration: 22s, 6s !important; }
  .nt-noel-tr, .nt-noel-tr *, .nt-ntt-tr *, .nt-noel-day *, .nt-vat.nt-k-noel-thong .nt-hinh, .nt-noel-ban { animation: none !important; }
}
.nt-ntt-phu .nt-gia img { width: 18px; height: 18px; }
.nt-noel-noi-ds small { font-size: 0.7rem; color: var(--mo); font-weight: 700; margin-left: 2px; }

/* ---------- tuyet roi trong khung cay thong thi tran + "cham de xem" (2026-11-18) ---------- */
.nt-ntt-tuyet { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.nt-noel-tt > .nt-ntt-cay, .nt-noel-tt > .nt-ntt-ben { position: relative; z-index: 1; }
.nt-noel-tt > .nt-ntt-cay { cursor: zoom-in; border-radius: 18px; }
.nt-ntt-cay::before {
  content: ''; position: absolute; left: 6%; right: 6%; top: 4%; bottom: 10%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 224, 120, 0.32), rgba(255, 200, 80, 0.08) 60%, transparent);
  animation: nt-ntt-tho 3.6s ease-in-out infinite;
}
@keyframes nt-ntt-tho { 0%, 100% { opacity: 0.55; transform: scale(0.94); } 50% { opacity: 1; transform: scale(1.04); } }
.nt-ntt-cay:focus-visible { outline: 3px solid #ffe066; outline-offset: 4px; }
.nt-ntt-xem {
  position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  padding: 4px 12px; border-radius: 99px; font-size: 0.82rem; font-weight: 800; color: #3a2400;
  background: linear-gradient(90deg, #ffe680, #fff6c8, #ffd54f); border: 2px solid #2b1d3a; box-shadow: 0 3px 0 #2b1d3a;
  animation: nt-ntt-goi 2.4s ease-in-out infinite;
}
@keyframes nt-ntt-goi { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }

/* ---------- man "Dem Giang sinh" (cham cay thong thi tran) ---------- */
body.nt-nd-mo { overflow: hidden; }
.nt-noel-dem {
  position: fixed; inset: 0; z-index: 2147482000; overflow: hidden; color: #fff8ec;
  background: radial-gradient(ellipse at 50% 120%, #2a4f86 0%, transparent 60%), linear-gradient(180deg, #050a1f 0%, #0d1d45 45%, #1b3a6e 100%);
  animation: nt-nd-vao 0.35s ease-out;
}
.nt-noel-dem.dang-dong { animation: nt-nd-ra 0.26s ease-in forwards; }
@keyframes nt-nd-vao { from { opacity: 0; } to { opacity: 1; } }
@keyframes nt-nd-ra { to { opacity: 0; } }
.nt-nd-troi { position: absolute; inset: 0; pointer-events: none; }
.nt-nd-cuc { position: absolute; border-radius: 50%; filter: blur(48px); opacity: 0.45; mix-blend-mode: screen; }
.nt-nd-cuc.a { width: 60vw; height: 26vh; left: -10vw; top: 6vh; background: #2bd99a; animation: nt-nd-troi1 14s ease-in-out infinite alternate; }
.nt-nd-cuc.b { width: 50vw; height: 22vh; right: -8vw; top: 12vh; background: #6a7cff; animation: nt-nd-troi2 17s ease-in-out infinite alternate; }
.nt-nd-cuc.c { width: 40vw; height: 18vh; left: 30vw; top: 2vh; background: #c06cff; opacity: 0.3; animation: nt-nd-troi1 21s ease-in-out infinite alternate-reverse; }
@keyframes nt-nd-troi1 { to { transform: translate(14vw, 4vh) scale(1.2, 0.8); } }
@keyframes nt-nd-troi2 { to { transform: translate(-12vw, 6vh) scale(0.85, 1.25); } }
.nt-nd-sau, .nt-nd-truoc { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.nt-nd-truoc { z-index: 3; }
.nt-nd-trang {
  position: absolute; right: 9vw; top: 7vh; width: clamp(54px, 9vw, 110px); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 38% 36%, #fffdf2 0 52%, #f3e6b8 72%, #e9d59a 100%);
  box-shadow: 0 0 40px 12px rgba(255, 246, 200, 0.35), 0 0 120px 40px rgba(255, 246, 200, 0.12);
}
.nt-nd-doi { position: absolute; left: 0; right: 0; bottom: 0; height: 30vh; }
.nt-nd-doi i { position: absolute; left: -10%; right: -10%; bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.nt-nd-doi .xa { height: 70%; background: linear-gradient(180deg, #cfe0f5, #9fbbe0); left: -30%; right: 20%; opacity: 0.85; }
.nt-nd-doi .gan { height: 52%; background: linear-gradient(180deg, #ffffff, #dce9f8); left: 10%; right: -30%; box-shadow: 0 -6px 30px rgba(255, 255, 255, 0.35); }
.nt-nd-cay {
  position: absolute; left: 50%; bottom: 8vh; z-index: 2; transform: translateX(-50%);
  height: min(68vh, 680px); aspect-ratio: 200 / 240; max-width: 92vw;
}
.nt-nd-cay .nt-ntt-nen { filter: drop-shadow(0 0 18px rgba(255, 226, 140, 0.45)) drop-shadow(6px 10px 6px rgba(0, 0, 0, 0.35)); }
.nt-nd-hao {
  position: absolute; left: -12%; right: -12%; top: -8%; bottom: 4%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 230, 140, 0.5), rgba(255, 200, 90, 0.16) 55%, transparent);
  animation: nt-ntt-tho 3.2s ease-in-out infinite;
}
.nt-nd-tia {
  position: absolute; left: 50%; top: 6%; width: 230%; aspect-ratio: 1; translate: -50% -50%; pointer-events: none; opacity: 0.55;
  background: repeating-conic-gradient(from 0deg, rgba(255, 240, 180, 0.22) 0deg 6deg, transparent 6deg 22deg);
  -webkit-mask: radial-gradient(closest-side, #000 0 18%, transparent 70%); mask: radial-gradient(closest-side, #000 0 18%, transparent 70%);
  animation: nt-nd-xoay 26s linear infinite;
}
@keyframes nt-nd-xoay { to { rotate: 360deg; } }
.nt-nd-cay .nt-ntt-tr { cursor: default; }
.nt-nd-chu {
  position: absolute; left: 50%; top: max(14px, 3vh); z-index: 4; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 120px);
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 18px; border: 0; background: none; color: inherit; cursor: pointer; text-align: center;
}
.nt-nd-chu b {
  font-family: 'Noto Serif SC', serif; font-weight: 900; font-size: clamp(2rem, 9vw, 4.4rem); line-height: 1.1; white-space: nowrap;
  background: linear-gradient(100deg, #ffd54f 0%, #fff6c8 20%, #ffb300 40%, #fff6c8 60%, #ffd54f 80%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #5a2a00) drop-shadow(0 0 14px rgba(255, 214, 90, 0.55));
  animation: nt-nd-anh 4s linear infinite;
}
@keyframes nt-nd-anh { to { background-position: -250% 0; } }
.nt-nd-chu span { font-weight: 800; font-size: clamp(1rem, 2.6vw, 1.35rem); text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.nt-nd-chu i { font-style: normal; font-weight: 600; font-size: 0.95rem; opacity: 0.9; }
.nt-nd-chu:focus-visible { outline: 3px solid #ffe066; outline-offset: 4px; border-radius: 14px; }
.nt-nd-tien {
  position: absolute; left: 50%; bottom: 2vh; z-index: 4; transform: translateX(-50%); margin: 0; white-space: nowrap;
  padding: 5px 14px; border-radius: 99px; background: rgba(10, 22, 52, 0.62); border: 1.5px solid rgba(255, 255, 255, 0.35);
  font-weight: 600; font-size: 0.9rem; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis;
}
.nt-nd-tien b { color: #ffe066; }
.nt-nd-dong {
  position: absolute; right: 14px; top: 14px; z-index: 5; width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid #2b1d3a; background: #fff8ec; color: #2b1d3a; font-size: 1.3rem; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 #2b1d3a;
}
.nt-nd-dong:focus-visible { outline: 3px solid #ffe066; outline-offset: 3px; }
@media (max-width: 640px) {
  .nt-nd-cay { height: min(58vh, 520px); bottom: 9vh; }
  .nt-nd-trang { right: 5vw; top: 15vh; }
}
@media (prefers-reduced-motion: reduce) {
  .nt-ntt-cay::before, .nt-ntt-xem, .nt-nd-cuc, .nt-nd-hao, .nt-nd-tia, .nt-nd-chu b, .nt-noel-dem, .nt-noel-dem.dang-dong { animation: none; }
}

/* bong tuyet mua le noi tren nen sang (co non, nang): vien xanh nhat + bong, khong thi trang lan vao nen (2026-11-18) */
body.nt-noel .nt-noel-tuyet .nt-tuyet-hat {
  opacity: 0.95;
  box-shadow: 0 0 0 1px rgba(110, 145, 200, 0.55), 0 1px 4px rgba(30, 60, 120, 0.45), 0 0 8px rgba(255, 255, 255, 0.9);
}
body.nt-noel .nt-noel-tuyet .nt-tuyet-hat.bong-tuyet {
  box-shadow: none; opacity: 0.95; font-size: 20px; color: #fff;
  text-shadow: 0 0 2px #4a78b8, 0 0 1px #2c5a9a, 0 1px 3px rgba(20, 50, 110, 0.6), 0 0 8px rgba(255, 255, 255, 0.9);
}

/* ---------- Ong gia Noel cuoi xe tuan loc bay ngang troi (2026-11-18) ---------- */
.nt-santa {
  position: fixed; left: 0; top: 12vh; z-index: 37; width: 220px; padding: 0; border: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 6px 6px rgba(20, 30, 60, 0.25));
}
.nt-santa[hidden] { display: none; }
.nt-santa:focus-visible { outline: 3px solid #ffe066; outline-offset: 4px; border-radius: 16px; }
.nt-sa-nhun { position: relative; display: block; animation: nt-sa-nhun 1.6s ease-in-out infinite; }
.nt-santa.phai .nt-sa-nhun, .nt-nd-santa .nt-sa-nhun { transform: scaleX(-1); }
@keyframes nt-sa-nhun { 0%, 100% { translate: 0 0; rotate: -2deg; } 50% { translate: 0 -10px; rotate: 2deg; } }
.nt-sa-hinh { display: block; width: 100%; height: auto; overflow: visible; }
.nt-sa-chan path { transform-box: fill-box; transform-origin: 50% 0; }
.nt-sa-chan path { animation: nt-sa-chan 0.5s ease-in-out infinite alternate; animation-delay: inherit; }
.nt-sa-chan.b path { animation-direction: alternate-reverse; }
@keyframes nt-sa-chan { from { rotate: -28deg; } to { rotate: 22deg; } }
.nt-sa-mui { animation: nt-sa-mui 1.2s ease-in-out infinite; }
.nt-sa-mui-hao { transform-box: fill-box; transform-origin: center; animation: nt-sa-hao 1.2s ease-in-out infinite; }
@keyframes nt-sa-mui { 0%, 100% { fill: #ff3b3b; } 50% { fill: #ff8a80; } }
@keyframes nt-sa-hao { 0%, 100% { scale: 0.8; opacity: 0.25; } 50% { scale: 1.5; opacity: 0.6; } }
/* vet sao lap lanh sau xe (ben phai khi bay sang trai; lat theo .phai) */
.nt-sa-vet { position: absolute; left: 88%; top: 52%; width: 70%; height: 30%; pointer-events: none; }
.nt-sa-vet i {
  position: absolute; width: 10px; height: 10px; top: 0;
  background: radial-gradient(circle, #fffbe0 0 22%, #ffd54f 36%, transparent 70%);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: nt-sa-vet 1.1s ease-out infinite;
}
.nt-sa-vet i:nth-child(1) { left: 2%; top: 10%; animation-delay: 0s; }
.nt-sa-vet i:nth-child(2) { left: 16%; top: 60%; animation-delay: -0.2s; width: 8px; height: 8px; }
.nt-sa-vet i:nth-child(3) { left: 30%; top: 20%; animation-delay: -0.45s; }
.nt-sa-vet i:nth-child(4) { left: 46%; top: 70%; animation-delay: -0.6s; width: 7px; height: 7px; }
.nt-sa-vet i:nth-child(5) { left: 62%; top: 30%; animation-delay: -0.8s; width: 8px; height: 8px; }
.nt-sa-vet i:nth-child(6) { left: 80%; top: 55%; animation-delay: -0.95s; width: 6px; height: 6px; }
@keyframes nt-sa-vet { 0% { opacity: 0; transform: scale(0.3) rotate(0); } 25% { opacity: 1; transform: scale(1.2) rotate(30deg); } 100% { opacity: 0; transform: scale(0.4) rotate(90deg); } }
body.co-bang .nt-santa { display: none; }
/* man Dem Giang sinh: bay qua mat trang moi 16 giay */
.nt-nd-santa {
  position: absolute; top: 9vh; left: 0; z-index: 1; width: clamp(150px, 20vw, 240px); pointer-events: none;
  animation: nt-nd-santa 16s linear infinite; animation-delay: 1.5s; translate: -110% 0;
}
@keyframes nt-nd-santa { 0% { translate: -110% 2vh; } 60% { translate: 105vw -3vh; } 100% { translate: 105vw -3vh; } }
@media (max-width: 640px) { .nt-santa { filter: none; } .nt-nd-santa { top: 20vh; } }
@media (prefers-reduced-motion: reduce) {
  .nt-sa-nhun { animation-duration: 3s; }
  .nt-sa-chan path { animation-duration: 0.9s; }
  .nt-nd-santa { animation-duration: 26s; }
}

/* ong gia bay ngang ca trang thi tran (truoc day bi khung thi tran che) */
body.nt-noel.o-thi-tran .nt-santa { z-index: 49; }
/* ong gia bay vong quanh cay thong trong khung troi dem cua thi tran */
.nt-ntt-santa { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; transform-origin: 50% 50%; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.35)); }
.nt-ntt-santa[hidden] { display: none; }

/* ---------- nhe cho dien thoai (2026-11-20, co giao: "choi tren dien thoai hoi lag") ----------
   Giu hinh dep, bo bot thu bat may ve lai lien tuc: bong tuyet khong do bong, do trang tri tren cay dung yen
   (sao va den van nhap nhay bang do mo), hao quang khong lam mo dong, vet sao sau xe ong gia an. */
.nt-tuyet-hat { will-change: transform; }
@media (max-width: 760px), (pointer: coarse) {
  body.nt-noel .nt-noel-tuyet .nt-tuyet-hat { box-shadow: 0 0 0 1px rgba(110, 145, 200, 0.6); }
  body.nt-noel .nt-noel-tuyet .nt-tuyet-hat.bong-tuyet { text-shadow: 0 0 2px #4a78b8; }
  body.nt-noel .nt-noel-tuyet .nt-tuyet-hat:nth-child(2n) { display: none; }
  .nt-ntr-o, .nt-ntr-chuong, .nt-ntr-no, .nt-ntr-tuyet { animation: none !important; }
  .nt-ntt-tr .nt-ntr-lap:nth-child(2n) { display: none; }
  .nt-ntt-hao { animation: none; filter: none; fill: rgba(255, 220, 110, 0.12); }
  .nt-ntt-tr.cap-5 .nt-ntr-bong.sang { animation: nt-ntr-nhay 1.8s steps(1, end) infinite; }
  .nt-noel-tr.du { filter: none; }
  .nt-sa-vet { display: none; }
  .nt-ntt-cay::before { animation: none; opacity: 0.8; }
  .nt-noel-day-b:nth-child(3n) { animation: none; }
}
