/* =====================================================================
   หมวด "เช็กดวงสนุก" — สไตล์ร่วม (ix-*) + หน้ารวม interactive.html
   ทุกหน้าในหมวดโหลดไฟล์นี้ (ส่วน "ดูต่อ", stepper, ฮีโร่)
   ===================================================================== */

/* ---------- สีพื้นของแต่ละกิจกรรม ---------- */
.ix-c-birth   { --ixbg: radial-gradient(circle at 50% 30%, #ffd98a, #a86a1f 50%, #2c1606); }
.ix-c-sign    { --ixbg: radial-gradient(circle at 50% 30%, #c4a8ff, #5a37a6 52%, #1a0d35); }
.ix-c-card    { --ixbg: radial-gradient(circle at 50% 30%, #f3a8d8, #8a2f7c 52%, #2a0c2b); }
.ix-c-wheel   { --ixbg: radial-gradient(circle at 50% 30%, #ffc28a, #b04f2c 52%, #351108); }
.ix-c-ask     { --ixbg: radial-gradient(circle at 50% 30%, #9fdcff, #3456b0 52%, #0f1338); }
.ix-c-journal { --ixbg: radial-gradient(circle at 50% 30%, #a8f0d4, #2f8277 52%, #0b2826); }
.ix-c-game    { --ixbg: radial-gradient(circle at 50% 30%, #ffb38a, #b0473a 55%, #3a1213); }

/* ---------- ฮีโร่ของหมวด ---------- */
.ix-hero { position: relative; }
.ix-hero::before {
  content: ''; position: absolute; left: 50%; top: 10px; width: 280px; height: 280px; transform: translateX(-50%); z-index: -1;
  background: radial-gradient(circle, rgba(227, 194, 122, .16), transparent 65%); pointer-events: none;
}
.ix-hero .hero-icon { animation: ixFloat 5s ease-in-out infinite; }
@keyframes ixFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- Stepper (ขั้นตอน) ---------- */
.ix-steps { list-style: none; display: flex; justify-content: center; gap: 6px; padding: 0; margin: 0 auto 18px; flex-wrap: wrap; }
.ix-steps li { display: flex; align-items: center; gap: 7px; padding: 5px 13px 5px 5px; border-radius: 999px; font-size: .84rem; color: var(--text-3); background: var(--surface); border: 1px solid var(--line-soft); }
.ix-steps li b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 500; background: var(--surface-2); color: var(--text-2); }
.ix-steps li.on { color: var(--gold-2); border-color: var(--line-2); background: rgba(227, 194, 122, .08); }
.ix-steps li.on b { background: var(--gold-grad); color: var(--ink); }
.ix-steps li.done b { background: rgba(185, 150, 236, .35); color: var(--text); }
.ix-steps li a { color: inherit; }

/* ---------- ดูต่อ ---------- */
.ix-more-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .ix-more-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .ix-more-grid { grid-template-columns: repeat(3, 1fr); } }
.ix-mini {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 18px; color: var(--text);
  background: linear-gradient(160deg, rgba(58, 29, 99, .55), rgba(27, 13, 49, .7)); border: 1px solid var(--line-soft);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; min-height: 72px;
}
.ix-mini:hover { color: var(--text); transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow-gold); }
.ix-mini-art { width: 56px; height: 56px; flex: none; border-radius: 14px; background: var(--ixbg); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255, 241, 201, .25); }
.ix-mini-art svg { width: 44px; height: 44px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }
.ix-mini-txt { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.ix-mini-txt b { font-weight: 500; font-family: var(--font-head); }
.ix-mini-txt small { color: var(--text-3); font-size: .8rem; }
.ix-mini .chev { margin-left: auto; width: 16px; height: 16px; color: var(--gold); flex: none; }
.ix-ll-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(227, 194, 122, .1); color: var(--gold); flex: none; }
.ix-ll-ic svg { width: 16px; height: 16px; }

/* ---------- การ์ดผลลัพธ์แบบหรู (ใช้ร่วม) ---------- */
.ix-result-head { text-align: center; }
.ix-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; letter-spacing: .16em; color: var(--gold); text-transform: uppercase; }
.ix-kicker svg { width: 14px; height: 14px; }
.ix-qmark { font-family: var(--font-head); color: var(--text); overflow-wrap: anywhere; }

/* ---------- หน้ารวม: การ์ดกิจกรรมใหญ่ ---------- */
.ix-acts { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .ix-acts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .ix-acts { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.ix-act {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden; color: var(--text);
  background: linear-gradient(180deg, rgba(42, 21, 72, .9), rgba(22, 10, 40, .95)); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; isolation: isolate;
}
.ix-act:hover { color: var(--text); transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow-gold); }
.ix-act-art { position: relative; height: 170px; display: grid; place-items: center; background: var(--ixbg); overflow: hidden; }
.ix-act-art::before { /* ลายดาวจาง ๆ */
  content: ''; position: absolute; inset: 0; opacity: .55;
  background-image: radial-gradient(1.2px 1.2px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 70% 20%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 85% 70%, #fff6d8 50%, transparent 51%), radial-gradient(1px 1px at 35% 80%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 55%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 10% 65%, #fff6d8 50%, transparent 51%);
}
.ix-act-art::after { content: ''; position: absolute; inset: auto 0 0; height: 60%; background: linear-gradient(180deg, transparent, rgba(22, 10, 40, .95)); }
.ix-act-art svg { position: relative; z-index: 1; width: 132px; height: 132px; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .5)); transition: transform .6s var(--ease); }
.ix-act:hover .ix-act-art svg { transform: scale(1.07) rotate(-3deg); }
.ix-act-badge { position: absolute; top: 12px; right: 12px; z-index: 2; }
.ix-act-body { position: relative; padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ix-act-body h3 { margin: 0; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.ix-act-body h3 svg { width: 20px; height: 20px; color: var(--gold); }
.ix-act-body p { margin: 0; color: var(--text-2); font-size: .93rem; line-height: 1.65; }
.ix-act-cta { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; color: var(--gold-2); font-weight: 500; font-size: .95rem; }
.ix-act-cta .arr { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: var(--ink); transition: transform .3s var(--ease); }
.ix-act-cta .arr svg { width: 18px; height: 18px; }
.ix-act:hover .ix-act-cta .arr { transform: translateX(4px); }
.ix-act.done .ix-act-cta .state { color: var(--good); }

/* ---------- ภารกิจวันนี้ ---------- */
.ix-quest { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 760px) { .ix-quest { grid-template-columns: auto 1fr; gap: 26px; } }
.ix-quest-ring { justify-self: center; }
.ix-quest-list { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) { .ix-quest-list { grid-template-columns: repeat(4, 1fr); } }
.ix-q { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); color: var(--text-2); font-size: .88rem; line-height: 1.3; min-height: 54px; }
.ix-q:hover { color: var(--text); border-color: var(--line-2); }
.ix-q .tick { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 1.5px dashed var(--line-2); color: transparent; }
.ix-q .tick svg { width: 14px; height: 14px; }
.ix-q.ok { color: var(--text); border-color: rgba(127, 216, 164, .35); background: rgba(127, 216, 164, .07); }
.ix-q.ok .tick { border: 0; background: var(--good); color: #10301f; }

/* ---------- Teaser ไพ่วันนี้ ---------- */
.ix-teaser { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: center; overflow: hidden; }
@media (min-width: 720px) { .ix-teaser { grid-template-columns: 200px 1fr; gap: 30px; } }
.ix-teaser-card { width: 150px; justify-self: center; position: relative; }
@media (min-width: 720px) { .ix-teaser-card { width: 180px; } }
.ix-teaser-card::before { content: ''; position: absolute; inset: -20%; background: radial-gradient(circle, rgba(227, 194, 122, .3), transparent 60%); z-index: -1; animation: ixPulse 3.2s ease-in-out infinite; }
@keyframes ixPulse { 0%, 100% { opacity: .55; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.05); } }
.ix-teaser-card .cf { animation: ixFloat 5s ease-in-out infinite; }
.ix-teaser h2 { margin-bottom: .25em; }
.ix-teaser .kw { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }

/* ---------- การ์ดโปรไฟล์ ---------- */
.ix-me { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ix-me .ix-me-ic { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; color: var(--gold); background: rgba(227, 194, 122, .1); box-shadow: 0 0 0 1px var(--line-2); }
.ix-me .ix-me-ic svg { width: 26px; height: 26px; }
.ix-me .ix-me-txt { flex: 1; min-width: 200px; }
.ix-me .ix-me-txt b { font-family: var(--font-head); font-size: 1.05rem; }
.ix-me .ix-me-txt p { margin: 0; color: var(--text-2); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  .ix-hero .hero-icon, .ix-teaser-card::before, .ix-teaser-card .cf { animation: none; }
}

/* ไอคอนใน date-pill / ปุ่ม ที่เติมด้วย data-icon */
.page-hero .date-pill svg { width: 16px; height: 16px; flex: none; }
.cta-band .ix-mini-art svg { width: 64px; height: 64px; }
@media (max-width: 639px) { .ix-act-art { height: 140px; } .ix-act-art svg { width: 112px; height: 112px; } }
