/* 信義萬富宮 官網：取廟方海報的金／朱紅／米白色調，手機優先 */
:root {
  --wf-red: #8e1b1b;
  --wf-red-dark: #6c1212;
  --wf-gold: #b8892b;
  --wf-gold-soft: #f3e3b8;
  --wf-cream: #fbf6ea;
  --wf-paper: #ffffff;
  --wf-ink: #2b2420;
  --wf-dim: #7a6c5d;
  --wf-line: #e6d9bf;
  --wf-navy: #1d2b4f;
  --wf-green: #2f7d4f;
  --wf-radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--wf-cream); color: var(--wf-ink); line-height: 1.75;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; font-size: 16px;
}
a { color: var(--wf-red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: "Noto Serif TC", "PMingLiU", serif; color: var(--wf-red-dark); line-height: 1.35; }
.wf-wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }

/* 頁首 */
.wf-header { background: var(--wf-red-dark); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.wf-header .wf-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.wf-brand { color: #fff; font-family: "Noto Serif TC", serif; font-weight: 900; font-size: 20px; letter-spacing: 2px; line-height: 1.2; }
.wf-brand small { display: block; font-size: 11.5px; font-weight: 400; letter-spacing: 1px; color: var(--wf-gold-soft); }
.wf-brand:hover { text-decoration: none; }
.wf-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.wf-nav a { color: #f6ead0; padding: 8px 11px; border-radius: 8px; font-size: 14.5px; }
.wf-nav a:hover, .wf-nav a.active { background: rgba(255,255,255,.14); text-decoration: none; }
.wf-burger { display: none; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; font-size: 22px; padding: 2px 11px; border-radius: 8px; cursor: pointer; }
@media (max-width: 860px) {
  .wf-burger { display: block; }
  .wf-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--wf-red-dark); padding: 8px 14px 14px; flex-direction: column; }
  .wf-nav.open { display: flex; }
  .wf-nav a { padding: 12px 10px; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
}

/* 版面元件 */
.wf-main { padding: 26px 0 50px; }
.wf-hero { background: linear-gradient(135deg, #7d1616 0%, #a52a2a 55%, #b8892b 130%); color: #fff; padding: 36px 0; }
.wf-hero .wf-wrap { display: grid; grid-template-columns: 1fr 230px; gap: 30px; align-items: center; }
.wf-hero h1 { color: #fff; font-size: 34px; margin: 0 0 8px; letter-spacing: 3px; }
.wf-hero p { margin: 6px 0; color: #fbeccb; font-size: 17px; }
.wf-hero .wf-btns { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.wf-hero img { width: 100%; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.35); border: 3px solid rgba(255,255,255,.55); }
@media (max-width: 700px) {
  .wf-hero .wf-wrap { grid-template-columns: 1fr; }
  .wf-hero img { max-width: 190px; margin: 0 auto; order: -1; }
  .wf-hero h1 { font-size: 28px; }
}
.wf-btn { display: inline-block; background: var(--wf-gold); color: #fff; border: none; padding: 11px 22px; border-radius: 999px; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; }
.wf-btn:hover { background: #a07620; text-decoration: none; }
.wf-btn.red { background: var(--wf-red); }
.wf-btn.red:hover { background: var(--wf-red-dark); }
.wf-btn.ghost { background: transparent; border: 2px solid #fff; color: #fff; }
.wf-btn.small { padding: 6px 14px; font-size: 14px; }
.wf-section { margin: 34px 0; }
.wf-section > h2 { font-size: 24px; margin: 0 0 6px; padding-left: 12px; border-left: 5px solid var(--wf-gold); }
.wf-section > .wf-sub { color: var(--wf-dim); margin: 0 0 16px 17px; }
.wf-card { background: var(--wf-paper); border: 1px solid var(--wf-line); border-radius: var(--wf-radius); padding: 18px 20px; box-shadow: 0 2px 8px rgba(120,80,20,.06); }
.wf-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.wf-grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.wf-card h3 { margin: 0 0 6px; font-size: 19px; }
.wf-tag { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--wf-gold-soft); color: #7a5410; }
.wf-tag.red { background: #f6d9d9; color: var(--wf-red-dark); }
.wf-tag.green { background: #d9efe1; color: var(--wf-green); }
.wf-tag.blue { background: #dbe4f7; color: var(--wf-navy); }
.wf-fit { color: var(--wf-red); font-size: 14.5px; margin-top: 8px; }
.wf-notice { background: #fff6dc; border: 1px solid #ecd48a; border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; }
.wf-notice.warn { background: #fdeaea; border-color: #e8b4b4; }
.wf-flash { background: #fdeaea; border: 1px solid #e8b4b4; color: #7a1c1c; padding: 10px 16px; border-radius: 10px; margin-bottom: 16px; }
.wf-figure { margin: 0 0 18px; text-align: center; }
.wf-figure img { border-radius: 12px; border: 1px solid var(--wf-line); box-shadow: 0 4px 14px rgba(0,0,0,.1); max-height: 900px; }
.wf-figure figcaption { color: var(--wf-dim); font-size: 14px; margin-top: 6px; }
.wf-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.wf-steps li { counter-increment: step; position: relative; padding: 6px 0 6px 44px; }
.wf-steps li::before { content: counter(step); position: absolute; left: 0; top: 6px; width: 30px; height: 30px; border-radius: 50%; background: var(--wf-red); color: #fff; text-align: center; line-height: 30px; font-weight: 700; }

/* 表單 */
.wf-form label { display: block; font-weight: 700; margin: 12px 0 4px; font-size: 15px; }
.wf-form input[type=text], .wf-form input[type=tel], .wf-form input[type=date], .wf-form input[type=number], .wf-form select, .wf-form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #cdbd9a; border-radius: 10px; font-size: 16px; background: #fffdf8; font-family: inherit;
}
.wf-form textarea { min-height: 80px; }
.wf-form .row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.wf-form .hint { color: var(--wf-dim); font-size: 13.5px; margin-top: 3px; }
.wf-form .check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 14px 0; }
.wf-form .check input { margin-top: 6px; }
.wf-form .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.wf-lunar-result { background: #f3ede0; border-radius: 8px; padding: 8px 12px; margin-top: 8px; font-size: 14.5px; min-height: 20px; color: var(--wf-navy); }
.wf-lunar-result.err { color: var(--wf-red); }
.wf-seg { display: flex; gap: 8px; margin: 4px 0 8px; }
.wf-seg label { margin: 0; display: flex; align-items: center; gap: 6px; font-weight: 400; background: #fff; border: 1px solid #cdbd9a; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.wf-qty { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--wf-line); }
.wf-qty input { width: 80px !important; text-align: center; }
.wf-shop-icon { width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%; }
.wf-lamp-icon { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; margin-right: 10px; vertical-align: middle; }

/* 開運品卡片 */
.wf-shop-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 20px; }
.wf-shop-card { display: flex; flex-direction: column; text-align: center; }
.wf-shop-card-img { width: 100%; aspect-ratio: 1 / 1; max-width: 160px; margin: 0 auto 12px; border-radius: 12px; overflow: hidden; background: var(--wf-cream); display: flex; align-items: center; justify-content: center; }
.wf-shop-card-img img { width: 100%; height: 100%; object-fit: cover; }
.wf-shop-card-noimg { font-size: 13px; color: var(--wf-dim); padding: 10px; }
.wf-shop-card h3 { margin: 0 0 4px; font-size: 18px; }
.wf-shop-card-price { font-weight: 700; color: var(--wf-red-dark); margin-bottom: 6px; }
.wf-shop-card-price small { font-weight: 400; color: var(--wf-dim); }
.wf-shop-card-desc { color: var(--wf-dim); font-size: 13.5px; margin: 0 0 12px; flex-grow: 1; }
.wf-shop-card-qty { display: flex; align-items: center; justify-content: center; gap: 10px; }
.wf-shop-card-qty label { margin: 0; font-weight: 700; }
.wf-shop-card-qty input { width: 70px !important; text-align: center; }
.wf-shop-card-sub { margin-top: 8px; font-size: 13.5px; color: var(--wf-green); font-weight: 700; }
.wf-shop-card-sub span { font-variant-numeric: tabular-nums; }
.wf-shop-total { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; background: var(--wf-gold-soft); border-radius: 12px; padding: 12px 18px; margin-bottom: 18px; font-size: 14.5px; }
.wf-shop-total-amount { font-size: 18px; font-weight: 700; color: var(--wf-red-dark); }
.wf-shop-total-amount b, .wf-shop-total b { font-variant-numeric: tabular-nums; }

/* 點燈卡片(單選) */
.wf-lamp-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 20px; }
.wf-lamp-card { display: flex; flex-direction: column; text-align: center; cursor: pointer; border-width: 2px; transition: border-color .15s, box-shadow .15s; }
.wf-lamp-card:hover { border-color: var(--wf-gold); }
.wf-lamp-card.selected { border-color: var(--wf-red); box-shadow: 0 0 0 2px rgba(142,27,27,.15); }
.wf-lamp-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.wf-lamp-card-img { width: 100%; aspect-ratio: 1 / 1; max-width: 140px; margin: 0 auto 10px; border-radius: 12px; overflow: hidden; background: var(--wf-cream); display: flex; align-items: center; justify-content: center; }
.wf-lamp-card-img img { width: 100%; height: 100%; object-fit: cover; }
.wf-lamp-card h3 { margin: 0 0 4px; font-size: 17px; }

/* 月曆 */
.wf-cal { width: 100%; border-collapse: collapse; background: var(--wf-paper); table-layout: fixed; border-radius: 12px; overflow: hidden; }
.wf-cal th { background: var(--wf-red-dark); color: #fff; padding: 8px 0; font-size: 14px; }
.wf-cal td { border: 1px solid var(--wf-line); vertical-align: top; height: 88px; padding: 4px 5px; font-size: 13px; }
.wf-cal td.out { background: #f6f1e6; color: #b9ad98; }
.wf-cal td.today { outline: 3px solid var(--wf-gold); outline-offset: -3px; }
.wf-cal .d { font-weight: 700; font-size: 15px; }
.wf-cal .l { color: var(--wf-dim); font-size: 11.5px; margin-left: 4px; font-weight: 400; }
.wf-cal .ev { display: block; background: #dbe4f7; color: var(--wf-navy); border-radius: 4px; padding: 0 4px; margin-top: 3px; font-size: 12px; line-height: 1.45; }
.wf-cal .ev.tianshe { background: #fde8c4; color: #7a4a00; }
.wf-cal .ev.law { background: #f6d9d9; color: var(--wf-red-dark); }
.wf-cal .off { display: block; color: #c0262d; font-size: 12px; margin-top: 3px; }
@media (max-width: 640px) { .wf-cal td { height: 64px; font-size: 11px; padding: 2px; } .wf-cal .ev { font-size: 10.5px; } .wf-cal .l { display: none; } }
.wf-month-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.wf-list-row { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--wf-line); flex-wrap: wrap; }
.wf-list-row .when { min-width: 150px; font-weight: 700; }

/* 問事流程／注意事項：圓形標籤 + 說明的清單 */
.wf-flow-list { display: flex; flex-direction: column; gap: 18px; }
.wf-flow-row { display: flex; gap: 18px; align-items: flex-start; }
.wf-flow-badge {
  flex: none; width: 68px; height: 68px; border-radius: 50%;
  background: var(--wf-red-dark); color: var(--wf-gold-soft);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-weight: 700; font-size: 14px; line-height: 1.3; letter-spacing: 1px;
}
.wf-flow-row > div:last-child { flex: 1; padding-top: 6px; line-height: 1.8; }

/* 問與答圖卡：✓／✗ 對照 */
.wf-qa-row { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.wf-qa-mark {
  flex: none; width: 40px; height: 40px; border-radius: 10px; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900;
}
.wf-qa-row.good .wf-qa-mark { background: var(--wf-green); }
.wf-qa-row.bad .wf-qa-mark { background: var(--wf-red); }
.wf-qa-row p { margin: 0 0 6px; }
.wf-qa-row p:last-child { margin-bottom: 0; }

/* 送出前「登記明細」確認卡 */
.wf-confirm-overlay {
  position: fixed; inset: 0; background: rgba(43,36,32,.55); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.wf-confirm-overlay[hidden] { display: none; }
.wf-confirm-card {
  background: var(--wf-cream); border: 2px solid var(--wf-gold); border-radius: 16px;
  padding: 22px; max-width: 420px; width: 100%; max-height: 86vh; overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.wf-confirm-card h3 { margin: 0 0 14px; color: var(--wf-red-dark); font-size: 20px; }
.wf-confirm-item { padding: 8px 0; border-bottom: 1px dashed var(--wf-line); display: flex; justify-content: space-between; gap: 10px; }
.wf-confirm-item:first-child { border-top: 1px dashed var(--wf-line); }
.wf-confirm-item .label { color: var(--wf-dim); font-size: 13px; }
.wf-confirm-total { display: flex; justify-content: space-between; align-items: center; margin: 14px 0; font-size: 18px; }
.wf-confirm-total b { color: var(--wf-red); font-size: 24px; }
.wf-confirm-card .wf-btn { width: 100%; text-align: center; }
.wf-confirm-hint { color: var(--wf-dim); font-size: 13px; text-align: center; margin-top: 10px; }
.wf-confirm-back { display: block; margin: 10px auto 0; background: none; border: none; color: var(--wf-dim); text-decoration: underline; cursor: pointer; font-size: 14px; }

/* 頁尾 */
.wf-footer { background: #2b1a14; color: #d9c8a8; padding: 28px 0; font-size: 14.5px; }
.wf-footer a { color: #f1d9a0; }
.wf-footer .cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.wf-footer h4 { color: #f1d9a0; margin: 0 0 6px; font-family: "Noto Serif TC", serif; }
.wf-bank { background: #fff8e6; border: 2px dashed var(--wf-gold); border-radius: 12px; padding: 14px 18px; white-space: pre-line; font-size: 17px; }
