/* =====================================================================
   ดูดวง.store — aspects.css (หน้า ดวงความรัก การงาน การเงิน สุขภาพ)
   ===================================================================== */
/* ให้วงแหวนคะแนนเคลื่อนไหวได้จริง (เบราว์เซอร์ที่รองรับ @property) */
@property --val { syntax: '<number>'; inherits: false; initial-value: 0; }

.asp-input-section { padding-top: 8px; padding-bottom: 24px; }
.asp-h2 { font-size: 1.25rem; }
.asp-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--text-3); font-family: var(--font-head); font-size: .88rem; }
.asp-or::before, .asp-or::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
.asp-birth { grid-template-columns: 1fr 1.4fr auto; }
.asp-find-msg { margin: 10px 0 0; min-height: 1.3em; color: var(--gold-2); }
.zodiac-tile { font: inherit; }
.zodiac-tile:focus-visible, .asp-ov-card:focus-visible, .asp-tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.asp-empty { padding-top: 0; }
.asp-empty-icon { font-size: 1.8rem; letter-spacing: 6px; margin-bottom: 8px; }

/* ---------- Result head ---------- */
.asp-results { padding-top: 16px; scroll-margin-top: 76px; }
.asp-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.asp-glyph {
  flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.3rem; color: var(--gold-2); font-family: 'Noto Sans Symbols', 'Segoe UI Symbol', serif;
  background: radial-gradient(circle at 35% 30%, rgba(233,196,106,.22), rgba(139,92,246,.18) 60%, rgba(14,10,28,.6));
  border: 1px solid var(--border-2); box-shadow: var(--shadow-gold);
}
.asp-head-text h2 { margin: 4px 0 2px; }
.asp-head-text p { margin: 0; }
.asp-head-text .eyebrow::before { display: none; }

/* ---------- Overview cards ---------- */
.asp-overview { margin-bottom: 26px; }
.asp-ov-card { cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; }
.asp-ov-card:hover { border-color: var(--border-2); background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); }
.asp-ov-card.is-current { border-color: var(--gold); box-shadow: var(--shadow), 0 0 0 1px var(--gold), var(--shadow-gold); }
.grid > .card + .card { margin-top: 0; }

/* ---------- Tabs ---------- */
.asp-tabs-wrap { max-width: 100%; margin: 0 auto 20px; display: flex; justify-content: center; scroll-margin-top: 80px; }
.asp-tabs { display: grid; grid-template-columns: repeat(4, 1fr); width: min(100%, 640px); }
.asp-tabs button { padding: 10px 8px; white-space: nowrap; }
@media (max-width: 560px) {
  .asp-tabs { grid-template-columns: repeat(2, 1fr); border-radius: 20px; }
  .asp-tabs button { border-radius: 16px; }
}

/* ---------- Panel ---------- */
.asp-panel-inner > .card, .asp-panel-inner > .grid { margin-top: 18px; }
.asp-panel-inner > :first-child { margin-top: 0; }
.asp-today { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; }
.asp-today-gauge { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.asp-band-lg { font-family: var(--font-head); font-size: 1.15rem; margin-top: 6px; }
.asp-today-body .eyebrow::before { display: none; }
.asp-today-body .reading { margin: 8px 0 0; }
.asp-today-body .callout { margin-bottom: 0; }

/* ---------- Trend chart ---------- */
.asp-chart { position: relative; margin-top: 6px; }
.asp-chart-plot { position: relative; height: 190px; margin: 24px 4px 0; }
.asp-chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.asp-chart-svg .asp-grid { stroke: rgba(206,184,255,.14); stroke-width: 1; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.asp-chart-svg .asp-line { stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(233,196,106,.45)); }
.asp-ylab { position: absolute; left: 0; transform: translateY(-50%); font-size: .68rem; color: var(--text-3); font-family: var(--font-head); pointer-events: none; }
.asp-dot {
  position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--bg-3); border: 2px solid var(--dot, var(--gold)); box-shadow: 0 0 10px var(--dot, var(--gold));
  animation: aspPop .5s ease both;
}
.asp-dot-val {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-head); font-weight: 500; font-size: .78rem; color: var(--text-2); white-space: nowrap;
}
.asp-dot.is-best { width: 16px; height: 16px; margin: -8px 0 0 -8px; background: var(--gold); border-color: var(--gold-2); box-shadow: 0 0 0 5px rgba(233,196,106,.18), 0 0 16px var(--gold); }
.asp-dot.is-best .asp-dot-val { color: var(--gold-2); font-size: .9rem; bottom: 18px; }
.asp-dot.is-best .asp-dot-val::before { content: '★ '; }
.asp-dot.is-worst { border-color: var(--info); box-shadow: 0 0 0 4px rgba(124,196,255,.15); }
.asp-dot.is-worst .asp-dot-val { color: var(--info); }
@keyframes aspPop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
.asp-chart-svg .asp-line { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: aspDraw 1.1s ease forwards; }
.asp-chart-svg .asp-area { animation: aspFade .9s ease both; }
@keyframes aspDraw { to { stroke-dashoffset: 0; } }
@keyframes aspFade { from { opacity: 0; } to { opacity: 1; } }

.asp-xlabs { display: grid; grid-template-columns: repeat(7, 1fr); margin: 8px 4px 0; border-top: 1px solid var(--border); padding-top: 8px; }
.asp-xlab { display: flex; flex-direction: column; align-items: center; line-height: 1.25; font-family: var(--font-head); }
.asp-xlab .d { font-size: .82rem; color: var(--text-2); }
.asp-xlab .n { font-size: .72rem; color: var(--text-3); }
.asp-xlab.is-today .d { color: var(--purple-2); }
.asp-xlab.is-best .d, .asp-xlab.is-best .n { color: var(--gold); }
.asp-xlab.is-worst .d { color: var(--info); }

.asp-trend-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.asp-note { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.asp-note small { display: block; font-family: var(--font-head); font-size: .78rem; }
.asp-note b { font-family: var(--font-head); font-weight: 500; }
.asp-note .ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; }
.asp-note.good { border-color: var(--border-2); background: rgba(233,196,106,.06); }
.asp-note.good .ic { background: rgba(233,196,106,.16); color: var(--gold); }
.asp-note.good b { color: var(--gold-2); }
.asp-note.warn { border-color: rgba(124,196,255,.3); background: rgba(124,196,255,.05); }
.asp-note.warn .ic { background: rgba(124,196,255,.14); color: var(--info); }
.asp-note.warn b { color: var(--info); }

/* ---------- Weekly / monthly ---------- */
.asp-period { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: start; padding: 16px 0; border-top: 1px solid var(--border); }
.asp-period:first-of-type { border-top: 0; padding-top: 6px; }
.asp-period .gauge { margin: 0; }
.asp-period-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.asp-period-head h4 { margin: 0; font-size: 1.05rem; color: var(--gold-2); }
.asp-period-head .muted { font-size: .85rem; }
.asp-band { font-size: .85rem; color: var(--text-3); margin: 2px 0 6px; }
.asp-period p { margin: 0 0 6px; color: var(--text-2); font-size: .98rem; }
.asp-period p.asp-advice { color: var(--gold-2); margin: 0; }

/* ---------- Style & factors ---------- */
.asp-bottom { align-items: stretch; }
.asp-sub { font-family: var(--font-head); font-size: .9rem; color: var(--text-3); margin: 6px 0 10px; }
.asp-match { color: var(--gold-2); }
.asp-match:hover { background: rgba(233,196,106,.16); color: var(--gold); }
.asp-chip-glyph { font-family: 'Noto Sans Symbols', 'Segoe UI Symbol', serif; font-size: 1rem; }
.asp-health-note { margin: 6px 0 0; font-size: .95rem; }
.asp-factors .kv { overflow-wrap: anywhere; }
.asp-disclaimer { margin-top: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .asp-birth { grid-template-columns: 1fr 1fr; }
  .asp-birth .btn { grid-column: 1 / -1; }
  .asp-today { grid-template-columns: 1fr; gap: 14px; }
  .asp-trend-notes { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .asp-head { gap: 12px; }
  .asp-glyph { width: 58px; height: 58px; font-size: 1.8rem; }
  .asp-head-text h2 { font-size: 1.3rem; }
  .card.asp-trend, .card.asp-periods, .card.asp-today { padding: 18px 14px; }
  .asp-chart-plot { height: 160px; }
  .asp-dot-val { font-size: .7rem; }
  .asp-dot.is-best .asp-dot-val { font-size: .78rem; }
  .asp-xlab .d { font-size: .76rem; }
  .asp-period { grid-template-columns: 60px 1fr; gap: 12px; }
  .asp-period .gauge-sm { width: 60px; height: 60px; }
  .asp-period .gauge-sm .val { font-size: 1rem; }
  .asp-factors .kv { grid-template-columns: 1fr; gap: 0; }
  .asp-factors .kv dd { margin-bottom: 8px; }
}
