/* ============================================================
   算算命 · 星座 / 塔罗 / 黄历（astro-dev 维护）
   知乎风 v2：浅灰底 + 白卡片、15px 正文、4px 圆角、轻阴影、实线分隔
   颜色只用 DESIGN.md v2 令牌；--green* 是品牌红，语义绿用 --ok*
   签文内容保留衬线；前缀统一 .as-，不改 HTML 类名与结构
   ============================================================ */

/* 模块说明（人工修改前先读）
 * 模块：public/styles/astro.css
 * 职责：星座 / 塔罗 / 黄历页面样式。
 * 修改边界：只改星座模块。
 */

/* ------------------------------------------------------------ 顶部引言 */
.as-hero {
  padding: 20px;
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.as-hero-kicker {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 13px;
}
.as-hero-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin: 6px 0 4px;
  color: var(--ink);
}
.as-hero-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
}
.as-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.as-hero-meta .as-sep { opacity: 0.7; }

/* ------------------------------------------------------------ 星座宫格 */
.as-sign-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 560px) {
  .as-sign-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.as-sign-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 2px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: var(--card);
  color: var(--muted);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.as-sign-btn:hover { border-color: var(--line-strong); }
.as-sign-btn .as-sign-symbol {
  font-size: 20px;
  line-height: 1.1;
  color: var(--as-sign-color, var(--ink-2));
}
.as-sign-btn .as-sign-label {
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
}
.as-sign-btn.active {
  border-color: var(--green);
  background: var(--green-soft);
}
.as-sign-btn.active .as-sign-label { color: var(--green-dark); }

/* ------------------------------------------------------------ 卡片通用 */
.as-panel {
  margin: 0 0 10px;
  padding: 20px;
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.as-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.as-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.as-glyph {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 18px;
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--green-dark);
}
.as-panel-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.as-panel-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.as-panel-head .btn[hidden] { display: none; }

/* 周期 tab */
.as-tabs {
  display: flex;
  margin: 0 0 14px;
}

/* 分数环：ui.ring 的内联色在浅底上不合适，这里局部覆盖成品牌红 */
.as-rings {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  padding: 6px 2px 14px;
}
.as-rings .as-ring { flex: 1; min-width: 0; }
.as-rings .ring-label { font-size: 13px; color: var(--muted); }
.as-rings .ring-wrap svg circle:first-of-type { stroke: var(--track); }
.as-rings .ring-wrap svg circle:last-of-type { stroke: var(--green); }
.as-rings .ring-wrap svg text {
  fill: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
}
.as-ring-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.as-ring-fallback b {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.as-ring-fallback span { font-size: 13px; color: var(--muted); }

/* 主文案 */
.as-lead {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 4px;
  background: var(--bg-soft);
}
.as-text-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}
@media (min-width: 560px) {
  .as-text-grid { grid-template-columns: 1fr 1fr; }
}
.as-text-card {
  padding: 12px 14px;
  border-radius: 4px;
  background: var(--bg-soft);
}
.as-text-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.as-text-title {
  font-size: 14px;
  color: var(--ink-2);
}
.as-text-score {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
}
.as-text-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* 幸运信息 */
.as-lucky-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
@media (min-width: 560px) {
  .as-lucky-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.as-lucky-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 4px;
  background: var(--bg-soft);
  min-width: 0;
}
.as-lucky-k { font-size: 13px; color: var(--muted); }
.as-lucky-v {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.as-color-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 2px;
  outline: 1px solid var(--line-strong);
  outline-offset: -1px;
}

/* 速配 */
.as-match {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 4px;
  background: var(--bg-soft);
}
.as-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.as-match-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.as-match-glyph {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 18px;
  border-radius: 4px;
  background: var(--card);
  color: var(--green-dark);
}
.as-match-name {
  font-size: 15px;
  color: var(--ink);
}
.as-match-sub { font-size: 13px; color: var(--muted); }
.as-match-note {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* 建议 */
.as-advice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 4px;
  border-left: 3px solid var(--green);
  background: var(--bg-soft);
}
.as-advice-icon { font-size: 15px; line-height: 1.6; }
.as-advice p { font-size: 15px; line-height: 1.7; color: var(--ink-2); }

/* 社区引导：整块可点 */
.as-community {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.as-community:hover { border-color: var(--green); text-decoration: none; }
.as-community:hover .as-community-title,
.as-community:hover .as-community-arrow { color: var(--green); }
.as-community-icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 18px;
  border-radius: 4px;
  background: var(--bg-soft);
}
.as-community-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.as-community-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.as-community-desc {
  font-size: 13px;
  color: var(--muted);
}
.as-community-arrow {
  margin-left: auto;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
}

/* ------------------------------------------------------------ 塔罗 */
.as-spread-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.as-spread-row .chip { cursor: pointer; }
.as-chip-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.as-spread-row .chip.active .as-chip-count {
  background: var(--green-soft);
  color: var(--green-dark);
}
.as-draw-btn { margin-bottom: 12px; }
.as-stage-hint {
  padding: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
  border-radius: 4px;
  background: var(--bg-soft);
}

.as-tcards {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.as-tcard,
.as-tcard-back {
  flex: none;
  width: 132px;
  min-height: 196px;
  border-radius: 4px;
  position: relative;
}
.as-tcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  animation: as-card-in 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.05) both;
}
.as-tcard-pos {
  align-self: stretch;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.as-tcard-art {
  font-size: 30px;
  line-height: 1;
  margin: 12px 0 8px;
  transition: transform 0.5s cubic-bezier(0.3, 0.9, 0.3, 1);
}
.as-tcard.is-reversed .as-tcard-art { transform: rotate(180deg); }
.as-tcard-num {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.as-tcard-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  margin-top: 2px;
}
.as-tcard-en {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 1px;
  line-height: 1.4;
}
.as-tcard-keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
}
.as-tcard-keywords span {
  font-size: 13px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--ink-2);
}
.as-tcard-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 13px;
  line-height: 1.4;
  padding: 0 6px;
  border-radius: 4px;
}
.as-tcard-badge.up { background: var(--ok-soft); color: var(--ok-dark); }
.as-tcard-badge.rev { background: var(--red-soft); color: var(--red); }

.as-tcard-back {
  display: grid;
  place-items: center;
  background: var(--card);
  box-shadow: var(--shadow);
  animation: as-deal 0.42s cubic-bezier(0.2, 0.8, 0.3, 1.08) both;
}
.as-tcard-back-mark {
  font-size: 22px;
  color: var(--green);
  opacity: 0.55;
}

.as-tarot-summary {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 4px;
  background: var(--bg-soft);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  animation: as-rise 0.4s ease both;
}
.as-tarot-advice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}
.as-tarot-advice span { line-height: 1.6; }
.as-tarot-details {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.as-tcard-detail {
  padding: 12px 14px;
  border-radius: 4px;
  background: var(--bg-soft);
}
.as-tcard-detail-head {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.as-tcard-detail-pos {
  display: inline-block;
  margin-right: 6px;
  font-size: 13px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 400;
  vertical-align: 1px;
}
.as-tcard-meaning {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
}
.as-tcard-tip {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}
.as-tcard-tip::before { content: "提示："; color: var(--green-dark); }

/* ------------------------------------------------------------ 黄历 */
.as-alm-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.as-alm-lunar {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}
.as-alm-sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}
.as-alm-ganzhi {
  display: flex;
  gap: 4px;
  margin-bottom: 2px;
}
.as-alm-ganzhi span {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--ink-2);
}
.as-alm-ganzhi em {
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
}
.as-alm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.as-alm-tags .tag,
.as-alm-tags .pill {
  font-size: 13px;
  border-radius: 4px;
}
.as-yiji {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.as-yiji-col {
  padding: 10px 12px;
  border-radius: 4px;
  background: var(--bg-soft);
  min-width: 0;
}
.as-yiji-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.as-yiji-label.yi { color: var(--ok-dark); }
.as-yiji-label.ji { color: var(--red); }
.as-yiji-list { display: flex; flex-wrap: wrap; gap: 4px; }
.as-yiji-chip {
  font-size: 13px;
  padding: 1px 8px;
  border-radius: 4px;
  color: var(--ok-dark);
  background: var(--ok-soft);
}
.as-yiji-chip.bad {
  color: var(--red);
  background: var(--red-soft);
}
.as-alm-lines {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}
.as-alm-k {
  display: inline-block;
  margin-right: 8px;
  font-size: 13px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--muted);
}
.as-jishi-head {
  margin: 14px 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.as-jishi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
@media (min-width: 560px) {
  .as-jishi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.as-jishi-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 2px;
  border-radius: 4px;
  background: var(--bg-soft);
}
.as-jishi-cell.good { background: var(--ok-soft); }
.as-jishi-zhi {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.as-jishi-cell.good .as-jishi-zhi { color: var(--ok-dark); }
.as-jishi-range {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.as-jishi-shen { font-size: 13px; color: var(--muted); }
.as-jishi-cell.good .as-jishi-shen { color: var(--ok-dark); }
.as-alm-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

/* 每日一签 */
.as-luck {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.as-luck-hint {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  text-align: center;
}
.as-luck-stage { margin-top: 12px; }
.as-slip {
  padding: 20px;
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
  animation: as-rise 0.42s cubic-bezier(0.2, 0.8, 0.3, 1.05) both;
}
.as-slip-level {
  font-size: 18px;
  font-weight: 700;
  color: var(--green-dark);
}
.as-slip-title {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}
.as-slip-poem {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 12px 0;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 2;
  letter-spacing: 1px;
  color: var(--ink);
}
.as-slip-interpret {
  text-align: left;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.as-slip-interpret p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.as-slip-interpret p:last-child { margin-bottom: 0; }
.as-slip-advice {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}
.as-slip-key {
  display: inline-block;
  margin-top: 12px;
  padding: 1px 10px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 13px;
}
.as-slip-note {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

/* ------------------------------------------------------------ 配对弹窗 */
.as-modal-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: center;
  margin-bottom: 2px;
}
.as-modal-score b {
  font-size: 26px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
.as-modal-score span { font-size: 13px; color: var(--muted); }
.as-modal-pair {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}
.as-modal-sec { margin-top: 12px; }
.as-modal-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.as-modal-sec ul { display: flex; flex-direction: column; gap: 4px; }
.as-modal-sec li {
  position: relative;
  padding-left: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}
.as-modal-sec li::before {
  content: "·";
  position: absolute;
  left: 3px;
  color: var(--green);
}
.as-modal-advice {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 4px;
  border-left: 3px solid var(--green);
  background: var(--bg-soft);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ------------------------------------------------------------ 动画（只保留位移/透明度） */
@keyframes as-deal {
  from { opacity: 0; transform: translateY(16px) rotate(-6deg) scale(0.92); }
  to { opacity: 1; transform: none; }
}
@keyframes as-card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes as-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ 窄屏微调 */
@media (max-width: 480px) {
  .as-hero { padding: 14px; }
  .as-hero-title { font-size: 20px; }
  .as-panel { padding: 14px; }
  .as-slip { padding: 14px; }
  .as-sign-btn { padding: 9px 1px 7px; }
  .as-sign-btn .as-sign-symbol { font-size: 19px; }
  .as-tcard, .as-tcard-back { width: 118px; }
  .as-alm-lunar { font-size: 17px; }
}
