/* 擇日（/goodday）與八字稱骨（/bazi）：建在 hub.css 之上；給長輩用，主要內容 16px 以上、按鈕與輸入 17px 以上、觸控 44px 以上 */
.gd { --gd-good: #2E7D32; --gd-good-soft: #E8F5E9; --gd-ghost: #6A1B9A; --gd-ghost-soft: #F3E5F5; --gd-folk: #A64B00; --gd-folk-soft: #FFF1E0; }
[data-theme="night"] .gd { --gd-good: #81C784; --gd-good-soft: rgba(129,199,132,.14); --gd-ghost: #CE93D8; --gd-ghost-soft: rgba(206,147,216,.14); --gd-folk: #FFB74D; --gd-folk-soft: rgba(255,183,77,.14); }
.gd .hub-head .hub-sub { font-size: 1rem; line-height: 1.65; }
.gd .hub-answer { font-size: 1.0625rem; }
.gd-ad { padding: 8px 0; }

/* 月份切換 */
.gd-mnav { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gd-mnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hub-line); background: var(--hub-panel); font-weight: 800; font-size: 1.0625rem; text-decoration: none; }

.gd-warn { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--gd-ghost-soft); color: var(--gd-ghost); font-weight: 700; line-height: 1.7; font-size: 1rem; }
.gd-warn-s { margin-bottom: 10px; font-size: .9375rem; padding: 8px 12px; }

/* 篩選 */
.gd-filter { display: grid; gap: 12px; margin: 0 0 14px; padding: 14px; border-radius: 12px; background: var(--hub-bg); border: 1px solid var(--hub-line); }
.gd-chk { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; font-size: 1.0625rem; cursor: pointer; }
.gd-chk input { width: 24px; height: 24px; accent-color: var(--hub-accent); flex: none; }
.gd-chk small { font-weight: 500; color: var(--hub-text-2); font-size: .875rem; }
.gd-zod { border: 0; margin: 0; padding: 0; min-width: 0; }
.gd-zod legend { font-weight: 800; font-size: 1.0625rem; margin-bottom: 8px; padding: 0; }
.gd-zod legend small { font-weight: 500; color: var(--hub-text-2); font-size: .875rem; }
.gd-zod-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.gd-zod-list label { position: relative; cursor: pointer; }
.gd-zod-list input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gd-zod-list span { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 10px; border: 1px solid var(--hub-line); background: var(--hub-panel); font-size: 1.125rem; font-weight: 800; color: var(--hub-text); }
.gd-zod-list input:checked + span { background: var(--hub-hl); border-color: var(--hub-hl); color: #fff; text-decoration: line-through; }
[data-theme="night"] .gd-zod-list input:checked + span { color: #0f1220; }
.gd-zod-list input:focus-visible + span { outline: 2px solid var(--hub-accent); outline-offset: 2px; }
.gd-fstat { margin: 0; font-weight: 800; color: var(--hub-accent); font-size: 1.0625rem; }
.gd-fstat:empty { display: none; }

/* 好日子清單 */
.gd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gd-day { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 14px; border: 1px solid var(--hub-line); border-radius: 12px; background: var(--hub-panel); }
.gd-day[hidden] { display: none; }
.gd-day.is-top { border-color: var(--gd-good); box-shadow: inset 4px 0 0 var(--gd-good); }
.gd-day.is-past { opacity: .6; }
.gd-day-date { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; background: var(--hub-accent-soft); padding: 8px 4px; text-align: center; align-self: start; }
.gd-day-date b { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--hub-text); }
.gd-day-date span { font-size: .9375rem; font-weight: 700; color: var(--hub-text-2); }
.gd-day-date.is-off b, .gd-day-date.is-off span { color: var(--hub-hl); }
.gd-day-body { display: grid; gap: 4px; min-width: 0; }
.gd-day-body p { margin: 0; line-height: 1.6; }
.gd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.gd-tags em { font-style: normal; font-size: .875rem; font-weight: 800; padding: 1px 10px; border-radius: 999px; }
.gd-tag-top { background: var(--gd-good); color: #fff; }
[data-theme="night"] .gd-tag-top { color: #0f1220; }
.gd-tag-off { background: rgba(198,40,40,.1); color: var(--hub-hl); }
.gd-tag-ghost { background: var(--gd-ghost-soft); color: var(--gd-ghost); }
.gd-tag-past { background: var(--hub-line); color: var(--hub-text-2); }
/* 楊公忌、紅紗日：只標示不排除 */
.gd-tag-warn { background: var(--gd-folk-soft); color: var(--gd-folk); box-shadow: inset 0 0 0 1px var(--gd-folk); }
.gd-day-body .gd-warn-note { font-size: .9375rem; color: var(--gd-folk); line-height: 1.6; }
.gd-lunar { font-size: 1.0625rem; font-weight: 700; }
.gd-chong { font-size: 1rem; }
.gd-chong b { color: var(--hub-hl); }
.gd-chong span { display: inline-block; margin-left: 8px; color: var(--hub-text-2); font-size: .9375rem; }
.gd-meta, .gd-also { font-size: .9375rem; color: var(--hub-text-2); }
.gd-also { color: var(--gd-good); font-weight: 700; }
.gd-al { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; font-size: 1rem; text-decoration: none; width: fit-content; }
.gd-list-s .gd-day { padding: 12px; }
.gd-list-s .gd-al { min-height: 40px; }
.gd-empty { margin: 8px 0 0; color: var(--hub-text-2); font-size: 1rem; }
.gd-more { margin: 12px 0 0; font-size: 1.0625rem; }
.gd-more a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; text-decoration: none; }
.gd-month h2 a { text-decoration: none; }
.gd-ex { margin-top: 14px; border-top: 1px dashed var(--hub-line); padding-top: 10px; }
.gd-ex summary { cursor: pointer; font-weight: 700; color: var(--hub-text-2); font-size: .9375rem; min-height: 44px; display: flex; align-items: center; }
.gd-ex ul { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: .9375rem; color: var(--hub-text-2); line-height: 1.6; }

/* 月曆：好日子綠底 */
.gd .hd-cal td.is-gd > a { background: var(--gd-good-soft); box-shadow: inset 0 0 0 2px var(--gd-good); }
.gd .hd-cal td.is-gd b { color: var(--gd-good); }
.gd .hd-cal td.is-gd.is-off b { color: var(--hub-hl); }

/* 總覽表單與事項卡 */
.gd-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.gd-form .calc-f > span { font-size: 1.0625rem; }
.gd-form select { font-size: 1.0625rem !important; min-height: 52px !important; }
.gd-go { min-height: 52px; font-size: 1.125rem; padding: 0 26px; }
.gd-acts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.gd-acts li { border: 1px solid var(--hub-line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.gd-act { display: grid; gap: 2px; text-decoration: none; color: var(--hub-text) !important; min-height: 44px; }
.gd-act b { font-size: 1.1875rem; color: var(--hub-accent); }
.gd-act small { font-size: .875rem; color: var(--hub-text-3); }
.gd-act span { font-size: 1rem; line-height: 1.6; }
.gd-act-m { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.gd-act-m a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; font-size: 1rem; text-decoration: none; }
.gd-how { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; line-height: 1.7; font-size: 1rem; }
.gd-more a + a { margin-left: 8px; }
.gd .hub-faq summary { font-size: 1.0625rem; min-height: 44px; display: flex; align-items: center; }
.gd .hub-faq p { font-size: 1rem; }
.gd .hub-chips a { font-size: 1rem; }

@media (max-width: 640px) {
  .gd-form { grid-template-columns: 1fr; }
  .gd-go { width: 100%; }
  .gd-zod-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gd-day { grid-template-columns: 68px 1fr; gap: 10px; padding: 12px; }
  .gd-day-date b { font-size: 1.35rem; }
  .gd-chong span { display: block; margin-left: 0; }
  .gd-acts { grid-template-columns: 1fr; }
  .gd-mnav a { padding: 0 12px; font-size: 1rem; }
}

/* ── 八字稱骨 /bazi ── */
.bz-form { display: grid; gap: 14px; }
.bz-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bz-form .calc-f > span { font-size: 1.0625rem; }
.bz-form select { font-size: 1.0625rem !important; min-height: 52px !important; }
.bz-cal { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--hub-bg); border: 1px solid var(--hub-line); width: fit-content; max-width: 100%; }
.bz-cal label { cursor: pointer; }
.bz-cal input { position: absolute; opacity: 0; pointer-events: none; }
.bz-cal span { display: flex; align-items: center; padding: 0 20px; border-radius: 9px; font-weight: 800; font-size: 1.0625rem; color: var(--hub-text-2); min-height: 46px; }
.bz-cal input:checked + span { background: var(--hub-accent); color: #fff; }
[data-theme="night"] .bz-cal input:checked + span { color: #0f1220; }
.bz-cal input:focus-visible + span { outline: 2px solid var(--hub-accent); outline-offset: 2px; }
.bz-go { min-height: 52px; font-size: 1.125rem; padding: 0 30px; }
.bz-err { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--hub-warn-bg); color: var(--hub-hl); font-weight: 700; font-size: 1rem; line-height: 1.7; }
.bz-dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 1.0625rem; line-height: 1.6; }
.bz-dl dt { color: var(--hub-text-3); font-weight: 700; }
.bz-dl dd { margin: 0; font-weight: 700; }
.bz-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.bz-pillars li { border: 1px solid var(--hub-line); border-radius: 12px; padding: 10px 4px; text-align: center; display: grid; gap: 2px; }
.bz-pillars li.is-day { border-color: var(--hub-accent); box-shadow: inset 0 0 0 1px var(--hub-accent); }
.bz-pillars small { font-size: .875rem; color: var(--hub-text-3); font-weight: 700; }
.bz-pillars b { font-size: 2rem; line-height: 1.15; letter-spacing: .04em; writing-mode: vertical-rl; text-orientation: upright; margin: 4px auto; }
.bz-pillars span { font-size: .9375rem; color: var(--hub-text-2); }
.bz-pillars .is-none b { color: var(--hub-text-3); font-size: 1.4rem; writing-mode: horizontal-tb; }
.bz-wx { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.bz-wx li { border-radius: 12px; padding: 10px 4px; text-align: center; background: var(--hub-bg); border: 1px solid var(--hub-line); }
.bz-wx b { display: block; font-size: 1.25rem; }
.bz-wx span { font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.bz-wx li.is-zero { opacity: .65; }
.bz-weight { margin: 0; font-size: 2rem; font-weight: 900; color: var(--hub-accent); line-height: 1.3; }
.bz-weight small { display: block; font-size: 1rem; font-weight: 600; color: var(--hub-text-2); }
.bz-sum { margin: 8px 0 0; font-size: 1rem; color: var(--hub-text-2); line-height: 1.7; }
.bz-song { margin: 14px 0 0; padding: 14px 18px; border-radius: 12px; background: var(--hub-accent-soft); font-size: 1.125rem; line-height: 1.9; font-weight: 700; }
.bz-plain { margin: 10px 0 0; font-size: 1rem; line-height: 1.75; }
.bz-note { margin: 10px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--hub-warn-bg); color: var(--hub-warn); font-size: .9375rem; line-height: 1.7; font-weight: 600; }
.bz-hours td, .bz-hours th { font-size: 1rem; }
.bz-tables { display: grid; gap: 16px; }
.bz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.bz-grid li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border: 1px solid var(--hub-line); border-radius: 10px; font-size: 1rem; }
.bz-grid li b { font-weight: 800; }
.bz-grid li span { font-variant-numeric: tabular-nums; color: var(--hub-accent); font-weight: 800; white-space: nowrap; }
.bz-grid li small { display: block; color: var(--hub-text-3); font-size: .8125rem; font-weight: 500; }
.bz-songs { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.bz-songs li { padding: 12px 0; border-bottom: 1px solid var(--hub-line); line-height: 1.75; }
.bz-songs li:last-child { border-bottom: 0; }
.bz-songs b { display: inline-block; min-width: 6.5em; color: var(--hub-accent); font-size: 1.0625rem; }
.bz-songs p { margin: 4px 0 0; font-size: 1rem; }
.bz-songs p + p { color: var(--hub-text-2); font-size: .9375rem; }
.bz-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.bz-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--hub-line); font-weight: 800; text-decoration: none; font-size: 1rem; }
@media (max-width: 640px) {
  .bz-row { grid-template-columns: 1fr 1fr; }
  .bz-row .bz-y { grid-column: 1 / -1; }
  .bz-go { width: 100%; }
  .bz-pillars b { font-size: 1.7rem; }
  .bz-weight { font-size: 1.7rem; }
  .bz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bz-dl { grid-template-columns: 1fr; gap: 0; }
  .bz-dl dd { margin-bottom: 8px; }
}
.bz-h3 { margin: 18px 0 10px; font-size: 1.0625rem; font-weight: 800; }
.bz-h3 small { font-weight: 600; color: var(--hub-text-3); font-size: .8125rem; margin-left: 6px; }
.bz-tables .bz-h3 { margin-top: 4px; }
.bz blockquote.bz-song { border: 0; }
