/* Tết Đinh Mùi 2027 – mobile-first, đỏ/vàng, hoa mai/đào bằng CSS + SVG nội tuyến nhỏ */
:root {
  --red-900: #5c0a0e;
  --red-800: #7f0d12;
  --red-700: #a50f16;
  --red-600: #c4161c;
  --red-50: #fdeeee;
  --gold-500: #f6c453;
  --gold-300: #ffe08a;
  --gold-700: #8a5a00;
  --mai: #ffcf33;
  --dao: #f472b6;
  --cream: #fffaf0;
  --paper: #ffffff;
  --ink: #2a1a12;
  --muted: #6b5548;
  --line: #ecdcc4;
  --ok: #166534;
  --warn: #9a3412;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(60, 20, 10, .06), 0 6px 20px rgba(60, 20, 10, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Playfair Display", "Noto Serif", "Times New Roman", Cambria, serif;
  --mai-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-32 -32 64 64'%3E%3Cg fill='%23ffcf33'%3E%3Ccircle cy='-15' r='13'/%3E%3Ccircle cx='14.3' cy='-4.6' r='13'/%3E%3Ccircle cx='8.8' cy='12.1' r='13'/%3E%3Ccircle cx='-8.8' cy='12.1' r='13'/%3E%3Ccircle cx='-14.3' cy='-4.6' r='13'/%3E%3C/g%3E%3Ccircle r='5.5' fill='%23c2410c'/%3E%3C/svg%3E");
  --dao-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-32 -32 64 64'%3E%3Cg fill='%23f9a8d4'%3E%3Ccircle cy='-15' r='13'/%3E%3Ccircle cx='14.3' cy='-4.6' r='13'/%3E%3Ccircle cx='8.8' cy='12.1' r='13'/%3E%3Ccircle cx='-8.8' cy='12.1' r='13'/%3E%3Ccircle cx='-14.3' cy='-4.6' r='13'/%3E%3C/g%3E%3Ccircle r='5.5' fill='%23be185d'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-wrap: break-word;
}
img, svg, canvas { max-width: 100%; height: auto; }
a { color: var(--red-700); text-underline-offset: 2px; }
a:hover { color: var(--red-600); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-family: var(--font-serif); font-size: clamp(1.6rem, 5.5vw, 2.5rem); color: var(--red-800); }
h2 { font-size: clamp(1.25rem, 4vw, 1.6rem); color: var(--red-800); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25rem; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: .5rem; top: -3rem; z-index: 100; padding: .5rem 1rem;
  background: var(--gold-300); color: var(--ink); border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: .5rem; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, var(--red-800), var(--red-600));
  overflow: hidden;
}
.site-header::before, .site-header::after {
  content: ""; position: absolute; pointer-events: none; background: var(--mai-svg) no-repeat center / contain; opacity: .9;
}
.site-header::before { width: 46px; height: 46px; right: 14px; top: 8px; }
.site-header::after { width: 26px; height: 26px; right: 62px; top: 30px; background-image: var(--dao-svg); opacity: .85; }
.header-inner { display: flex; align-items: center; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand:hover { color: var(--gold-300); }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand strong { color: var(--gold-300); }
.brand-name { font-size: 1.25rem; letter-spacing: .01em; }
.brand-tag { font-size: .72rem; font-weight: 600; color: var(--red-900); background: var(--gold-300); border-radius: 999px; padding: .1rem .5rem; white-space: nowrap; }
.site-nav { background: rgba(0, 0, 0, .18); }
.nav-list {
  display: flex; gap: .25rem; list-style: none; margin: 0 auto; padding: .35rem 1rem;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
  mask-image: linear-gradient(to right, #000 88%, transparent);
}
@media (min-width: 900px) { .nav-list { -webkit-mask-image: none; mask-image: none; flex-wrap: wrap; } }
.nav-list::-webkit-scrollbar { display: none; }
.nav-list a {
  display: block; white-space: nowrap; color: #fff; text-decoration: none; padding: .45rem .75rem;
  border-radius: 999px; font-size: .95rem; min-height: 40px; line-height: 1.6;
}
.nav-list a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.nav-list a[aria-current="page"] { background: var(--gold-500); color: var(--red-900); font-weight: 700; }

/* ---------- Layout ---------- */
main { display: block; padding: 1.25rem 0 2.5rem; }
.section { margin: 2rem 0; }
.lead { font-size: 1.08rem; color: var(--muted); }
.breadcrumb { font-size: .9rem; margin-bottom: .75rem; color: var(--muted); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.breadcrumb li + li::before { content: "›"; margin-right: .25rem; color: var(--muted); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem;
}
.card + .card { margin-top: 1rem; }
.grid > .card + .card, .grid > * { margin-top: 0; }
.grid { display: grid; gap: 1rem; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.note {
  font-size: .92rem; color: var(--muted); background: #fff6e0; border-left: 4px solid var(--gold-500);
  padding: .65rem .85rem; border-radius: 8px;
}
.note-ai { background: #f3f0ff; border-left-color: #7c3aed; }
.badge {
  display: inline-block; font-size: .78rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px;
  background: var(--red-50); color: var(--red-700); border: 1px solid #f5c2c2;
}
.badge-gold { background: #fff4d1; color: var(--gold-700); border-color: #f1dc9a; }
.badge-ai { background: #efe9ff; color: #5b21b6; border-color: #d9ccff; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .55rem 1rem; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2;
  background: var(--red-600); color: #fff; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--red-700); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-gold { background: var(--gold-500); color: var(--red-900); }
.btn-gold:hover { background: #f0b52c; color: var(--red-900); }
.btn-ghost { background: #fff; color: var(--red-700); border-color: #e8c9c2; }
.btn-ghost:hover { background: var(--red-50); color: var(--red-800); }
.btn-sm { min-height: 38px; padding: .35rem .75rem; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.field { display: grid; gap: .3rem; margin-bottom: .85rem; }
.field label, .field .label { font-weight: 600; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); }
input[type="text"], input[type="number"], input[type="date"], input[type="search"], input[type="tel"], select, textarea {
  width: 100%; min-height: 44px; padding: .55rem .7rem; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid #d9c3a5; border-radius: 10px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--red-600); outline: 2px solid rgba(196, 22, 28, .25); outline-offset: 0; }
input[type="color"] { width: 52px; height: 44px; padding: 2px; border: 1px solid #d9c3a5; border-radius: 10px; background: #fff; }
input[type="range"] { width: 100%; accent-color: var(--red-600); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--red-600); width: 1.1rem; height: 1.1rem; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.form-row { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.tab {
  min-height: 40px; padding: .4rem .85rem; border-radius: 999px; border: 1px solid #e3c9a8; background: #fff;
  font: inherit; cursor: pointer; color: var(--ink);
}
.tab[aria-selected="true"], .chip[aria-pressed="true"] { background: var(--red-600); color: #fff; border-color: var(--red-600); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  min-height: 36px; padding: .3rem .75rem; border-radius: 999px; border: 1px solid #e3c9a8; background: #fff;
  font: inherit; font-size: .92rem; cursor: pointer; color: var(--ink);
}
.status { min-height: 1.5em; font-size: .95rem; }
.status.error { color: #b91c1c; }
.status.ok { color: var(--ok); }

/* ---------- Hero & countdown ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: var(--radius); padding: 1.5rem 1rem 1.25rem;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 210, 90, .22), transparent 60%),
    linear-gradient(160deg, var(--red-700), var(--red-900));
  box-shadow: var(--shadow); text-align: center;
}
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: 0; width: 88px; height: 88px; background: var(--mai-svg) no-repeat center / contain; opacity: .55;
  pointer-events: none;
}
.hero::before { left: -34px; top: -34px; }
.hero::after { right: -36px; bottom: -36px; background-image: var(--dao-svg); }
.hero > * { position: relative; z-index: 1; }
.hero > .petals { position: absolute; z-index: 0; }
@media (min-width: 640px) { .hero::before, .hero::after { width: 130px; height: 130px; opacity: .8; } }
.hero h1 { color: var(--gold-300); margin-bottom: .25rem; position: relative; }
.hero p { position: relative; }
.hero .sub { color: #ffe9c2; font-size: 1.02rem; }
.countdown { display: flex; justify-content: center; gap: .5rem; margin: 1rem 0 .5rem; position: relative; }
.cd-box {
  min-width: 66px; padding: .5rem .35rem; border-radius: 12px; background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(246, 196, 83, .55);
}
.cd-num { display: block; font-size: clamp(1.6rem, 8vw, 2.6rem); font-weight: 800; color: var(--gold-300); font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd-label { font-size: .8rem; color: #ffe9c2; }
.days-left { font-size: clamp(1.15rem, 4.5vw, 1.5rem); font-weight: 700; color: #fff; margin: .25rem 0 0; position: relative; }
.days-left strong { color: var(--gold-300); font-size: 1.25em; }
.today-lunar { position: relative; font-size: .95rem; color: #ffe9c2; margin-top: .5rem; }
.petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.petals span {
  position: absolute; top: -20px; width: 12px; height: 10px; background: var(--dao); opacity: .75;
  border-radius: 150% 0 150% 0; animation: fall 11s linear infinite;
}
.petals span:nth-child(odd) { background: var(--mai); }
.petals span:nth-child(1) { left: 6%; animation-delay: -1s; }
.petals span:nth-child(2) { left: 18%; animation-delay: -6s; animation-duration: 13s; }
.petals span:nth-child(3) { left: 33%; animation-delay: -3s; }
.petals span:nth-child(4) { left: 49%; animation-delay: -9s; animation-duration: 14s; }
.petals span:nth-child(5) { left: 64%; animation-delay: -4s; }
.petals span:nth-child(6) { left: 78%; animation-delay: -7s; animation-duration: 12s; }
.petals span:nth-child(7) { left: 91%; animation-delay: -2s; }
@keyframes fall {
  0% { transform: translate(0, -20px) rotate(0); }
  50% { transform: translate(24px, 200px) rotate(160deg); }
  100% { transform: translate(-10px, 460px) rotate(340deg); }
}
@media (prefers-reduced-motion: reduce) { .petals { display: none; } }

/* ---------- Tool cards ---------- */
.tool-card {
  display: flex; gap: .85rem; align-items: flex-start; text-decoration: none; color: inherit; height: 100%;
  transition: transform .15s, box-shadow .15s;
}
.tool-card:hover { transform: translateY(-2px); color: inherit; box-shadow: 0 8px 26px rgba(60, 20, 10, .14); }
.tool-icon {
  flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red-600), var(--red-800)); color: var(--gold-300);
}
.tool-icon svg { width: 26px; height: 26px; }
.tool-card h3 { margin: 0 0 .2rem; color: var(--red-800); }
.tool-card p { margin: 0; color: var(--muted); font-size: .94rem; }

/* ---------- Key dates ---------- */
.dates { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.date-item {
  display: grid; grid-template-columns: 64px 1fr; gap: .75rem; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .75rem;
}
.date-item.is-main { border-color: var(--red-600); box-shadow: 0 0 0 2px rgba(196, 22, 28, .12); }
.date-badge {
  text-align: center; border-radius: 10px; background: var(--red-600); color: #fff; padding: .25rem 0; line-height: 1.15;
}
.date-badge b { display: block; font-size: 1.35rem; }
.date-badge span { font-size: .75rem; }
.date-item h3 { margin: 0; font-size: 1rem; }
.date-item p { margin: 0; font-size: .9rem; color: var(--muted); }
.date-left { font-weight: 700; color: var(--red-700); }

/* ---------- Trends ---------- */
.trends-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; counter-reset: tr; }
.trend {
  display: grid; grid-template-columns: 28px 1fr auto; gap: .6rem; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .7rem;
}
.trend::before { counter-increment: tr; content: counter(tr); font-weight: 800; color: var(--red-600); text-align: center; }
.trend a.q { font-weight: 700; text-decoration: none; }
.trend .news { display: block; font-size: .85rem; color: var(--muted); }
.trend .news a { color: var(--muted); }
.trend img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: #f3e7d3; }
.trend .traffic { font-size: .8rem; color: var(--gold-700); font-weight: 700; }

/* ---------- Affiliate ---------- */
.aff-card { display: grid; grid-template-columns: 84px 1fr; gap: .75rem; align-items: center; text-decoration: none; color: inherit; }
.aff-card img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; background: #f6e9d6; }
.aff-card h3 { font-size: 1rem; margin: 0 0 .2rem; color: var(--ink); }
.aff-card p { margin: 0; font-size: .88rem; color: var(--muted); }
.aff-disclosure { font-size: .82rem; color: var(--muted); margin-top: .5rem; }

/* ---------- Ads (ẩn đến khi bật AdSense) ---------- */
.ad-slot { margin: 1.5rem auto; min-height: 100px; text-align: center; }
.ad-slot::before { content: "Quảng cáo"; display: block; font-size: .72rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { padding: .55rem .65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #fbefdc; font-weight: 700; color: var(--red-900); }
tr:last-child td { border-bottom: 0; }

/* ---------- Xông đất ---------- */
.result-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.guest {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .75rem .9rem;
}
.guest-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .75rem; }
.guest-rank { font-weight: 800; color: #fff; background: var(--red-600); border-radius: 999px; min-width: 2rem; text-align: center; padding: 0 .4rem; }
.guest-year { font-size: 1.15rem; font-weight: 800; }
.guest-score { margin-left: auto; font-weight: 800; color: var(--red-700); }
.guest details { margin-top: .4rem; font-size: .92rem; }
.guest summary { cursor: pointer; color: var(--red-700); font-weight: 600; }
.guest ul { margin: .35rem 0 0; }
.score-bar { height: 6px; border-radius: 99px; background: #f3e4cc; margin-top: .4rem; overflow: hidden; }
.score-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-500), var(--red-600)); }
.pos { color: var(--ok); }
.neg { color: #b91c1c; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; }
.faq details + details { margin-top: .6rem; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--red-800); }
.faq details p { margin: .5rem 0 0; }

/* ---------- Lịch âm ---------- */
.cal-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.cal-toolbar h2 { margin: 0 auto 0 0; font-size: 1.25rem; }
.cal-toolbar select, .cal-toolbar input { width: auto; min-width: 90px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-head { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); padding: .25rem 0; }
.cal-head.sun { color: var(--red-600); }
.cal-cell {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 56px; padding: .25rem .1rem; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font: inherit; cursor: pointer; color: var(--ink);
}
.cal-cell:hover { border-color: var(--gold-500); }
.cal-cell.other { opacity: .45; }
.cal-cell .sd { font-size: 1.05rem; font-weight: 700; line-height: 1.1; }
.cal-cell .ld { font-size: .72rem; color: var(--muted); line-height: 1.2; }
.cal-cell .ld.first { color: var(--red-600); font-weight: 700; }
.cal-cell.sun .sd { color: var(--red-600); }
.cal-cell.today { background: #fff4d1; border-color: var(--gold-500); }
.cal-cell.selected { outline: 3px solid var(--red-600); outline-offset: -2px; }
.cal-cell.event::after {
  content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--red-600);
}
.cal-cell.tet { background: linear-gradient(160deg, #ffe2e2, #fff4d1); }
@media (min-width: 640px) { .cal-cell { min-height: 72px; } .cal-cell .sd { font-size: 1.3rem; } .cal-cell .ld { font-size: .8rem; } }
.day-detail .big { font-size: 3rem; font-weight: 800; color: var(--red-700); line-height: 1; }
.day-detail dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .75rem; margin: .75rem 0 0; }
.day-detail dt { color: var(--muted); }
.day-detail dd { margin: 0; font-weight: 600; }

/* ---------- Văn khấn ---------- */
.vk-text {
  white-space: pre-line; font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.85;
  background: #fffdf7; border: 1px solid #ead7b4; border-radius: 12px; padding: 1rem 1.1rem;
}
.vk-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.vk-list a { display: block; text-decoration: none; }
.vk-list .card:hover { border-color: var(--gold-500); }
.vk-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }

/* ---------- Lời chúc ---------- */
.wish-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.wish { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .85rem .95rem; }
.wish-text { white-space: pre-line; font-size: 1.02rem; margin: 0 0 .6rem; }
.wish-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .6rem; }
.ai-result { white-space: pre-line; font-size: 1.05rem; background: #fffdf7; border: 1px dashed var(--gold-500); border-radius: 12px; padding: .85rem; }

/* ---------- Thiệp ---------- */
.maker { display: grid; gap: 1rem; }
@media (min-width: 900px) { .maker { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; } .maker-preview { position: sticky; top: .75rem; } }
.maker-preview canvas {
  display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; margin: 0 auto;
  border-radius: 12px; background: #f3e4cc; box-shadow: var(--shadow);
}
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; }
.bg-option {
  padding: 0; border: 2px solid transparent; border-radius: 10px; background: #f3e4cc; cursor: pointer; overflow: hidden;
  aspect-ratio: 4 / 5;
}
.bg-option img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-option[aria-pressed="true"] { border-color: var(--red-600); box-shadow: 0 0 0 2px var(--gold-500); }
.step { margin-bottom: 1rem; }
.step > h2 { font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.step-num {
  display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--red-600); color: #fff; font-size: .9rem;
}
.qr-fallback { display: grid; grid-template-columns: 120px 1fr; gap: .75rem; align-items: center; }
.qr-fallback img { width: 120px; height: auto; background: #fff; border-radius: 8px; }

/* ---------- Hình nền ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.g-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.g-thumb { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #f3e4cc; }
.g-body { padding: .55rem .6rem .7rem; display: grid; gap: .4rem; flex: 1; }
.g-body h3 { font-size: .92rem; margin: 0; }
.g-body .btn { width: 100%; }

/* ---------- Footer ---------- */
.site-footer { background: var(--red-900); color: #f7e3cf; padding: 1.75rem 0 2rem; font-size: .92rem; }
.site-footer a { color: var(--gold-300); }
.site-footer p { margin: 0 0 .6rem; }
.footer-nav ul { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.ai-label { background: rgba(255, 255, 255, .08); border-radius: 10px; padding: .6rem .8rem; }
.donate { background: rgba(255, 255, 255, .06); border-radius: 12px; padding: .8rem; margin-bottom: 1rem; display: grid; grid-template-columns: 110px 1fr; gap: .8rem; align-items: center; }
.donate img { width: 110px; border-radius: 8px; background: #fff; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%) translateY(150%); z-index: 50;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 999px; font-size: .95rem;
  transition: transform .25s; max-width: calc(100% - 2rem); text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Liên kết dạng lưới (trang tổng) ---------- */
.link-grid { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .35rem .75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.link-grid a { display: inline-block; padding: .2rem 0; min-height: 32px; }
.day-links { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day-links a {
  display: grid; place-items: center; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  text-decoration: none; font-weight: 600;
}
.day-links a:hover { border-color: var(--gold-500); background: #fff4d1; }

/* ---------- Thanh chia sẻ ---------- */
.share-bar { display: flex; flex-wrap: wrap; gap: .4rem; }
.share-bar .sh-zalo { background: #0068ff; color: #fff; border-color: #0068ff; }
.share-bar .sh-zalo:hover { background: #0054cc; color: #fff; }
.share-bar .sh-fb { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-bar .sh-fb:hover { background: #125fc4; color: #fff; }
.share-bar .sh-msg { background: #a334fa; color: #fff; border-color: #a334fa; }
.send-panel, .link-panel { margin-top: .75rem; padding: .75rem; background: #fffdf7; border: 1px dashed var(--gold-500); border-radius: 12px; }
.link-panel input { font-size: .85rem; margin-bottom: .2rem; }
.promo { border-color: var(--gold-500); background: linear-gradient(135deg, #fff, #fff6e0); }

/* ---------- Trang thiệp người nhận /t/ ---------- */
.t-page { background: radial-gradient(120% 80% at 50% 0%, #b3121b, #5c0a0e 70%); }
.t-page .site-footer { background: rgba(0, 0, 0, .35); }
.t-stage { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 1rem .75rem 2rem; min-height: 100vh; }
.t-stage > .petals { z-index: 2; }
.t-card {
  position: relative; margin: 0; width: min(100%, 560px); aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, #7f0d12, #c4161c); box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
  container-type: inline-size; opacity: 0; transform: scale(.94) translateY(12px);
  transition: opacity .9s ease, transform 1.1s cubic-bezier(.2, .8, .2, 1);
}
.t-card.t-916 { aspect-ratio: 9 / 16; width: min(100%, calc((100vh - 120px) * 9 / 16), 480px); }
.t-card.t-45 { width: min(100%, calc((100vh - 140px) * 4 / 5), 560px); }
.t-card.t-show { opacity: 1; transform: none; }
.t-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t-text {
  --k: 1; position: absolute; left: 8%; right: 8%; display: flex; flex-direction: column; justify-content: center;
  text-align: center; overflow: hidden; line-height: 1.3; font-size: calc(6.2cqw * var(--k));
}
.t-text.t-pos-top { top: 6%; bottom: 50%; }
.t-text.t-pos-center { top: 18%; bottom: 18%; }
.t-text.t-pos-bottom { top: 48%; bottom: 9%; }
.t-light { text-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
.t-dark { text-shadow: 0 1px 8px rgba(255, 255, 255, .7); }
.t-line { display: block; opacity: 0; transform: translateY(10px); transition: opacity .8s ease, transform .8s ease; white-space: pre-line; }
.t-show .t-line { opacity: 1; transform: none; }
.t-show .t-line:nth-child(1) { transition-delay: .5s; }
.t-show .t-line:nth-child(2) { transition-delay: .8s; }
.t-show .t-line:nth-child(3) { transition-delay: 1.1s; }
.t-show .t-line:nth-child(4) { transition-delay: 1.4s; }
.t-show .t-line:nth-child(5) { transition-delay: 1.9s; }
.t-title { font-size: 1.45em; line-height: 1.15; }
.t-sub { font-size: .62em; margin-bottom: .5em; opacity: .92; }
.t-to { font-size: .75em; margin-bottom: .2em; }
.t-from { font-size: .75em; margin-top: .4em; }
.t-mark { position: absolute; left: 0; right: 0; bottom: 2.2%; text-align: center; font: 500 2.2cqw var(--font); color: rgba(255, 255, 255, .85); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.t-note { color: #ffe9c2; max-width: 560px; text-align: center; margin: .75rem 0 0; }
.t-cta { display: flex; flex-direction: column; gap: .6rem; width: min(100%, 560px); margin-top: 1.1rem; }
.t-big { min-height: 54px; font-size: 1.08rem; }
.t-share { width: min(100%, 560px); margin-top: 1rem; }
.t-share h2 { font-size: 1.05rem; }
.t-more { color: #ffe9c2; margin-top: 1rem; text-align: center; }
.t-more a { color: var(--gold-300); }
@media (prefers-reduced-motion: reduce) {
  .t-card, .t-line { transition: none; }
}

/* ---------- Dịch vụ ảnh sản phẩm ---------- */
.svc-hero h1 { font-size: clamp(1.5rem, 5vw, 2.3rem); }
.pricing { align-items: stretch; }
.price-card { display: flex; flex-direction: column; gap: .3rem; position: relative; }
.price-card h3 { margin: 0; color: var(--red-800); }
.price-card ul { margin: .3rem 0 .8rem; flex: 1; }
.price-card .badge { position: absolute; top: .7rem; right: .7rem; }
.price-card.is-hot { border-color: var(--red-600); box-shadow: 0 0 0 2px rgba(196, 22, 28, .15), var(--shadow); }
.price { font-size: 1.6rem; font-weight: 800; color: var(--red-700); margin: 0; }
.steps { display: grid; gap: .5rem; padding-left: 1.4rem; }
.svc-demos { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .svc-demos { grid-template-columns: 1fr 1fr; } }
.compare { --pos: 50%; position: relative; margin: 0; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: #eee; box-shadow: var(--shadow); }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .cmp-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .5); pointer-events: none; }
.cmp-label { position: absolute; top: .6rem; padding: .15rem .55rem; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .8rem; font-weight: 700; }
.cmp-l { left: .6rem; }
.cmp-r { right: .6rem; }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.cmp-range:focus-visible + figcaption { outline: 3px solid #2563eb; }
.compare figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: .45rem .7rem; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); color: #fff; font-size: .88rem; }

/* ---------- Print (văn khấn) ---------- */
@media print {
  .site-header, .site-footer, .no-print, .ad-slot, .btn, .breadcrumb, nav, .toast { display: none !important; }
  body { background: #fff; color: #000; font-size: 13pt; }
  main { padding: 0; }
  .vk-text { border: 0; padding: 0; background: none; font-size: 14pt; }
  a { color: #000; text-decoration: none; }
}
