/* =====================================================================
   duduangfree.buzz — aspects.css (เรดาร์ดวง รัก งาน เงิน สุขภาพ)
   ===================================================================== */
@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-2), transparent); }
.asp-birth { grid-template-columns: 1fr 1.4fr auto; align-items: end; }
.asp-find-msg { margin: 10px 0 0; min-height: 1.3em; color: var(--gold-2); }

/* แถบเลือกราศีแบบกะทัดรัด (6 x 2) */
.asp-signs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.asp-sign { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 10px; border: 1px solid var(--border); background: rgba(14,6,24, .85); color: var(--text); font: inherit; cursor: pointer; transition: transform .2s var(--ease-out), border-color .2s, box-shadow .2s, background .2s; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.asp-sign .glyph { font-family: 'Noto Sans Symbols', 'Segoe UI Symbol', serif; font-size: 1.5rem; line-height: 1; color: var(--gold-2); text-shadow: 0 0 10px var(--gold-glow); }
.asp-sign .name { font-family: var(--font-head); font-size: .78rem; color: var(--text-2); }
.asp-sign:hover { transform: translateY(-2px); border-color: var(--red); background: rgba(168,85,247, .12); }
.asp-sign[aria-checked="true"] { border-color: var(--gold); background: linear-gradient(180deg, rgba(247, 197, 72, .22), rgba(168,85,247, .18)); box-shadow: inset 0 0 14px rgba(247, 197, 72, .25); }
.asp-sign[aria-checked="true"] .name { color: var(--gold-2); }
.asp-sign: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(247, 197, 72, .22), rgba(168,85,247, .25) 60%, rgba(7,3,15, .8));
  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; }

/* ---------- แดชบอร์ด: เรดาร์ + 4 ด้าน ---------- */
.asp-dash { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: stretch; margin-bottom: 24px; }
.asp-radar-card { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.asp-radar { width: 100%; max-width: 260px; margin-top: 14px; }
.asp-radar-svg { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 0 12px rgba(168,85,247, .35)); }
.asp-r-ring { fill: none; stroke: rgba(247, 197, 72, .25); stroke-width: .8; }
.asp-r-axis { stroke: rgba(196,161,255, .3); stroke-width: .8; stroke-dasharray: 3 4; }
.asp-r-shape { stroke: var(--gold); stroke-width: 1.8; stroke-linejoin: round; transform-origin: 100px 100px; transform-box: view-box; animation: aspRadar .9s var(--ease-out) both; }
.asp-r-dot { stroke: #07030f; stroke-width: 1.5; animation: aspFade .9s ease both; }
.asp-r-lab { font-size: 15px; }
@keyframes aspRadar { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.asp-radar-sum { text-align: center; }
.asp-best-hint { font-size: .9rem; color: var(--text-2); margin-top: 4px; }

.asp-overview { display: grid; gap: 10px; align-content: stretch; }
.asp-ov-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(14,6,24, .85); cursor: pointer;
  opacity: 0; transform: translateX(-14px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out), border-color .2s, box-shadow .2s, background .2s; }
.asp-ov-card.in { opacity: 1; transform: none; }
.asp-ov-card:hover { border-color: var(--red); background: rgba(168,85,247, .1); }
.asp-ov-card.is-current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow-gold); }
.asp-ov-ic { flex: none; width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 10px; background: var(--red-dim); border: 1px solid var(--border); }
.asp-ov-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.asp-ov-top { display: flex; gap: 10px; align-items: baseline; }
.asp-ov-top b { font-family: var(--font-head); font-weight: 500; }
.asp-ov-band { font-size: .8rem; }
.asp-ov-line { font-size: .9rem; color: var(--text-2); overflow-wrap: anywhere; }
.asp-ov-num { flex: none; font-size: 1.5rem; font-weight: 700; min-width: 2ch; text-align: right; }
.asp-meter { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.asp-meter i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--red-3), var(--col, var(--gold))); box-shadow: 0 0 10px var(--col, var(--gold)); transition: width 1s var(--ease-out); }

/* ---------- 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, .asp-panel-inner > .hud-card { 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-quest { font-family: var(--font-head); font-size: 1.15rem; line-height: 1.4; margin: 6px 0 8px; }
.asp-type { margin: 6px 0 12px; min-height: 3.2em; overflow-wrap: anywhere; }
.asp-advice-box { 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(196,161,255,.18); 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(247,197,72,.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(247,197,72,.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(--red-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(247,197,72,.06); }
.asp-note.good .ic { background: rgba(247,197,72,.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(247,197,72,.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; }
  .asp-trend, .asp-periods, .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; }
}

@media (max-width: 860px) {
  .asp-dash { grid-template-columns: 1fr; }
  .asp-radar-card { padding-bottom: 18px; }
}
@media (max-width: 480px) {
  .asp-signs { grid-template-columns: repeat(4, 1fr); }
  .asp-ov-ic { width: 40px; height: 40px; font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .asp-ov-card { opacity: 1; transform: none; transition: none; }
  .asp-r-shape { animation: none; }
}
