/* Phông có sẵn trên máy, chỉnh cho rộng gần bằng phông chính để chữ không nhảy dòng khi phông chính tải xong. */
@font-face { font-family: 'Be Tam'; src: local('Arial'), local('ArialMT'); font-weight: 400 500; size-adjust: 107.5%; }
@font-face { font-family: 'Be Tam'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 600 700; size-adjust: 102.6%; }
@font-face { font-family: 'Garamond Tam'; src: local('Times New Roman Bold'), local('TimesNewRomanPS-BoldMT'); font-weight: 600 700; size-adjust: 95.2%; }
:root { --muc: #40262a; --phu: #6f5256; --nhan: #a51a2b; --nen: #fffaf5; --vien: #e2cdc6; }
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--nen); color: var(--muc); font: 400 1.0625rem/1.6 'Be Vietnam Pro', 'Be Tam', system-ui, sans-serif; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--nhan); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--nhan); outline-offset: 3px; }
h1, h2 { font-family: 'EB Garamond', 'Garamond Tam', Georgia, serif; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 9vw, 4.25rem); line-height: 1.12; }
h2 { margin-bottom: 24px; font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.2; }
h3 { margin-bottom: 4px; font-size: 1.1875rem; font-weight: 600; line-height: 1.4; }
p { text-wrap: pretty; }

.nut { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 10px 24px; border: 1.5px solid var(--nhan); border-radius: 999px; background: var(--nhan); color: #fff; font-weight: 600; text-decoration: none; }
.nut.phu { background: none; color: var(--nhan); }
.nut.nho { min-height: 44px; padding: 8px 18px; }
.hang { display: flex; flex-wrap: wrap; gap: 10px; }

.dau-trang { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1120px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
.ten-trang { flex: none; }
.ten-trang img { width: 148px; }
.dau-trang nav a { white-space: nowrap; }
@media (max-width: 429px) { .ten-trang img { width: 128px; } header.dau-trang nav { gap: 6px; } .dau-trang .nut-tim, .dau-trang .nut-menu { width: 40px; height: 40px; } .dau-trang .nut.nho { padding-inline: 14px; } }
@media (max-width: 359px) { .dau-trang { gap: 8px; padding-inline: 12px; } .ten-trang img { width: 100px; } header.dau-trang nav { gap: 2px; } .dau-trang .nut.nho { padding-inline: 8px; font-size: .9375rem; } .dau-trang .nut-tim, .dau-trang .nut-menu { width: 36px; height: 40px; } }
.dau-trang nav { display: flex; align-items: center; gap: 14px; }
.dau-trang nav a:not(.nut) { padding: 10px 0; color: var(--muc); font-weight: 500; text-decoration: none; }
/* Menu chính 2 cấp. Máy tính: một hàng, rê chuột vào mục thì gạch chân chạy ra từ giữa,
   mục có con thì hộp mục con trượt xuống. Điện thoại: gấp vào nút ba gạch, bấm mũi tên để xổ mục con. */
.dau-trang { position: relative; z-index: 40; }
.menu-chinh, .menu-con { margin: 0; padding: 0; list-style: none; }
.menu-chinh { display: flex; align-items: center; gap: 6px; }
.menu-chinh > li { position: relative; display: flex; align-items: center; }
.dau-trang .menu-chinh > li > a { position: relative; padding: 10px 10px !important; border-radius: 10px; transition: color .2s ease; }
.menu-chinh > li > a::after { content: ""; position: absolute; right: 10px; bottom: 4px; left: 10px; height: 2px; border-radius: 2px; background: var(--nhan); transform: scaleX(0); transition: transform .25s ease; }
.menu-chinh > li:hover > a, .menu-chinh > li:focus-within > a { color: var(--nhan); }
.menu-chinh > li:hover > a::after, .menu-chinh > li:focus-within > a::after { transform: scaleX(1); }
.mo-con { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: -6px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muc); cursor: pointer; }
.mo-con svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.menu-con a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--muc); font-weight: 500; text-decoration: none; transition: background .2s ease, color .2s ease, padding .2s ease; }
.menu-con a:hover, .menu-con a:focus-visible { background: rgb(138 18 32 / .07); color: var(--nhan); padding-left: 20px; }
.nut-menu { display: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muc); cursor: pointer; }
.nut-menu svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (min-width: 900px) {
  .menu-con { position: absolute; top: 100%; left: 0; z-index: 60; min-width: 240px; padding: 8px; border-radius: 16px; background: #fffaf5; box-shadow: 0 18px 40px rgb(60 10 20 / .16); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
  .menu-con::before { content: ""; position: absolute; right: 0; bottom: 100%; left: 0; height: 10px; } /* cầu nối để chuột đi xuống không bị mất hộp */
  .co-con:hover .menu-con, .co-con:focus-within .menu-con, .co-con.mo .menu-con { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .co-con:hover .mo-con svg, .co-con.mo .mo-con svg { transform: rotate(180deg); }
}
@media (max-width: 899px) {
  .nut-menu { display: inline-grid; place-items: center; }
  .menu-chinh { position: absolute; top: 100%; right: 12px; left: 12px; z-index: 50; display: none; flex-direction: column; align-items: stretch; gap: 0; max-height: calc(100dvh - 90px); overflow-y: auto; padding: 8px; border-radius: 18px; background: #fffaf5; box-shadow: 0 18px 40px rgb(60 10 20 / .18); }
  .dau-trang.mo-menu .menu-chinh { display: flex; animation: menu-mo .22s ease; }
  .menu-chinh > li { flex-wrap: wrap; }
  .dau-trang .menu-chinh > li > a { flex: 1; padding: 14px 16px !important; }
  .menu-chinh > li > a::after { display: none; }
  .menu-chinh > li > a:hover { background: rgb(138 18 32 / .07); }
  .mo-con { width: 44px; height: 44px; margin: 0; }
  .co-con.mo .mo-con svg { transform: rotate(180deg); }
  .menu-con { display: none; flex-basis: 100%; padding: 0 0 6px 12px; }
  .co-con.mo .menu-con { display: block; }
}
@keyframes menu-mo { from { opacity: 0; transform: translateY(-6px); } }


main { overflow-x: clip; } /* ảnh nghiêng ở đầu trang không làm trang rộng thêm */
main > section { max-width: 1120px; margin: 0 auto; padding: 48px 16px; }
.mo-dau { display: grid; gap: 36px; align-items: center; }
main > .mo-dau { padding-top: 24px; }
.mo-dau p { max-width: 34em; margin: 16px 0 24px; font-size: 1.1875rem; }
.quat { position: relative; display: flex; justify-content: center; padding: 14px 0 18px; }
.quat img { width: 40%; max-width: 230px; border-radius: 22px; box-shadow: 0 16px 36px rgb(80 20 30 / .22); }
.quat img:nth-child(1) { margin-right: -10%; rotate: -7deg; }
.quat img:nth-child(2) { z-index: 1; }
.quat img:nth-child(3) { margin-left: -10%; rotate: 7deg; }
.mot-bia { justify-self: center; width: min(64vw, 290px); }
.mot-bia img { border-radius: 28px; box-shadow: 0 16px 36px rgb(80 20 30 / .22); }

.cac-dip { display: grid; gap: 28px; }
.cac-dip article { display: grid; grid-template-columns: 116px 1fr; gap: 18px; align-items: center; min-width: 0; }
.cac-dip img { border-radius: 16px; box-shadow: 0 8px 20px rgb(80 20 30 / .16); }
.cac-dip h3 { font-size: 1.3125rem; }
.cac-dip h3 a { color: var(--muc); text-decoration: none; }
.cac-dip div a { display: inline-block; padding: 8px 0; }

/* Trang chủ: tab chủ đề và danh sách thiệp. Chưa có mã chạy thì hiện mọi danh sách, không hiện tab. */
.cac-tab { display: none; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.co-js .cac-tab { display: flex; }
.cac-tab button { min-height: 46px; padding: 8px 18px; border: 1.5px solid var(--vien); border-radius: 999px; background: #fff; color: var(--muc); font: inherit; font-weight: 500; cursor: pointer; }
.cac-tab [aria-selected=true] { border-color: var(--nhan); background: var(--nhan); color: #fff; }
.co-js .bang:not(.dang-chon) { display: none; }
.bang + .bang { margin-top: 36px; }
.co-js .bang + .bang { margin-top: 0; }
.bang h3 { margin-bottom: 14px; font-size: 1.3125rem; }
.co-js .bang h3 { display: none; }
.bang > p { margin-top: 22px; }
.bang > p a { display: inline-block; padding: 8px 0; }
.cac-mau { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 14px; }
.the-mau[hidden] { display: none; }
.the-mau { display: grid; align-content: start; gap: 4px; min-width: 0; color: var(--muc); text-decoration: none; }
.the-mau b { margin-top: 8px; font-size: 1.1875rem; font-weight: 600; }
.the-mau > span:last-child { color: var(--phu); font-size: .9375rem; line-height: 1.5; }
.khung-cuon { display: block; aspect-ratio: 1 / 1.75; border-radius: 18px; background: #f8ece6; box-shadow: 0 10px 24px rgb(80 20 30 / .18); overflow: hidden; }
.khung-cuon img { width: 100%; }

main > .nen-do { max-width: none; padding-inline: max(16px, 50vw - 544px); background: #8a1220; color: #fff1dc; }
.ba-cot, .hai-cot, .loi-moi { display: grid; gap: 26px; }
.doan { max-width: 40em; font-size: 1.1875rem; }
.cac-buoc { display: grid; gap: 24px; margin-bottom: 20px; padding: 0; list-style: none; counter-reset: buoc; }
.cac-buoc li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; counter-increment: buoc; }
.cac-buoc li::before { content: counter(buoc); grid-row: span 2; color: var(--nhan); font: 600 2.75rem/1 'EB Garamond', 'Garamond Tam', Georgia, serif; font-variant-numeric: lining-nums; }
.cac-buoc h2 { margin-bottom: 4px; font: 600 1.1875rem/1.4 'Be Vietnam Pro', 'Be Tam', system-ui, sans-serif; }
blockquote { padding: 22px; border-radius: 22px; background: #f8ece6; font: 600 1.375rem/1.4 'EB Garamond', 'Garamond Tam', Georgia, serif; text-wrap: pretty; }
main > .moi-tao { padding-bottom: 72px; }
.moi-tao h2 { margin-bottom: 8px; }
.moi-tao p { margin-bottom: 20px; }

main > .bai { max-width: 760px; }
main > .bai + .bai { padding-top: 0; }
.bai h1 { margin-bottom: 20px; font-size: clamp(2.25rem, 8vw, 3.25rem); }
.bai > h2 { margin: 32px 0 10px; font-size: 1.75rem; }
.bai > p, .bai > div { margin-bottom: 18px; }

/* Chân trang: giới thiệu, 2 nhóm liên kết, dòng Copyright và nút nhắn tin */
.cuoi-trang { padding: 36px 16px calc(24px + env(safe-area-inset-bottom)); background: #f8ece6; color: var(--muc); }
.chan-tren, .chan-duoi { max-width: 1088px; margin: 0 auto; }
.chan-tren { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; padding-bottom: 24px; }
.chan-gioi-thieu { grid-column: 1 / -1; }
.chan-gioi-thieu img { display: block; height: 40px; width: auto; margin-bottom: 8px; }
.chan-gioi-thieu p { max-width: 34ch; }
.cuoi-trang nav { display: grid; align-content: start; }
.chan-nhom { margin-bottom: 4px; font-weight: 600; }
.cuoi-trang nav a { padding: 7px 0; color: var(--muc); text-decoration: none; }
.cuoi-trang nav a:hover { text-decoration: underline; }
.chan-duoi { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 20px; border-top: 1px solid rgb(90 30 30 / .12); font-size: .9375rem; }
.nhan-tin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
/* Điện thoại: nút nhắn tin lên trước, chữ "Cần hỗ trợ" một dòng riêng, 2 nút nằm cạnh nhau */
@media (max-width: 759px) { .nhan-tin { order: -1; } .nhan-tin span { flex-basis: 100%; } }
.nut-nhan { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid rgb(90 30 30 / .14); border-radius: 999px; background: #fff; color: var(--muc); font-weight: 600; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.nut-nhan svg { width: 20px; height: 20px; fill: currentColor; }
.nut-nhan.zalo svg { color: #0068ff; }
.nut-nhan.telegram svg { color: #229ed9; }
@media (hover: hover) { .nut-nhan:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgb(80 20 30 / .12); } }

@media (min-width: 760px) {
  main > section { padding-block: 72px; }
  .mo-dau { grid-template-columns: 1.05fr 1fr; gap: 48px; }
  main > .mo-dau { padding-top: 40px; }
  .cac-dip { grid-template-columns: repeat(5, 1fr); gap: 20px; }
  .cac-dip article { grid-template-columns: 1fr; align-content: start; }
  .cac-mau { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .ba-cot { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .hai-cot, .cac-buoc { grid-template-columns: 1fr 1fr; gap: 32px 48px; }
  .bai .cac-buoc { grid-template-columns: 1fr; }
  .loi-moi { grid-template-columns: repeat(3, 1fr); }
  .chan-tren { grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
  .chan-gioi-thieu { grid-column: auto; }
}

/* Bảng giá theo từng thiệp */
.bang-gia-dau h1 { margin-bottom: 14px; }
.diem-nhan { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 28px; padding: 0; list-style: none; }
.diem-nhan li { padding: 6px 14px; border-radius: 999px; background: #f8ece6; font-size: .9375rem; font-weight: 500; }
.hai-gia { display: grid; gap: 18px; align-items: start; }
.o-gia { display: grid; gap: 12px; padding: 24px; border: 1.5px solid var(--vien); border-radius: 26px; background: #fff; }
.o-gia.chinh { border-color: var(--nhan); box-shadow: 0 16px 36px rgb(80 20 30 / .12); }
.o-gia h2 { margin: 0; font-size: 1.625rem; }
.so-tien { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.so-tien b { color: var(--nhan); font-size: clamp(2.25rem, 9vw, 3rem); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.giam { padding: 2px 10px; border-radius: 999px; background: #e6f1e4; color: #245a2c; font-weight: 600; }
.giam:empty { display: none; }
.goi-y { color: var(--phu); font-size: .9375rem; }
.co-gi { display: grid; gap: 8px; margin: 4px 0 8px; padding: 0; list-style: none; }
.co-gi li { padding-left: 28px; background: no-repeat 0 .3em / 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23a51a2b'/%3E%3Cpath d='m6 10.5 2.6 2.6L14 7.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.bang-cuon { overflow-x: auto; border: 1.5px solid var(--vien); border-radius: 20px; background: #fff; }
.so-sanh { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.so-sanh th, .so-sanh td { padding: 12px 8px; border-bottom: 1px solid #f0e3dd; text-align: center; }
.so-sanh th[scope=row], .so-sanh thead th:first-child { text-align: left; font-weight: 500; }
.so-sanh thead th { background: #f8ece6; font-weight: 600; }
.so-sanh thead th:last-child { color: var(--nhan); }
.so-sanh tr:last-child > * { border-bottom: 0; }
.so-sanh .co { color: #2f7a3e; font-weight: 700; }
.so-sanh .khong { color: var(--phu); }
@media (min-width: 760px) { .cac-buoc.ba-buoc { grid-template-columns: repeat(3, 1fr); } .hai-gia { grid-template-columns: 1.15fr 1fr; gap: 24px; } .so-sanh { font-size: 1rem; } .so-sanh th, .so-sanh td { padding: 14px 18px; } }
.nhan-phi { position: absolute; top: 10px; left: 10px; padding: 2px 10px; border-radius: 999px; background: #f0cf7d; color: #40262a; font-size: .875rem; font-weight: 600; }
.khung-cuon { position: relative; }
#hop-nang-cap { width: min(420px, calc(100vw - 32px)); height: max-content; margin: auto; padding: 24px; border: 0; border-radius: 24px; background: #fffaf5; color: #40262a; }
#hop-nang-cap[open] { display: grid; gap: 12px; }
#hop-nang-cap::backdrop { background: rgb(40 12 18 / .55); }
#hop-nang-cap div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
#hop-nang-cap button { min-height: 50px; border: 1.5px solid var(--vien); border-radius: 999px; background: #fff; color: inherit; font: inherit; }

/* Ảnh minh hoạ trên trang chủ */
.kem-anh { display: grid; gap: 28px; align-items: center; }
.kem-anh > img, .moi-tao > img { width: 100%; border-radius: 26px; object-fit: cover; }
.kem-anh > img { aspect-ratio: 4 / 3; }
.kem-anh .cac-buoc { grid-template-columns: 1fr; margin: 0; }
.ds-dung { display: grid; gap: 22px; }
.moi-tao > img { aspect-ratio: 16 / 7; margin-bottom: 28px; }
@media (min-width: 760px) {
  .kem-anh { grid-template-columns: 1.1fr 1fr; gap: 56px; }
  .kem-anh.nguoc > img { order: 1; aspect-ratio: 4 / 5; max-height: 560px; }
}

/* Trang chi tiết mẫu */
.chi-tiet { display: grid; gap: 22px; }
main > .chi-tiet { padding-top: 16px; }
.thong-tin { display: grid; align-content: start; gap: 10px; min-width: 0; }
.thong-tin h1 { font-size: clamp(2.25rem, 8vw, 3.5rem); }
.thong-tin > p:first-child a { display: inline-block; padding: 8px 0; }
.gia-mau { justify-self: start; min-height: 32px; padding: 3px 14px; border-radius: 999px; background: #e6f1e4; color: #245a2c; font-weight: 600; }
.gia-mau:empty { visibility: hidden; }
.gia-mau.tra-phi { background: #f0cf7d; color: #40262a; }
.chuyen-mau { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chi-tiet [hidden] { display: none; }
.demo-mau { display: grid; gap: 12px; min-width: 0; }
.chon-may { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chon-may button { min-width: 0; min-height: 52px; padding: 4px; border: 1.5px solid var(--vien); border-radius: 16px; background: #fff; color: var(--muc); font: inherit; font-size: .875rem; font-weight: 500; line-height: 1.25; cursor: pointer; }
.chon-may [aria-pressed=true] { border-color: var(--nhan); background: var(--nhan); color: #fff; }
/* Khung máy tự co theo chỗ trống và giữ đúng tỉ lệ màn hình. Chừa hai bên để khách vuốt cuộn trang. */
.san { display: grid; place-items: center; --cao: max(420px, 72svh); }
.khung-may { --w: 390; --h: 844; width: min(100%, var(--w) * 1px, var(--cao) * var(--w) / var(--h)); border: 8px solid #2b1b1e; border-radius: 34px; background: #2b1b1e; box-shadow: 0 18px 40px rgb(80 20 30 / .24); overflow: hidden; }
.khung-may[data-loai=laptop], .khung-may[data-loai=man-hinh-lon] { border-radius: 16px; }
.man { position: relative; aspect-ratio: var(--w) / var(--h); border-radius: inherit; background: #f8ece6; overflow: hidden; }
.bia-demo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.man iframe { position: absolute; top: 0; left: 0; width: calc(var(--w) * 1px); height: calc(var(--h) * 1px); border: 0; transform: scale(var(--ti-le)); transform-origin: 0 0; }
.co-man { min-height: 1.6em; color: var(--phu); font-size: .9375rem; text-align: center; }
.viec-demo { justify-content: center; }
@media (max-width: 480px) { .viec-demo { display: grid; grid-template-columns: 1fr 1fr; } .viec-demo .nut { padding-inline: 6px; font-size: .9375rem; } }
.viec-demo button { font: inherit; font-weight: 600; cursor: pointer; }
.viec-demo button:disabled { opacity: .5; cursor: default; }
@media (max-width: 759px) {
  .thanh-dung { position: fixed; z-index: 5; inset: auto 0 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--vien); background: var(--nen); }
  .thanh-dung .nut { width: 100%; }
  body:has(.chi-tiet) .cuoi-trang { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
}
@media (min-width: 760px) {
  main > .chi-tiet { grid-template-columns: minmax(220px, 290px) minmax(0, 1fr); gap: 40px; padding-top: 24px; }
  .thong-tin { gap: 14px; padding-top: 12px; }
  .san { min-height: var(--cao); }
  .thanh-dung .nut { width: 100%; }
}

/* Video hướng dẫn trên trang chủ: video dọc, các dòng hướng dẫn bên cạnh. */
.video-hd-hai { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: 14px; align-items: start; }
.video-hd-khung { display: grid; gap: 8px; }
.man-video { position: relative; aspect-ratio: 9 / 16; border-radius: 20px; background: #f8ece6; box-shadow: 0 14px 30px rgb(80 20 30 / .2); overflow: hidden; cursor: pointer; }
.bia-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.man-video.da-tai .bia-video { display: none; }
.man-video iframe { position: absolute; top: 0; left: 0; width: 1080px; height: 1920px; border: 0; transform: scale(var(--ti-le, .3)); transform-origin: 0 0; pointer-events: none; }
.phat-video { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border: 0; border-radius: 50%; background: rgb(165 26 43 / .92); box-shadow: 0 6px 18px rgb(0 0 0 / .25); cursor: pointer; }
.phat-video::before, .nut-video::before { content: ''; display: block; margin: auto; width: 0; height: 0; border-block: 12px solid transparent; border-left: 20px solid #fff; translate: 3px 0; }
.man-video.dang-phat .phat-video { display: none; }
.dieu-khien { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 6px; }
.nut-video { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--nhan); cursor: pointer; }
.nut-video::before { border-block-width: 8px; border-left-width: 13px; translate: 2px 0; }
.man-video.dang-phat + .dieu-khien .nut-video::before { width: 12px; height: 14px; border: 0; border-inline: 4px solid #fff; translate: 0; }
.dieu-khien input { width: 100%; min-width: 0; height: 44px; accent-color: var(--nhan); }
#gio-video { display: none; color: var(--phu); font-size: .875rem; font-variant-numeric: tabular-nums; }
.dieu-khien, .phat-video { visibility: hidden; }
.co-js .dieu-khien, .co-js .phat-video { visibility: visible; }
.cac-doan { display: grid; gap: 6px; padding: 0; list-style: none; }
.cac-doan button { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; width: 100%; min-height: 44px; padding: 8px 10px; border: 1.5px solid var(--vien); border-radius: 14px; background: #fff; color: var(--muc); font: inherit; text-align: left; cursor: pointer; }
.cac-doan .moc { color: var(--nhan); font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.6; }
.cac-doan b { font-size: .9375rem; font-weight: 600; line-height: 1.35; }
.cac-doan button > span:last-child { display: none; grid-column: 2; color: var(--phu); font-size: .9375rem; line-height: 1.45; }
.cac-doan [aria-current] { border-color: var(--nhan); background: #fbeeea; }
@media (min-width: 760px) {
  .video-hd-hai { grid-template-columns: 340px minmax(0, 1fr); gap: 40px; }
  .dieu-khien { grid-template-columns: 44px 1fr auto; }
  #gio-video { display: inline; }
  .cac-doan { gap: 10px; }
  .cac-doan button { padding: 12px 16px; }
  .cac-doan b { font-size: 1.0625rem; }
  .cac-doan button > span:last-child { display: block; }
}

/* Phân trang danh sách mẫu. Khi đã chạy mã, trang đầu chỉ hiện 20 mẫu để không bị nhảy. */
.ngoai-trang { display: none !important; }
.co-js .cac-mau:not(.da-chia) > :nth-child(n+21) { display: none; }
.phan-trang { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 24px; }
.phan-trang[hidden] { display: none; }
.phan-trang button { min-width: 46px; min-height: 46px; padding: 0 12px; border: 1.5px solid var(--vien); border-radius: 999px; background: #fff; color: var(--muc); font: inherit; font-weight: 600; cursor: pointer; }
.phan-trang [aria-current=page] { border-color: var(--nhan); background: var(--nhan); color: #fff; }
.phan-trang button:disabled { opacity: .4; cursor: default; }


/* ---------- Trang chủ làm mới ---------- */
/* Đầu trang đỏ son, hoạ tiết mây cát tường vàng mờ, cánh hoa rơi. */
main > .dau-do { position: relative; max-width: none; margin: 0; padding: 40px max(16px, 50vw - 544px) 56px; overflow: hidden; background: #8a1220 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='120' viewBox='0 0 160 120'%3E%3Cg fill='none' stroke='%23f0c96a' stroke-width='2' stroke-linecap='round' opacity='.16'%3E%3Cpath d='M18 64c0-12 10-22 22-22s22 10 22 22c0 7-6 12-12 12s-12-5-12-12c0-4 3-7 7-7'/%3E%3Cpath d='M62 64c6-8 18-9 26-2M88 62c4-10 17-13 25-6 6 5 6 14 0 18-4 3-10 2-12-2'/%3E%3Cpath d='M98 18c0-8 7-14 15-14s15 6 15 14c0 5-4 8-8 8s-8-3-8-8c0-2 2-4 4-4M128 18c4-5 12-6 17-1'/%3E%3Cpath d='M20 108c3-6 11-8 17-4M37 104c3-7 12-9 18-4 4 4 4 10 0 13-3 2-7 1-8-2'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 160px 120px; color: #fff1dc; isolation: isolate; }
.dau-do h1 { color: #fffaf0; font-size: clamp(2.75rem, 11vw, 4.5rem); line-height: 1.04; letter-spacing: -.015em; }
.dau-do p { color: #ffe9cf; }
.dau-do .nut { border-color: #f6cf6c; background: #f6cf6c; color: #5a1018; }
.dau-do .nut.phu { border-color: #ffe2b0; background: none; color: #fff1dc; }
.dau-do .chu-dau > * { animation: len-dau .8s cubic-bezier(.2,.7,.2,1) backwards; }
.dau-do .chu-dau > :nth-child(2) { animation-delay: .12s; }
.dau-do .chu-dau > :nth-child(3) { animation-delay: .24s; }
@keyframes len-dau { from { opacity: 0; translate: 0 24px; } }
/* Ba tấm thiệp xoè ra khi trang mở rồi bay bồng bềnh. */
.dau-do .quat img { box-shadow: 0 22px 44px rgb(30 0 6 / .45); animation: xoe 1.1s cubic-bezier(.2,.8,.2,1) .2s backwards, bong 6s ease-in-out 1.4s infinite alternate; }
.dau-do .quat img:nth-child(1) { --tu: 45%; animation-delay: .2s, 1.4s; }
.dau-do .quat img:nth-child(2) { --tu: 0%; animation-delay: .2s, 2.4s; }
.dau-do .quat img:nth-child(3) { --tu: -45%; animation-delay: .2s, 1.9s; }
@keyframes xoe { from { rotate: 0deg; translate: var(--tu) 18px; } }
@keyframes bong { to { translate: 0 -12px; } }
.roi { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.roi i { position: absolute; top: -24px; left: var(--x); width: var(--co); height: calc(var(--co) * .7); border-radius: 80% 0; background: #f6cf6c; opacity: .75; animation: roi var(--thoi) linear var(--tre) infinite; }
.roi i.hong { background: #f7b6c8; }
@keyframes roi { to { transform: translate(-40px, 105vh) rotate(540deg); } }
@media (min-width: 760px) { main > .dau-do { padding-block: 64px 88px; grid-template-columns: 1.15fr 1fr; } .dau-do .quat img { max-width: 260px; } }

/* Dải bìa mẫu chạy ngang hai chiều. */
main > .dai-mau { max-width: none; padding-inline: 0; overflow: hidden; background: #fbeee9; }
.dai-mau h2 { max-width: 1120px; margin: 0 auto 28px; padding-inline: 16px; }
.dai-mau-phu { max-width: 1120px; margin: -14px auto 8px; padding-inline: 16px; color: var(--muc); opacity: .8; }
/* Một hàng thiệp trong lòng vòng cung: ở giữa phẳng, hai bên nghiêng vào và to dần (trang-chu.js tính từng thiệp). */
.vong-mau { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 34px 0 40px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); cursor: grab; }
.vong-mau::-webkit-scrollbar { display: none; }
.vong-mau.dang-keo { cursor: grabbing; }
.vong-mau:focus-visible { outline-offset: -4px; }
.ray { display: flex; width: max-content; padding-inline: 8px; }
.the-chay { flex: none; width: 132px; margin-right: 18px; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 14px 30px rgb(90 20 30 / .16); transform-origin: 50% 50%; will-change: transform; }
.the-chay img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; object-position: top; pointer-events: none; -webkit-user-drag: none; }
.dai-mau-nut { margin: 0; text-align: center; }
@media (min-width: 760px) { .the-chay { width: 176px; margin-right: 26px; } }

/* Khối đỏ và khối cuối có cùng hoạ tiết mây. */
main > .nen-do.hoa-tiet { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='120' viewBox='0 0 160 120'%3E%3Cg fill='none' stroke='%23f0c96a' stroke-width='2' stroke-linecap='round' opacity='.16'%3E%3Cpath d='M18 64c0-12 10-22 22-22s22 10 22 22c0 7-6 12-12 12s-12-5-12-12c0-4 3-7 7-7'/%3E%3Cpath d='M62 64c6-8 18-9 26-2M88 62c4-10 17-13 25-6 6 5 6 14 0 18-4 3-10 2-12-2'/%3E%3Cpath d='M98 18c0-8 7-14 15-14s15 6 15 14c0 5-4 8-8 8s-8-3-8-8c0-2 2-4 4-4M128 18c4-5 12-6 17-1'/%3E%3Cpath d='M20 108c3-6 11-8 17-4M37 104c3-7 12-9 18-4 4 4 4 10 0 13-3 2-7 1-8-2'/%3E%3C/g%3E%3C/svg%3E"); background-size: 160px 120px; }
main > .video-hd { max-width: none; padding-inline: max(16px, 50vw - 544px); background: #fbeee9; }

/* Khối cuối trang chủ: nền đỏ son có hoạ tiết như đầu trang, khép trang lại. */
.trang-chu main > .moi-tao { max-width: none; padding-inline: max(16px, 50vw - 544px); padding-bottom: 88px; background: #8a1220 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='120' viewBox='0 0 160 120'%3E%3Cg fill='none' stroke='%23f0c96a' stroke-width='2' stroke-linecap='round' opacity='.16'%3E%3Cpath d='M18 64c0-12 10-22 22-22s22 10 22 22c0 7-6 12-12 12s-12-5-12-12c0-4 3-7 7-7'/%3E%3Cpath d='M62 64c6-8 18-9 26-2M88 62c4-10 17-13 25-6 6 5 6 14 0 18-4 3-10 2-12-2'/%3E%3Cpath d='M98 18c0-8 7-14 15-14s15 6 15 14c0 5-4 8-8 8s-8-3-8-8c0-2 2-4 4-4M128 18c4-5 12-6 17-1'/%3E%3Cpath d='M20 108c3-6 11-8 17-4M37 104c3-7 12-9 18-4 4 4 4 10 0 13-3 2-7 1-8-2'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 160px 120px; color: #fff1dc; }
.trang-chu .moi-tao h2 { color: #fffaf0; }
.trang-chu .moi-tao .nut { border-color: #f6cf6c; background: #f6cf6c; color: #5a1018; }
.trang-chu .moi-tao > img { box-shadow: 0 24px 50px rgb(30 0 6 / .4); }
/* Khối "Bắt đầu chiếc thiệp" thấp gọn: banner ngang 21:9; máy tính đặt banner bên trái, chữ bên phải */
.trang-chu main > .moi-tao { padding-block: 40px 48px; }
.trang-chu .moi-tao > img { aspect-ratio: 21 / 9; margin-bottom: 20px; border-radius: 20px; }
@media (min-width: 760px) {
  .trang-chu main > .moi-tao { display: grid; grid-template-columns: 1.5fr 1fr; grid-template-rows: auto auto 1fr; column-gap: 48px; align-items: start; padding-block: 48px; }
  .trang-chu .moi-tao > img { grid-row: 1 / 4; margin: 0; }
  .trang-chu .moi-tao h2 { align-self: end; margin-top: 12px; }
  .trang-chu .moi-tao .nut { justify-self: start; }
}

/* Thẻ mẫu nổi lên khi rê chuột, hiện lần lượt khi đổi tab. */
.the-mau .khung-cuon { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.the-mau:hover .khung-cuon, .the-mau:focus-visible .khung-cuon { transform: translateY(-8px); box-shadow: 0 22px 40px rgb(80 20 30 / .28); }
.bang.dang-chon .the-mau { animation: len-dau .6s cubic-bezier(.2,.7,.2,1) backwards; }
.bang.dang-chon .the-mau:nth-child(4n+2) { animation-delay: .06s; }
.bang.dang-chon .the-mau:nth-child(4n+3) { animation-delay: .12s; }
.bang.dang-chon .the-mau:nth-child(4n+4) { animation-delay: .18s; }
.nut { transition: transform .2s ease, box-shadow .2s ease; }
.nut:hover { transform: translateY(-2px); }
.nut:active { transform: translateY(1px) scale(.98); }

/* Hiện dần khi cuộn tới. Chỉ ẩn khi mã đã chạy, nên không có mã vẫn thấy đủ nội dung. */
.co-hien [data-hien] { opacity: 0; translate: 0 28px; transition: opacity .7s ease var(--tre, 0s), translate .7s cubic-bezier(.2,.7,.2,1) var(--tre, 0s); }
.co-hien [data-hien].da-hien { opacity: 1; translate: 0 0; }
.phong-cham.da-hien { animation: phong-anh 9s ease-out both; }
@keyframes phong-anh { from { scale: 1.06; } }

/* Video hướng dẫn trên điện thoại: chỉ có video, to và ở giữa. */
@media (max-width: 759px) {
  .video-hd-hai { grid-template-columns: 1fr; justify-items: center; }
  .video-hd-khung { width: min(100%, 320px); }
  .video-hd .cac-doan { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .roi, .dau-do .chu-dau > *, .dau-do .quat img, .bang.dang-chon .the-mau, .phong-cham.da-hien { animation: none !important; }
  .roi { display: none; }
    .co-hien [data-hien] { opacity: 1; translate: none; transition: none; }
}

/* ---------- Tìm mẫu thiệp ---------- */
.nut-tim { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muc); cursor: pointer; }
.nut-tim svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nut-tim:hover { background: rgb(138 18 32 / .08); }
.hop-tim { width: min(100% - 24px, 560px); max-height: min(80dvh, 640px); margin: 8dvh auto auto; padding: 0; border: 0; border-radius: 20px; background: #fffaf5; color: var(--muc); box-shadow: 0 24px 60px rgb(40 0 10 / .3); }
.hop-tim::backdrop { background: rgb(40 10 15 / .45); }
.dau-tim { position: sticky; top: 0; display: flex; gap: 8px; padding: 14px; background: #fffaf5; border-bottom: 1px solid rgb(90 30 30 / .1); }
.dau-tim input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid rgb(90 30 30 / .2); border-radius: 12px; background: #fff; font: inherit; font-size: 1rem; }
.dong-tim { min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--muc); font: inherit; cursor: pointer; }
.bao-tim { margin: 0; padding: 12px 16px 4px; font-size: .9375rem; opacity: .8; }
.kq-tim { margin: 0; padding: 4px 8px 12px; list-style: none; }
.kq-tim a { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 12px; color: inherit; text-decoration: none; }
.kq-tim a:hover, .kq-tim a:focus-visible { background: rgb(138 18 32 / .07); }
.kq-tim img { width: 44px; height: 88px; object-fit: cover; border-radius: 8px; flex: none; }
.kq-tim span { display: grid; }
.kq-tim small { opacity: .75; }

/* Nhãn HOT, Mới, Nổi bật: xếp dọc ở góc phải trên của thẻ mẫu (Trả phí ở góc trái). */
.cac-nhan { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.cac-nhan > span { position: static; padding: 2px 10px; border-radius: 999px; color: #fff; font-size: .8125rem; font-weight: 700; line-height: 1.5; letter-spacing: .02em; box-shadow: 0 4px 10px rgb(60 10 20 / .22); }
.cac-nhan .nhan-hot { background: linear-gradient(135deg, #ff7a18, #e0244b); }
.cac-nhan .nhan-moi { background: #2f7d4f; }
.cac-nhan .nhan-noi-bat { background: #a51a2b; }
.the-chay { position: relative; }
.the-chay .cac-nhan { top: 8px; right: 8px; }
.kq-tim b .cac-nhan, .kq-tim b > span { position: static; display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; color: #fff; font-size: .75rem; font-weight: 700; vertical-align: 2px; }
.kq-tim .nhan-hot { background: linear-gradient(135deg, #ff7a18, #e0244b); }
.kq-tim .nhan-moi { background: #2f7d4f; }
.kq-tim .nhan-noi-bat { background: #a51a2b; }
