/* ===== 煜坤鑫黃曆通 · 公開網站樣式 ===== */
/* 視覺風格參考微信小程序「擇日」頁面：米色底、金棕主色、宜綠忌紅 */

:root {
  --bg: #F5F0E8;
  --card: #FFFDF7;
  --border: #D4C5A9;
  --gold: #B8860B;
  --gold-light: #DAA520;
  --ink: #1A1A2E;
  --muted: #8A8A9A;
  --green: #1F7A3A;
  --green-bg: #e8f5e9;
  --red: #C62828;
  --red-bg: #ffebee;
  --gold-bg: #FAF3E0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 56px;
}

/* ── 頂部橫幅 ── */
.hero {
  background: linear-gradient(135deg, #B8860B, #DAA520);
  color: #fff;
  padding: 40px 24px 32px;
  text-align: center;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 18px rgba(184, 134, 11, 0.25);
  margin: 0 -16px 24px;
}
.hero .brand {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
}
.hero .slogan {
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.95;
  letter-spacing: 1px;
}

/* ── 卡片 ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

/* ── 今日黃曆 ── */
.today-head {
  text-align: center;
  margin-bottom: 16px;
}
.today-greg {
  font-size: 20px;
  font-weight: 700;
}
.today-lunar {
  font-size: 14px;
  color: var(--gold);
  margin-top: 4px;
}
.today-pillar {
  display: inline-block;
  margin-top: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #fff;
  background: linear-gradient(135deg, #B8860B, #DAA520);
  padding: 6px 18px;
  border-radius: 10px;
}
.yiji {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}
.yiji-col { flex: 1; }
.yiji-label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.yiji-label.good { color: var(--green); }
.yiji-label.bad { color: var(--red); }
.tag {
  display: inline-block;
  padding: 5px 12px;
  margin: 0 6px 8px 0;
  border-radius: 8px;
  font-size: 13px;
}
.tag.good { background: var(--green-bg); color: var(--green); }
.tag.bad { background: var(--red-bg); color: var(--red); }
/* 紅通書絕對凶日徽標 */
.taboo-banner {
  display: none;
  margin: 12px 0 4px;
  padding: 10px 12px;
  border: 1.5px solid var(--red);
  border-radius: 10px;
  background: var(--red-bg);
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.taboo-banner.show { display: block; }
.taboo-banner .taboo-reasons {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.85;
}
.taboo-banner .taboo-items { font-weight: 700; }
.chongsha {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ── 干支換算器 ── */
.converter {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.converter select {
  flex: 1;
  min-width: 84px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
}
.conv-sep {
  color: #8a7a4a;
  font-size: 14px;
}
.convert-result {
  min-height: 24px;
}
.gz-empty {
  font-size: 14px;
  color: #a08a4a;
  line-height: 1.8;
}
.gz-result {
  border-top: 1px dashed #ecd9a8;
  padding-top: 14px;
}
.gz-line {
  font-size: 16px;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 6px;
}
.gz-lunar {
  color: var(--gold);
}
.gz-pillars {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}
.gz-pillar {
  flex: 1;
  background: var(--gold-bg);
  border: 1px solid #F0E5C9;
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
}
.gz-label {
  display: block;
  font-size: 12px;
  color: #8a7a4a;
  margin-bottom: 4px;
}
.gz-val {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 2px;
}
.gz-yiji {
  margin-top: 6px;
}
.yiji-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.8;
}
.yiji-row .yiji-label {
  flex: none;
}
.yiji-row .yiji-label.good { color: #2E8B57; }
.yiji-row .yiji-label.bad { color: #B22222; }
.yiji-row > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gz-chong {
  margin-top: 8px;
  font-size: 14px;
  color: #8a7a4a;
}
.note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}

/* ── 頁尾 ── */
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  padding-top: 8px;
}
.footer .org { color: var(--ink); font-weight: 600; }
.footer .icp { color: var(--gold); }
.footer .icp a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(184,134,11,0.4); }
.footer .icp a:hover { border-bottom-color: var(--gold); }
.disclaimer {
  background: var(--gold-bg);
  border: 1px solid #F0E5C9;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: #6b5a2e;
  line-height: 1.9;
  margin-bottom: 18px;
}

/* ── 微信小程序 QR ── */
.qr-card { text-align: center; }
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.qr-img {
  width: 184px;
  height: 184px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: contain;
  padding: 8px;
}
.qr-text { max-width: 340px; }
.qr-tip {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.7;
}
.qr-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 1px;
}

@media (max-width: 480px) {
  .hero { padding: 32px 18px 26px; }
  .hero .brand { font-size: 22px; }
  .yiji { flex-direction: column; gap: 12px; }
}

/* ── 語言切換器（右上角浮動，Apple 風格膠囊）── */
.lang-switch {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 50;
  display: flex;
  gap: 2px;
  background: rgba(255, 253, 247, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid rgba(184, 134, 11, 0.28);
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.lang-switch button {
  border: none;
  background: transparent;
  color: #6b5a2e;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.5px;
  transition: color .15s ease, background .15s ease;
}
.lang-switch button:hover { color: var(--gold); }
.lang-switch button.active {
  background: linear-gradient(135deg, #B8860B, #DAA520);
  color: #fff;
  box-shadow: 0 1px 4px rgba(184, 134, 11, 0.4);
}
@media (max-width: 480px) {
  .lang-switch { top: 8px; right: 8px; }
  .lang-switch button { padding: 4px 9px; font-size: 12px; }
}

/* ── 英文版字體與排版微調 ── */
html[lang="en"] body {
  font-family: "Helvetica Neue", "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}
html[lang="en"] .hero .brand { letter-spacing: 0.5px; }
html[lang="en"] .note,
html[lang="en"] .disclaimer { line-height: 1.75; }
