/* =====================================================================
   หน้าแรก — เล่าเรื่องโชค.com
   ===================================================================== */

/* ---------- Hero ---------- */
.home-hero { position: relative; overflow: hidden; padding: 34px 0 26px; isolation: isolate; }
.home-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(520px 380px at 78% 30%, rgba(185, 150, 236, .35), transparent 65%),
    radial-gradient(420px 300px at 85% 40%, rgba(227, 194, 122, .18), transparent 60%);
}
.hero-inner { position: relative; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 5px 14px; border-radius: 999px; font-size: .84rem; color: var(--gold-2); background: rgba(227, 194, 122, .1); border: 1px solid var(--line); }
.hero-kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: twinkle 2.4s infinite; }
.home-hero h1 { font-size: clamp(2rem, 8.4vw, 3.6rem); line-height: 1.28; margin-bottom: .35em; max-width: 13em; text-shadow: 0 6px 30px rgba(0, 0, 0, .35); }
.hero-lead { color: var(--text-2); max-width: 30em; font-size: 1rem; margin-bottom: 20px; }

.hero-art { position: absolute; z-index: -1; right: -120px; top: -10px; width: 380px; height: 380px; opacity: .55; pointer-events: none; }
.hero-art .wheel { width: 100%; height: 100%; animation: spinSlow 120s linear infinite; }
/* ลูกแก้วพยากรณ์กลางวงล้อ (ไม่หมุนตามวงล้อ) */
.hero-art .ball { position: absolute; left: 50%; top: 50%; width: 44%; height: auto; transform: translate(-50%, -50%); overflow: visible; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .45)); }
.hero-art .ball-mist { transform-origin: 100px 92px; animation: spinSlow 14s linear infinite; }
.hero-art .ball-core { transform-origin: 100px 96px; animation: ballPulse 4s ease-in-out infinite; }
.hero-art .ball-aura { animation: ballPulse 4s ease-in-out infinite; transform-origin: 100px 92px; }
.hero-art .ball-stars { animation: twinkle 3s ease-in-out infinite; }
@keyframes ballPulse { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }
@media (min-width: 720px) { .hero-art { right: -40px; top: -30px; width: 460px; height: 460px; opacity: .8; } }
@media (min-width: 1100px) { .hero-art { right: 4%; width: 520px; height: 520px; opacity: 1; } .home-hero { padding: 70px 0 50px; } }

.hero-search { position: relative; max-width: 560px; }
.hero-search input {
  width: 100%; height: 56px; border: 0; border-radius: 999px; padding: 0 64px 0 22px;
  background: var(--cream); color: var(--ink); font-size: 1rem; box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .7), 0 0 0 1px rgba(227, 194, 122, .5);
}
.hero-search input::placeholder { color: var(--ink-3); }
.hero-search input:focus { outline: none; box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .7), 0 0 0 3px rgba(227, 194, 122, .7); }
.hero-search button { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold-grad); color: var(--ink); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(184, 138, 62, .8); }
.hero-search button svg { width: 20px; height: 20px; }
.hero-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero-quick a { font-size: .82rem; padding: 6px 13px; }

/* ---------- Tiles ---------- */
.home-tiles { margin-top: 6px; }

/* ---------- My fortune ---------- */
#my-fortune:empty { display: none; }
.myf { display: grid; gap: 18px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 760px) { .myf { grid-template-columns: auto 1fr auto; gap: 28px; } }
.myf-head { display: flex; align-items: center; gap: 16px; }
.myf-head .who { font-size: .86rem; color: var(--text-3); }
.myf-head h2 { margin: 2px 0 0; font-size: clamp(1.25rem, 3.4vw, 1.6rem); }
.myf-summary { color: var(--text-2); font-size: .96rem; margin: 0; }
.myf-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.myf-meta .badge { font-weight: 400; }
.myf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 760px) { .myf-actions { flex-direction: column; } }
.myf-empty { display: grid; gap: 16px; align-items: center; text-align: center; }
@media (min-width: 760px) { .myf-empty { grid-template-columns: 1fr auto; text-align: left; } }
.myf-empty h2 { margin-bottom: .2em; }
.myf-empty p { margin: 0; color: var(--text-2); }

/* ---------- Zodiac card ---------- */
.card-light .zodiac-chip { color: var(--ink); }
.card-light .zodiac-chip .score { font-size: .72rem; color: #8a5a12; font-weight: 500; }
.zodiac-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.card-light .chip { background: rgba(42, 22, 64, .05); border-color: rgba(42, 22, 64, .12); color: var(--ink-2); }
.card-light .chip:hover { background: rgba(42, 22, 64, .09); color: var(--ink); }

/* ---------- Day grid scores ---------- */
.day-btn .sc { font-size: .72rem; color: var(--gold-2); }
.day-btn .sc .stars { font-size: .62rem; letter-spacing: 1px; }
.day-btn.is-mine { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.day-btn.is-mine::after { content: 'วันเกิดคุณ'; font-size: .62rem; color: var(--ink); background: var(--gold-grad); padding: 0 6px; border-radius: 99px; }

/* ---------- Services row ---------- */
.svc-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 44%); gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.svc-row::-webkit-scrollbar { display: none; }
.svc-row .service-card { scroll-snap-align: start; }
@media (min-width: 720px) { .svc-row { grid-auto-columns: minmax(170px, 1fr); } }
@media (min-width: 1000px) { .svc-row { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); overflow: visible; } }

/* ---------- Lucky grid ---------- */
.lucky-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .lucky-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.lucky-card { display: flex; flex-direction: column; gap: 12px; }
.lucky-card h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 0; }
.lucky-card h3 svg { width: 20px; height: 20px; color: var(--gold); }
.lucky-card .foot { margin-top: auto; }
.color-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.color-list .swatch .sw { width: 38px; height: 38px; }
.color-list .swatch b { font-size: .95rem; }
.avoid-line { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(240, 138, 138, .08); border: 1px dashed rgba(240, 138, 138, .35); font-size: .86rem; color: var(--text-2); }
.avoid-line i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .2); }
.moon-big { display: flex; align-items: center; gap: 14px; }
.moon-disc { width: 64px; height: 64px; border-radius: 50%; flex: none; position: relative; overflow: hidden; background: #2a1a44; box-shadow: 0 0 30px -4px rgba(245, 223, 166, .5), inset 0 0 0 1px rgba(245, 223, 166, .3); }
.moon-disc i { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff8e0, #f0d08a 60%, #c99a48); }
.level-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .84rem; font-weight: 500; }
.level-great { background: var(--gold-grad); color: var(--ink); }
.level-good { background: rgba(127, 216, 164, .16); color: var(--good); }
.level-normal { background: rgba(185, 150, 236, .16); color: var(--lav); }
.level-caution { background: rgba(242, 180, 107, .16); color: var(--warn); }

/* ---------- Dream band ---------- */
.dream-band { display: grid; gap: 10px; align-items: center; overflow: hidden; background: radial-gradient(500px 260px at 90% 20%, rgba(143, 216, 255, .18), transparent 65%), linear-gradient(160deg, rgba(58, 40, 120, .65), rgba(27, 13, 49, .8)); }
@media (min-width: 760px) { .dream-band { grid-template-columns: 1.4fr 1fr; } }
.dream-band-art svg { width: 100%; max-width: 300px; margin: 0 auto; animation: floatY 7s ease-in-out infinite; }
@media (max-width: 759px) { .dream-band-art { order: -1; } .dream-band-art svg { max-width: 170px; } }
.dream-chips { justify-content: flex-start !important; margin: 4px 0 16px; }
.dream-chips .chip { font-size: .85rem; padding: 6px 13px; }

/* ---------- Play grid ---------- */
.play-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .play-grid { grid-template-columns: repeat(4, 1fr); } }
.play-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius); color: var(--text); background: linear-gradient(160deg, rgba(58, 29, 99, .55), rgba(27, 13, 49, .7)); border: 1px solid var(--line); transition: .25s var(--ease); position: relative; overflow: hidden; }
.play-card::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--glow, rgba(227, 194, 122, .25)), transparent 70%); }
.play-card:hover { color: var(--text); transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow-gold); }
.play-card .pi { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--gold-2); background: rgba(227, 194, 122, .12); box-shadow: inset 0 0 0 1px var(--line); }
.play-card .pi svg { width: 24px; height: 24px; }
.play-card b { font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1.35; margin-top: 4px; }
.play-card small { color: var(--text-3); font-size: .8rem; line-height: 1.45; }

/* ---------- Tips ---------- */
.tips-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .tips-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .tips-grid { grid-template-columns: repeat(4, 1fr); } }
.tip { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px -18px rgba(42, 22, 64, .5), 0 0 0 1px rgba(184, 138, 62, .18); color: var(--ink) !important; transition: .25s var(--ease); }
.tip:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(42, 22, 64, .55), 0 0 0 1px rgba(184, 138, 62, .4); }
.tip .tip-art { height: 110px; display: grid; place-items: center; color: #fff1c9; background: var(--bg-img); position: relative; }
.tip .tip-art svg { width: 46px; height: 46px; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .35)); }
.tip .tip-body { padding: 12px 14px 14px; }
.tip b { display: block; font-family: var(--font-head); font-weight: 600; font-size: .98rem; line-height: 1.45; }
.tip small { color: var(--ink-3); font-size: .8rem; }
@media (max-width: 719px) { .tip { flex-direction: row; } .tip .tip-art { height: auto; width: 92px; flex: none; } .tip .tip-art svg { width: 34px; height: 34px; } }

/* ---------- CTA ---------- */
.cta-band .cta-moon { position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; box-shadow: inset -28px 10px 0 0 rgba(245, 223, 166, .22); }
.cta-perks { list-style: none; padding: 0; margin: 16px auto 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; max-width: 560px; }
.cta-perks li { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--text); }
.cta-perks li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; background: var(--gold-grad) ; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.5 14.5l-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.5 14.5l-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat; }
