/* ดูดวงและไพ่: บล็อกที่ใช้ร่วมกันทุกหน้า (ฟอนต์ Sarabun ของธีม)
   din/fortune-hero (.din-fh) · din/note-box (.din-fnote) · din/fortune-caution (.din-fcaution)
   din/cta-banner (.din-fcta) · din/fortune-disclaimer (.din-fdisc) */
.din-fh, .din-fnote, .din-fcaution, .din-fcta, .din-fdisc {
  --f-green: #4ba44e; --f-green-dark: #2b481e; --f-night: #1d1438; --f-night-2: #3b2163; --f-gold: #f4c95d; --f-gold-soft: #fff3d1; --f-pink: #b81d65;
  box-sizing: border-box; font-family: var(--din-font, Sarabun, 'Noto Sans Thai', sans-serif);
}
.din-fh *, .din-fnote *, .din-fcaution *, .din-fcta * { box-sizing: border-box; }

/* ================= แถบหัวแบบแฟ้ม ================= */
.din-fh { position: relative; margin-top: 34px; color: #fff; }
.din-fh.has-tabs { margin-top: 40px; }
.din-fh__tabs { position: absolute; left: 0; bottom: 100%; width: 140px; height: 26px; pointer-events: none; }
.din-fh__tabs i { position: absolute; bottom: 0; height: 26px; border-radius: 12px 12px 0 0; }
.din-fh__tabs i:nth-child(1) { left: 0; width: 84px; z-index: 3; background: #3f8b42; }
.din-fh__tabs i:nth-child(2) { left: 66px; width: 44px; z-index: 2; background: #9fd39b; }
.din-fh__tabs i:nth-child(3) { left: 92px; width: 40px; z-index: 1; background: #cbe8c8; }
.din-fh.has-stars::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(1.5px 1.5px at 78% 22%, #fff 60%, transparent), radial-gradient(1px 1px at 62% 70%, #fff 60%, transparent),
    radial-gradient(2.5px 2.5px at 90% 64%, var(--f-gold) 60%, transparent), radial-gradient(2px 2px at 40% 26%, var(--f-gold) 60%, transparent),
    radial-gradient(1px 1px at 30% 80%, #fff 60%, transparent), radial-gradient(1.5px 1.5px at 12% 20%, #fff 60%, transparent);
}
.din-fh__inner { position: relative; display: flex; align-items: center; gap: 20px; }
.din-fh__text { flex: 1; min-width: 0; }
.din-fh .din-fh__title { margin: 0; color: #fff; font-family: inherit; font-weight: 700; line-height: 1.25; }
.din-fh .din-fh__sub { margin: 4px 0 0; font-size: 16px; line-height: 1.5; }
.din-fh .din-fh__meta { margin: 10px 0 0; font-size: 13px; color: #bfb1dc; }
.din-fh .din-fh__kicker { display: inline-block; padding: 2px 12px; border-radius: 999px; background: rgba(244, 201, 93, .18); color: var(--f-gold); font-size: 14px; font-weight: 600; }
.din-fh__icon {
  display: grid; place-items: center; flex: none; width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8e1, var(--f-gold) 70%); color: var(--f-night-2);
  font-size: 54px; line-height: 1; box-shadow: 0 0 0 6px rgba(244, 201, 93, .25), 0 0 40px rgba(244, 201, 93, .45);
}
.din-fh .din-fh__img { flex: none; width: 150px; height: auto; margin: 0 !important; border-radius: 0; }

/* สไตล์ "เขียวแฟ้ม" (เหมือนหน้าลอยกระทง) */
.din-fh.is-style-green { min-height: 190px; display: flex; align-items: center; justify-content: center; padding: 20px 24px; border-radius: 0 10px 10px 10px; background-color: var(--f-green); box-shadow: inset 0 10px 0 0 #3f8b42; }
.din-fh.is-style-green .din-fh__inner { width: 100%; justify-content: center; text-align: center; }
.din-fh.is-style-green .din-fh__text { flex: 0 1 auto; max-width: 60%; }
.din-fh.is-style-green .din-fh__title { font-size: 28px; }
.din-fh.is-style-green .din-fh__sub { color: var(--f-gold-soft); font-weight: 600; }
.din-fh.is-style-green .din-fh__meta { color: #e3f1d9; }
/* หนูนิดอยู่กึ่งกลางแถบเขียว (บน-ล่าง) · วางตามกรอบ .din-fh ไม่ใช่กรอบข้อความ */
.din-fh.is-style-green .din-fh__inner { position: static; }
.din-fh.is-style-green .din-fh__text { position: relative; }
.din-fh.is-style-green .din-fh__img { position: absolute; top: 5px; bottom: -5px; margin: auto 0 !important; width: 144px; height: auto !important; max-height: calc(100% - 10px); object-fit: contain; animation: din-fh-bob 4s ease-in-out infinite; }
.din-fh.is-style-green.din-fh--img-left .din-fh__img { left: 22px; }
.din-fh.is-style-green.din-fh--img-right .din-fh__img { right: 22px; }
.din-fh.is-style-green .din-fh__icon { width: 64px; height: 64px; font-size: 34px; }
@keyframes din-fh-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* สไตล์ "ม่วงกลางคืน" (หน้าดวงรายเดือน) */
.din-fh.is-style-night {
  overflow: hidden; padding: 30px 30px 30px 34px; border-radius: 0 14px 14px 14px; border-bottom: 6px solid var(--f-green);
  background-color: var(--f-night); background-image: linear-gradient(118deg, var(--f-night) 0%, var(--f-night-2) 48%, #6a2a7c 78%, var(--f-pink) 100%);
}
.din-fh.is-style-night.has-tabs { overflow: visible; }
.din-fh.is-style-night .din-fh__title { font-size: 28px; margin: 8px 0 4px; }
.din-fh.is-style-night .din-fh__sub { color: #dcd0f2; }
.din-fh.is-style-night .din-fh__img { align-self: flex-end; margin-bottom: -36px !important; }
.din-fh.is-style-night.din-fh--img-left .din-fh__img { order: -1; }
.din-fh.is-style-night.din-fh--img-left .din-fh__icon { order: -2; }
.din-fh.has-background { background-image: none; box-shadow: none; }

@media (max-width: 640px) {
  .din-fh.is-style-green { min-height: 140px; justify-content: flex-end; }
  .din-fh.is-style-green .din-fh__inner { justify-content: flex-end; text-align: right; }
  .din-fh.is-style-green.din-fh--img-right .din-fh__inner { justify-content: flex-start; text-align: left; }
  .din-fh.is-style-green .din-fh__text { max-width: 62%; }
  .din-fh.is-style-green .din-fh__title { font-size: 26px; }
  .din-fh.is-style-green .din-fh__sub { font-size: 13px; }
  .din-fh.is-style-green .din-fh__img { width: 104px; }
  .din-fh.is-style-green.din-fh--img-left .din-fh__img { left: 8px; }
  .din-fh.is-style-green.din-fh--img-right .din-fh__img { right: 8px; }
  .din-fh.is-style-night { padding: 22px 20px 0; }
  .din-fh.is-style-night .din-fh__inner { display: block; }
  .din-fh.is-style-night .din-fh__icon { float: left; width: 56px; height: 56px; margin: 4px 14px 6px 0; font-size: 32px; }
  .din-fh.is-style-night .din-fh__title { font-size: 25px; }
  .din-fh.is-style-night .din-fh__sub { clear: left; padding-top: 4px; font-size: 15px; }
  .din-fh.is-style-night .din-fh__img { width: 104px; margin: -14px 0 0 auto !important; }
}

/* ================= กล่องข้อความสั้น ================= */
.din-fnote { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: #e3f1d9; color: var(--f-green-dark); font-size: 16px; line-height: 1.65; }
.din-fnote p { margin: 0; }
.din-fnote__icon { flex: none; }
.din-fnote a { color: inherit; font-weight: 700; }
.din-fnote.is-style-cream { background: #fff4d6; color: #4a3b22; border: 1.5px solid #f0dfae; }
.din-fnote.is-style-purple { background: #f4eefc; color: var(--f-night-2); border: 1.5px solid #e6dbf5; }

/* ================= กล่องคำเตือน ================= */
.din-fcaution { margin-top: 20px; font-size: 14.5px; line-height: 1.65; }
.din-fcaution__box { max-width: 760px; margin: 0 auto; padding: 14px 18px; border-radius: 16px; text-align: left; }
.din-fcaution p { display: flex; gap: 6px; margin: 0; }
.din-fcaution p + p { margin-top: 6px; }
.din-fcaution__icon { flex: none; }
.din-fcaution a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
/* ม่วงกลางคืน: ต่อท้ายกระดานไพ่ให้เป็นผืนเดียวกัน */
.din-fcaution.is-style-night { padding: 22px 16px; border-radius: 10px; border-bottom: 6px solid var(--f-green); color: #d9cff0; background-color: #3d2160; background-image: linear-gradient(180deg, #34205a 0%, #3d2160 100%); }
.din-fcaution.is-style-night .din-fcaution__box { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); }
.din-fcaution.is-style-night a { color: var(--f-gold); }
.din-fcaution.is-style-night a:hover { color: #fff; }
.din-fcaution.is-style-light .din-fcaution__box { background: #f4eefc; border: 1.5px solid #e6dbf5; color: #4a3b56; }
.din-fcaution.is-style-light a { color: var(--f-green); }
.din-fcaution.has-background { background-image: none; }
.din-tarot-board:has(+ .din-fcaution.is-style-night) { margin-bottom: 0 !important; border-bottom: 0 !important; border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: 18px; }
.din-tarot-board + .din-fcaution.is-style-night { margin-top: 0 !important; padding-top: 4px; border-top-left-radius: 0; border-top-right-radius: 0; }

/* ================= แบนเนอร์ชวนไปหน้าอื่น ================= */
.din-fcta.din-fcta {
  display: flex; align-items: center; gap: 20px; margin-top: 40px; padding: 22px 24px; border-radius: 20px; color: #fff; text-decoration: none;
  background-color: var(--f-night);
  background-image: radial-gradient(1.5px 1.5px at 80% 25%, #fff 60%, transparent), radial-gradient(2px 2px at 64% 75%, var(--f-gold) 60%, transparent), linear-gradient(120deg, var(--f-night), var(--f-night-2));
}
.din-fcta.is-style-green { background-color: var(--f-green); background-image: radial-gradient(1.5px 1.5px at 80% 25%, #fff 60%, transparent), radial-gradient(2px 2px at 64% 75%, var(--f-gold) 60%, transparent); }
.din-fcta.has-background { background-image: none; }
.din-fcta__card {
  flex: none; display: grid; place-items: center; width: 64px; aspect-ratio: 2 / 3; border-radius: 9px; border: 2px solid var(--f-gold);
  background: radial-gradient(circle at 50% 40%, #5b3592, var(--f-night-2)); font-size: 26px; transform: rotate(-6deg); box-shadow: 0 0 24px rgba(244, 201, 93, .4);
}
.din-fcta .din-fcta__img { flex: none; width: 84px; height: auto; margin: 0 !important; border-radius: 0; }
.din-fcta__text { flex: 1; min-width: 0; }
.din-fcta__text strong { display: block; font-size: 20px; line-height: 1.35; }
.din-fcta__text span { color: #d9ccf3; }
.din-fcta.is-style-green .din-fcta__text span { color: #eef7ea; }
.din-fcta__btn { flex: none; display: inline-flex; align-items: center; min-height: 46px; padding: 8px 24px; border-radius: 999px; background: var(--f-green); color: #fff; font-weight: 700; white-space: nowrap; }
.din-fcta.is-style-green .din-fcta__btn { background: #fff; color: var(--f-green-dark); }
.din-fcta.din-fcta:hover { color: #fff; }
.din-fcta.din-fcta:hover .din-fcta__btn { filter: brightness(1.08); }
@media (max-width: 720px) {
  .din-fcta.din-fcta { flex-wrap: wrap; }
  .din-fcta__btn { width: 100%; justify-content: center; }
}

/* ================= บรรทัดท้ายหน้า ================= */
.din-fdisc.din-fdisc { max-width: 40em; margin: 22px auto 0; padding-top: 14px; border-top: 1px solid #e6dbf5; font-size: 14px; line-height: 1.6; color: #6c6280; text-align: center; }

/* ข้อความแนะนำ (เห็นเฉพาะคนที่ล็อกอิน) */
.din-fortune-empty { padding: 12px 14px; border: 1px dashed #b99be0; border-radius: 10px; background: #faf7fe; color: #6b3fa0; font-size: 14px; }
.din-fortune-preview .din-fh__img { animation: none; }
@media (prefers-reduced-motion: reduce) { .din-fh .din-fh__img { animation: none; } }

/* หนูนิดขยับเบาๆ */
@keyframes din-nunid-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-6px) rotate(-2deg); } }
.din-nunid-bob, .din-fcta .din-fcta__img, .din-fh.is-style-night .din-fh__img { animation: din-nunid-bob 3.6s ease-in-out infinite; transform-origin: 50% 100%; }
@media (prefers-reduced-motion: reduce) { .din-nunid-bob, .din-fcta .din-fcta__img, .din-fh.is-style-night .din-fh__img { animation: none; } }

/* ---------- ปุ่มกิจกรรมการ์ดสี (din/fortune-links) ---------- */
.din-flinks { margin: 26px 0 0; }
.din-flinks ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.din-flinks li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.din-flinks li::before { content: none !important; }
.din-flink {
  --c: #3f8b42; --bg: #f1f8e9; --line: #cfe3bd;
  display: flex; align-items: center; gap: 14px; min-height: 104px; height: 100%; padding: 16px 18px; box-sizing: border-box;
  border-radius: 16px; background: var(--bg); border: 1.5px solid var(--line); color: #2f2a22 !important; text-decoration: none !important;
  transition: transform .15s, box-shadow .15s;
}
.din-flink:hover, .din-flink:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(40, 60, 30, .12); }
.din-flink--purple { --c: #3b2163; --bg: #f4eefc; --line: #e0d2f3; }
.din-flink--gold { --c: #a8781c; --bg: #fff4d6; --line: #f0dfae; }
.din-flink--pink { --c: #b81d65; --bg: #fdecf3; --line: #f3cadb; }
.din-flink__icon { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--c); color: #fff; }
.din-flink__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.din-flink__text b { font-size: 19px; font-weight: 700; }
.din-flink__text small { font-size: 14.5px; color: #6b6355; }
.din-flink__arrow { font-size: 24px; line-height: 1; color: var(--c); }
@media (max-width: 960px) { .din-flinks ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 480px) {
  .din-flink { min-height: 84px; padding: 12px; gap: 10px; }
  .din-flink__icon { width: 44px; height: 44px; }
  .din-flink__icon svg { width: 22px; height: 22px; }
  .din-flink__text b { font-size: 16px; }
  .din-flink__text small { font-size: 13px; }
  .din-flink__arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .din-flink { transition: none; } }

/* หน้าหมวดที่มีหน้า Hub: แถบหัวเขียวแทนแบนเนอร์ลาย + เนื้อหา Hub เต็มความกว้างใต้ปุ่มหมวด */
.din-hub-banner .din-fh { margin-top: 40px; }
.din-hub-banner .din-fh.is-style-green { min-height: 260px; }
.din-hub-banner .din-fh.is-style-green .din-fh__title { font-size: 30px; }
@media (max-width: 640px) { .din-hub-banner .din-fh.is-style-green { min-height: 170px; } .din-hub-banner .din-fh.is-style-green .din-fh__title { font-size: 26px; } }
.din-hub { margin-top: 8px; }
.din-hub > .din-flinks:first-child { margin-top: 30px; }

/* ---------- แถบหัวเขียว: ข้อความชิดข้างหนูนิด (ตัวใหญ่) ---------- */
.din-fh.is-style-green.din-fh--side { justify-content: flex-start; min-height: 250px; padding: 26px 44px; }
.din-fh.is-style-green.din-fh--side .din-fh__inner { position: relative; justify-content: flex-start; text-align: left; gap: 30px; }
.din-fh.is-style-green.din-fh--side .din-fh__img { position: static; flex: none; width: 190px; max-height: none; margin: 0 !important; order: -1; }
.din-fh.is-style-green.din-fh--side.din-fh--img-right .din-fh__img { order: 3; }
.din-fh.is-style-green.din-fh--side .din-fh__text { flex: 1; max-width: none; }
.din-fh.is-style-green.din-fh--side .din-fh__title { font-size: 30px; line-height: 1.3; }
.din-fh.is-style-green.din-fh--side .din-fh__sub { margin-top: 8px; font-size: 16px; font-weight: 400; line-height: 1.6; color: #fff4d6; max-width: 36em; }
.din-fh.is-style-green .din-fh__kicker { margin-bottom: 6px; background: rgba(255, 255, 255, .18); color: #fff; font-size: 14.5px; }
@media (max-width: 640px) {
  .din-fh.is-style-green.din-fh--side { min-height: 0; padding: 18px 16px; }
  .din-fh.is-style-green.din-fh--side .din-fh__inner { gap: 12px; }
  .din-fh.is-style-green.din-fh--side .din-fh__img { width: 92px; }
  .din-fh.is-style-green.din-fh--side .din-fh__title { font-size: 20px; }
  .din-fh.is-style-green.din-fh--side .din-fh__sub { font-size: 14px; }
  .din-fh.is-style-green .din-fh__kicker { font-size: 12px; }
}
.din-hub-banner .din-fh.is-style-green.din-fh--side .din-fh__title { font-size: 28px; }
@media (max-width: 640px) { .din-hub-banner .din-fh.is-style-green.din-fh--side .din-fh__title { font-size: 20px; } }

/* ---------- การ์ดดวงรายเดือนล่าสุด (din/horo-featured) ---------- */
.din-hfeat-wrap { margin-top: 52px; }
.din-hfeat-wrap .din-heading { margin-bottom: 22px; }
.din-hfeat {
  display: flex; flex-wrap: wrap; align-items: stretch; border-radius: 18px; overflow: hidden; text-decoration: none !important; color: #fff !important;
  background: radial-gradient(1.5px 1.5px at 22% 24%, #fff 60%, transparent), radial-gradient(2px 2px at 58% 14%, #f4c95d 60%, transparent), radial-gradient(1px 1px at 46% 82%, #fff 60%, transparent),
    linear-gradient(120deg, #1d1438 0%, #3b2163 55%, #6a2a7c 100%);
  box-shadow: 0 14px 34px rgba(42, 23, 72, .28); transition: transform .15s, box-shadow .15s;
}
.din-hfeat:hover, .din-hfeat:focus-visible { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(42, 23, 72, .34); }
.din-hfeat__text { flex: 1; min-width: 280px; padding: 34px 38px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.din-hfeat__kicker { align-self: flex-start; padding: 3px 14px; border-radius: 999px; background: rgba(244, 201, 93, .2); color: #f4c95d; font-size: 14px; font-weight: 600; }
.din-hfeat__title { font-size: 34px; line-height: 1.25; font-weight: 700; color: #fff; }
.din-hfeat__desc { font-size: 17px; line-height: 1.6; color: #e6dbf5; }
.din-hfeat__btn { margin-top: 8px; align-self: flex-start; display: inline-flex; align-items: center; min-height: 46px; padding: 0 26px; border-radius: 999px; background: #f4c95d; color: #3b2163; font-size: 17px; font-weight: 700; }
.din-hfeat__art { flex: none; width: 300px; display: flex; align-items: flex-end; justify-content: center; padding-top: 16px; }
.din-hfeat__art img { display: block; width: 250px; height: auto !important; margin: 0 !important; }
.din-hfeat__art img.din-hfeat__photo { width: 100%; height: 100% !important; object-fit: cover; }
@media (max-width: 760px) {
  .din-hfeat__text { padding: 22px 20px 8px; min-width: 0; }
  .din-hfeat__title { font-size: 24px; }
  .din-hfeat__desc { font-size: 15px; }
  .din-hfeat__art { width: 100%; padding-top: 0; }
  .din-hfeat__art img { width: 170px; }
}
@media (prefers-reduced-motion: reduce) { .din-hfeat { transition: none; } }

/* ---------- หน้า Hub: ย่อหน้าแนะนำ + กล่องจุดเด่น ---------- */
.din-hub .din-hub-text { max-width: 900px; margin: 18px auto 0 !important; font-size: 17.5px; line-height: 1.85; color: #3b3428; }
.din-hub .din-flinks + .din-hub-text { margin-top: 30px !important; }
.din-hub .din-hub-text strong { color: #2b481e; }
.din-hub .din-hub-closing { margin-top: 30px !important; text-align: center; font-size: 18px; font-weight: 600; color: #2b481e; }
.din-hub .din-hub-points { max-width: 960px; margin: 40px auto 0 !important; padding: 24px 28px; border-radius: 18px; background: #f1f8e9; border: 1.5px solid #dcebcd; }
.din-hub .din-hub-points h2 { margin: 0 0 12px !important; font-size: 24px; color: #2b481e; text-align: left; }
.din-hub .din-hub-points h2::after, .din-hub .din-hub-points h2::before { content: none !important; }
.din-hub .din-hub-points ul { margin: 0 !important; padding-left: 1.2em !important; }
.din-hub .din-hub-points li { margin: 0 0 8px !important; font-size: 16.5px; line-height: 1.75; }
.din-hub .din-hub-points li::marker { color: #4ba44e; }
.din-hub-banner .din-fh.is-style-green.din-fh--side .din-fh__title { font-size: 28px; line-height: 1.35; }
@media (max-width: 640px) {
  .din-hub .din-hub-text { font-size: 16px; }
  .din-hub .din-hub-points { padding: 18px 16px; }
  .din-hub .din-hub-points h2 { font-size: 20px; }
  .din-hub-banner .din-fh.is-style-green.din-fh--side .din-fh__title { font-size: 19px; }
}

/* =================================================================== */
/* 3.12: หัวข้อส่วน · กล่องแนะนำไพ่ · กล่องลิงก์ · ปุ่มดินสอ · แจ้งเตือนเดือนใหม่ */
/* =================================================================== */

/* ---------- หัวข้อส่วน (din/section-head) ---------- */
.din-shead { margin: 56px 0 22px; text-align: center; }
.din-shead .din-shead__kicker { margin: 0 !important; font-size: 15px; font-weight: 700; color: #a8781c; }
.din-shead .din-shead__title { display: inline-block; margin: 4px 0 0 !important; padding-bottom: 6px; border-bottom: 3px solid #2b481e; font-size: 30px; line-height: 1.3; color: #2b481e; }
.din-shead .din-shead__title::before, .din-shead .din-shead__title::after { content: none !important; }
.din-shead .din-shead__sub { margin: 10px auto 0 !important; max-width: 40em; font-size: 16px; line-height: 1.7; color: #6b6355; }
@media (max-width: 640px) { .din-shead .din-shead__title { font-size: 22px; } }

/* ---------- กล่องแนะนำไพ่ (din/fortune-teaser) ---------- */
.din-teaser {
  --t-bg: linear-gradient(180deg, #fbfdf6, #eef7e4); --t-line: #dcebcd; --t-ink: #2b481e; --t-desc: #4a3b22; --t-kick: #3f8b42; --t-note: #6b6355;
  --t-btn: #4ba44e; --t-btn-ink: #fff; --t-card-b: #4ba44e; --t-card: radial-gradient(circle at 50% 40%, #fffbe8, #e5f3d9 70%);
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; margin: 32px 0 0; padding: 32px 36px;
  border-radius: 18px; background: var(--t-bg); border: 1.5px solid var(--t-line); overflow: hidden; color: var(--t-ink);
}
.din-teaser.is-style-night {
  --t-bg: radial-gradient(ellipse at 30% 0%, #4a2a7a 0%, #2a1748 60%, #1d1438 100%); --t-line: transparent; --t-ink: #fff; --t-desc: #e6dbf5; --t-kick: #f4c95d; --t-note: #bfb1dc;
  --t-btn: #f4c95d; --t-btn-ink: #3b2163; --t-card-b: #f4c95d; --t-card: radial-gradient(circle at 50% 40%, #5b3592, #3b2163 60%, #1d1438);
  border-bottom: 6px solid #4ba44e;
}
.din-teaser__fan { position: relative; flex: none; display: block; width: 500px; max-width: 100%; height: 290px; text-decoration: none !important; }
.din-teaser__card {
  position: absolute; left: calc(50% - 52px); top: 34px; width: 104px; aspect-ratio: 2 / 3; box-sizing: border-box; border-radius: 12px; overflow: hidden;
  border: 3px solid var(--t-card-b); background: var(--t-card); box-shadow: -2px 4px 10px rgba(0, 0, 0, .22);
  transform-origin: 50% 260%; transform: rotate(var(--r)); display: grid; place-items: center; transition: transform .25s;
}
.din-teaser__fan:hover .din-teaser__card { transform: rotate(calc(var(--r) * 1.15)); }
.entry-content .din-teaser__card img, .din-teaser__card img { width: 100%; height: 100% !important; object-fit: cover; margin: 0 !important; border-radius: 0; }
.din-teaser__label { display: grid; place-items: center; width: 80%; height: 86%; box-sizing: border-box; border: 1.5px dashed #9fd39b; border-radius: 8px; font-size: 11px; font-weight: 700; color: #2b481e; text-align: center; transform: rotate(-38deg); }
.din-teaser__moon { color: #f4c95d; font-size: 30px; }
.entry-content .din-teaser__nunid, .din-teaser__nunid { position: absolute; left: -6px; bottom: -14px; width: 180px; height: auto !important; margin: 0 !important; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.din-teaser__text { flex: 1; min-width: 280px; }
.din-teaser .din-teaser__kicker { margin: 0 !important; font-size: 15px; font-weight: 700; color: var(--t-kick); }
.din-teaser .din-teaser__title { margin: 6px 0 8px !important; font-size: 32px; line-height: 1.3; color: var(--t-ink); }
.din-teaser .din-teaser__title::before, .din-teaser .din-teaser__title::after { content: none !important; }
.din-teaser .din-teaser__desc { margin: 0 0 18px !important; font-size: 17px; line-height: 1.75; color: var(--t-desc); }
.din-teaser .din-teaser__btn { display: inline-flex; align-items: center; min-height: 50px; padding: 0 30px; border-radius: 999px; background: var(--t-btn); color: var(--t-btn-ink) !important; font-size: 18px; font-weight: 700; text-decoration: none !important; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.din-teaser .din-teaser__btn:hover { filter: brightness(1.06); }
.din-teaser .din-teaser__note { margin: 10px 0 0 !important; font-size: 14px; color: var(--t-note); }
@media (max-width: 760px) {
  .din-teaser { padding: 22px 18px 26px; text-align: center; }
  .din-teaser__fan { width: 100%; height: 230px; }
  .din-teaser__card { width: 84px; left: calc(50% - 42px); top: 26px; }
  .din-teaser__nunid { width: 130px; }
  .din-teaser .din-teaser__title { font-size: 25px; }
  .din-teaser .din-teaser__desc { font-size: 15.5px; }
}

/* ---------- กล่องลิงก์ (din/link-box) ---------- */
.din-lbox {
  --l-bg: linear-gradient(120deg, #1d1438 0%, #3b2163 50%, #6a2a7c 100%); --l-ink: #fff; --l-desc: #e6dbf5; --l-kick: #f4c95d; --l-kick-bg: rgba(244, 201, 93, .2);
  --l-btn: #f4c95d; --l-btn-ink: #3b2163; --l-line: transparent; --l-dot: rgba(244, 201, 93, .18); --l-dot-ink: #f4c95d; --l-ring: #2a1748; --l-ring-b: #f4c95d;
  position: relative; display: flex; margin: 32px 0 0; color: var(--l-ink) !important; text-decoration: none !important; background: var(--l-bg); border: 1.5px solid var(--l-line); overflow: hidden;
}
.din-lbox--gold { --l-bg: radial-gradient(2px 2px at 30% 22%, #fff 60%, transparent), linear-gradient(115deg, #fff4d6 0%, #ffe7a8 60%, #f6d27a 100%); --l-ink: #3b2163; --l-desc: #4a3b22; --l-kick: #a8781c; --l-kick-bg: rgba(168, 120, 28, .12); --l-btn: #3b2163; --l-btn-ink: #fff; --l-line: #f0dfae; --l-dot: #3b2163; --l-dot-ink: #f4c95d; --l-ring: #3b2163; --l-ring-b: #f4c95d; }
.din-lbox--mint { --l-bg: linear-gradient(135deg, #f1f8e9 0%, #dcefd0 100%); --l-ink: #2b481e; --l-desc: #4a5a3e; --l-kick: #fff; --l-kick-bg: #4ba44e; --l-btn: #3b2163; --l-btn-ink: #fff; --l-line: #cfe3bd; --l-dot: #4ba44e; --l-dot-ink: #fff; --l-ring: #2a1748; --l-ring-b: #4ba44e; }
.din-lbox--lilac { --l-bg: #f4eefc; --l-ink: #3b2163; --l-desc: #6b6355; --l-kick: #7a63a0; --l-kick-bg: transparent; --l-btn: #6b3fa0; --l-btn-ink: #fff; --l-line: #c9b3ea; --l-dot: #6b3fa0; --l-dot-ink: #fff; --l-ring: #ece2fa; --l-ring-b: #6b3fa0; }
.din-lbox__main { flex: 1; display: flex; align-items: center; gap: 28px; min-width: 0; }
.din-lbox__text { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.din-lbox__kicker { align-self: flex-start; padding: 3px 14px; border-radius: 999px; background: var(--l-kick-bg); color: var(--l-kick); font-size: 14px; font-weight: 700; }
.din-lbox__title { font-size: 32px; line-height: 1.25; font-weight: 700; color: var(--l-ink); }
.din-lbox__desc { font-size: 17px; line-height: 1.6; color: var(--l-desc); }
.din-lbox__btn { align-self: flex-start; margin-top: 8px; display: inline-flex; align-items: center; min-height: 50px; padding: 0 30px; border-radius: 999px; background: var(--l-btn); color: var(--l-btn-ink) !important; font-size: 17px; font-weight: 700; text-decoration: none !important; }
.entry-content .din-lbox__img, .din-lbox__img { flex: none; width: 270px; height: auto !important; margin: 0 !important; align-self: flex-end; }
.din-signdots { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.din-signdots i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--l-dot); color: var(--l-dot-ink); font-size: 15px; font-style: normal; }
/* กว้าง */
.din-lbox--wide { border-radius: 24px; padding: 22px 36px 22px 24px; box-shadow: 0 14px 34px rgba(42, 23, 72, .22); }
.din-lbox--wide.din-lbox--night { border-bottom: 6px solid #4ba44e; }
.din-lbox--wide.has-latest { flex-wrap: wrap; padding: 0; }
.din-lbox--wide.has-latest .din-lbox__main { padding: 22px 0 0 22px; align-items: flex-end; }
.din-lbox--wide.has-latest .din-lbox__text { padding-bottom: 22px; }
.din-lbox__latest { flex: none; width: 380px; box-sizing: border-box; padding: 22px 24px; background: rgba(255, 255, 255, .72); display: flex; flex-direction: column; gap: 10px; color: #2f2a22; }
.din-lbox__latest > b { font-size: 16px; color: #2b481e; }
.din-lbox__latest a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; background: #fff; color: #2f2a22 !important; text-decoration: none !important; box-shadow: 0 2px 8px rgba(43, 72, 30, .08); }
.din-lbox__latest a b { display: block; font-size: 14.5px; line-height: 1.35; }
.din-lbox__latest a small { font-size: 12px; color: #8a8a8a; }
.din-lbox__thumb { flex: none; width: 84px; height: 56px; border-radius: 8px; overflow: hidden; background: linear-gradient(120deg, #1d1438, #3b2163 55%, #6a2a7c); display: grid; place-items: center; }
.entry-content .din-lbox__thumb img, .din-lbox__thumb img { width: 100%; height: 100% !important; object-fit: cover; margin: 0 !important; }
.din-lbox__noimg { color: #f4c95d; font-size: 20px; }
/* การ์ด */
.din-lbox--card { width: 100%; max-width: 340px; box-sizing: border-box; border-radius: 22px; padding: 18px 20px 22px; text-align: center; box-shadow: 0 12px 28px rgba(42, 23, 72, .22); }
.din-lbox--card .din-lbox__main { flex-direction: column; gap: 6px; }
.din-lbox--card .din-lbox__img { width: 220px; align-self: center; }
.din-lbox--card .din-lbox__text { align-items: center; }
.din-lbox--card .din-lbox__kicker, .din-lbox--card .din-lbox__btn { align-self: center; }
.din-lbox--card .din-lbox__title { font-size: 22px; }
.din-lbox--card .din-lbox__desc { font-size: 15px; }
/* แถบเล็ก */
.din-lbox--strip { align-items: center; gap: 14px; max-width: 640px; margin-left: auto; margin-right: auto; padding: 10px 18px 10px 10px; border-radius: 999px; box-shadow: 0 8px 20px rgba(0, 0, 0, .1); }
.din-lbox--strip.din-lbox--mint, .din-lbox--strip.din-lbox--lilac { border-width: 2px; border-style: dashed; }
.din-lbox__ring { flex: none; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: var(--l-ring); border: 3px solid var(--l-ring-b); overflow: hidden; }
.entry-content .din-lbox__ring img, .din-lbox__ring img { width: 104px; height: auto !important; margin: 22px 0 0 !important; align-self: auto; }
.din-lbox--strip .din-lbox__text { gap: 0; line-height: 1.35; }
.din-lbox--strip .din-lbox__kicker { padding: 0; background: none; font-size: 13.5px; color: var(--l-kick-bg) !important; }
.din-lbox--strip.din-lbox--night .din-lbox__kicker, .din-lbox--strip.din-lbox--gold .din-lbox__kicker, .din-lbox--strip.din-lbox--lilac .din-lbox__kicker { color: var(--l-kick) !important; }
.din-lbox--strip .din-lbox__title { font-size: 19px; }
.din-lbox--strip .din-lbox__desc { font-size: 14px; }
.din-lbox__arrow { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--l-btn); color: var(--l-btn-ink); font-size: 22px; font-weight: 700; }
.din-lbox:hover .din-lbox__arrow, .din-lbox:hover .din-lbox__btn { filter: brightness(1.08); }
@media (max-width: 760px) {
  .din-lbox--wide { padding: 16px 16px 16px 8px; border-radius: 20px; }
  .din-lbox--wide .din-lbox__main { gap: 10px; }
  .din-lbox--wide .din-lbox__img { width: 120px; }
  .din-lbox--wide .din-lbox__title { font-size: 19px; }
  .din-lbox--wide .din-lbox__desc, .din-lbox--wide .din-signdots { display: none; }
  .din-lbox--wide .din-lbox__btn { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
  .din-lbox__latest { width: 100%; }
  .din-lbox--strip { border-radius: 20px; }
  .din-lbox__ring { width: 68px; height: 68px; }
  .din-lbox__ring img { width: 82px; margin-top: 16px !important; }
  .din-lbox--strip .din-lbox__title { font-size: 16.5px; }
  .din-lbox__arrow { width: 40px; height: 40px; }
}

/* ---------- ปุ่มดินสอ (เห็นเฉพาะแอดมิน) ---------- */
:where(*):has(> .din-pen) { position: relative; }
.din-pen { position: absolute; top: 10px; right: 10px; z-index: 30; display: flex; gap: 6px; }
.din-pen a { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 12px; border-radius: 999px; background: #fff; color: #2b481e !important; border: 1.5px solid #2b481e; font-size: 12.5px; font-weight: 700; text-decoration: none !important; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); opacity: .92; }
.din-pen a:hover { opacity: 1; background: #2b481e; color: #fff !important; }

/* ---------- แจ้งเตือนดวงเดือนใหม่ ---------- */
.din-newmonth {
  position: fixed; right: 20px; bottom: calc(20px + var(--din-ad-h, 0px)); z-index: 9990; width: 370px; max-width: calc(100vw - 24px); box-sizing: border-box;
  display: flex; align-items: flex-end; gap: 10px; padding: 16px 16px 16px 10px; border-radius: 18px; background: #2a1748; color: #fff; font-family: var(--din-font, "Sarabun", sans-serif);
  box-shadow: 0 18px 40px rgba(42, 23, 72, .45), 0 0 0 1px rgba(244, 201, 93, .35); opacity: 0; transition: opacity .4s;
}
.din-newmonth.is-in { opacity: 1; }
.din-newmonth[hidden] { display: none; }
.din-newmonth__img { flex: none; width: 92px; height: auto; margin: -34px 0 -6px; }
.din-newmonth__body { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.din-newmonth__tag { align-self: flex-start; padding: 0 10px; border-radius: 999px; background: #f4c95d; color: #3b2163; font-size: 12.5px; font-weight: 700; }
.din-newmonth__title { font-size: 18px; line-height: 1.3; }
.din-newmonth__text { font-size: 14.5px; line-height: 1.5; color: #e6dbf5; }
.din-newmonth__row { display: flex; gap: 8px; margin-top: 6px; }
.din-newmonth__go { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #4ba44e; color: #fff !important; font-size: 15px; font-weight: 700; text-decoration: none !important; }
.din-newmonth__later { min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #e6dbf5; font: inherit; font-size: 14px; cursor: pointer; }
.din-newmonth__x { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; border: 0; background: none; color: #bfb1dc; font-size: 22px; line-height: 1; cursor: pointer; }
@media (max-width: 900px) {
  body:has(.din-bnav) .din-newmonth { bottom: calc(76px + env(safe-area-inset-bottom) + var(--din-ad-h, 0px)); }
}
@media (max-width: 640px) {
  .din-newmonth { right: 12px; left: 12px; width: auto; padding: 12px 12px 12px 6px; }
  .din-newmonth__img { width: 66px; margin-top: -26px; }
  .din-newmonth__title { font-size: 16px; }
  .din-newmonth__text { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .din-newmonth, .din-newmonth__img { transition: none; animation: none; } }

.din-more-label { margin: 48px 0 -18px !important; text-align: center; font-size: 15px; font-weight: 700; color: #8a7a5a; }


/* =================================================================== */
/* จอมือถือ/แท็บเล็ต: จัดทุกกล่องให้อยู่ในกรอบ ไม่ซ้อนทับ ไม่ล้นจอ        */
/* =================================================================== */
/* แถบหัว: แท็บเล็ตลดรูปและตัวหนังสือ */
@media (min-width: 641px) and (max-width: 1024px) {
  .din-fh.is-style-green.din-fh--side { padding: 22px 28px; min-height: 200px; }
  .din-fh.is-style-green.din-fh--side .din-fh__img { width: 150px; }
  .din-fh.is-style-green.din-fh--side .din-fh__title, .din-hub-banner .din-fh.is-style-green.din-fh--side .din-fh__title { font-size: 25px; }
  .din-teaser { padding: 28px 26px; }
  .din-teaser__fan { width: 100%; }
}
/* มือถือ: หนูนิดอยู่บน ข้อความอยู่ล่าง กึ่งกลาง ไม่ทับกัน */
@media (max-width: 640px) {
  .din-fh.is-style-green, .din-fh.is-style-green.din-fh--side { min-height: 0; padding: 16px 16px 20px; justify-content: center; }
  .din-fh.is-style-green .din-fh__inner, .din-fh.is-style-green.din-fh--side .din-fh__inner {
    position: relative; flex-direction: column; align-items: center; justify-content: center !important; gap: 6px; text-align: center !important;
  }
  .din-fh.is-style-green .din-fh__text, .din-fh.is-style-green.din-fh--side .din-fh__text { max-width: 100% !important; flex: none; width: 100%; }
  .din-fh.is-style-green .din-fh__img, .din-fh.is-style-green.din-fh--side .din-fh__img {
    position: static !important; order: -1 !important; width: 96px !important; max-height: none; margin: 0 auto !important;
  }
  .din-fh.is-style-green .din-fh__title, .din-fh.is-style-green.din-fh--side .din-fh__title,
  .din-hub-banner .din-fh.is-style-green .din-fh__title, .din-hub-banner .din-fh.is-style-green.din-fh--side .din-fh__title { font-size: 21px; line-height: 1.35; }
  .din-fh.is-style-green .din-fh__sub, .din-fh.is-style-green.din-fh--side .din-fh__sub { font-size: 14.5px; max-width: none; }
  .din-fh.is-style-green .din-fh__kicker { font-size: 12.5px; }
  .din-hub-banner .din-fh.is-style-green { min-height: 0; }
  /* ม่วงกลางคืน: ข้อความก่อน หนูนิดชิดขวาล่าง ไม่ทับข้อความ */
  .din-fh.is-style-night { padding: 20px 18px 0; }
  .din-fh.is-style-night .din-fh__title { font-size: 22px; }
  .din-fh.is-style-night .din-fh__img { display: block; width: 92px; margin: 8px 0 0 auto !important; }

  /* กล่องแนะนำไพ่: พัดแคบลงให้อยู่ในกล่อง */
  .din-teaser { padding: 20px 14px 24px; gap: 8px; }
  .din-teaser__fan { width: 100%; height: 200px; }
  .din-teaser__card { width: 70px; left: calc(50% - 35px); top: 22px; border-width: 2px; border-radius: 9px; transform: rotate(calc(var(--r) * .6)); }
  .din-teaser__fan:hover .din-teaser__card { transform: rotate(calc(var(--r) * .66)); }
  .din-teaser__nunid, .entry-content .din-teaser__nunid { width: 110px; left: 0; bottom: -10px; }
  .din-teaser__label { font-size: 8.5px; line-height: 1.25; }
  .din-teaser__text { min-width: 0; width: 100%; }
  .din-teaser .din-teaser__title { font-size: 22px; }
  .din-teaser .din-teaser__btn { width: 100%; justify-content: center; font-size: 17px; }
}
/* จอเล็กมาก (≤360px) */
@media (max-width: 360px) {
  .din-teaser__card { width: 62px; left: calc(50% - 31px); }
  .din-fh.is-style-green .din-fh__title, .din-fh.is-style-green.din-fh--side .din-fh__title { font-size: 19.5px; }
}
/* ขนาดตัวหนังสือที่ตั้งในบล็อก (แถบขวา › ขนาดตัวหนังสือ) · ชนะค่าเดิมทุกขนาดจอ */
.din-fsz-t :is(h1, h2, h3, .din-fh__title, .din-teaser__title, .din-lbox__title, .din-hfeat__title, .lpc-title, .lph-finder-title, .din-heading) { font-size: var(--fs-t) !important; }
.din-fsz-x :is(p, li, .din-fh__sub, .din-teaser__desc, .din-lbox__text, .din-hfeat__desc, .lpc-lead, .lph-bubble, .ldc-bubble p, .lpc-try__bubble) { font-size: var(--fs-x) !important; }
@media (max-width: 640px) {
  .din-fsz-tm :is(h1, h2, h3, .din-fh__title, .din-teaser__title, .din-lbox__title, .din-hfeat__title, .lpc-title, .lph-finder-title, .din-heading) { font-size: var(--fs-tm) !important; }
  .din-fsz-xm :is(p, li, .din-fh__sub, .din-teaser__desc, .din-lbox__text, .din-hfeat__desc, .lpc-lead, .lph-bubble, .ldc-bubble p, .lpc-try__bubble) { font-size: var(--fs-xm) !important; }
}