:root {
  --bg: #fdfbf7;
  --cream: #f3ead8;
  --sand: #eadfc4;
  --sand-dk: #e3d3ad;
  --footer: #dec9a2;
  --footer-ink: #414042;   
  --footer-head: #3a3a3c;
  --footer-line: #b6a789;
  --ink: #2f2a24;
  --ink-2: #5b5349;
  --muted: #8a8174;
  --gold: #b88a3a;
  --red: #9c2a2a;
  --line: #d9cdb5;
  --serif: "Noto Serif", "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --wrap: 1200px;
}

body.ftn-old { height: auto; min-height: 100%; }

/* header breadcrumbs title seciton tab footer */

.h, .f { font: 15px/1.7 var(--sans); letter-spacing: .02em; color: var(--ink); text-align: left; -webkit-text-size-adjust: 100%; }
.h *, .f *, .h *::before, .f *::before, .h *::after, .f *::after { box-sizing: border-box; }
:where(.h, .f) a { color: inherit; text-decoration: none; transition: none; }
:where(.h, .f) img { max-width: 100%; display: block; border: 0; }
:where(.h, .f) :where(h2, h4, p) { margin: 0; font: inherit; }
:where(.h, .f) ul { list-style: none; margin: 0; padding: 0; }
:where(.h, .f) li { list-style: none; margin: 0; padding: 0; position: static; }
:where(.h, .f) li::before { content: none; display: none; }
:where(.h, .f) button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; margin: 0; }
.h .h__talk, .h .has-dd { position: relative; }
.h span::after, .f span::after { content: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.12em; }
.ic--lg { width: 22px; height: 22px; }
.caret { width: .8em; height: .8em; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 1.6em; padding: .85em 1.4em; font-size: 14px; border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s; white-space: nowrap; }
.btn--sm { padding: .55em 1em; font-size: 12.5px; gap: .6em; }
.btn--sand { background: var(--sand-dk); }
.btn--sand:hover { background: #d8c493; }
.btn--line { border-color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--bg); }
.h .btn--line { border-color: var(--red); color: var(--ink); }
.h .btn--line:hover { background: none; color: var(--ink); }   /* 與我們談談: no colour change (it stuck after tapping on phones) */

/* ---------- header ---------- */
.h { position: sticky; top: 0; z-index: 9999; background: rgba(253,251,247,.96); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(0,0,0,.04); }
.h__in { display: flex; align-items: center; height: 78px; gap: 40px; }
.h__logo img { height: 46px; width: auto; }
.h__nav { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.h__nav > ul { display: flex; align-items: center; gap: 26px; }
.h__navlink { font-size: 13.5px; display: inline-flex; align-items: center; gap: 4px; padding: 26px 0; }
.h__navlink:hover { color: var(--gold); }
.h__right { display: flex; align-items: center; gap: 10px; }
.h__lang { font-size: 11.5px; color: var(--muted); margin-right: 18px; display: flex; gap: 6px; }
.h__lang a.on { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.dd { position: absolute; top: 100%; left: -16px; min-width: 190px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(60,40,10,.08); padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s; z-index: 60; }
.dd--right { left: auto; right: 0; top: calc(100% + 6px); }
.dd a, .dd span { display: block; padding: 8px 18px; font-size: 13.5px; white-space: nowrap; } /* span = phone numbers, shown without a link */
.dd a:hover { background: var(--cream); color: var(--gold); }
.has-dd.open > .dd { opacity: 1; visibility: visible; transform: none; }

@media (hover: hover) and (min-width: 1081px) {
  .has-dd:hover > .dd { opacity: 1; visibility: visible; transform: none; }
}

@media (min-width: 1081px) {
  .h .h__nav .has-dd:has(> .mega) { position: static; }   /* panel is placed against the whole header */
  .h .mega { left: 0; right: 0; top: 100%; min-width: 0; padding: 36px 0 44px; background: var(--bg); border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(60,40,10,.06); }
  .h .mega::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 12px; }   /* keeps the hover while moving down to the panel */
  .mega__intro { max-width: 900px; margin-bottom: 26px; font-size: 13.5px; line-height: 1.9; color: var(--ink-2); }
  .mega__head-t { font-weight: inherit; }
  .mega__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 15px; color: var(--gold); }
  .h .dd .mega__head span { display: inline; padding: 0; font-size: inherit; }
  .mega__head .ic { width: 26px; height: 26px; stroke-width: 1.3; }
  .mega__grid { display: grid; grid-template-columns: 1fr 400px; column-gap: 48px; align-items: start; }
  .mega__items { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; align-content: start; }
  .h .dd .mega__item { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; row-gap: 6px; padding: 20px 0 18px; border-bottom: 1px solid var(--line); white-space: normal; }
  .h .dd .mega__item:hover { background: none; color: inherit; }
  .h .dd .mega__title { display: block; padding: 0; white-space: normal; font: 400 21px/1.4 var(--serif); letter-spacing: .04em; color: #414042; }
  .h .dd .mega__item:hover .mega__title { color: var(--red); }
  .mega__item > .ic { width: 15px; height: 15px; color: var(--ink-2); }


  .mega__card { padding: 24px; background: #eee3c5; }
  .mega__card img { width: 100%; height: 140px; object-fit: cover; }
  .mega__card-h { margin: 22px 0 14px; font: 500 24px/1.4 var(--serif); letter-spacing: .04em; color: #414042; }
  .mega__card-p { font-size: 15px; line-height: 2; color: var(--ink-2); }
  .h .dd .mega__card-btn { display: inline-flex; align-items: center; gap: 28px; margin-top: 20px; padding: 14px 22px; border: 1px solid var(--red); font-size: 15px; color: #414042; }
  .h .dd .mega__card-btn:hover { background: none; color: var(--red); }
  .mega__card-btn .ic { width: 14px; height: 14px; color: var(--red); }
}
.h__top { display: none; } 
.h__burger { display: none; margin-left: auto; align-items: center; gap: 12px; font-size: 15px; letter-spacing: .1em; padding: 8px 0; }
.h__burger-icon { display: flex; flex-direction: column; gap: 5px; width: 18px; }
.h__burger-icon i { display: block; height: 1.5px; background: var(--ink); transition: .2s; }
.h__mcontact, .h__go, .h__burger-close { display: none; }   /* phone/tablet menu only */


.show-m, .br-m { display: none; }

.crumbs { background: var(--bg); font: 12px/1.6 var(--sans); letter-spacing: .04em; color: var(--muted); }
.crumbs__in { display: flex; flex-wrap: wrap; align-items: center; margin: 0 auto; padding-top: 55px; padding-bottom: 22px; list-style: none; } /* 55px: same position as the design */
.crumbs li { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; position: static; }
.crumbs li::before, .crumbs span::after { content: none; display: none; }   /* undo main.css li / span pseudo-elements */
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current] { color: var(--ink); }
.crumbs__sep { width: 12px; height: 12px; margin: 0 12px; color: var(--ink); stroke-width: 2; }


.ptitle { background: var(--bg); border-bottom: 1px solid #e0ddd9; }
.ptitle__in { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-top: 14px; padding-bottom: 46px; }
.ptitle .ptitle__title { margin: 0; font: 400 48px/1.3 var(--serif); letter-spacing: .16em; color: #414042; }
.ptitle .ptitle__sub { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; font: 12px/1.4 var(--sans); letter-spacing: .02em; text-transform: uppercase; color: #414042; white-space: nowrap; }
.ptitle__sub i { display: block; width: 28px; height: 1px; background: #8a8174; }

/* section tabs  */
.tabs { background: linear-gradient(#e0ddd9, #e0ddd9) left bottom / 100% 1px no-repeat, var(--bg); font: 14px/1.4 var(--sans); letter-spacing: .04em; }   /* bottom line drawn as background so the red underline can sit on top of it */
.tabs__in { display: flex; gap: 42px; margin: 0 auto; list-style: none; overflow-x: auto; scrollbar-width: none; }   /* many tabs: scroll sideways on small screens */
.tabs__in::-webkit-scrollbar { display: none; }
.tabs li { flex: none; margin: 0; padding: 0; list-style: none; position: static; }
.tabs li::before { content: none; display: none; }   /* undo main.css li bullets */
.tabs a { display: block; padding: 16px 0 15px; border-bottom: 2px solid transparent; color: #414042; text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: #a83439; }
.tabs a.on { color: #a83439; border-bottom-color: #a83439; }

/* ---------- footer ---------- */
.f { background: var(--footer); padding: 40px 0 30px; font-size: 12px; color: var(--footer-ink); }
.f__top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--footer-line); }
.f__logo { height: 46px; width: auto; filter: brightness(1.08) saturate(.7); } /* logo circle is the same colour as the footer; lighten it like the design */
.f__phone { display: flex; align-items: center; gap: 10px; }
.f__phone small { font-size: 11px; }
.f__phone b { font-weight: 400; font-size: 20px; color: var(--footer-head); letter-spacing: .04em; }
.f__cols { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 24px; padding: 30px 0 26px; }   /* 4 menus with pages + the single links */
.f__cols h4 { font-size: 13px; font-weight: 500; color: var(--footer-head); margin-bottom: 14px; }
.f__cols a { display: block; line-height: 2; }
.f__cols a:hover, .f__bottom a:hover { color: var(--red); }
.f__links h4 { margin-bottom: 10px; }
.f__links h4 a { line-height: 1.7; }
.f__note { font: 400 18px var(--serif) !important; color: var(--footer-head); padding-bottom: 20px; border-bottom: 1px solid var(--footer-line); }
.f__bottom { display: flex; justify-content: space-between; padding: 16px 0 30px; font-size: 11px; }
.f__bottom a + a { margin-left: 20px; }
.f__contact { font-size: 11px; }

@media (max-width: 1080px) {
  .h { backdrop-filter: none; background: var(--bg); }
  .h__top { display: block; border-bottom: 1px solid var(--line); }
  .h__top-in { display: flex; align-items: center; justify-content: space-between; height: 66px; }
  .h__top .btn--sm { font-size: 14px; padding: 10px 14px; gap: 10px; }
  .h__top .h__lang { margin: 0; font-size: 13px; gap: 10px; }
  .h__top .dd { position: absolute; display: block; left: 0; right: auto; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(60,40,10,.08); padding: 8px 0; opacity: 0; visibility: hidden; }
  .h__top .has-dd.open > .dd { opacity: 1; visibility: visible; }

  /* logo row + 選單 ☰ */
  .h__in { gap: 16px; height: 96px; }
  .h__logo img { height: 60px; }
  .h__burger { display: flex; }
  .nav-open .h__burger-icon i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-open .h__burger-icon i:nth-child(2) { opacity: 0; }
  .nav-open .h__burger-icon i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .nav-open .h__burger-open { display: none; }
  .nav-open .h__burger-close { display: inline; }   /* 選單 -> 關閉 */
  .dd a, .dd span { padding: 10px 12px; font-size: 15px; white-space: normal; }   /* 與我們談談 dropdown in the top bar */

  /* menu panel (design: 手機展開導覽) */
  .h__nav { position: fixed; inset: 162px 0 0; background: var(--bg); flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 0 24px 48px; overflow-y: auto; transform: translateX(100%); transition: transform .25s; border-top: 1px solid var(--line); }
  .nav-open .h__nav { transform: none; }

  /* tagline + phone numbers */
  .h__mcontact { display: block; padding: 40px 0 34px; color: #414042; }
  .h__mtag { font-size: 13px; letter-spacing: .04em; margin-bottom: 26px; }
  .h__mphone { display: flex; align-items: center; gap: 10px; font-size: 18px; }
  .h__mphone .ic { width: 19px; height: 19px; }
  .h__mphone b { font-weight: 400; color: var(--gold); margin-left: 4px; }
  .h__mnums { display: flex; align-items: center; gap: 22px; margin: 8px 0 22px 29px; font-size: 20px; color: var(--gold); }
  .h__mnums i { display: block; width: 1.5px; height: 22px; background: #414042; }

  /* rows: 關於我們 + (opens) / 最新消息 ↗ (link) */
  .h__nav > ul { flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); }
  .h__nav > ul > li { border-bottom: 1px solid var(--line); }
  .h__navlink, .h .h__support { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 17px 0; font: 400 22px/1.4 var(--serif); letter-spacing: .04em; color: #414042; }
  .h__navlink .caret { width: 16px; height: 16px; stroke-width: 1.3; color: #414042; transition: transform .2s; }
  .h__nav .has-dd.open > .h__navlink .caret { transform: rotate(180deg); }   /* ⌄ closed, ⌃ open */
  .h__go { display: block; width: 20px; height: 20px; stroke-width: 1.3; }
  .h__nav .has-dd.open > .h__navlink { position: relative; padding-left: 16px; font-weight: 600; color: var(--gold); }
  .h__nav .has-dd.open > .h__navlink::before { content: ""; position: absolute; left: 0; top: 50%; width: 2px; height: 24px; margin-top: -12px; background: var(--gold); }   /* gold bar */

  /* open section: icon heading, page rows, card */
  .h__nav .dd { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; display: none; padding: 0 0 24px; }
  .h__nav .has-dd.open > .dd { display: block; border-top: 1px solid var(--line); }
  .h__nav .mega .wrap { padding: 0; }
  .mega__intro { display: none; }
  .mega__head { display: flex; align-items: center; gap: 14px; padding: 36px 0 12px; font-size: 15px; color: var(--gold); }
  .mega__head .ic { width: 26px; height: 26px; stroke-width: 1.3; }
  .h .dd .mega__head span { display: inline; padding: 0; font-size: inherit; }
  .mega__head-t { display: none; }   /* mobile: 告別與紀念 only, the section name is right above */
  .h .dd .mega__item { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; border-bottom: 1px solid var(--line); }
  .h .dd .mega__item:hover { background: none; }
  .h .dd .mega__title { display: block; padding: 0; font: 400 18px/1.4 var(--serif); letter-spacing: .04em; color: #414042; }
  .mega__item > .ic { width: 18px; height: 18px; stroke-width: 1.3; color: #414042; }
  .mega__card { margin-top: 24px; padding: 20px; background: #eee3c5; }
  .mega__card img { width: 100%; height: 150px; object-fit: cover; }
  .mega__card-h { margin: 22px 0 14px; font: 500 22px/1.4 var(--serif); letter-spacing: .04em; color: #414042; }
  .mega__card-p { font-size: 15px; line-height: 2; color: var(--ink-2); }
  .h .dd .mega__card-btn { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding: 15px 18px; border: 1px solid var(--red); font-size: 15px; color: #414042; }
  .mega__card-btn .ic { width: 20px; height: 20px; stroke-width: 1.3; color: var(--red); }

  /* 支持我們: last row, same look as 最新消息 / 聯絡 */
  .h__right { display: block; padding: 0; }
  .h__right .h__lang, .h__right .h__talk { display: none; }   /* already in the top bar */
  .h .h__support { background: none; border: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .show-m { display: inline !important; }
  .br-m { display: inline !important; }
  .hide-m { display: none !important; }

  .crumbs { font-size: 12px; }
  .crumbs__in { padding-top: 20px; padding-bottom: 16px; }
  .crumbs__sep { margin: 0 8px; }
  .ptitle__in { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 8px; padding-bottom: 30px; }
  .ptitle .ptitle__title { font-size: 34px; letter-spacing: .1em; }
  .ptitle .ptitle__sub { margin: 0; white-space: normal; }
  .tabs__in { gap: 28px; justify-content: space-between; }   /* mobile design: tabs spread across the width (scrolls when there are too many) */
  .tabs { font-size: 13px; }
  .f { padding: 40px 0 32px; font-size: 15px; }
  .f__top { flex-direction: column; align-items: flex-start; gap: 22px; padding-bottom: 30px; }
  .f__logo { height: 60px; }
  .f__phone { flex-wrap: wrap; gap: 6px 12px; }
  .f__phone .ic { width: 20px; height: 20px; }
  .f__phone small { font-size: 15px; }
  .f__phone b { flex-basis: 100%; font-size: 30px; letter-spacing: .06em; }
  .f__cols { grid-template-columns: 1fr 1fr; gap: 32px 24px; padding: 32px 0 34px; }
  .f__cols h4 { font-size: 17px; margin-bottom: 10px; }
  .f__cols a { line-height: 2.9; }
  .f__note { font-size: 24px !important; line-height: 1.6 !important; padding-bottom: 32px; }
  .f__bottom { flex-direction: column; gap: 14px; padding: 26px 0; border-bottom: 1px solid var(--footer-line); font-size: 12px; }
  .f__bottom a { font-size: 14px; }
  .f__bottom a + a { margin-left: 24px; }
  .f__contact { font-size: 14px; line-height: 2; padding-top: 26px; }
}

/* ---------- English: Latin text needs less letter-spacing ---------- */
.h__navlink, .h__lang a { white-space: nowrap; }
html[lang="en"] .h__in { gap: 28px; }
html[lang="en"] .h__nav > ul { gap: 18px; }
html[lang="en"] .h__navlink { font-size: 13px; }
html[lang="en"] .h__lang { margin-right: 6px; }
/* narrow desktops: English menu is long, so the call button shows just the number */
@media (min-width: 1081px) and (max-width: 1300px) {
  html[lang="en"] .h__talk-label { display: none; }
}
