:root {
  --member-ink: #3d281e;
  --member-brown: #4a2f24;
  --member-brown-deep: #382219;
  --member-gold: #b87520;
  --member-gold-light: #dfb46f;
  --member-paper: #fffaf0;
  --member-line: rgba(145,94,37,.22);
}

body:has(main.member-page),
body:has(main.member-dashboard) {
  margin: 0;
  color: var(--member-ink);
  background:
    radial-gradient(circle at 9% 18%, rgba(215,172,101,.14), transparent 31%),
    radial-gradient(circle at 91% 58%, rgba(183,119,45,.09), transparent 29%),
    linear-gradient(180deg, #fbf5e9 0%, #f5e8d2 100%);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

main.member-page,
main.member-dashboard {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,.17), transparent 260px),
    repeating-linear-gradient(0deg, rgba(126,83,36,.016) 0 1px, transparent 1px 5px) !important;
}

/* 與新版首頁一致的頁首 */
:is(.member-page,.member-dashboard) .member-home-header {
  position: relative;
  z-index: 100;
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 22px !important;
  width: 100%;
  min-height: 92px;
  height: auto !important;
  padding: 14px clamp(24px,5vw,88px) !important;
  border: 0 !important;
  background: var(--member-brown) !important;
  color: #fff8eb;
  box-shadow: 0 1px 0 rgba(214,172,100,.3);
}
.member-home-header > .zen-menu,
.member-home-header > .zen-header-socials { display: none !important; }
.member-home-header .zen-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
  margin: 0;
  color: #fff8eb !important;
  text-decoration: none;
}
.member-home-header .zen-brand img { width: 54px; height: 54px; object-fit: contain; }
.member-home-header .zen-brand span { display: grid; gap: 2px; line-height: 1.15; }
.member-home-header .zen-brand b {
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .12em;
}
.member-home-header .zen-brand small { display: block; margin: 0; color: rgba(255,248,235,.72); font-size: 12px; letter-spacing: .22em; }

.member-quick-menu { position: relative; flex: 0 0 auto; }
.member-quick-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  box-sizing: border-box;
  padding: 7px 15px;
  border: 1px solid rgba(225,182,105,.5);
  border-radius: 999px;
  color: #fff8eb;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  white-space: nowrap;
}
.member-quick-menu summary::-webkit-details-marker { display: none; }
.member-quick-menu summary::before { content: "☰"; color: var(--member-gold-light); font-size: 19px; }
.member-quick-menu[open] summary { background: rgba(255,255,255,.08); }
.member-quick-menu nav {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  box-sizing: border-box;
  display: grid !important;
  gap: 0 !important;
  width: 228px !important;
  padding: 6px !important;
  border: 1px solid rgba(157,110,54,.2);
  border-radius: 14px;
  background: rgba(255,252,245,.98);
  box-shadow: 0 16px 38px rgba(56,34,25,.2);
}
.member-quick-menu nav a {
  display: block;
  padding: 7px 11px !important;
  border: 0 !important;
  border-radius: 8px;
  color: var(--member-ink) !important;
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
}
.member-quick-menu nav a:hover,
.member-quick-menu nav a:focus-visible { background: #f5e4c7; color: #7c4912 !important; outline: none; }

.member-search-v286 { position: relative; margin-left: auto; }
.member-search-v286 summary {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  list-style: none;
}
.member-search-v286 summary::-webkit-details-marker { display: none; }
.member-search-v286 summary:hover { background: rgba(255,255,255,.08); }
.member-search-v286 summary::before {
  content: "";
  width: 17px;
  height: 17px;
  border: 2px solid #f8ead4;
  border-radius: 50%;
  transform: translate(-2px,-2px);
}
.member-search-v286 summary::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 2px;
  background: #f8ead4;
  transform: translate(8px,8px) rotate(45deg);
}
.member-search-v286 form {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: flex;
  width: min(330px,calc(100vw - 32px));
  padding: 7px;
  border-radius: 999px;
  background: #fffaf1;
  box-shadow: 0 14px 34px rgba(56,34,25,.22);
}
.member-search-v286 input {
  min-width: 0;
  flex: 1;
  padding: 9px 13px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--member-ink);
  font: inherit;
}
.member-search-v286 button {
  padding: 8px 15px;
  border: 0;
  border-radius: 999px;
  background: var(--member-gold);
  color: #fff;
  cursor: pointer;
}
.member-home-header .zen-member {
  flex: 0 0 auto;
  min-width: 118px;
  margin: 0 !important;
  padding: 10px 18px !important;
  border: 1px solid rgba(225,182,105,.55) !important;
  border-radius: 999px;
  background: transparent !important;
  color: #fff8eb !important;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
}

/* 會員登入與會員中心內容：只統一色調，不改動功能與結構 */
.member-page .member-auth {
  border-color: var(--member-line);
  background: rgba(255,251,243,.97);
  box-shadow: 0 18px 46px rgba(68,42,24,.1);
}
.member-page .member-welcome { background: linear-gradient(145deg,#fbf1df,#f1dfc3); }
.member-page .member-form-wrap { background: rgba(255,253,248,.98); }
.member-page .member-tabs,
.member-page .member-form-wrap input { border-color: var(--member-line); }
.member-page .member-tabs button.active,
.member-page .member-submit { background: var(--member-gold); }

.member-dashboard .dashboard-toolbar { margin-top: 22px; }
.member-dashboard .dashboard-logout {
  border-color: rgba(184,117,32,.5);
  background: rgba(255,251,243,.94);
  color: #8c5518;
}
.member-dashboard .dashboard-hero {
  border-color: var(--member-line);
  background: linear-gradient(120deg,rgba(255,249,238,.98),rgba(241,222,191,.9));
  box-shadow: 0 14px 38px rgba(68,42,24,.075);
}
.member-dashboard .dashboard-grid article {
  border-color: var(--member-line);
  background: rgba(255,251,243,.96);
  box-shadow: 0 9px 25px rgba(68,42,24,.05);
}

/* 與新版首頁一致的頁尾 */
:is(.member-page,.member-dashboard) .member-home-footer {
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: minmax(220px,1.1fr) auto auto auto;
  align-items: center;
  gap: clamp(20px,3vw,52px) !important;
  width: 100%;
  padding: 28px clamp(24px,5vw,88px) !important;
  border: 0 !important;
  background: var(--member-brown-deep) !important;
  color: rgba(255,248,235,.82) !important;
}
.member-home-footer .zen-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: #fff8eb !important;
  text-decoration: none;
}
.member-home-footer .zen-footer-brand img { width: 62px; height: 62px; object-fit: contain; }
.member-home-footer .zen-footer-brand span { display: grid; gap: 3px; }
.member-home-footer .zen-footer-brand b { font-family: "Noto Serif TC",serif; font-size: 23px; letter-spacing: .11em; }
.member-home-footer .zen-footer-brand small { display: block; margin: 0; color: rgba(255,248,235,.68); font-size: 12px; letter-spacing: .14em; }
.member-home-footer .zen-footer-links,
.member-home-footer .zen-footer-socials { display: flex !important; align-items: center; gap: 18px !important; }
.member-home-footer .zen-footer-links a,
.member-home-footer .zen-footer-socials a { color: rgba(255,248,235,.82) !important; text-decoration: none; white-space: nowrap; }
.member-home-footer .zen-footer-socials img { width: 28px; height: 28px; }
.member-home-footer .zen-footer-socials a { display: inline-flex !important; align-items: center; gap: 6px; }
.member-home-footer > small { display: block; margin: 0; color: rgba(255,248,235,.62) !important; white-space: nowrap; }

@media (max-width:900px) {
  :is(.member-page,.member-dashboard) .member-home-header { gap: 13px !important; min-height: 80px; padding: 11px 20px !important; }
  .member-home-header .zen-brand b { font-size: 20px; }
  .member-home-header .zen-brand small { display: none; }
  .member-home-header .zen-brand img { width: 46px; height: 46px; }
  .member-home-header .zen-member { min-width: 0; padding: 9px 13px !important; }
  :is(.member-page,.member-dashboard) .member-home-footer { grid-template-columns: 1fr 1fr; }
  .member-home-footer > small { text-align: right; }
}

@media (max-width:560px) {
  :is(.member-page,.member-dashboard) .member-home-header { gap: 8px !important; padding: 10px 14px !important; }
  .member-quick-menu summary { width: 42px; padding: 7px 10px; }
  .member-quick-menu summary span { display: none; }
  .member-quick-menu nav { position: fixed; top: 74px; left: 12px; right: 12px; width: auto !important; max-height: calc(100vh - 90px); overflow: auto; }
  .member-home-header .zen-brand { gap: 8px; }
  .member-home-header .zen-brand img { width: 41px; height: 41px; }
  .member-home-header .zen-brand b { font-size: 17px; letter-spacing: .06em; }
  .member-search-v286 { margin-left: auto; }
  .member-home-header .zen-member { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
  .member-page .member-auth { margin-left: 14px; margin-right: 14px; }
  .member-dashboard .dashboard-hero,
  .member-dashboard .dashboard-grid { margin-left: 14px; margin-right: 14px; }
  :is(.member-page,.member-dashboard) .member-home-footer { grid-template-columns: 1fr; gap: 20px !important; padding: 28px 22px !important; text-align: center; }
  .member-home-footer .zen-footer-brand,
  .member-home-footer .zen-footer-links,
  .member-home-footer .zen-footer-socials { justify-content: center; flex-wrap: wrap; }
  .member-home-footer > small { text-align: center; white-space: normal; }
}
