/* Colour and motifs of the light pages: twilight banners (moon, blossom, sea, cloud edge),
   tinted bands, four accent colours and zodiac medallions. Loaded after light.css. */
body.nq-light{
  --tw:radial-gradient(circle at 12% 0%,rgba(139,108,255,.55),transparent 42%),radial-gradient(circle at 88% 100%,rgba(255,170,130,.5),transparent 46%),linear-gradient(165deg,#1d1250 0%,#372079 38%,#6b3596 68%,#b9578f 100%);
  --moon-disc:radial-gradient(circle,#fffdf2 0 34px,#ffedc2 35px 52px,rgba(251,219,165,.42) 53px 62px,rgba(251,219,165,.16) 63px 104px,transparent 150px);
  --a1:#6f4bd0;--a1-bg:#f1ecff;--a2:#b32f6c;--a2-bg:#ffeaf3;--a3:#8a5504;--a3-bg:#fff3d8;--a4:#12786b;--a4-bg:#e2f6f1}

/* ═══ 1. twilight banners ═══ */
body.nq-light :is(.pg-hero,.la-hero,.dark-gradient){position:relative;isolation:isolate;overflow:hidden;border:0}
body.nq-light .pg section.pg-hero{padding:40px 0 104px}
body.nq-light .la-hero{padding-bottom:92px}
body.nq-light .dark-gradient{padding-bottom:92px}
body.nq-light :is(.pg-hero,.la-hero,.dark-gradient){
  background:
    url(img/may-vien.svg) left bottom/480px 60px repeat-x,
    url(img/bien-trang-nhe.webp) center bottom 10px/min(620px,110%) auto no-repeat,
    radial-gradient(1.4px 1.4px at 9% 22%,#fff 60%,transparent),radial-gradient(1.2px 1.2px at 31% 12%,#fff 60%,transparent),radial-gradient(1.6px 1.6px at 52% 30%,#ffe9c4 60%,transparent),radial-gradient(1px 1px at 68% 14%,#fff 60%,transparent),radial-gradient(1.3px 1.3px at 22% 58%,#fff 60%,transparent),radial-gradient(1px 1px at 78% 62%,#fff 60%,transparent),
    var(--moon-disc) calc(100% + 40px) -70px/300px 300px no-repeat,
    var(--tw)}
/* blossom branch from the top-right corner, a second one mirrored low on the left */
body.nq-light :is(.pg-hero,.la-hero,.dark-gradient)::before{content:"";position:absolute;z-index:-1;pointer-events:none;top:-26px;right:-18px;width:min(400px,46vw);aspect-ratio:1;background:url(img/canh-dao-trai.webp) center/contain no-repeat;filter:drop-shadow(0 8px 16px rgba(20,8,60,.45))}
body.nq-light :is(.pg-hero,.la-hero,.dark-gradient)::after{content:"";position:absolute;z-index:-1;pointer-events:none;left:-14px;bottom:34px;width:min(190px,24vw);aspect-ratio:285/305;background:url(img/canh-dao-phai.webp) center/contain no-repeat;transform:scaleX(-1);opacity:.85}
body.nq-light :is(.la-hero,.dark-gradient)>*{position:relative}
body.nq-light .la-hero :is(svg.la-hero-art,.la-hero-art){display:none}

/* rounded banners of blog and văn khấn */
body.nq-light.nq-light :is(.blog-hero,.vk-hero){position:relative;isolation:isolate;overflow:hidden;border:0;box-shadow:0 22px 50px rgba(70,40,140,.28);
  background:url(img/bien-trang-nhe.webp) center bottom -8px/min(520px,120%) auto no-repeat,var(--moon-disc) -80px -110px/280px 280px no-repeat,var(--tw);padding-bottom:62px!important}
body.nq-light.nq-light :is(.blog-hero,.vk-hero)::before{content:"";position:absolute;inset:auto;z-index:0;top:-24px;right:-20px;width:min(330px,44vw);height:auto;aspect-ratio:1;background:url(img/canh-dao-trai.webp) center/contain no-repeat;pointer-events:none}
body.nq-light.nq-light :is(.blog-hero,.vk-hero)::after{content:"";position:absolute;z-index:0;left:-22px;bottom:-34px;width:min(122px,18vw);aspect-ratio:285/305;background:url(img/canh-dao-phai.webp) center/contain no-repeat;transform:scaleX(-1);pointer-events:none}
body.nq-light.nq-light .vk-hero>*{position:relative;z-index:1}

/* văn khấn detail header + the tử vi articles' titles */
body.nq-light .vm-page>section.bg-cream:first-child{position:relative;isolation:isolate;overflow:hidden;padding-bottom:44px;
  background:url(img/may-vien.svg) left bottom/480px 36px repeat-x,var(--moon-disc) calc(100% - 6%) -80px/300px 300px no-repeat,var(--tw)}
body.nq-light .vm-page>section.bg-cream:first-child::before{content:"";position:absolute;z-index:-1;top:-20px;right:-16px;width:min(300px,34vw);aspect-ratio:1;background:url(img/canh-dao-trai.webp) center/contain no-repeat;opacity:.95;pointer-events:none}
body.nq-light.nq-pillar .vm-page h1{padding:34px 30px 38px;border-radius:22px;color:#fff;
  background:url(img/canh-dao-phai.webp) right -14px top -10px/150px auto no-repeat,var(--moon-disc) 96% 130%/260px 260px no-repeat,var(--tw);box-shadow:0 20px 44px rgba(70,40,140,.26);text-shadow:0 2px 14px rgba(18,8,56,.45)}

/* text on the twilight (form panels, summary cards and widgets keep their own light surface) */
body.nq-light .pg-hero :is(.pg-intro,.pg-proof) :is(h1,h1 small,p,li,li b),
body.nq-light .pg-hero>.wrap>:is(h1,p),body.nq-light .pg-hero>.wrap>h1 small,
body.nq-light .la-hero :is(h1,.la-eyebrow,.la-lead,.la-crumb,.la-crumb a,.la-crumb li,nav,nav a,nav li,nav span),
body.nq-light .dark-gradient :is(h1,h2,p,span),
body.nq-light.nq-light :is(.blog-hero,.vk-hero) :is(h1,p,.text-white,.text-gray-300,.text-gray-400),
body.nq-light .vm-page>section.bg-cream:first-child :is(h1,p,li,li a,span){color:#fff;text-shadow:0 1px 12px rgba(18,8,56,.55)}
body.nq-light .la-hero .la-hero-grid>div:first-child>p{color:#f1eaff;text-shadow:0 1px 10px rgba(18,8,56,.6)}
body.nq-light .pg-hero h1 em,body.nq-light.nq-light :is(.blog-hero,.vk-hero) h1 span{color:#ffe2a6}
body.nq-light .pg-hero :is(.pg-eyebrow,.pg-crumbs a),body.nq-light .pg-hero>.wrap>nav a{color:#ffe2a6;text-shadow:0 1px 8px rgba(18,8,56,.6)}
body.nq-light .pg-hero .pg-crumbs li,body.nq-light .pg-hero .pg-lead{color:#f1eaff}
body.nq-light .pg-hero .pg-ticks li::before{color:#ffe2a6}
body.nq-light .pg-hero .pg-chips a{background:rgba(255,255,255,.14);border-color:rgba(255,226,166,.6);color:#fff;backdrop-filter:blur(6px)}
body.nq-light .pg-hero .pg-chips a:hover{background:rgba(255,226,166,.28)}
body.nq-light .pg-hero .pg-facts div{background:rgba(255,255,255,.96);border-color:transparent;box-shadow:0 10px 24px rgba(22,10,66,.3)}
body.nq-light .pg-hero .pg-facts :is(dt,dd){text-shadow:none}
body.nq-light .pg-hero .pg-facts dt{color:#63598a}
body.nq-light .pg-hero .pg-facts dd{color:#2a1d66}
body.nq-light .pg-hero :is(.pg-panel,.pg .ty-widget,.ty-widget,.pg-answer){box-shadow:0 26px 60px rgba(18,8,56,.45);border:1px solid rgba(255,226,166,.8)}
body.nq-light .pg-hero .pg-panel::after{content:"";display:block;height:0}
body.nq-light .pg-hero :is(.pg-panel,.ty-widget,.pg-answer) :is(h2,h3,p,li,b,label,dt,dd,span){text-shadow:none}
body.nq-light .pg-hero .pg-answer :is(h2,b){color:#241a4a}
body.nq-light .pg-hero .pg-answer p{color:#3d3366}
body.nq-light.nq-light :is(.blog-hero,.vk-hero) [class*="text-gold"]{color:#ffe2a6;border-color:rgba(255,226,166,.55);background:rgba(255,255,255,.1)}
body.nq-light.nq-light .vk-hero a:not(.vk-jump){background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,226,166,.5)}
body.nq-light.nq-light .vk-hero input{background:#fff;color:#241a4a}
body.nq-light .vm-page>section.bg-cream:first-child span[class*="border"]{background:rgba(255,255,255,.14);border-color:rgba(255,226,166,.6);color:#ffe2a6}
body.nq-light .vm-page>section.bg-cream:first-child a.vk-jump{color:#2a1650;text-shadow:none}

/* ═══ 2. section headings and tinted bands ═══ */
body.nq-light .pg .head h2::after,body.nq-light .la-sec h2::after{content:"";display:block;width:160px;height:24px;margin-top:10px;background:url(img/hoa-tiet.svg) center/contain no-repeat}
body.nq-light .pg .head.mid h2::after{margin-inline:auto}
body.nq-light .pg>section:not(.pg-hero):nth-of-type(4n+2){background:url(img/hoa-rai.svg) 0 0/300px 280px,linear-gradient(180deg,#f7f4fd,#ece4ff 22%,#ece4ff 78%,#f7f4fd)}
body.nq-light .pg>section:not(.pg-hero):nth-of-type(4n+4){background:url(img/hoa-rai.svg) 120px 40px/300px 280px,linear-gradient(180deg,#f7f4fd,#ffe9f2 22%,#ffe9f2 78%,#f7f4fd)}
body.nq-light .pg>section:not(.pg-hero):nth-of-type(4n+5){background:linear-gradient(180deg,#f7f4fd,#fff2d9 24%,#fff2d9 76%,#f7f4fd)}

/* ═══ 3. cards: four accents in turn ═══ */
body.nq-light :is(.pg-grid>*:nth-child(4n+1),.pg-chi>li:nth-child(4n+1)){--ac:var(--a1);--ac-bg:var(--a1-bg)}
body.nq-light :is(.pg-grid>*:nth-child(4n+2),.pg-chi>li:nth-child(4n+2)){--ac:var(--a2);--ac-bg:var(--a2-bg)}
body.nq-light :is(.pg-grid>*:nth-child(4n+3),.pg-chi>li:nth-child(4n+3)){--ac:var(--a3);--ac-bg:var(--a3-bg)}
body.nq-light :is(.pg-grid>*:nth-child(4n+4),.pg-chi>li:nth-child(4n+4)){--ac:var(--a4);--ac-bg:var(--a4-bg)}
body.nq-light .pg-grid>.pg-box,body.nq-light .pg-grid>li>.pg-box{border-top:4px solid var(--ac,var(--a1));background:linear-gradient(180deg,var(--ac-bg,var(--a1-bg)),#fff 62%)}
body.nq-light .pg-grid>.pg-box h3,body.nq-light .pg-grid>.pg-box h3 a{color:var(--ac,var(--a1))}
body.nq-light .pg-grid .pg-num{background:var(--ac,var(--a1));color:#fff;box-shadow:0 8px 18px color-mix(in srgb,var(--ac,#6f4bd0) 38%,transparent)}
body.nq-light .pg-grid .pg-quote{color:var(--ac,var(--a1));border-top-color:color-mix(in srgb,var(--ac,#6f4bd0) 40%,#fff)}

/* 12 con giáp: a seal with the branch's character */
body.nq-light .pg-chi a{position:relative;overflow:hidden;background:linear-gradient(165deg,var(--ac-bg),#fff 70%);border:1px solid color-mix(in srgb,var(--ac) 26%,#fff)}
body.nq-light .pg-chi a b{color:var(--ac);padding-right:52px}
body.nq-light .pg-chi a small{padding-right:34px}
body.nq-light .pg-chi a::after{content:attr(data-han);position:absolute;top:12px;right:12px;display:grid;place-items:center;width:48px;height:48px;border-radius:50%;font:700 26px/1 "Noto Serif CJK SC","Songti SC","SimSun",serif;color:#fff;background:radial-gradient(circle at 32% 28%,color-mix(in srgb,var(--ac) 62%,#fff),var(--ac) 72%);box-shadow:0 0 0 3px #fff,0 0 0 4px color-mix(in srgb,var(--ac) 45%,#fff),0 8px 16px color-mix(in srgb,var(--ac) 30%,transparent)}
body.nq-light .pg-chi a:hover,body.nq-light .pg-chi a[aria-current]{border-color:var(--ac);background:var(--ac-bg);box-shadow:0 14px 30px color-mix(in srgb,var(--ac) 28%,transparent)}

/* 12 palaces */
body.nq-light .pg-palace{border:1px solid #d9ccf7;background:linear-gradient(165deg,#fff,#f3eeff)}
body.nq-light .pg-palace h3{color:#3d2a85}
body.nq-light .pg-palace--core{border:2px solid #dca23a;background:linear-gradient(165deg,#fff8e4,#ffe9bd)}
body.nq-light .pg-palace--core h3{color:#7a4a00}
body.nq-light .pg-palace--opp{border:2px dashed #d4558f;background:linear-gradient(165deg,#fff2f7,#ffdfec)}
body.nq-light .pg-palace--opp h3{color:#9d1c5c}
body.nq-light .pg-palace-center{background:var(--moon-disc) 50% -40%/300px 300px no-repeat,var(--tw);border:0}
body.nq-light .pg-palace-center :is(b,p){color:#fff;text-shadow:0 1px 10px rgba(18,8,56,.6)}

/* tables, answer boxes, calls to action, questions */
body.nq-light .pg-table-wrap{border:1px solid #d9ccf7}
body.nq-light .pg-table thead th{background:linear-gradient(90deg,#33207a,#6b3596);color:#ffeec7}
body.nq-light .pg-table thead th:not(:first-child){background:#4a2a89}
body.nq-light .pg-table tbody tr:nth-child(even){background:#f8f5ff}
body.nq-light .pg-table tbody tr:hover{background:#fff4dc}
body.nq-light .pg section:not(.pg-hero) .pg-answer{border:1px solid #e8c680;border-left:6px solid #e0a73c;background:url(img/canh-dao-phai.webp) right -16px bottom -22px/130px auto no-repeat,linear-gradient(115deg,#fff1cf,#fff7ea 60%,#ffeaf3);padding-right:120px}
body.nq-light .pg .pg-cta{position:relative;overflow:hidden;border:0;background:var(--moon-disc) 78% 50%/260px 260px no-repeat,var(--tw);box-shadow:0 22px 46px rgba(70,40,140,.3)}
body.nq-light .pg .pg-cta :is(h2,p){color:#fff;text-shadow:0 1px 10px rgba(18,8,56,.6);position:relative}
body.nq-light .pg .pg-cta .btn{position:relative}
body.nq-light .pg .faq details{margin-bottom:10px;padding:0 20px;border:1px solid #ddd1f8;border-left:4px solid #8d6ae0;border-radius:14px;background:#fff}
body.nq-light .pg .faq details[open]{border-left-color:#e0a73c;background:linear-gradient(180deg,#fff7e4,#fff 70%)}
body.nq-light .pg .faq summary{padding:16px 0}
body.nq-light .pg .faq summary::after{color:#c93f7f}

/* ═══ 4. lịch âm ═══ */
body.nq-light .la-card{border-top:5px solid transparent;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(90deg,#6f4bd0,#c93f7f 55%,#e0a73c) border-box;box-shadow:0 18px 42px rgba(70,40,140,.16)}
body.nq-light .la-main{position:relative;margin-top:-56px}
body.nq-light .la-sec{background:url(img/hoa-rai.svg) 0 0/300px 280px,linear-gradient(180deg,transparent,#efe8ff 18%,#efe8ff 82%,transparent)}
body.nq-light .la-sec+.la-sec{background:url(img/hoa-rai.svg) 140px 60px/300px 280px,linear-gradient(180deg,transparent,#ffeaf3 18%,#ffeaf3 82%,transparent)}
body.nq-light .la-faq details{border-left:4px solid #8d6ae0}

/* ═══ 5. văn khấn ═══ */
body.nq-light .vm-page a:is(.vk-item,.vk-tile,.vk-card-link),body.nq-light .vm-page .vk-grid>a{border-top:4px solid #6f4bd0;background:linear-gradient(180deg,#f3eeff,#fff 55%)}
body.nq-light .vm-page .vk-grid>a:nth-child(3n+2){border-top-color:#c93f7f;background:linear-gradient(180deg,#ffedf5,#fff 55%)}
body.nq-light .vm-page .vk-grid>a:nth-child(3n+3){border-top-color:#e0a73c;background:linear-gradient(180deg,#fff4da,#fff 55%)}
body.nq-light .vk-card{border-color:#ddd1f8;box-shadow:0 12px 30px rgba(70,40,140,.1)}
body.nq-light .vk-card-head{background:linear-gradient(90deg,#efe8ff,#ffeaf3);border-bottom-color:#ddd1f8}
body.nq-light .vk-prayer-card{border:2px solid #e0a73c}
body.nq-light .vk-prayer-card .vk-card-head{background:linear-gradient(90deg,#ffeec2,#fff7e6 60%,#ffeaf3);border-bottom-color:#e8c680}
body.nq-light .vk-prayer{background:url(img/canh-dao-trai.webp) right -40px top -30px/210px auto no-repeat,#fffdf6;background-attachment:local}

/* ═══ 6. blog ═══ */
body.nq-light .vm-page .article-body h2::before{content:"";position:absolute;left:0;top:.16em;bottom:.16em;width:5px;border-radius:5px;background:linear-gradient(180deg,#c93f7f,#e0a73c)}
body.nq-light .vm-page .article-body h2{position:relative;padding-left:16px;color:#33207a}
body.nq-light .vm-page .article-body h3{color:#8a2f74}
body.nq-light .facts-head{background:linear-gradient(90deg,#33207a,#8a3f98);border:0}
body.nq-light :is(.facts-head,.facts-head small){color:#fff}
body.nq-light .vm-page aside .bg-white{border-top:4px solid #8d6ae0;box-shadow:0 12px 28px rgba(70,40,140,.1)}
body.nq-light .vm-page :is(.blog-grid,.posts-grid)>*{border-top:4px solid #8d6ae0}

/* ═══ 7. lá số page ═══ */
body.nq-light .vm-page .section-card:not([style]){border-top:4px solid transparent;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(90deg,#6f4bd0,#c93f7f 55%,#e0a73c) border-box;box-shadow:0 14px 34px rgba(70,40,140,.12)}

/* ═══ phones ═══ */
@media (max-width:760px){
  body.nq-light .pg section.pg-hero{padding:26px 0 78px}
  body.nq-light :is(.la-hero,.dark-gradient){padding-bottom:74px}
  body.nq-light :is(.pg-hero,.la-hero,.dark-gradient)::before{width:190px;top:-34px;right:-48px;opacity:.9}
  body.nq-light :is(.pg-hero,.la-hero,.dark-gradient)::after{width:96px;bottom:30px}
  body.nq-light.nq-light :is(.blog-hero,.vk-hero)::before{width:150px;top:-30px;right:-42px}
  body.nq-light .vm-page>section.bg-cream:first-child::before{width:150px;right:-44px}
  body.nq-light .pg section:not(.pg-hero) .pg-answer{padding-right:18px;background:linear-gradient(115deg,#fff1cf,#fff7ea 60%,#ffeaf3)}
  body.nq-light .pg-chi a::after{width:38px;height:38px;font-size:20px;top:10px;right:10px}
  body.nq-light .pg-chi a b{padding-right:40px;font-size:21px}
}

body.nq-light .vm-page>section.bg-cream:first-child{margin-bottom:22px}
body.nq-light .la-hero .la-today{box-shadow:0 22px 48px rgba(18,8,56,.45);border:1px solid rgba(255,226,166,.55)}

/* ── fixes after review ── */
body.nq-light.nq-pillar .vm-page h1,body.nq-light.nq-pillar .vm-page h1 *{color:#fff!important}
/* nothing decorative behind running text */
body.nq-light .vk-prayer{background:#fffdf6}
body.nq-light .pg-palace-center{background:radial-gradient(circle at 92% 8%,#fff6da 0 20px,rgba(251,219,165,.4) 21px 28px,transparent 64px),var(--tw)}
body.nq-light.nq-light :is(.blog-hero,.vk-hero)::before{width:min(250px,34vw);right:-46px;top:-30px}

/* list cards of văn khấn and blog: accents in turn */
body.nq-light :is(.vk-grid>.vk-card,.blog-cards>.blog-card):nth-child(3n+1){--ac:#6f4bd0;--ac-bg:#f1ecff}
body.nq-light :is(.vk-grid>.vk-card,.blog-cards>.blog-card):nth-child(3n+2){--ac:#b32f6c;--ac-bg:#ffeaf3}
body.nq-light :is(.vk-grid>.vk-card,.blog-cards>.blog-card):nth-child(3n+3){--ac:#8a5504;--ac-bg:#fff3d8}
body.nq-light .vk-grid>.vk-card{border:1px solid color-mix(in srgb,var(--ac) 24%,#fff);border-top:5px solid var(--ac);background:linear-gradient(175deg,var(--ac-bg),#fff 58%);box-shadow:0 10px 26px color-mix(in srgb,var(--ac) 13%,transparent)}
body.nq-light .vk-grid>.vk-card:hover{border-color:var(--ac);box-shadow:0 18px 36px color-mix(in srgb,var(--ac) 26%,transparent)}
body.nq-light .vk-grid .vk-card__icon{background:var(--ac);border-color:transparent;box-shadow:0 0 0 3px #fff,0 0 0 4px color-mix(in srgb,var(--ac) 40%,#fff)}
body.nq-light .vk-grid :is(.vk-card__type,.vk-card__more){color:var(--ac)}
body.nq-light .blog-cards>.blog-card{border:1px solid color-mix(in srgb,var(--ac) 24%,#fff);border-left:5px solid var(--ac);background:linear-gradient(100deg,#fff 55%,var(--ac-bg));box-shadow:0 10px 26px color-mix(in srgb,var(--ac) 13%,transparent)}
body.nq-light .blog-cards>.blog-card:hover{box-shadow:0 18px 36px color-mix(in srgb,var(--ac) 26%,transparent)}
body.nq-light.nq-light .dark-gradient :is(h1,h2,p,span,.text-gray-300,.text-gray-400,[class*="text-gold"]){color:#fff;text-shadow:0 1px 10px rgba(18,8,56,.6)}
body.nq-light.nq-light .vk-hero .vk-popular a{background:rgba(29,18,80,.62);color:#fff;border-color:rgba(255,226,166,.6)}
body.nq-light .pg-hero>.wrap>:is(.pg-note,p.pg-note){color:#f1eaff;text-shadow:0 1px 8px rgba(18,8,56,.6)}
body.nq-light .pg-hero>.wrap>p a,body.nq-light .pg-hero>.wrap>.pg-note a{color:#ffe2a6}
@media (min-width:761px){body.nq-light .pg-hero>.wrap>h1{max-width:calc(100% - 230px)}}
/* phones: titles use the full width, so no moon behind them and only a small sprig in the corner */
@media (max-width:760px){
  body.nq-light{--moon-disc:radial-gradient(circle at 100% 0,rgba(255,224,170,.32),transparent 130px)}
  body.nq-light :is(.pg-hero,.la-hero,.dark-gradient)::before{width:118px;top:-30px;right:-34px}
  body.nq-light.nq-light :is(.blog-hero,.vk-hero)::before,body.nq-light .vm-page>section.bg-cream:first-child::before{width:104px;top:-30px;right:-32px}
  body.nq-light.nq-pillar .vm-page h1{padding:30px 22px 32px;background:url(img/canh-dao-phai.webp) right -26px top -30px/96px auto no-repeat,var(--tw)}
  body.nq-light :is(.pg-hero,.la-hero,.dark-gradient)::after{display:none}
}
