.daily-almanac{max-width:1400px;margin:0 auto;padding:0;box-sizing:border-box;overflow:hidden}
.daily-almanac .almanac-container{display:grid;grid-template-columns:15% 20% 1fr 1fr;column-gap:20px;align-items:center;width:100%;padding:0;margin:0;box-sizing:border-box}
.daily-almanac .almanac-section{display:flex;align-items:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0;margin:0;position:relative;box-sizing:border-box}
.daily-almanac .almanac-section strong{font-weight:700;margin-right:5px;color:#fff;flex-shrink:0}
.daily-almanac .almanac-text{display:inline-block;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#fff}
.daily-almanac .almanac-section.favorable:hover .almanac-text::after,
.daily-almanac .almanac-section.unfavorable:hover .almanac-text::after{content:attr(title);position:absolute;top:100%;left:0;background:#fff;color:#000;padding:8px;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,0.15);white-space:normal;z-index:100;max-width:400px;margin-top:4px}
@media(max-width:768px){.daily-almanac .almanac-container{display:block}.daily-almanac .almanac-section{width:100%;white-space:normal;margin-bottom:10px}.daily-almanac .almanac-section:last-child{margin-bottom:0}}
.zodiac-banner-shortcode{width:261px;height:45px;background-color:#FFFFFF21;position:relative;font-size:16px;font-weight:normal;text-align:center;line-height:45px;text-transform:uppercase;color:#ffffff;margin:0!important;padding:0!important}

/* ---- Mobile override for zodiac banner ---- */
@media (max-width: 767px){
  .zodiac-banner-shortcode{
    width: auto !important;
    height: auto !important;
    line-height: normal !important;
    padding: 11px 20px !important;             /* 上下11 / 左右20 */
    font-size: 14px !important;
    background: rgba(255, 255, 255, 0.13) !important;
    display: inline-block !important;
  }
}


/* ---- Mobile override for daily_almanac ---- */
@media (max-width: 767px){
  .daily-almanac .almanac-container{
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 30px !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x !important;
    scrollbar-width: none !important;
  }
  .daily-almanac .almanac-container::-webkit-scrollbar{
    display:none !important;
  }
  .daily-almanac .almanac-section{
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 85vw !important;
    white-space: nowrap !important;
  }
}

/* Force zodiac_banner one-line no wrap */
.zodiac-banner-shortcode{
  white-space: nowrap !important;
}


/* ---- Align text vertically for [daily_almanac] sections on mobile ---- */
@media (max-width: 767px){
  .daily-almanac .almanac-container{
    align-items: center !important;           /* 子项垂直居中对齐 */
  }
  .daily-almanac .almanac-section{
    display: flex !important;
    align-items: center !important;           /* 行内文字与加粗标题居中对齐 */
    line-height: 1.3 !important;              /* 统一行高 */
  }
  .daily-almanac .almanac-section strong,
  .daily-almanac .almanac-section .almanac-text{
    line-height: 1.3 !important;              /* 标题/正文一致行高 */
    vertical-align: middle !important;
  }
}


/* ============ Font families ============ */
/* Import Arapey for zodiac banner (skip if theme already loads it) */
@import url('https://fonts.googleapis.com/css2?family=Arapey:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* [zodiac_banner]: Arapey */
.zodiac-banner-shortcode{
  font-family: 'Arapey', serif !important;
  white-space: nowrap !important; /* 单行不换行 */
}

/* [daily_almanac]: Century Gothic */
.daily-almanac{
  font-family: "Century Gothic","Apple Gothic","Segoe UI",Arial,sans-serif !important;
}

/* ============ Baseline alignment fix for last line ============ */
@media (max-width: 1024px){
  .daily-almanac .almanac-section{
    display: flex !important;
    align-items: baseline !important;     /* 与文本基线对齐，避免粗体抬头 */
    line-height: 1.2 !important;          /* 统一行高 */
  }
  .daily-almanac .almanac-section strong{
    display: inline-block !important;
    font-weight: 700 !important;
    margin-right: 6px !important;
    line-height: 1.2 !important;
  }
  .daily-almanac .almanac-section .almanac-text{
    display: inline-block !important;
    line-height: 1.2 !important;
  }
}


/* ---- Container-level baseline alignment for mobile ---- */
@media (max-width: 1024px){
  .daily-almanac .almanac-container{
    align-items: baseline !important;        /* 关键：各区块之间按基线对齐 */
  }
  .daily-almanac .almanac-section{
    display: inline-flex !important;         /* 作为基线参与者 */
    align-items: baseline !important;        /* 内部 strong 与文本同基线 */
    line-height: 1.2 !important;
  }
  .daily-almanac .almanac-section strong,
  .daily-almanac .almanac-section .almanac-text{
    line-height: 1.2 !important;
  }
}

/* === Auto-scrolling marquee for Favorable/Unfavorable === */
.daily-almanac .almanac-section.favorable .almanac-text,
.daily-almanac .almanac-section.unfavorable .almanac-text {
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
  display: inline-block !important;
  position: relative !important;
}

.daily-almanac .almanac-section.favorable .almanac-text span,
.daily-almanac .almanac-section.unfavorable .almanac-text span {
  display: inline-block;
  padding-left: 100%;
  animation: almanac-marquee var(--marquee-duration, 15s) linear infinite;
}

@keyframes almanac-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.daily-almanac .almanac-section.favorable:hover .almanac-text::after,
.daily-almanac .almanac-section.unfavorable:hover .almanac-text::after {
  content: none !important;
  display: none !important;
}

/* === Almanac auto-scroll marquee for Favorable/Unfavorable (added) === */
.daily-almanac .almanac-section.favorable .almanac-text,
.daily-almanac .almanac-section.unfavorable .almanac-text{
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
  display: inline-block !important;
  position: relative !important;
}

.daily-almanac .almanac-section.favorable .almanac-text > span,
.daily-almanac .almanac-section.unfavorable .almanac-text > span{
  display: inline-block !important;
  padding-left: 100% !important;        /* start off-screen to the right */
  animation: almanac-marquee var(--marquee-duration, 15s) linear infinite !important;
    will-change: transform;
}

/* Stop animation on hover if needed (optional, comment out to keep moving) */
.daily-almanac .almanac-section.favorable:hover .almanac-text > span,
.daily-almanac .almanac-section.unfavorable:hover .almanac-text > span{
  animation-play-state: paused;
}

/* Disable the original tooltip bubble to avoid overlap */
.daily-almanac .almanac-section.favorable:hover .almanac-text::after,
.daily-almanac .almanac-section.unfavorable:hover .almanac-text::after{
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Keyframes for marquee */
@keyframes almanac-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
/* === v2.0.2: force single-row layout on tablet & remove ellipsis === */
@media (max-width: 1024px){
  .daily-almanac .almanac-container{
    display: grid !important;
    grid-auto-flow: column !important;
    grid-template-columns: auto auto 1fr 1fr !important;
    column-gap: 12px !important;
    align-items: center !important;
  }
  .daily-almanac .almanac-section{
    display: flex !important;
    align-items: center !important;
  }
}

/* no text ellipsis in almanac-text */
.daily-almanac .almanac-text{
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.daily-almanac .almanac-text > span{
  display: inline-block !important;
  padding-left: 100% !important;
  animation: almanac-marquee var(--marquee-duration, 15s) linear infinite !important;
}
