:root{
  --dem:#241A12; --dem2:#30231A; --dem3:#1A1209;
  --nau:#8A5F3C; --hophach:#E0A45E; --vang:#FFC978;
  --kem:#FFF4E2; --kem-mo:#E3D2B8;
  --da:#A9703F;
  /* giấy xé */
  --giay:#FFF4E2; --giay-lot:#F0DFC2;
  --giay-chu:#33240F; --giay-chu2:#5C452F; --giay-nhan:#8A5F3C;
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth}
body{
  background:var(--dem3); color:var(--kem);
  font-family:"Be Vietnam Pro",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  line-height:1.6;
}
.serif{font-family:"Playfair Display",Georgia,"Times New Roman",serif}
.khuon{position:absolute;width:0;height:0;overflow:hidden}
img{display:block;max-width:100%}

/* ---------- MÀN KHÓA ---------- */
#khoa{
  position:fixed; inset:0; z-index:100; display:grid; place-items:center;
  background:radial-gradient(ellipse at 50% 42%, #4A3524 0%, #241A12 65%);
  padding:24px; text-align:center; transition:opacity .9s ease, visibility .9s;
}
#khoa.tat{opacity:0; visibility:hidden}
.o-cua{
  width:88px; height:112px; margin:0 auto 32px; border-radius:44px 44px 6px 6px;
  background:linear-gradient(180deg,var(--vang),var(--hophach));
  box-shadow:0 0 60px 18px rgba(240,183,94,.28), 0 0 140px 50px rgba(240,183,94,.1);
  animation:tho 4s ease-in-out infinite;
}
@keyframes tho{0%,100%{opacity:.85;transform:scale(1)}50%{opacity:1;transform:scale(1.04)}}
#khoa h1{font-size:clamp(22px,5.5vw,30px); font-weight:500; margin-bottom:10px}
#khoa p{color:var(--kem-mo); font-size:15px; margin-bottom:28px}
.o-nhap{display:flex; flex-direction:column; gap:12px; width:min(100%,300px); margin:0 auto}
.o-nhap input{
  background:rgba(243,230,212,.08); border:1px solid rgba(243,230,212,.26);
  color:var(--kem); padding:15px 18px; border-radius:12px; font-size:17px;
  text-align:center; font-family:inherit; letter-spacing:.04em;
}
.o-nhap input:focus{outline:none; border-color:var(--hophach); background:rgba(243,230,212,.12)}
.o-nhap input::placeholder{color:rgba(227,210,184,.55)}
.nut{
  background:linear-gradient(180deg,var(--hophach),var(--nau)); color:#fff; border:none;
  padding:15px; border-radius:12px; font-size:16px; font-weight:600; font-family:inherit;
  cursor:pointer; transition:transform .15s, filter .2s;
}
.nut:active{transform:scale(.97)} .nut:hover{filter:brightness(1.1)}
.sai{color:#F09A78; font-size:14px; min-height:20px; margin-top:12px}
.rung{animation:rung .4s}
@keyframes rung{0%,100%{transform:translateX(0)}25%{transform:translateX(-9px)}75%{transform:translateX(9px)}}

/* ---------- NHÀ ĐANG TỐI — bấm công tắc thì đèn lên ----------
   Lớp phủ màu đêm đè lên trang; nhà vẫn mờ mờ phía sau. Nằm dưới màn khoá (z 100). */
#toi{position:fixed; inset:0; z-index:90; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:14px; padding:24px; text-align:center;
  background:radial-gradient(ellipse at 50% 55%, rgba(14,18,38,.74) 0%, rgba(4,6,14,.92) 80%)}
#toi h1{font-size:clamp(30px,8vw,44px); font-weight:500; color:#E8E4F4}
#toi p{color:#B9B6CC; font-size:15px}
#toi button{margin-top:18px; display:flex; flex-direction:column; align-items:center; gap:12px;
  background:none; border:0; color:#FFE6B8; font:inherit; font-size:15px; font-weight:600; cursor:pointer}
#toi .cong-tac{width:84px; height:84px; border-radius:50%; display:grid; place-items:center;
  border:1.5px solid rgba(255,214,150,.65); background:rgba(255,201,120,.1);
  animation:moi-bam 2s ease-in-out infinite}
#toi .cong-tac svg{width:38px; height:38px}
@keyframes moi-bam{
  0%,100%{box-shadow:0 0 12px 1px rgba(255,201,120,.3)}
  50%{box-shadow:0 0 34px 10px rgba(255,201,120,.55)}
}
#toi i{position:absolute; width:3px; height:3px; border-radius:50%; background:#FFFDF6;
  box-shadow:0 0 6px 1px rgba(255,244,226,.8); animation:nhap-sao 2.4s ease-in-out infinite alternate}
/* đèn chớp vài cái như bóng đèn cũ rồi sáng hẳn */
#toi.sang{pointer-events:none; animation:len-den 1.9s ease-out forwards;
  background:radial-gradient(ellipse at 50% 62%, rgba(255,190,100,.28) 0%, rgba(4,6,14,.93) 72%)}
#toi.sang>*{opacity:0; transition:opacity .25s}
@keyframes len-den{
  0%{opacity:1} 12%{opacity:.45} 20%{opacity:.88} 32%{opacity:.3} 40%{opacity:.7} 100%{opacity:0}
}
body.dang-toi{overflow:hidden}
body.dang-toi .chan{opacity:0}
.chan{transition:opacity .8s ease 1.2s}

/* ---------- NHẠC ---------- */
.nut-nhac{
  position:fixed; top:14px; right:14px; z-index:60; width:42px; height:42px; border-radius:50%;
  background:rgba(36,26,18,.72); border:1px solid rgba(243,230,212,.22);
  color:var(--kem); font-size:17px; cursor:pointer; backdrop-filter:blur(8px);
}
.nut-nhac.tat-tieng{color:var(--kem-mo); opacity:.6}
/* tắt tiếng thì có gạch chéo, nhìn là biết */
.nut-nhac.tat-tieng::after{content:""; position:absolute; left:11px; right:11px; top:50%; height:2px;
  background:var(--kem-mo); rotate:-40deg; border-radius:1px}

/* ---------- MỞ ĐẦU ---------- */
#mo-dau{
  min-height:44svh; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:10px; padding:52px 20px 10px; text-align:center;
  background:radial-gradient(ellipse at 50% 46%, #332518 0%, var(--dem3) 72%);
}
#mo-dau h1{font-size:clamp(30px,8vw,46px); font-weight:500}
#mo-dau p{color:var(--kem-mo); font-size:14px; letter-spacing:.06em}
.goi-cuon{font-size:13px; color:var(--kem-mo); opacity:.8}

/* ---------- CĂN NHÀ ----------
   ĐỨNG YÊN. Không camera, không transform theo từng khung hình — đó là thứ làm
   trang giật. Cả bức vẽ nằm gọn trong màn nên đốm sáng nào cũng chạm tới được,
   và bài toán "camera không với tới món đồ sát mép" biến mất luôn. */
#canh{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; padding:6px 8px 24px;
}
.buc{
  position:relative; width:100%; margin:0 auto;
  /* 0.5625 = tỉ lệ bức vẽ (941×1672). Chặn theo chiều cao để không bao giờ phải cuộn mới
     thấy hết nhà — đốm sáng nằm ngoài màn là đốm không ai bấm. */
  max-width:min(100%, calc((94svh - 150px) * 0.5619), 520px);
}
.buc>img{width:100%; height:auto; border-radius:14px;
  box-shadow:0 26px 64px rgba(0,0,0,.55), 0 0 100px rgba(224,164,94,.1)}
.chi-dan{font-size:13px; color:var(--kem-mo); opacity:.85; text-align:center}
/* ---------- ĐÃ MỞ ĐƯỢC BAO NHIÊU ---------- */
.chan{display:flex; flex-direction:column; align-items:center; gap:6px; width:100%}
.tien-do{display:flex; flex-direction:column; align-items:center; gap:6px; width:min(100%,380px); text-align:center}
.tien-do .dem{font-size:14px; font-weight:600; color:var(--kem)}
.tien-do .vach{display:flex; gap:4px; width:min(100%,300px)}
.tien-do .vach i{flex:1; height:5px; border-radius:3px; box-shadow:inset 0 0 0 1px var(--mau); opacity:.9; transition:background .4s}
.tien-do .vach i.on{background:var(--mau)}
.tien-do .chu-mau{display:flex; flex-wrap:wrap; justify-content:center; gap:2px 12px; font-size:11.5px; color:var(--kem-mo)}
.tien-do .chu-mau span::before{content:""; display:inline-block; width:8px; height:8px; margin-right:5px;
  border-radius:50%; background:var(--mau)}
.xem-het{margin-top:2px; padding:11px 26px; border:0; border-radius:28px; cursor:pointer; pointer-events:auto;
  background:linear-gradient(180deg,var(--vang),var(--hophach)); color:#241A12;
  font-family:inherit; font-weight:700; font-size:14.5px; box-shadow:0 0 22px rgba(255,201,120,.5)}
.xem-het[hidden],.chi-dan[hidden]{display:none}
/* đường lùi: đốm sáng hỏng thì đọc dọc */
.xep-doc{width:min(100%,560px); margin:8px auto 0; padding:0 6px}
.o-xep{padding:30px 0 10px}

/* ---------- ĐIỆN THOẠI: BỨC VẼ TRÀN KÍN MÀN ----------
   Ảnh tỉ lệ 0.5619 còn màn điện thoại khoảng 0.46, nên phủ kín thì phải cắt hai
   bên 9–13%. Bảy đốm chạm nằm trong khoảng x 14–78 nên không đốm nào bị cắt —
   ĐỔI ẢNH NỀN hay dời đốm ra sát mép thì phải tính lại chỗ này.
   Màn rộng thì thôi, vì cắt dọc một bức vẽ cao như vậy trông rất tệ. */
@media (max-width:700px){
  #canh{display:block; position:relative; height:100svh; padding:0; overflow:hidden}
  .buc{
    position:absolute; top:50%; left:50%; translate:-50% -50%;
    width:max(100%, calc(100svh * 0.5619));   /* đây là phép phủ kín */
    max-width:none; aspect-ratio:940 / 1673;
  }
  .buc>img{width:100%; height:100%; border-radius:0; box-shadow:none}
  .song,.gio,.vat{border-radius:0}
  /* bộ đếm và chữ chỉ dẫn nằm gọn trên KHOẢNG TRỜI: đặt dưới chân thì che mất vườn rau
     và đốm ở bậc thềm. Lớp này không nhận chạm. */
  .chan{
    position:absolute; left:0; right:0; top:0; z-index:3; margin:0; pointer-events:none; gap:4px;
    padding:calc(8px + env(safe-area-inset-top)) 58px 0;   /* chừa chỗ hai bên cho nút ♪ */
  }
  .chan .tien-do{width:auto; max-width:100%; gap:4px; padding:6px 12px 7px; border-radius:16px;
    background:rgba(18,14,30,.55)}
  .chan .tien-do .dem{font-size:12.5px; line-height:1.3}
  .chan .tien-do .vach{width:210px; gap:3px}
  .chan .tien-do .chu-mau{gap:0 9px; font-size:10px; line-height:1.5; max-width:290px}
  .chan .tien-do .chu-mau span::before{width:6px; height:6px; margin-right:4px}
  .chan .xem-het{margin:3px 0 1px; padding:8px 20px; font-size:13px}
  .chan .chi-dan{font-size:11.5px; text-shadow:0 1px 4px rgba(12,8,24,.95)}
}

/* ---------- ĐỐM SÁNG BẤM ĐƯỢC ---------- */
.diem{position:absolute; inset:0}
.cham{
  position:absolute; translate:-50% -50%; width:52px; height:52px;  /* đủ to cho ngón tay */
  border:0; background:none; padding:0; cursor:pointer; z-index:2;
}
/* Giống một ngọn đèn nhỏ trong nhà hơn là một nút bấm trên giao diện —
   lõi nhỏ, quầng ấm loang rộng. */
.cham .loi{
  position:absolute; inset:22px; border-radius:50%; background:#FFE2A8;
  box-shadow:0 0 6px 2px rgba(255,201,120,.9), 0 0 16px 7px rgba(224,164,94,.4);
  transition:inset .2s, opacity .3s;
}
.cham .quang{
  position:absolute; inset:14px; border-radius:50%;
  border:1.5px solid rgba(255,201,120,.6);
  animation:toa 2.8s cubic-bezier(.2,.6,.3,1) infinite;
}
/* vòng sáng lan ra rồi tắt — chỉ transform với opacity, máy chạy bằng GPU */
@keyframes toa{
  0%{transform:scale(.4); opacity:.85}
  70%{opacity:0}
  100%{transform:scale(1.5); opacity:0}
}
.cham:hover .loi,.cham:focus-visible .loi{inset:18px}
.cham:focus-visible{outline:2px solid var(--vang); outline-offset:3px; border-radius:50%}
/* xem rồi thì thôi vẫy gọi, nhưng vẫn còn đó để quay lại */
.cham.da-xem .quang{animation:none; opacity:0}
.cham.da-xem .loi{opacity:.45; box-shadow:0 0 5px 1px rgba(255,201,120,.4)}

/* ---------- CÀNH LÁ ĐUNG ĐƯA ----------
   Ảnh rời nền trong suốt đặt đè lên bức vẽ. Cành lá vẽ chết trong ảnh nền thì
   không nhúc nhích được — phải tách ra mới cho đưa được.
   Xoay quanh ĐÚNG chỗ cành bám vào, không thì cả cành trượt đi như bị kéo. */
.gio{position:absolute; inset:0; overflow:hidden; border-radius:14px; pointer-events:none}
.gio .la{position:absolute; height:auto; will-change:transform;
  animation-iteration-count:infinite; animation-timing-function:ease-in-out}
/* lấn ra ngoài mép một chút để lúc xoay không hở khoảng trống ở góc */
.la.tren-trai{left:-2%; top:-2%; transform-origin:2% 2%; animation-name:dua-tren}
.la.tren-phai{right:-2%; top:-2%; transform-origin:98% 2%; animation-name:dua-tren-nguoc}
.la.duoi-trai{left:-1%; bottom:-2%; transform-origin:35% 100%; animation-name:dua-duoi}
@keyframes dua-tren{0%,100%{transform:rotate(-1.2deg)}50%{transform:rotate(3.2deg)}}
@keyframes dua-tren-nguoc{0%,100%{transform:rotate(1.4deg)}50%{transform:rotate(-3deg)}}
@keyframes dua-duoi{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(3.6deg)}}

/* ---------- MÈO, BÉ, BỤI RAU ----------
   Ảnh rời đè lên chính hình vẽ chết của chúng trong tranh. Mỗi cái phải TO HƠN
   hình cũ một chút, không thì lúc nhúc nhích sẽ lòi hình cũ ra phía sau. */
.vat{position:absolute; inset:0; overflow:hidden; border-radius:14px; pointer-events:none}
.vat .mon{position:absolute; height:auto; will-change:transform;
  animation-iteration-count:infinite; animation-timing-function:ease-in-out}
.mon.neo-giua{translate:-50% -50%}
.mon.neo-day{translate:-50% -100%}

/* mèo ngủ: phập phồng thở, lâu lâu trở mình. Chỉ phóng TO lên từ đáy (không bao giờ
   nhỏ hơn 1) để không lòi con mèo vẽ chết phía sau. */
.mon.lan{animation-name:tro-minh; transform-origin:50% 90%}
@keyframes tro-minh{
  0%,28%,56%,100%{transform:scale(1)}
  14%,42%{transform:scale(1.025,1.11)}
  68%{transform:rotate(3.5deg) scale(1.03)}
  80%{transform:rotate(-1.5deg) scale(1.02)}
}
/* chữ z bay lên từ đầu mèo */
.zzz{position:absolute; color:#FFF4E2; font:italic 700 13px Georgia,serif; opacity:0;
  text-shadow:0 1px 3px rgba(30,18,8,.8); animation:bay-z 3.9s ease-in-out infinite}
@keyframes bay-z{
  0%{opacity:0; transform:translate(0,0) scale(.6)}
  25%{opacity:.95}
  100%{opacity:0; transform:translate(-14px,-34px) scale(1.25)}
}
/* cánh hoa rơi từ tán cây. Mỗi lớp phủ trọn bức vẽ nên % trong translate là % bức vẽ */
.hoa{position:absolute; inset:0; opacity:0; will-change:transform;
  animation:hoa-roi 11s linear infinite}
.hoa i{position:absolute; width:7px; height:5px; border-radius:80% 20% 80% 20%;
  background:linear-gradient(135deg,#FFD9E2,#EE93AA); animation:hoa-lat 2.4s ease-in-out infinite alternate}
@keyframes hoa-roi{
  0%{opacity:0; transform:translate(0,0)}
  8%{opacity:.95}
  35%{transform:translate(9%,17%)}
  65%{transform:translate(5%,34%)}
  90%{opacity:.85}
  100%{opacity:0; transform:translate(16%,54%)}
}
@keyframes hoa-lat{from{transform:rotate(-40deg) scaleX(1)}to{transform:rotate(130deg) scaleX(.45)}}
/* bé chạy — nhịp ngắn, nhún lên xuống */
.mon.nhun{animation-name:chay-nhun}
@keyframes chay-nhun{
  0%,100%{transform:translateY(0) rotate(-1.6deg)}
  50%{transform:translateY(-2.2%) rotate(1.8deg)}
}
/* bụi rau rung rinh, xoay quanh gốc */
.mon.lay{animation-name:rung-rinh; transform-origin:50% 100%}
@keyframes rung-rinh{
  0%,100%{transform:rotate(-1.5deg)}
  50%{transform:rotate(1.9deg)}
}

/* ---------- ĐÈN VÀ SAO (trang trí) ---------- */
.song{position:absolute; inset:0; pointer-events:none; overflow:hidden; border-radius:14px}
.song>*{position:absolute; translate:-50% -50%; will-change:opacity}
/* lớp cánh hoa phủ trọn bức vẽ nên không được dịch nửa ô như đèn với sao */
.song>.hoa{translate:none; will-change:transform}
.den{
  width:9%; aspect-ratio:1; border-radius:50%;
  background:radial-gradient(circle,
    rgba(255,201,120,.45) 0%, rgba(255,201,120,.2) 38%, rgba(255,201,120,0) 70%);
  animation:tho-den 4.2s ease-in-out infinite alternate;
}
@keyframes tho-den{from{opacity:1; transform:scale(1.12)}to{opacity:.3; transform:scale(.9)}}
.sao{
  width:3.4px; height:3.4px; border-radius:50%; background:#FFFDF6;
  box-shadow:0 0 5px 1.5px rgba(255,244,226,.9);
  animation:nhap-sao 2.2s ease-in-out infinite alternate;
}
/* hai tia chữ thập loé lên khi sao sáng nhất */
.sao::before,.sao::after{content:""; position:absolute; left:50%; top:50%; translate:-50% -50%;
  width:13px; height:1px; background:linear-gradient(90deg,transparent,#FFFDF6,transparent)}
.sao::after{width:1px; height:13px; background:linear-gradient(transparent,#FFFDF6,transparent)}
@keyframes nhap-sao{from{opacity:1; transform:scale(1.15)}to{opacity:.12; transform:scale(.55)}}
/* thỉnh thoảng một vệt sao băng */
.song>.sao-bang{left:46%; top:5%; width:64px; height:1.5px; opacity:0; translate:none;
  background:linear-gradient(90deg,transparent,#FFFDF6);
  animation:bang 9s ease-in 2s infinite}
@keyframes bang{
  0%{opacity:0; transform:rotate(22deg) translateX(0)}
  3%{opacity:1}
  11%,100%{opacity:0; transform:rotate(22deg) translateX(150px)}
}

/* ---------- THẺ KỶ NIỆM ---------- */
.the{
  border:0; padding:0; background:none; color:var(--giay-chu);
  /* margin:auto là thứ căn <dialog> vào giữa màn. Dòng `*{margin:0}` ở đầu file
     giết mất nó, nên phải trả lại — không thì thẻ dính lên sát đỉnh. */
  margin:auto;
  width:min(94vw,420px); max-height:94svh; overflow:visible;
  opacity:0; transform:translateY(16px) scale(.97);
  transition:opacity .22s ease, transform .3s cubic-bezier(.22,1,.36,1);
}
.the.mo{opacity:1; transform:none}
.the::backdrop{background:rgba(12,8,4,.74); backdrop-filter:blur(3px)}
/* Chừa lề quanh mép giấy xé. Không chừa thì khi nội dung dài phải cuộn, khung
   cuộn cắt phẳng mất đường rách — trên điện thoại nhìn như tờ giấy bị xén. */
.the-trong{max-height:94svh; overflow-y:auto; overscroll-behavior:contain;
  padding:14px 10px 18px; -webkit-overflow-scrolling:touch}
.dong{
  position:absolute; top:-10px; right:-6px; width:36px; height:36px; border-radius:50%;
  border:1px solid rgba(243,230,212,.3); background:rgba(36,26,18,.92); color:var(--kem);
  font-size:19px; line-height:1; cursor:pointer; z-index:3;
}
.dong:hover{background:var(--nau)}
/* thanh điều khiển lúc tự chạy — nằm dưới thẻ, trong <dialog> để bấm được */
.dieu-khien{display:flex; align-items:center; justify-content:space-between; gap:10px; margin:6px 10px 0}
.dieu-khien[hidden]{display:none}
.dieu-khien button{padding:10px 16px; border-radius:24px; border:1px solid rgba(201,139,75,.55);
  background:rgba(36,26,18,.92); color:var(--vang); font:inherit; font-size:13.5px; cursor:pointer}
.dieu-khien .dk-so{font-size:13px; color:var(--kem-mo)}
.the.tu-chay .the-trong{max-height:calc(94svh - 56px)}

/* ---------- GIẤY XÉ ---------- */
.to-chu{
  position:relative; background:var(--giay); color:var(--giay-chu);
  clip-path:url(#xe2); padding:20px 22px 24px; transform:rotate(-.7deg);
  box-shadow:0 18px 40px rgba(0,0,0,.45);
}
.to-chu .nam{font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--giay-nhan); margin-bottom:5px}
.to-chu h2{font-family:"Playfair Display",Georgia,serif; font-size:clamp(19px,5.2vw,25px);
  font-weight:500; color:var(--giay-chu); margin-bottom:11px; line-height:1.3}
.to-chu p{font-size:15px; line-height:1.62; color:var(--giay-chu2); margin-bottom:9px}
.to-chu p:last-child{margin-bottom:0}

.to-anh{position:relative; margin:-10px 14px 0 10px; transform:rotate(1.4deg)}
.to-anh .xo{position:absolute; inset:-6px -5px -7px -6px; background:var(--giay-lot);
  clip-path:url(#xe2); transform:rotate(1.5deg)}
.to-anh .khung{position:relative; clip-path:url(#xe); background:var(--giay); padding:7px 7px 9px;
  box-shadow:0 16px 36px rgba(0,0,0,.42)}
.to-anh .cua-so-anh{position:relative; width:100%; aspect-ratio:3/4; max-height:62svh; overflow:hidden;
  border-radius:2px; background:#C9A074}
.to-anh .cua-so-anh.ngang{aspect-ratio:4/3}
.to-anh .nen-mo{position:absolute; inset:-24px; background-size:cover; background-position:center;
  filter:blur(18px) brightness(.72)}
.to-anh img{position:absolute; inset:0; width:100%; height:100%; object-fit:contain}
/* chừa sẵn một dòng để thẻ không nhảy khi lật tới tấm không có chú thích */
.to-anh .chu-thich{margin:8px 6px 0; min-height:1.5em; text-align:center; font-size:13.5px; line-height:1.5;
  color:var(--giay-chu2); overflow-wrap:anywhere}
.to-anh .chua-co{position:relative; aspect-ratio:16/10; display:grid; place-items:center;
  background:#EFDFC4; color:var(--giay-nhan); font-size:12.5px; text-align:center; padding:12px}
/* position:relative để nút nằm TRÊN lớp giấy lót (.xo trùm cả vùng nút) — chữ màu sẫm vì nền là giấy */
.lat{position:relative; display:flex; align-items:center; justify-content:center; gap:7px; margin-top:4px;
  padding:7px 0; background:none; border:none; color:var(--giay-nhan); font:inherit; font-size:12px; cursor:pointer; width:100%}
.lat .nhan{opacity:.85}
/* .cham ở đây là dãy chấm chỉ số ảnh, KHÔNG phải đốm sáng trên bức vẽ — gỡ lại
   mấy thuộc tính định vị, không thì nó nhảy ra khỏi nút lật. */
.lat .cham{display:flex; gap:5px; position:static; translate:none; width:auto; height:auto; z-index:auto}
.lat .cham i{width:5px;height:5px;border-radius:50%;background:rgba(122,82,48,.35)}
.lat .cham i.on{background:var(--giay-nhan); width:14px; border-radius:3px}

/* ---------- MÀN CUỐI ---------- */
#cuoi{padding:60px 22px 110px; max-width:620px; margin:0 auto; text-align:center}
#cuoi .anh-mo-uoc{margin:0 0 34px; border-radius:16px; overflow:hidden;
  box-shadow:0 26px 70px rgba(0,0,0,.5)}
#cuoi .mo-rieng{color:var(--kem-mo); font-size:15px; margin-bottom:26px; font-style:italic}
#cuoi h2{font-size:clamp(24px,6vw,34px); font-weight:500; margin-bottom:14px}
#cuoi .mo-bai{color:var(--kem-mo); margin-bottom:34px}
.y-nghia{display:grid; gap:14px; margin-bottom:38px; text-align:left}
.y-nghia div{background:rgba(201,139,75,.09); border-left:2px solid var(--hophach); padding:16px 18px}
.y-nghia b{color:var(--vang); display:block; margin-bottom:4px; font-weight:600}
.y-nghia span{font-size:14.5px; color:#EADCC7}
.ket-lai{font-size:15.5px; color:#EADCC7; background:rgba(243,230,212,.06); padding:20px; border-radius:14px; margin-bottom:50px}

/* ---------- MỜI VUỐT XUỐNG + MỜI MỞ THƯ ---------- */
.vuot-xuong{display:flex; flex-direction:column; align-items:center; gap:7px; margin:4px auto 0; padding:8px 18px 12px;
  border:0; border-radius:22px; cursor:pointer; background:rgba(18,14,30,.62); color:var(--vang);
  font:inherit; font-size:12.5px; font-weight:600; animation:nhun-xuong 1.5s ease-in-out infinite}
.vuot-xuong[hidden]{display:none}
.vuot-xuong i,.mui-ten i{width:10px; height:10px; border-right:2.5px solid var(--vang);
  border-bottom:2.5px solid var(--vang); rotate:45deg}
@keyframes nhun-xuong{0%,100%{transform:translateY(0)}50%{transform:translateY(6px)}}
@media (max-width:700px){
  .vuot-xuong{position:absolute; z-index:3; left:50%; translate:-50% 0; margin:0; white-space:nowrap;
    bottom:calc(10px + env(safe-area-inset-bottom))}
}
.moi-thu{display:flex; flex-direction:column; align-items:center; gap:18px; margin:6px 0 20px}
.mui-ten{display:flex; flex-direction:column; align-items:center; gap:3px}
.mui-ten i{width:14px; height:14px; animation:chay-xuong 1.5s ease-in-out infinite}
.mui-ten i:nth-child(2){animation-delay:.2s}
.mui-ten i:nth-child(3){animation-delay:.4s}
@keyframes chay-xuong{0%,100%{opacity:.15}45%{opacity:1}}
.nut-thu{display:flex; flex-direction:column; align-items:center; gap:4px; width:min(100%,320px);
  padding:20px 22px 16px; border-radius:20px; cursor:pointer; font-family:inherit; font-size:16px; font-weight:700;
  border:1.5px solid rgba(255,214,150,.7); background:rgba(201,139,75,.14); color:var(--vang);
  animation:moi-bam 2s ease-in-out infinite}
.nut-thu .phong{font-size:44px; line-height:1.15; animation:lac-thu 2.6s ease-in-out infinite}
.nut-thu small{font-size:12px; font-weight:400; color:var(--kem-mo)}
@keyframes lac-thu{0%,60%,100%{transform:rotate(0)}68%{transform:rotate(-11deg)}76%{transform:rotate(9deg)}84%{transform:rotate(-6deg)}92%{transform:rotate(3deg)}}
.thu.vua-mo{animation:mo-thu .8s ease both}
@keyframes mo-thu{from{opacity:0; transform:translateY(26px)}to{opacity:1; transform:none}}

.thu{border-top:1px solid rgba(201,139,75,.24); padding-top:42px; text-align:left}
.thu h3{font-size:19px; font-weight:500; margin-bottom:22px; color:var(--vang)}
.thu p{margin-bottom:15px; font-size:16px; color:#EFE2CE; opacity:0; transform:translateY(14px);
  transition:opacity .8s ease, transform .8s ease}
.thu p.hien{opacity:1; transform:none}
.thu .ky{margin-top:26px; text-align:right; color:var(--kem-mo); font-style:italic}
.nut-chia-se{margin-top:54px; background:none; border:1px solid rgba(201,139,75,.45); color:var(--hophach);
  padding:13px 26px; border-radius:30px; font-size:14px; font-family:inherit; cursor:pointer}
.ghi-chu{margin-top:14px; font-size:12px; color:var(--kem-mo); opacity:.65}

/* ---------- GIẢM CHUYỂN ĐỘNG ----------
   Đốm sáng là đường đi của trang, nên KHÔNG được ẩn — chỉ cho đứng yên. */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition-duration:.01ms !important}
  /* Nhiều điện thoại Android tự bật chế độ này khi tiết kiệm pin, làm cả căn nhà đứng
     im. Lá, mèo, hoa, sao chỉ nhúc nhích tại chỗ rất nhẹ nên VẪN CHO CHẠY; chỉ tắt
     những thứ lướt nhanh, rung lắc. */
  .song>.sao-bang,.o-cua,.rung{animation:none !important}
  .cham .quang{animation:none !important; opacity:.5 !important; transform:scale(1) !important}
  .the{opacity:1 !important; transform:none !important}
  .thu p{opacity:1 !important; transform:none !important}
  #toi.sang{animation:none !important; opacity:0 !important}
}
}

@media (min-width:720px){
  #canh{padding-bottom:48px}
  .the{width:min(92vw,440px)}
}
