/* ==================================================================
   社群人脉 · 生活工具 · 黄道吉日 样式
   金色 / 暖黄主题；吉道用金、黑道用浅灰，不用大红大绿。
   ================================================================== */
.fd-page {
  --tc: #E0A82E; --tbg: #FBF3DD;
  max-width: 640px; margin: 0 auto; padding: 0 14px 16px;
  font-size: 15px; color: #2b2b2b; -webkit-text-size-adjust: 100%;
}
.fd-page * { box-sizing: border-box; }

/* 顶部导航 */
.fd-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px; margin: 0 -14px 6px; padding-left: 14px; padding-right: 14px;
  background: linear-gradient(135deg, var(--tc), #F2C75A);
  color: #fff; box-shadow: 0 2px 8px rgba(224,168,46,.22);
}
.fd-head-l { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.fd-head-r { display: flex; gap: 8px; }
.fd-hbtn {
  border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.16);
  color: #fff; font-size: 13px; padding: 5px 11px; border-radius: 16px; cursor: pointer;
}
.fd-hbtn:active { background: rgba(255,255,255,.3); }

/* 模式 tab */
.fd-tabs { display: flex; gap: 0; background: #f6efe0; border-radius: 10px; padding: 4px; margin-bottom: 10px; }
.fd-tab {
  flex: 1; border: 0; background: transparent; color: #8a7a4e; font-size: 14.5px;
  padding: 9px 0; border-radius: 8px; cursor: pointer; font-weight: 600;
}
.fd-tab.active { background: #fff; color: var(--tc); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* 方言小条 */
.fd-subbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.fd-dialect-btn {
  font-size: 13px; color: #9a874e; background: #f6efe0; border: 0;
  padding: 5px 12px; border-radius: 14px; cursor: pointer;
}
.fd-dialect-btn b { color: var(--tc); }

/* 事项选择 */
.fd-sec { margin-bottom: 12px; }
.fd-label { font-size: 13px; color: #a39468; margin-bottom: 8px; padding-left: 2px; }
.fd-events { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.fd-events::-webkit-scrollbar { height: 0; }
.fd-ev {
  flex: 0 0 auto; white-space: nowrap; border: 1px solid #ecdfba; background: #fff;
  color: #6b5d36; font-size: 14px; padding: 8px 14px; border-radius: 18px; cursor: pointer;
}
.fd-ev.active { background: var(--tc); border-color: var(--tc); color: #fff; font-weight: 700; }

/* 日期选择 */
.fd-dates { background: #fbf6ea; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.fd-daterow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fd-daterow label { width: 64px; font-size: 13.5px; color: #9a874e; flex: 0 0 auto; }
.fd-daterow input {
  flex: 1; border: 1px solid #ecdfba; border-radius: 8px; padding: 9px 10px;
  font-size: 15px; color: #2b2b2b; background: #fff;
}
.fd-qbtn {
  width: 100%; border: 0; background: var(--tc); color: #fff; font-size: 15.5px;
  font-weight: 700; padding: 12px 0; border-radius: 10px; cursor: pointer; margin-top: 2px;
}
.fd-qbtn:active { filter: brightness(.95); }
.fd-hint { text-align: center; font-size: 12px; color: #b3a276; margin-top: 8px; }

/* 结果区 */
.fd-result { margin-bottom: 14px; }
.fd-result-tip { font-size: 14px; color: #6b5d36; margin: 4px 2px 10px; }
.fd-result-tip b { color: var(--tc); }
.fd-foot-note { font-size: 12px; color: #b3a276; margin: 10px 2px 0; line-height: 1.6; }

.fd-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border: 1px solid #f0e6cb; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(224,168,46,.07);
}
.fd-card-main { min-width: 0; }
.fd-card-date { font-size: 15.5px; font-weight: 700; color: #2b2b2b; display: flex; align-items: center; gap: 6px; }
.fd-card-sub { font-size: 13px; color: #a39468; margin-top: 3px; }
.fd-card-jc { font-size: 12px; color: #8a7a4e; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fd-suit { color: #9a874e; }
.fd-exp { font-size: 11px; color: #c08a3e; background: #fbf0e0; border-radius: 6px; padding: 1px 6px; font-weight: 600; }

/* 建除 / 黄道 小标 */
.fd-jc { font-size: 11.5px; padding: 2px 8px; border-radius: 10px; font-weight: 700; white-space: nowrap; }
.fd-jc-gold { background: #FBF0D6; color: #B07B12; }
.fd-jc-gray { background: #EFEAE0; color: #9A8C72; }

/* 标签（金 / 浅灰，禁大红大绿） */
.fd-tag { font-size: 12px; padding: 4px 10px; border-radius: 12px; font-weight: 600; white-space: nowrap; }
.fd-tag-gold { background: #FBF0D6; color: #B07B12; }
.fd-tag-gray { background: #EFEAE0; color: #9A8C72; }

/* 提示 */
.fd-tip { background: #fbf6ea; border: 1px dashed #ecdfba; border-radius: 10px; padding: 14px; font-size: 14px; color: #8a7a4e; line-height: 1.7; }
.fd-tip-warn { background: #fbf0e0; border-color: #e8d3ad; color: #a9762e; margin-bottom: 12px; }

/* 单日详情 */
.fd-day-head { background: #fff; border: 1px solid #f0e6cb; border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.fd-day-g { font-size: 16px; font-weight: 700; color: #2b2b2b; }
.fd-day-l { font-size: 14px; color: var(--tc); margin-top: 5px; font-weight: 600; }
.fd-day-m { font-size: 12.5px; color: #b3a276; margin-top: 5px; }

/* 针对事项结论 */
.fd-ev-concl { font-size: 13.5px; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; line-height: 1.6; }
.fd-ev-good { background: #FBF0D6; color: #8a5e0e; border: 1px solid #f0e0b0; }
.fd-ev-bad { background: #f3efea; color: #8a7a4e; border: 1px solid #e6ded0; }
.fd-ev-mid { background: #faf7f0; color: #9a874e; border: 1px solid #efe6d3; }

/* 黄历属性表 */
.fd-profile { background: #fff; border: 1px solid #f0e6cb; border-radius: 12px; padding: 6px 14px; margin-bottom: 12px; }
.fd-p-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0e6cb; font-size: 13.5px; }
.fd-p-row:last-child { border-bottom: 0; }
.fd-p-k { flex: 0 0 84px; color: #a39468; }
.fd-p-v { flex: 1; color: #4a4231; line-height: 1.6; }

/* 宜忌分组 */
.fd-group { border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.fd-group-gold { background: #FBF0D6; }
.fd-group-gray { background: #F2EFE8; }
.fd-group-h { font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.fd-group-gold .fd-group-h { color: #B07B12; }
.fd-group-gray .fd-group-h { color: #9A8C72; }
.fd-group ul { margin: 0; padding-left: 18px; }
.fd-group li { font-size: 13.5px; color: #5a4f38; line-height: 1.8; }
.fd-muted { color: #b3a276; list-style: none; margin-left: -16px; }

/* 科普折叠 */
.fd-pop { background: #fbf6ea; border-radius: 10px; padding: 4px 14px; margin-bottom: 8px; font-size: 13px; color: #9a874e; }
.fd-pop summary { cursor: pointer; padding: 10px 0; font-weight: 600; color: #8a7a4e; }
.fd-pop p { margin: 0 0 10px; line-height: 1.7; }
.fd-pop b { color: var(--tc); }

/* 固定免责（不可折叠、不可隐藏） */
.fd-disclaimer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: #f7f1e3; border-top: 1px solid #ecdfba; color: #9a874e;
  font-size: 11.5px; line-height: 1.6; padding: 8px 16px; max-height: 92px; overflow-y: auto;
  text-align: center;
}
.fd-disclaimer b { color: #b07b12; }

/* 遮罩 + 底部弹窗 */
.fd-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60; }
.fd-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  background: #fff; border-radius: 16px 16px 0 0; padding: 16px 16px 22px; max-height: 70vh; overflow-y: auto;
}
.fd-sheet-h { font-size: 16px; font-weight: 700; text-align: center; color: #2b2b2b; margin-bottom: 12px; }
.fd-sheet-b { font-size: 14px; }
.fd-sheet-cancel {
  margin-top: 16px; text-align: center; color: #9a874e; font-size: 15px;
  border-top: 1px solid #eee; padding-top: 14px; cursor: pointer;
}
.fd-sheet-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.fd-sheet-item {
  border: 1px solid #ecdfba; background: #fbf6ea; color: #6b5d36; font-size: 14px;
  padding: 9px 16px; border-radius: 18px; cursor: pointer;
}
.fd-sheet-item.active { background: var(--tc); border-color: var(--tc); color: #fff; font-weight: 700; }

/* 历史记录 */
.fd-hist-list { display: flex; flex-direction: column; gap: 8px; }
.fd-hist-item { background: #fbf6ea; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.fd-hist-item:active { background: #f6efe0; }
.fd-hist-desc { font-size: 14px; color: #2b2b2b; font-weight: 600; }
.fd-hist-time { font-size: 11.5px; color: #b3a276; margin-top: 3px; }
.fd-clear-btn { width: 100%; margin-top: 14px; border: 1px solid #e8d3ad; background: #fbf0e0; color: #a9762e; font-size: 14px; padding: 10px; border-radius: 10px; cursor: pointer; }

/* 海报弹窗 */
.fd-poster-wrap { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 86%; max-width: 380px; }
#fdPosterImg { width: 100%; border-radius: 10px; display: block; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.fd-poster-bar { display: flex; gap: 10px; margin-top: 12px; }
.fd-poster-dl, .fd-poster-close {
  flex: 1; text-align: center; text-decoration: none; font-size: 15px; font-weight: 700;
  padding: 11px 0; border-radius: 10px; cursor: pointer; border: 0;
}
.fd-poster-dl { background: var(--tc); color: #fff; }
.fd-poster-close { background: #fff; color: #8a7a4e; border: 1px solid #ecdfba; }
