/* Thiệp Số – CSS lõi dùng chung (mẫu tự định nghĩa phần còn lại) */
html.ts-locked, html.ts-noscroll { overflow: hidden; }
html.ts-locked body, html.ts-noscroll body { overflow: hidden; }

.ts-reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.ts-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ts-reveal { opacity: 1; transform: none; transition: none; } }

/* Nút nhạc */
.ts-music-btn { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255, 255, 255, .92); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 14px 0; }
.ts-music-btn span { width: 3px; height: 6px; background: #8e1f2b; border-radius: 2px; }
.ts-music-btn.is-playing span { animation: ts-eq 1s ease-in-out infinite; }
.ts-music-btn.is-playing span:nth-child(2) { animation-delay: .2s; }
.ts-music-btn.is-playing span:nth-child(3) { animation-delay: .4s; }
@keyframes ts-eq { 0%, 100% { height: 5px; } 50% { height: 18px; } }
html.ts-locked .ts-music-btn { display: none; }

/* Thông báo */
.ts-toast { position: fixed; left: 50%; bottom: 76px; z-index: 90; transform: translate(-50%, 16px); max-width: calc(100% - 32px); background: rgba(30, 20, 20, .92); color: #fff; padding: 10px 18px; border-radius: 99px; font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; opacity: 0; pointer-events: none; transition: .3s; text-align: center; }
.ts-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Dải thông báo demo / xem trước */
.ts-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 95; background: #1f1a17; color: #fff; text-align: center; font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 7px 12px; }
.ts-banner a { color: #f6d28b; font-weight: 600; }

/* Xem ảnh lớn */
.ts-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12, 8, 8, .94); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .25s; }
.ts-lightbox.is-on { opacity: 1; pointer-events: auto; }
.ts-lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: 4px; }
.ts-lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; border-radius: 50%; width: 44px; height: 44px; font-size: 28px; line-height: 1; }
.ts-lightbox__close { top: 14px; right: 14px; }
.ts-lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.ts-lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }
.ts-lightbox__count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .7); font: 13px sans-serif; }

/* Hộp thoại */
[data-ts-modal] { position: fixed; inset: 0; z-index: 80; background: rgba(20, 12, 12, .55); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .25s; }
[data-ts-modal][hidden] { display: none; }
[data-ts-modal].is-on { opacity: 1; }
@media (min-width: 640px) { [data-ts-modal] { align-items: center; } }

/* Trang thông báo (không tìm thấy, hết hạn...) */
.ts-message { margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f8f3ec; color: #3b2a26; font: 16px/1.6 Georgia, "Times New Roman", serif; text-align: center; padding: 24px; }
.ts-message main { max-width: 420px; }
.ts-message__icon { font-size: 42px; color: #8e1f2b; }
.ts-message h1 { font-weight: 400; font-size: 28px; margin: 8px 0; }
.ts-message a { color: #8e1f2b; }
