/* nguoc.vn — biến thể màu/font cho từng mẫu thiệp (?mau=<slug>) */

html[data-mau] {
  --d-accent: #e8d9b5;
  --d-accent-soft: rgba(232, 217, 181, 0.16);
  --d-overlay: linear-gradient(180deg, rgba(14, 16, 11, 0.35) 0%, rgba(14, 16, 11, 0.25) 35%, rgba(14, 16, 11, 0.9) 100%);
  --d-block: rgba(20, 23, 17, 0.42);
  --d-block-line: rgba(255, 255, 255, 0.1);
  --font-script: "Great Vibes", "Playfair Display", cursive;
}

/* ---------- màu nhấn ---------- */
html[data-mau] .demo-bg::after { background: var(--d-overlay); }
html[data-mau] .gate__seal {
  color: var(--d-accent);
  border-color: var(--d-accent);
  background: var(--d-accent-soft);
}
html[data-mau] .gate__date,
html[data-mau] .ihead__amp,
html[data-mau] .ihead__date,
html[data-mau] .ilabel,
html[data-mau] .tl__time,
html[data-mau] .irow a,
html[data-mau] .credit a { color: var(--d-accent); }
html[data-mau] .irow__ic { color: var(--d-accent); background: var(--d-accent-soft); }
html[data-mau] .wd__av { color: var(--d-accent); background: var(--d-accent-soft); }
html[data-mau] .petals i { background: var(--d-accent); }
html[data-mau] .gate .btn,
html[data-mau] .form .btn,
html[data-mau] .ibar .primary { background: var(--d-accent); color: #1c1b17; }
html[data-mau] .iblock { background: var(--d-block); border-color: var(--d-block-line); }

/* ---------- 1. Song Hỷ đỏ ---------- */
html[data-mau="song-hy-do"] {
  --d-accent: #f0d099;
  --d-accent-soft: rgba(240, 208, 153, 0.18);
  --d-overlay: linear-gradient(180deg, rgba(84, 9, 15, 0.55) 0%, rgba(64, 7, 12, 0.72) 45%, rgba(36, 4, 8, 0.94) 100%);
  --d-block: rgba(58, 9, 14, 0.55);
  --d-block-line: rgba(240, 208, 153, 0.18);
  --font-script: "SVN Beloved", "Great Vibes", cursive;
}

/* ---------- 2. Hoa hồng kem (sáng) ---------- */
html[data-mau="hong-kem"] {
  --d-accent: #c98f7f;
  --d-accent-soft: rgba(201, 143, 127, 0.16);
  --font-script: "SVN Blenda Script", "Great Vibes", cursive;
}

/* ---------- 3. Lá bạch đàn ---------- */
html[data-mau="la-bach-dan"] {
  --d-accent: #d7e2c6;
  --d-accent-soft: rgba(215, 226, 198, 0.16);
  --d-overlay: linear-gradient(180deg, rgba(18, 34, 24, 0.6) 0%, rgba(14, 28, 20, 0.7) 45%, rgba(9, 18, 13, 0.94) 100%);
  --d-block: rgba(16, 32, 22, 0.5);
  --d-block-line: rgba(215, 226, 198, 0.16);
  --font-script: "VLAgileScriptCalligraphy", "Great Vibes", cursive;
}

/* ---------- 4. Art Deco ---------- */
html[data-mau="art-deco"] {
  --d-accent: #dcbb72;
  --d-accent-soft: rgba(220, 187, 114, 0.14);
  --d-overlay: linear-gradient(180deg, rgba(6, 8, 10, 0.78) 0%, rgba(6, 8, 10, 0.82) 45%, rgba(4, 5, 7, 0.96) 100%);
  --d-block: rgba(8, 10, 12, 0.62);
  --d-block-line: rgba(220, 187, 114, 0.2);
  --font-script: "VL NewParis Headline", "Playfair Display", serif;
}
html[data-mau="art-deco"] .gate__names,
html[data-mau="art-deco"] .ihead__names { letter-spacing: 0.1em; text-transform: uppercase; font-size: clamp(26px, 7vw, 38px); }
html[data-mau="art-deco"] .gate__eyebrow,
html[data-mau="art-deco"] .ihead__eyebrow { letter-spacing: 0.42em; }

/* ---------- 5. Tối giản trắng (sáng) ---------- */
html[data-mau="toi-gian"] {
  --d-accent: #8a8377;
  --d-accent-soft: rgba(138, 131, 119, 0.12);
  --font-script: "SVN Desire", "Playfair Display", serif;
}

/* ---------- 6. Vòm Boho ---------- */
html[data-mau="vom-boho"] {
  --d-accent: #edc5a0;
  --d-accent-soft: rgba(237, 197, 160, 0.16);
  --d-overlay: linear-gradient(180deg, rgba(62, 32, 20, 0.5) 0%, rgba(56, 28, 18, 0.66) 45%, rgba(30, 15, 10, 0.94) 100%);
  --d-block: rgba(46, 24, 16, 0.5);
  --d-block-line: rgba(237, 197, 160, 0.16);
  --font-script: "UTM Wedding K&T", "Great Vibes", cursive;
}

/* ---------- 7. Sen hồng ---------- */
html[data-mau="sen-hong"] {
  --d-accent: #f3bcc6;
  --d-accent-soft: rgba(243, 188, 198, 0.16);
  --d-overlay: linear-gradient(180deg, rgba(70, 20, 30, 0.55) 0%, rgba(58, 14, 24, 0.7) 45%, rgba(28, 6, 12, 0.94) 100%);
  --d-block: rgba(52, 14, 22, 0.55);
  --d-block-line: rgba(243, 188, 198, 0.16);
  --font-script: "VLDreamScriptPro", "Great Vibes", cursive;
}

/* ---------- 8. Trái tim hồng ---------- */
html[data-mau="tim-hong"] {
  --d-accent: #ffc0d0;
  --d-accent-soft: rgba(255, 192, 208, 0.16);
  --d-overlay: linear-gradient(180deg, rgba(56, 8, 24, 0.6) 0%, rgba(48, 6, 20, 0.74) 45%, rgba(22, 3, 10, 0.94) 100%);
  --d-block: rgba(46, 8, 20, 0.55);
  --d-block-line: rgba(255, 192, 208, 0.16);
  --font-script: "SVN Blenda Script", "Great Vibes", cursive;
}

/* ---------- 9. Xanh navy viền hoa ---------- */
html[data-mau="navy-vang"] {
  --d-accent: #cfd8ea;
  --d-accent-soft: rgba(207, 216, 234, 0.14);
  --d-overlay: linear-gradient(180deg, rgba(9, 18, 38, 0.66) 0%, rgba(8, 16, 34, 0.78) 45%, rgba(4, 9, 20, 0.95) 100%);
  --d-block: rgba(8, 16, 34, 0.58);
  --d-block-line: rgba(207, 216, 234, 0.16);
  --font-script: "UVN Buc Thu", "Great Vibes", cursive;
}

/* ---------- 10. Oải hương ---------- */
html[data-mau="oai-huong"] {
  --d-accent: #d9c6ef;
  --d-accent-soft: rgba(217, 198, 239, 0.16);
  --d-overlay: linear-gradient(180deg, rgba(44, 30, 66, 0.55) 0%, rgba(36, 24, 56, 0.7) 45%, rgba(18, 12, 30, 0.94) 100%);
  --d-block: rgba(34, 24, 52, 0.55);
  --d-block-line: rgba(217, 198, 239, 0.16);
  --font-script: "VLAgileScriptLine", "Great Vibes", cursive;
}

/* ---------- 11. Hoàng hôn ---------- */
html[data-mau="hoang-hon"] {
  --d-accent: #f6c08a;
  --d-accent-soft: rgba(246, 192, 138, 0.16);
  --d-overlay: linear-gradient(180deg, rgba(96, 44, 18, 0.5) 0%, rgba(74, 32, 14, 0.68) 45%, rgba(34, 14, 8, 0.94) 100%);
  --d-block: rgba(56, 26, 12, 0.5);
  --d-block-line: rgba(246, 192, 138, 0.16);
  --font-script: "UVN Buc Thu", "Great Vibes", cursive;
}

/* ---------- 12. Mẫu đơn ---------- */
html[data-mau="mau-don"] {
  --d-accent: #f7c3c9;
  --d-accent-soft: rgba(247, 195, 201, 0.16);
  --d-overlay: linear-gradient(180deg, rgba(78, 26, 34, 0.52) 0%, rgba(62, 20, 28, 0.7) 45%, rgba(30, 9, 14, 0.94) 100%);
  --d-block: rgba(52, 18, 24, 0.55);
  --d-block-line: rgba(247, 195, 201, 0.16);
  --font-script: "VLAGILESCRIPTCALLIGRAPHY", "Great Vibes", cursive;
}

/* ---------- chế độ bìa thiệp (?cover=1): tràn viền, không khung ---------- */
html[data-cover] .gate {
  background: transparent;
  backdrop-filter: none;
  padding: 30px 24px;
  align-items: center;
}
html[data-cover] .gate__card {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  width: min(420px, 100%);
}
html[data-cover] .gate .btn,
html[data-cover] .gate p.hint { display: none; }
html[data-cover] .gate__names { font-size: clamp(34px, 9.4vw, 48px); margin: 12px 0 6px; }
html[data-cover] .gate__date { letter-spacing: 0.3em; }
html[data-cover] .gate__seal { margin-top: 22px; }
html[data-cover] .ibar { display: none; }

/* ---------- hai mẫu nền sáng: chữ mực, khối giấy ---------- */
html[data-mau="hong-kem"],
html[data-mau="toi-gian"] { background: #f6f1e9; }
/* body.demo đặt nền tối nên phải ghi đè, không thì chữ mực chìm vào nền đen */
html[data-mau="hong-kem"] body,
html[data-mau="toi-gian"] body { background: #f6f1e9; }
html[data-mau="hong-kem"] .demo-bg video,
html[data-mau="toi-gian"] .demo-bg video { display: none; }
html[data-mau="hong-kem"] .demo-bg::after,
html[data-mau="toi-gian"] .demo-bg::after {
  background:
    radial-gradient(70% 45% at 50% 0%, rgba(255, 255, 255, 0.9) 0%, rgba(246, 241, 233, 0.6) 55%, rgba(240, 232, 221, 0.95) 100%),
    linear-gradient(180deg, #fbf7f1 0%, #f4ece1 100%);
}
html[data-mau="hong-kem"] .gate,
html[data-mau="toi-gian"] .gate { background: rgba(250, 246, 240, 0.86); }
html[data-mau="hong-kem"] .gate__card,
html[data-mau="toi-gian"] .gate__card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 30px 60px -40px rgba(60, 40, 30, 0.5);
  color: #2b2823;
}
html[data-mau="hong-kem"] .gate__names,
html[data-mau="toi-gian"] .gate__names,
html[data-mau="hong-kem"] .ihead__names,
html[data-mau="toi-gian"] .ihead__names,
html[data-mau="hong-kem"] .ititle,
html[data-mau="toi-gian"] .ititle,
html[data-mau="hong-kem"] .irow__t,
html[data-mau="toi-gian"] .irow__t,
html[data-mau="hong-kem"] .tl__body b,
html[data-mau="toi-gian"] .tl__body b,
html[data-mau="hong-kem"] .wd__n,
html[data-mau="toi-gian"] .wd__n,
html[data-mau="hong-kem"] .countdown b,
html[data-mau="toi-gian"] .countdown b { color: #2b2823; }
html[data-mau="hong-kem"] .gate p.hint,
html[data-mau="toi-gian"] .gate p.hint,
html[data-mau="hong-kem"] .gate__eyebrow,
html[data-mau="toi-gian"] .gate__eyebrow,
html[data-mau="hong-kem"] .ihead__eyebrow,
html[data-mau="toi-gian"] .ihead__eyebrow,
html[data-mau="hong-kem"] .ihead__sub,
html[data-mau="toi-gian"] .ihead__sub,
html[data-mau="hong-kem"] .itext,
html[data-mau="toi-gian"] .itext,
html[data-mau="hong-kem"] .irow__d,
html[data-mau="toi-gian"] .irow__d,
html[data-mau="hong-kem"] .tl__body span,
html[data-mau="toi-gian"] .tl__body span,
html[data-mau="hong-kem"] .wd__x,
html[data-mau="toi-gian"] .wd__x,
html[data-mau="hong-kem"] .countdown span,
html[data-mau="toi-gian"] .countdown span,
html[data-mau="hong-kem"] .credit,
html[data-mau="toi-gian"] .credit { color: #6d675c; }
html[data-mau="hong-kem"] .iblock,
html[data-mau="toi-gian"] .iblock {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(0, 0, 0, 0.07);
}
html[data-mau="hong-kem"] .countdown div,
html[data-mau="toi-gian"] .countdown div,
html[data-mau="hong-kem"] .wd,
html[data-mau="toi-gian"] .wd,
html[data-mau="hong-kem"] .form input,
html[data-mau="toi-gian"] .form input,
html[data-mau="hong-kem"] .form textarea,
html[data-mau="toi-gian"] .form textarea,
html[data-mau="hong-kem"] .form select,
html[data-mau="toi-gian"] .form select {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.12);
  color: #2b2823;
}
html[data-mau="hong-kem"] .form input::placeholder,
html[data-mau="toi-gian"] .form input::placeholder,
html[data-mau="hong-kem"] .form textarea::placeholder,
html[data-mau="toi-gian"] .form textarea::placeholder { color: #9a938a; }
html[data-mau="hong-kem"] .ibar,
html[data-mau="toi-gian"] .ibar {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
}
html[data-mau="hong-kem"] .ibar button,
html[data-mau="toi-gian"] .ibar button,
html[data-mau="hong-kem"] .ibar a,
html[data-mau="toi-gian"] .ibar a { color: #4a463f; }
html[data-mau="hong-kem"] .gate .btn,
html[data-mau="toi-gian"] .gate .btn,
html[data-mau="hong-kem"] .form .btn,
html[data-mau="toi-gian"] .form .btn,
html[data-mau="hong-kem"] .ibar .primary,
html[data-mau="toi-gian"] .ibar .primary { color: #fff; }
html[data-mau="hong-kem"] .irow { border-bottom-color: rgba(0, 0, 0, 0.08); }
html[data-mau="toi-gian"] .irow { border-bottom-color: rgba(0, 0, 0, 0.08); }

/* che do bia: luon tran vien, ke ca mau nen sang */
html[data-cover] .gate__card {
  background: none;
  border-color: transparent;
  box-shadow: none;
}

