*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font: 400 1.125rem/1.6 var(--phong-chu); color: var(--muc); background: var(--nen-ngoai); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
ol { list-style: none; padding: 0; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--nhan); outline-offset: 3px; }
.thiep:focus { outline: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.thiep { position: relative; width: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; text-align: center; box-shadow: 0 0 60px rgb(60 10 20 / .25); }
.thiep section { position: relative; padding: 56px 24px; }

.nut { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 10px 30px; border: 0; border-radius: 999px; background: var(--nut); color: var(--chu-nut); font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: 0 8px 20px rgb(90 20 30 / .22); transition: transform .2s; }
.nut:active { transform: scale(.96); }

/* Nút mở: nhịp nhẹ, vòng sáng lan ra và vệt sáng lướt qua để mời bấm. Bấm thì nhún xuống rồi bật lên. */
[data-mo] { position: relative; animation: moi-bam 2.4s ease-in-out infinite; }
[data-mo]::before, [data-mo]::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
[data-mo]::before { border: 2px solid var(--nut); animation: lan-ra 2.4s ease-out infinite; }
[data-mo]::after { background: linear-gradient(110deg, transparent 42%, rgb(255 255 255 / .5) 50%, transparent 58%) 130% 0 / 260% 100% no-repeat; animation: luot-sang 3.6s ease-in-out infinite; }
.dang-bam [data-mo] { animation: bam .45s ease-out both; }
.dang-bam [data-mo]::before { animation: lan-ra .45s ease-out both; }
.dang-bam [data-thoi] { animation: bam .45s ease-out both; }
@keyframes moi-bam { 50% { scale: 1.05; } }
@keyframes lan-ra { from { opacity: .8; } to { opacity: 0; scale: 1.28 1.7; } }
@keyframes luot-sang { 60%, to { background-position: -60% 0; } }
@keyframes bam { 35% { scale: .86; } 75% { scale: 1.1; } to { scale: 1; } }
.lop-canh { position: fixed; inset: 0; z-index: 12; width: 100%; height: 100%; pointer-events: none; }

/* Bìa chỉ hiện khi có JavaScript, để thiệp luôn đọc được */
.bia { display: none; }
.co-js .bia { display: grid; place-items: center; position: fixed; inset: 0; z-index: 10; overflow: hidden; text-align: center; padding: calc(12px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); }
.co-js:not(.da-mo), .co-js:not(.da-mo) body { overflow: hidden; height: 100%; }
.khung-bia { position: relative; display: flex; flex-direction: column; align-items: center; }

.anh-dau, .cac-anh img { aspect-ratio: 600 / 760; object-fit: cover; }

/* Album trượt. Không có mã thì vẫn vuốt ngang xem được. */
.album .cac-anh { position: relative; display: flex; gap: 0; height: auto; margin: 0 -24px; padding: 10px 19% 26px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; perspective: 900px; }
.album .cac-anh::-webkit-scrollbar { display: none; }
.o-anh { flex: 0 0 100%; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer; scroll-snap-align: center; transform: translateX(calc(var(--lech, 0) * -16%)) rotateY(calc(var(--lech, 0) * -24deg)) scale(calc(1 - var(--xa, 0) * .16)); opacity: calc(1 - var(--xa, 0) * .35); }
.album .o-anh img { position: static; width: 100%; margin: 0; border: 0; border-radius: 20px; box-shadow: 0 16px 34px rgb(60 20 20 / .26); transform: none; }
.so-anh { font-variant-numeric: tabular-nums; }
.xem-anh { width: 100vw; max-width: none; height: 100dvh; max-height: none; padding: 0; border: 0; background: rgb(20 10 12 / .94); }
.xem-anh[open] { display: grid; place-items: center; }
.xem-anh::backdrop { background: rgb(20 10 12 / .6); }
.xem-anh img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.xem-anh button { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .16); color: #fff; font: 400 2rem/1 system-ui, sans-serif; cursor: pointer; }
.xem-anh .dong { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.xem-anh .truoc, .xem-anh .sau { top: calc(50% - 24px); left: 8px; }
.xem-anh .sau { right: 8px; left: auto; }

.ban-do { display: none; }
.co-js .ban-do { display: block; height: 240px; margin: 18px 0 0; border-radius: 18px; background: rgb(128 110 90 / .14); overflow: hidden; }
.ban-do iframe { display: block; width: 100%; height: 100%; border: 0; }
p, h1, h2, h3 { overflow-wrap: anywhere; }

.khoi-ngay { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 330px; margin: 14px auto; }
.khoi-ngay p { padding: 8px 10px; line-height: 1.35; }
.khoi-ngay .so-ngay { padding: 0 20px; border: solid var(--vien); border-width: 0 1.5px; font-size: 3.75rem; line-height: 1.15; }

.nhac-lich { margin: 16px 0; }
.nhac-lich > p { font-size: 1rem; }
.nhac-lich div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.nhac-lich a { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 16px; border: 1.5px solid currentColor; border-radius: 999px; color: inherit; font-size: 1rem; font-weight: 600; line-height: 1.25; text-decoration: none; }

/* Lịch tháng, dùng chung */
.lich-thang { width: 100%; max-width: 360px; margin: 0 auto; padding: 16px 10px; border-radius: 22px; background: var(--giay, #fff); border-spacing: 0; }
caption { padding-bottom: 12px; font-size: 1.25rem; }
.lich-thang th { padding: 6px 0; font-weight: 600; }
.lich-thang td { width: 14.28%; height: 42px; }
.ngay-vui b { position: relative; display: inline-grid; place-items: center; width: 44px; height: 42px; padding-bottom: 5px; color: #fff; background: var(--nhan); clip-path: path('M22 40C8 29 1 21 1 12.500 1 6 6 1.500 12 1.500 16.500 1.500 20 4 22 8 24 4 27.500 1.500 32 1.500 38 1.500 43 6 43 12.500 43 21 36 29 22 40Z'); }
/* Hình đánh dấu khác theo chủ đề (mặc định là trái tim ở trên). */
.lich-thang[data-dau=hoa] .ngay-vui b { padding-bottom: 0; clip-path: path('M12.5 10.5a9.5 9.5 0 1 0 19.0 0a9.5 9.5 0 1 0 -19.0 0ZM22.5 17.8a9.5 9.5 0 1 0 19.0 0a9.5 9.5 0 1 0 -19.0 0ZM18.7 29.5a9.5 9.5 0 1 0 19.0 0a9.5 9.5 0 1 0 -19.0 0ZM6.3 29.5a9.5 9.5 0 1 0 19.0 0a9.5 9.5 0 1 0 -19.0 0ZM2.5 17.8a9.5 9.5 0 1 0 19.0 0a9.5 9.5 0 1 0 -19.0 0ZM11.0 21.0a11.0 11.0 0 1 0 22.0 0a11.0 11.0 0 1 0 -22.0 0Z'); }
.lich-thang[data-dau=sao] .ngay-vui b { padding: 4px 0 0; font-size: .8125rem; clip-path: path('M22.0 0.0L28.2 13.5L42.9 15.2L32.0 25.2L34.9 39.8L22.0 32.5L9.1 39.8L12.0 25.2L1.1 15.2L15.8 13.5Z'); }
.lich-thang[data-dau=may] .ngay-vui b { padding: 6px 0 0; clip-path: path('M2.0 25.0a10.0 10.0 0 1 0 20.0 0a10.0 10.0 0 1 0 -20.0 0ZM22.0 25.0a10.0 10.0 0 1 0 20.0 0a10.0 10.0 0 1 0 -20.0 0ZM9.0 17.0a13.0 13.0 0 1 0 26.0 0a13.0 13.0 0 1 0 -26.0 0ZM12.0 27.0a10.0 10.0 0 1 0 20.0 0a10.0 10.0 0 1 0 -20.0 0Z'); }
.lich-thang[data-dau=bong-bay] .ngay-vui b { padding: 0 0 6px; clip-path: path('M5.0 18.0a17.0 17.0 0 1 0 34.0 0a17.0 17.0 0 1 0 -34.0 0ZM18 35l4 6 4-6Z'); }
.lich-thang[data-dau=tron] .ngay-vui b { width: 38px; height: 38px; padding: 0; border-radius: 50%; clip-path: none; box-shadow: 0 0 0 3px var(--nen-lich, #fff), 0 0 0 5px var(--nhan); }
.lich-thang[data-dau=kim-cuong] .ngay-vui b { padding: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

.dem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 360px; margin: 28px auto 0; }
.dem p { padding: 10px 2px; border-radius: 14px; background: var(--o-dem); color: var(--chu-dem); }
.dem b { display: block; font-size: 1.625rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.dem span { font-size: .9375rem; }

.phan-hoi { display: grid; gap: 20px; margin-top: 24px; text-align: left; }
.phan-hoi .o { display: grid; gap: 6px; font-weight: 600; }
.phan-hoi input:not([type=radio]), .phan-hoi textarea { width: 100%; min-height: 50px; padding: 10px 16px; border: 1.5px solid var(--vien); border-radius: 14px; background: #fff; font-weight: 500; font-size: 1.0625rem; -webkit-appearance: none; appearance: none; }
.phan-hoi textarea { resize: vertical; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0 0 6px; font-weight: 600; }
.hang { display: flex; gap: 8px; }
.chon { position: relative; flex: 1; }
.chon input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.chon span { display: grid; place-items: center; min-height: 50px; padding: 4px; border: 1.5px solid var(--vien); border-radius: 14px; background: #fff; font-size: 1rem; line-height: 1.25; text-align: center; }
.chon input:checked + span { border-color: var(--nhan); background: var(--nhan); color: #fff; font-weight: 600; }
.chon input:focus-visible + span { outline: 3px solid var(--nhan); outline-offset: 2px; }
.ket-qua:empty { display: none; }

.nguoi-khac, .chep-tk { justify-self: center; min-height: 46px; padding: 8px 20px; border: 1.5px solid var(--vien); border-radius: 999px; background: #fff; font-weight: 600; cursor: pointer; }

.so-loi-chuc ul { display: grid; gap: 12px; padding: 0; list-style: none; }
.so-loi-chuc li { padding: 16px 18px; border-radius: 18px; background: #fff; text-align: left; }
.nguoi-chuc { margin-top: 6px; color: var(--nhan); font-weight: 600; }

.thiep .tai-khoan { max-width: 360px; margin: 10px auto 0; text-align: center; }
.tai-khoan[open] { padding-bottom: 20px; }
.tai-khoan p { padding: 0 18px; }
.anh-qr { width: min(300px, 100% - 24px); margin: 0 auto 12px; border-radius: 12px; }
a.chep-tk { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.ma-qr { width: min(260px, 100% - 24px); margin: 0 auto 12px; }
.so-tk { font-size: 1.375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tai-khoan .nhac-tk { margin: 10px 0 14px; font-size: 1rem; }
.hinh-qua { display: block; width: min(190px, 60%); height: auto; margin: 0 auto 10px; }
.qr-mau { display: grid; place-items: center; width: min(200px, 100% - 24px); aspect-ratio: 1; margin: 14px auto 0; border: 2px dashed currentColor; border-radius: 14px; font-size: 1.5rem; font-weight: 700; letter-spacing: .2em; opacity: .55; }

details { margin-top: 10px; border-radius: 16px; background: #fff; text-align: left; }
summary { min-height: 50px; padding: 12px 18px; font-weight: 600; cursor: pointer; }
details p { padding: 0 18px 16px; }

.ghi-cong { max-width: 480px; margin: 0 auto; padding: 18px 76px 24px 20px; background: #fffaf5; color: #40262a; font-size: .875rem; line-height: 1.5; }
.ghi-cong a { color: inherit; }
.xem-tiep { display: grid; justify-items: center; gap: 4px; max-width: 480px; margin: 0 auto; padding: 24px 16px 90px; background: #fffaf5; color: #40262a; text-align: center; }
.xem-tiep a:not(.nut) { padding: 10px; color: #a51a2b; }

.nut-cuon { position: fixed; z-index: 6; right: max(14px, calc(50vw - 226px)); bottom: calc(72px + env(safe-area-inset-bottom)); width: 48px; height: 48px; padding: 12px; border: 2px solid #fff; border-radius: 50%; background: var(--nhan); cursor: pointer; box-shadow: 0 6px 16px rgb(90 20 30 / .3); }
.nut-cuon path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nut-cuon[aria-pressed=false] .dung, .nut-cuon[aria-pressed=true] .chay { display: none; }

.nut-nhac { position: fixed; z-index: 6; right: max(14px, calc(50vw - 226px)); bottom: calc(14px + env(safe-area-inset-bottom)); width: 48px; height: 48px; padding: 11px; border: 2px solid #fff; border-radius: 50%; background: var(--nhan); color: #fff; cursor: pointer; box-shadow: 0 6px 16px rgb(90 20 30 / .3); }
.nut-nhac svg { fill: currentColor; }
.nut-nhac[aria-pressed=true] { animation: nhip 1.8s ease-in-out infinite; }
@keyframes nhip { 50% { transform: scale(1.08); } }

.canh-hoa { position: fixed; inset: 0; z-index: 11; overflow: hidden; pointer-events: none; transition: opacity 2.5s; }
.canh-hoa.tan { opacity: 0; }
.canh-hoa i { position: absolute; top: -24px; width: 13px; height: 17px; border-radius: 80% 10% 70% 30%; background: var(--canh); opacity: .6; animation: roi linear infinite; }
[data-roi=canh] .canh-hoa i { border-radius: 80% 10% 70% 30%; }
[data-roi=la] .canh-hoa i { border-radius: 0 100% 0 100%; }
[data-roi=sao] .canh-hoa i { width: 16px; height: 16px; border-radius: 0; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
[data-roi=cham] .canh-hoa i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 8px var(--canh); }
[data-roi=giay] .canh-hoa i { width: 9px; height: 16px; border-radius: 2px; }
[data-roi=giay] .canh-hoa i:nth-child(3n) { background: var(--nhan); }
[data-roi=giay] .canh-hoa i:nth-child(3n + 1) { background: var(--vien); }
@keyframes roi { 50% { transform: translate(34px, 52vh) rotate(200deg); } to { transform: translate(-18px, 106vh) rotate(400deg); } }

@media (prefers-reduced-motion: no-preference) {
  .co-js .hien > * { opacity: 0; transform: translateY(22px); transition: opacity .9s, transform .9s cubic-bezier(.2, .7, .2, 1); }
  .co-js .hien > :nth-child(2) { transition-delay: 100ms; }
  .co-js .hien > :nth-child(n + 3) { transition-delay: 200ms; }
  .co-js .hien > h2 { transform: scale(.88); }
  .co-js .hien > .to, .co-js .hien > .the, .co-js .hien > .to-thiep { transform: translateY(36px) scale(.96); }
  .co-js .hien.thay > * { opacity: 1; transform: none; }
  .co-js .lich.hien li, .co-js .chuyen.hien .moc { opacity: 0; translate: -28px 0; transition: opacity .8s, translate .8s cubic-bezier(.2, .7, .2, 1); }
  .co-js .lich.hien li:nth-child(even), .co-js .chuyen.hien .moc:nth-child(odd) { translate: 28px 0; }
  .co-js .lich.hien li:nth-child(2) { transition-delay: .15s; }
  .co-js .lich.hien li:nth-child(n + 3) { transition-delay: .3s; }
  .co-js .lich.hien.thay li, .co-js .chuyen.hien.thay .moc { opacity: 1; translate: 0; }
  .ngay-vui b { animation: tim-dap 1.6s ease-in-out infinite; }
  @keyframes tim-dap { 15% { scale: 1.14; } 30% { scale: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Album: 5 kiểu ---------- */
.album .cac-anh[data-kieu=mo], .album .cac-anh[data-kieu=chong] { display: grid; margin: 0; padding: 10px 12% 30px; overflow: visible; scroll-snap-type: none; perspective: none; touch-action: pan-y; }
.cac-anh[data-kieu=mo] .o-anh, .cac-anh[data-kieu=chong] .o-anh { grid-area: 1 / 1; }
/* Mờ dần, ảnh đang hiện phóng to rất chậm */
.cac-anh[data-kieu=mo] .o-anh { overflow: hidden; border-radius: 20px; box-shadow: 0 16px 34px rgb(60 20 20 / .26); opacity: 0; transform: none; transition: opacity 1.2s ease; }
.cac-anh[data-kieu=mo] .o-anh img { box-shadow: none; }
.cac-anh[data-kieu=mo] .o-anh.dang-hien { z-index: 1; opacity: 1; }
.cac-anh[data-kieu=mo] .o-anh.dang-hien img { animation: phong-cham 8s ease-out both; }
@keyframes phong-cham { to { transform: scale(1.08); } }
/* Chồng ảnh: ảnh trên cùng bay ra rồi xuống dưới cùng */
.cac-anh[data-kieu=chong] .o-anh { z-index: calc(20 - var(--thu, 0)); opacity: 1; transform: translateY(calc(var(--thu, 0) * 12px)) rotate(calc(var(--thu, 0) * 3deg - 3deg)) scale(calc(1 - var(--thu, 0) * .05)); transition: transform .65s ease, opacity .65s ease; }
.cac-anh[data-kieu=chong] .o-anh.xa { opacity: 0; }
.cac-anh[data-kieu=chong] .o-anh.bay { z-index: 30; opacity: 0; transform: translateX(120%) rotate(16deg); }
/* Dải phim chạy ngang, nghiêng nhẹ xen kẽ */
.album.co-phim { overflow: hidden; }
.album .cac-anh[data-kieu=phim] { display: flex; gap: 0; width: max-content; margin: 0; padding: 14px 0 30px; overflow: visible; scroll-snap-type: none; perspective: none; animation: chay-phim calc(var(--so, 4) * 7s) linear infinite; }
.cac-anh[data-kieu=phim] .o-anh { flex: 0 0 auto; width: min(56vw, 240px); margin-right: 16px; opacity: 1; transform: rotate(-2deg); }
.cac-anh[data-kieu=phim] .o-anh:nth-child(even) { transform: rotate(2deg) translateY(10px); }
.cac-anh[data-kieu=phim]:focus-within { animation-play-state: paused; }
@media (hover: hover) { .cac-anh[data-kieu=phim]:hover { animation-play-state: paused; } }
@keyframes chay-phim { to { transform: translateX(-50%); } }
/* Lưới: một ảnh lớn, các ảnh nhỏ bên dưới, lần lượt đổi chỗ */
.album .cac-anh[data-kieu=luoi] { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 6px 0 24px; overflow: visible; scroll-snap-type: none; perspective: none; transition: opacity .45s ease; }
.cac-anh[data-kieu=luoi] .o-anh { opacity: 1; transform: none; }
.cac-anh[data-kieu=luoi] .o-anh:first-child { grid-column: 1 / -1; }
.cac-anh[data-kieu=luoi] .o-anh:first-child img { aspect-ratio: 4 / 3; }
.album .cac-anh[data-kieu=luoi] .o-anh img { border-radius: 14px; box-shadow: 0 8px 20px rgb(60 20 20 / .2); }
.cac-anh[data-kieu=luoi].doi { opacity: .2; }
.cac-anh[data-kieu=phim] + .so-anh, .cac-anh[data-kieu=luoi] + .so-anh { display: none; }
@media (prefers-reduced-motion: reduce) {
  .album .cac-anh[data-kieu=phim] { width: auto; overflow-x: auto; animation: none; }
  .cac-anh .ban-sao { display: none; }
  .cac-anh[data-kieu=mo] .o-anh.dang-hien img { animation: none; }
  .cac-anh[data-kieu=mo] .o-anh, .cac-anh[data-kieu=chong] .o-anh { transition: none; }
}
