/* ดูดวงรายเดือน (ม่วงกลางคืน-ทอง) · บล็อก: din/zodiac-finder, din/sign-nav, din/horo-sign, din/horo-archive
   ทุกบล็อกมี class .lph ที่ตัวบล็อกเอง */
.lph {
  --night: #1d1438; --night-2: #3b2163; --purple: #6b3fa0; --purple-soft: #f4eefc; --line: #e6dbf5;
  --green: #4ba44e; --green-dark: #2b481e; --green-soft: #e3f1d9; --green-line: #cfe3bd;
  --gold: #f4c95d; --gold-soft: #fff4d6; --pink: #b81d65; --text: #333; --muted: #6c6280;
  font-family: var(--din-font, Sarabun, 'Noto Sans Thai', sans-serif); font-size: 17px; line-height: 1.75; color: var(--text);
  max-width: var(--din-wrap, 1200px); margin-left: auto; margin-right: auto;
}
.lph, .lph *, .lph *::before, .lph *::after { box-sizing: border-box; }
.lph :where(h2, h3, h4, p, blockquote) { margin: 0; }
.lph img { display: block; max-width: 100%; height: auto; border-radius: 0; }

/* ---------- ส่วนของแต่ละราศี ---------- */
.lph.lph-signsec { margin-top: 34px; padding: 26px; border-radius: 22px; background: #fff; border: 1.5px solid var(--green-line); scroll-margin-top: 90px; /* ธีมเผื่อความสูงหัวเว็บไว้แล้ว (scroll-padding-top) บวกแถบเลือกราศี */ }
.lph.lph-signsec:target { border-color: var(--green); }
.lph .lph-signsec-head {
  display: flex; align-items: center; gap: 16px; margin: -26px -26px 0; padding: 18px 26px; border-radius: 20px 20px 0 0; color: #fff;
  background: radial-gradient(1.5px 1.5px at 70% 30%, #fff 60%, transparent), radial-gradient(2px 2px at 88% 70%, var(--gold) 60%, transparent),
    linear-gradient(115deg, var(--night) 0%, var(--night-2) 60%, #5d2a7e 100%);
  border-bottom: 5px solid var(--green);
}
.lph .lph-signsec-sym {
  display: grid; place-items: center; flex: none; width: 62px; height: 62px; border-radius: 50%; font-size: 34px; line-height: 1;
  background: radial-gradient(circle at 35% 30%, #fff8e1, var(--gold) 70%); color: var(--night-2); box-shadow: 0 0 24px rgba(244, 201, 93, .45);
}
.lph .lph-signsec-head h2 { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 700; color: #fff; }
.lph .lph-signsec-head p { margin: 0; color: #dcd0f2; font-size: 15px; }
.lph .lph-totop { margin-left: auto; align-self: flex-start; color: #cfe8c8; font-size: 14px; text-decoration: none; white-space: nowrap; }
.lph .lph-totop:hover { color: #fff; }

/* คำฮีลใจ */
.lph .lph-quote {
  position: relative; margin: 20px 0 0; padding: 22px 26px 22px 64px; border: 0; border-radius: 18px; background: var(--gold-soft);
  font-size: 21px; line-height: 1.55; font-weight: 700; color: #4a3b22;
}
.lph .lph-quote::before { content: "“"; position: absolute; left: 18px; top: 4px; font-size: 64px; line-height: 1; color: var(--gold); }

/* พาร์ทดวง */
.lph .lph-part { margin: 26px 0 10px; padding-bottom: 8px; border-bottom: 2px dashed var(--green-line); font-size: 20px; line-height: 1.4; font-weight: 700; color: var(--green-dark); }
.lph .lph-lead { font-size: 18px; }
.lph .lph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.lph .lph-box { padding: 18px 20px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); }
.lph .lph-box--wide { grid-column: 1 / -1; }
.lph .lph-box h4, .lph .lph-step h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--green-dark); }
.lph .lph-love { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.lph .lph-love > div { padding: 12px 14px; border-radius: 12px; background: #fdf0f6; }
.lph .lph-love b { display: block; color: var(--pink); font-size: 15px; }

/* พาร์ทจิตวิทยา */
.lph .lph-psych { padding: 24px; border-radius: 20px; background: linear-gradient(180deg, var(--purple-soft), #fff); border: 1.5px solid var(--line); }
.lph .lph-says { display: flex; gap: 14px; align-items: flex-start; }
.lph .lph-says img { flex: none; width: 74px; height: auto; margin: 0 !important; }
.lph .lph-bubble { position: relative; flex: 1; padding: 14px 18px; border-radius: 4px 18px 18px 18px; background: #fff; box-shadow: 0 4px 14px rgba(59, 33, 99, .08); }
.lph .lph-bubble small { display: block; margin-bottom: 2px; color: var(--green); font-weight: 700; font-size: 14px; }
.lph .lph-steps { display: grid; gap: 12px; margin-top: 18px; }
.lph .lph-says + .lph-steps { margin-top: 18px; }
.lph .lph-psych > .lph-steps:first-child { margin-top: 0; }
.lph .lph-step { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); }
.lph .lph-step .lph-emoji { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--gold-soft); font-size: 24px; }
.lph .lph-journal {
  margin-top: 6px; padding: 10px 14px; border-radius: 10px; font-size: 18px; font-weight: 600; color: var(--night-2);
  background: repeating-linear-gradient(180deg, #fffdf6 0 31px, #efe3c4 31px 32px); line-height: 32px;
}
.lph .lph-placeholder { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: #f6f7f5; color: #8a8f86; font-size: 15px; border: 1px dashed #d5dccf; }

/* ---------- แถบเลือกราศี (พื้นทอง) ---------- */
/* ทองสว่าง: ไล่แสงเงานุ่มๆ + ประกายดาว + แสงวิ่งผ่านช้าๆ (ไม่มีขอบเข้ม) */
.lph.lph-jump {
  margin-top: 22px; padding: 10px; border-radius: 14px; z-index: 20; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1.5px 1.5px at 8% 30%, #fffbe8 60%, transparent 100%),
    radial-gradient(1px 1px at 23% 78%, #fff 60%, transparent 100%),
    radial-gradient(1.5px 1.5px at 47% 18%, #fffbe8 60%, transparent 100%),
    radial-gradient(1px 1px at 71% 84%, #fff 60%, transparent 100%),
    radial-gradient(1.5px 1.5px at 92% 26%, #fffbe8 60%, transparent 100%),
    radial-gradient(ellipse 60% 120% at 50% -20%, rgba(255, 246, 200, .55), transparent 60%),
    linear-gradient(115deg, #e9bd57 0%, #f6d98b 16%, #fff4c9 32%, #f2cd6c 48%, #dfae47 62%, #f8e09a 80%, #e6b955 100%);
  border: 0;
  box-shadow:
    0 8px 22px rgba(176, 128, 24, .28), 0 0 18px rgba(244, 201, 93, .3),
    inset 0 1px 0 rgba(255, 252, 235, .95), inset 0 -2px 5px rgba(170, 120, 30, .3);
}
.lph.lph-jump::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 252, 230, .55) 48%, transparent 60%);
  background-size: 250% 100%; background-position: 120% 0; animation: lph-sheen 7s ease-in-out infinite;
}
@keyframes lph-sheen { 0%, 55% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .lph.lph-jump::after { animation: none; } }
.lph.lph-jump.is-sticky { position: sticky; top: calc(var(--din-header-h, 0px) + 6px); }
.admin-bar .lph.lph-jump.is-sticky { top: calc(var(--din-header-h, 0px) + 38px); }
.lph .lph-jump-inner { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr); gap: 6px; overflow-x: auto; scrollbar-width: none; }
.lph .lph-jump-inner::-webkit-scrollbar { display: none; }
.lph .lph-jump-inner a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 62px; padding: 6px 4px;
  border-radius: 9px; border: 1px solid #f6dc8c; background: linear-gradient(180deg, #fffdf5, #fbf1d6); color: var(--green-dark);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), 0 2px 5px rgba(150, 105, 20, .22);
  font-size: 14px; font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s;
}
.lph .lph-jump-inner a i { font-style: normal; font-size: 22px; line-height: 1.15; color: var(--purple); }
.lph .lph-jump-inner a:hover { border-color: var(--green); transform: translateY(-2px); color: var(--green-dark); }
.lph .lph-jump-inner a.is-active { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(75, 164, 78, .35); }
.lph .lph-jump-inner a.is-active i { color: var(--gold); }

/* ---------- หาราศีเกิด + ลัคนา (ครีมทอง-ม่วง ไม่ใช้สีเขียว) ---------- */
.lph.lph-finder { margin-top: 20px; padding: 18px 20px; border-radius: 18px; background: var(--gold-soft); border: 1.5px solid #f0dfae; }
/* หนูนิดอยู่หน้าหัวข้อ */
.lph .lph-finder-title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 19px; line-height: 1.4; font-weight: 700; color: #4a3b22; }
/* ต้องชนะ .entry-content img:not(...) { margin: auto !important } ของธีม */
.lph.lph-finder .lph-finder-title img.lph-finder-nunid:not(.alignleft):not(.alignright) { flex: none; width: clamp(48px, 12vw, 64px); height: auto !important; margin: -6px 0 -4px !important; filter: drop-shadow(0 3px 4px #53306b33); }
.lph .lph-finder-icon { flex: none; }
.lph .lph-finder-fields { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 10px 12px; align-items: end; clear: none; }
.lph .lph-finder-fields label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-weight: 700; font-size: 15px; color: #4a3b22; }
.lph.lph-finder input, .lph.lph-finder select {
  font: inherit; font-weight: 400; width: 100%; min-height: 44px; margin: 0; padding: 6px 12px; border-radius: 10px; border: 1.5px solid #e5d3a2; background: #fff; color: var(--text);
}
.lph.lph-finder input:disabled, .lph.lph-finder select:disabled { opacity: .5; }
.lph .lph-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 24px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; white-space: nowrap; text-decoration: none;
  background: linear-gradient(120deg, var(--night-2), var(--purple)); color: #fff; box-shadow: 0 6px 14px rgba(59, 33, 99, .25);
}
.lph .lph-btn:hover { filter: brightness(1.1); color: #fff; }
.lph .lph-check { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 15px; color: #6b5a33; cursor: pointer; }
.lph .lph-check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--purple); }
.lph .lph-results:not(:empty) { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.lph .lph-res { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1.5px solid #f0dfae; }
.lph .lph-res-label { font-weight: 700; color: #6b5a33; }
.lph .lph-res-sign { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 8px; background: linear-gradient(120deg, var(--night-2), var(--purple)); color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; }
.lph .lph-res-sign:hover { filter: brightness(1.12); color: #fff; }
.lph .lph-res-sign i { font-style: normal; color: var(--gold); }
.lph .lph-res small { flex-basis: 100%; color: #7a6f5a; font-size: 13.5px; }
.lph .lph-res-note, .lph .lph-res-err { grid-column: 1 / -1; margin: 0; font-size: 13.5px; color: #8a7448; }
.lph .lph-res-err { color: #b32d2e; font-weight: 600; }
.lph.lph-finder a { color: var(--purple); font-weight: 700; }

/* ---------- ดวงรายเดือนย้อนหลัง: ใช้การ์ด din-card + din-related ของธีม (เหมือน "บทความที่เกี่ยวข้อง") ---------- */
.lph-related { --night: #1d1438; --night-2: #3b2163; --gold: #f4c95d; --pink: #b81d65; --green: #4ba44e; max-width: 1000px; margin: 48px auto 0; }
.din-related.lph-related .din-grid { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)) !important; }
@media (max-width: 900px) { .din-related.lph-related .din-grid { grid-template-columns: repeat(min(3, var(--cols, 4)), minmax(0, 1fr)) !important; } }
@media (max-width: 640px) { .din-related.lph-related .din-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
/* กันสไตล์ของ .entry-content (หัวข้อ/ลิงก์/รูป) ไม่ให้การ์ดต่างจากท้ายบทความ */
.entry-content .lph-related .din-card__title { margin: 0 0 4px; font-size: 15px; line-height: 1.45; }
.entry-content .lph-related a { text-decoration: none; }
.entry-content .lph-related .din-card__title a { color: #111; }
.entry-content .lph-related .din-card__media img:not(.alignleft):not(.alignright) { margin: 0 !important; width: 100%; height: 100% !important; object-fit: cover; }
/* ปกม่วงเมื่อไม่มีรูปหน้าปก */
.lph-related .din-card__media { container-type: inline-size; }
.lph-related .lph-cover {
  position: absolute; inset: 0; display: block;
  background: radial-gradient(1.5px 1.5px at 18% 22%, #fff 60%, transparent), radial-gradient(2px 2px at 62% 16%, var(--gold) 60%, transparent),
    radial-gradient(1px 1px at 40% 80%, #fff 60%, transparent), linear-gradient(120deg, var(--night) 0%, var(--night-2) 55%, #6a2a7c 100%);
}
.lph-related .lph-cover-1 { background-image: radial-gradient(1.5px 1.5px at 18% 22%, #fff 60%, transparent), radial-gradient(2px 2px at 62% 16%, var(--gold) 60%, transparent), linear-gradient(120deg, #142046 0%, #23407a 60%, #3b2a7c 100%); }
.lph-related .lph-cover-2 { background-image: radial-gradient(1.5px 1.5px at 18% 22%, #fff 60%, transparent), radial-gradient(2px 2px at 62% 16%, var(--gold) 60%, transparent), linear-gradient(120deg, #1d2a1a 0%, #2b481e 55%, #3d6b2f 100%); }
.lph-related .lph-cover-3 { background-image: radial-gradient(1.5px 1.5px at 18% 22%, #fff 60%, transparent), radial-gradient(2px 2px at 62% 16%, var(--gold) 60%, transparent), linear-gradient(120deg, #2a1230 0%, #6a1f55 60%, var(--pink) 100%); }
.entry-content .lph-related .lph-cover img:not(.alignleft):not(.alignright), .lph-related .lph-cover img { position: absolute; right: 6%; bottom: -6%; width: 30%; height: auto !important; margin: 0 !important; object-fit: contain; transition: transform .3s; }
.lph-related .din-card__media:hover .lph-cover img { transform: translateY(-4px) rotate(-3deg); }
.lph-related .lph-cover-text { position: absolute; left: 8%; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; color: #fff; line-height: 1.2; }
.lph-related .lph-cover-text small { font-size: max(10px, 5cqw); color: #e6dbf5; }
.lph-related .lph-cover-text b { font-size: max(16px, 11cqw); font-weight: 700; color: var(--gold); }
.lph-related .lph-acard-badge { position: absolute; top: 0; right: 0; z-index: 1; padding: 2px 6px; border-radius: 0 6px 0 6px; background: var(--green); color: #fff; font-size: 8px; font-weight: 700; line-height: 1.05; text-align: left; }
@media (max-width: 720px) {
  .lph { font-size: 16.5px; }
  .lph.lph-signsec { padding: 16px; border-radius: 18px; }
  .lph .lph-signsec-head { margin: -16px -16px 0; padding: 14px 16px; gap: 12px; flex-wrap: wrap; border-radius: 16px 16px 0 0; }
  .lph .lph-signsec-sym { width: 48px; height: 48px; font-size: 26px; }
  .lph .lph-signsec-head h2 { font-size: 21px; }
  .lph .lph-totop { display: none; }
  .lph .lph-quote { font-size: 18px; padding: 18px 18px 18px 52px; }
  .lph .lph-grid, .lph .lph-love { grid-template-columns: 1fr; }
  .lph.lph-jump { padding: 8px; }
  .lph .lph-jump-inner { grid-auto-columns: 62px; }
  .lph .lph-jump-inner a { min-height: 56px; font-size: 13px; }
  .lph .lph-jump-inner a i { font-size: 19px; }
  .lph.lph-finder { padding: 16px; }
  .lph .lph-finder-fields { grid-template-columns: 1fr 1fr; }
  .lph .lph-finder-fields label:nth-child(3), .lph .lph-finder-fields .lph-btn { grid-column: 1 / -1; }
  .lph .lph-results:not(:empty) { grid-template-columns: 1fr; }
  .lph .lph-psych { padding: 14px; }
  .lph .lph-says { flex-direction: column; gap: 6px; }
  .lph .lph-says img { width: 58px; margin-left: 8px !important; }
  .lph .lph-bubble { border-radius: 18px; }
  .lph .lph-step { grid-template-columns: 36px 1fr; gap: 10px; padding: 12px 14px; }
  .lph .lph-step .lph-emoji { width: 36px; height: 36px; font-size: 19px; border-radius: 10px; }
}
