/* 跨頁共用導覽；沒有 JavaScript 時仍可直接使用所有連結。 */
.site-nav-wrap{
  --site-nav-bg:#f4f4e7;
  --site-nav-ink:#344630;
  --site-nav-muted:#43523a;
  --site-nav-accent:#2e432b;
  --site-nav-line:#8d9d78;
  --site-nav-selected:#dce6ce;
  --site-nav-hover:#e7ecdb;
  --site-nav-shadow:#3b513323;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  min-width:0;
  max-width:100%;
  margin-inline-start:auto;
  color:var(--site-nav-ink);
}
body .site-header.home-header.portal-header{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:16px;min-height:68px;height:auto;padding:12px clamp(20px,3.3vw,52px);overflow:visible;background:transparent;border-bottom:1px solid #bc9a6a5c}
.site-header.portal-header .site-nav-wrap{flex:1 1 auto}
.site-header .site-page-brand{display:inline-flex;align-items:center;gap:12px;flex-shrink:0;margin-right:auto;color:#47263e;font:400 24px/1.3 Georgia,'PMingLiU','Songti TC',serif;letter-spacing:.5px;text-decoration:none;white-space:nowrap}
.site-page-brand>img{display:block;width:44px;height:44px;object-fit:contain;border-radius:7px;background:#fff7e9}
.site-header .site-page-brand:focus-visible{outline:2px solid #8b6031;outline-offset:4px;border-radius:7px}
.site-header .site-menu{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:4px;min-width:0;max-width:100%;margin:0;padding:0}
body .site-header .site-menu a{display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;padding:10px 11px;border:1px solid transparent;border-radius:8px;color:var(--site-nav-muted);font-family:var(--sunway-ui-font);font-size:14px;font-weight:400;line-height:1.5;letter-spacing:.15px;text-decoration:none;text-underline-offset:5px;white-space:nowrap;overflow-wrap:normal;transition:background-color .16s,border-color .16s,color .16s}
body .site-header .site-menu a[aria-current='page']{border-color:var(--site-nav-line);background:var(--site-nav-selected);color:var(--site-nav-accent)}
body .site-header .site-menu a:hover{background:var(--site-nav-hover);color:var(--site-nav-ink)}
body .site-header .site-menu a:focus-visible,.site-header .site-menu-toggle:focus-visible{outline:2px solid var(--site-nav-accent);outline-offset:3px}
.site-header .site-menu-toggle{display:none;align-items:center;justify-content:center;gap:12px;min-height:44px;margin:0;padding:10px 14px;border:1px solid var(--site-nav-line);border-radius:9px;background:linear-gradient(135deg,var(--site-nav-bg),var(--site-nav-selected));color:var(--site-nav-ink);font:400 14px/1.5 var(--sunway-ui-font);letter-spacing:1px;white-space:nowrap;cursor:pointer}
.site-header .site-menu-toggle>span{font-size:18px;line-height:1}
.site-header .site-menu-toggle:is(:hover,[aria-expanded='true']){border-color:#748764;background:var(--site-nav-selected);color:var(--site-nav-accent)}
/* 政策頁的品牌框獨立保留，導覽不擠壓標誌與標語。 */
body .site-header.lu-code-header .site-nav-wrap{width:100%;margin:14px 0 0}
body:is([data-site-page='divination'],[data-site-page='chart'],[data-site-page='numerology'],[data-site-page='lucky']) .portal-main{padding-top:18px}

/* 桌機導覽留在頁首正常文流；只有手機選單持續浮動。 */
@media(min-width:1081px){
  html{scroll-padding-top:20px}
  body .site-header.home-header.portal-header{position:static;top:auto;z-index:auto}
  body .site-header .site-menu{padding:3px 5px;border:1px solid #8d9d7899;border-radius:12px;background:#f4f4e7ec}
  html.site-menu-ready body .site-header.lu-code-header .lu-brand{margin-top:0}
}

@media(max-width:1080px){
  body .site-header.home-header.portal-header{min-height:68px;padding:12px 18px;gap:12px}
  .site-header .site-nav-wrap{flex-direction:column;align-items:flex-end;width:100%}
  .site-header .site-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:4px;width:100%}
  body .site-header .site-menu a{justify-content:flex-start;white-space:normal;overflow-wrap:anywhere;padding:11px 12px}
  html.site-menu-ready .site-header .site-menu-toggle{display:inline-flex}
  html.site-menu-ready .site-header .site-nav-wrap:not(.is-menu-open) .site-menu{display:none}
  html.site-menu-ready .site-header .site-nav-wrap.is-menu-open .site-menu{display:flex;flex-direction:column;align-items:stretch}
  body .site-header.lu-code-header .site-nav-wrap{margin-top:12px}

  /* 各頁的手機選單皆浮於視窗右上，保留頁面正常捲動。 */
  html.site-menu-ready body .site-header .site-nav-wrap{position:fixed;top:max(12px,env(safe-area-inset-top));right:max(18px,env(safe-area-inset-right));z-index:18;width:min(320px,calc(100vw - 36px));margin:0;padding:0;border:0;border-radius:0;background:transparent;pointer-events:none}
  html.site-menu-ready body .site-header .site-menu-toggle{position:static;pointer-events:auto;box-shadow:0 2px 8px var(--site-nav-shadow)}
  html.site-menu-ready body .site-header .site-nav-wrap.is-menu-open .site-menu{position:absolute;top:calc(100% + 8px);right:0;width:100%;margin:0;padding:8px;border:1px solid var(--site-nav-line);border-radius:12px;background:var(--site-nav-bg);box-shadow:0 10px 26px var(--site-nav-shadow);max-height:calc(100vh - 84px);max-height:min(70svh,430px);overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;pointer-events:auto}

  /* 首頁選單對齊服務區的橫線，捲動後停在視窗右上。 */
  html.site-menu-ready body[data-site-page='home'] .site-header.home-header.portal-header{
    --site-home-menu-docked:max(12px,env(safe-area-inset-top));
    --site-home-menu-rest:max(calc(var(--home-menu-rule-center) - 22px),var(--site-home-menu-docked));
    position:sticky;
    top:calc(var(--site-home-menu-docked) - var(--site-home-menu-rest));
    z-index:40;
    display:block;
    min-height:0;
    height:0;
    padding:0;
    border:0;
    background:transparent;
    pointer-events:none;
  }
  html.site-menu-ready body[data-site-page='home'] .site-header .site-nav-wrap{
    position:absolute;
    top:var(--site-home-menu-rest);
  }
  html.site-menu-ready body[data-site-page='home'] .site-header .site-nav-wrap.is-menu-open .site-menu{
    max-height:min(65svh,430px,max(90px,calc(100svh - var(--site-home-menu-rest) - 60px)));
  }

  /* 政策頁沿用奶油品牌框，按鈕在框內，選單在框下方。 */
  html.site-menu-ready body:is([data-site-page='terms'],[data-site-page='privacy'],[data-site-page='guide']) .site-header.lu-code-header{--site-policy-menu-inset:calc(clamp(16px,3.4vw,64px) + 16px);position:relative;z-index:40;overflow:visible}
  html.site-menu-ready body:is([data-site-page='terms'],[data-site-page='privacy'],[data-site-page='guide']) .site-header.lu-code-header .lu-brand{padding-right:128px}
  html.site-menu-ready body:is([data-site-page='terms'],[data-site-page='privacy'],[data-site-page='guide']) .site-header .site-nav-wrap.is-menu-open .site-menu{max-height:65vh;max-height:min(65svh,430px);overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
}
@media(max-width:700px){
  html.site-menu-ready body:is([data-site-page='terms'],[data-site-page='privacy'],[data-site-page='guide']) .site-header.lu-code-header{--site-policy-menu-inset:32px}
  html.site-menu-ready body:is([data-site-page='terms'],[data-site-page='privacy'],[data-site-page='guide']) .site-header.lu-code-header .site-menu-toggle{top:24px}
}
@media(max-width:540px){
  .site-header .site-menu{grid-template-columns:minmax(0,1fr)}
  body .site-header .site-menu a{white-space:nowrap;overflow-wrap:normal}
  .site-header .site-page-brand{gap:10px;font-size:22px}
  html.site-menu-ready body[data-site-page='home'] .portal-hero-content{padding-top:78px}
  html.site-menu-ready body:is([data-site-page='terms'],[data-site-page='privacy'],[data-site-page='guide']) .site-header.lu-code-header .lu-brand{padding-top:calc(max(12px,env(safe-area-inset-top)) + 38px);padding-right:16px}
}
@media(max-width:360px){
  html.site-menu-ready body:is([data-site-page='terms'],[data-site-page='privacy'],[data-site-page='guide']) .site-header.lu-code-header{--site-policy-menu-inset:24px}
  html.site-menu-ready body:is([data-site-page='terms'],[data-site-page='privacy'],[data-site-page='guide']) .site-header.lu-code-header .site-menu-toggle{top:22px}
}

/* 贊助頁沿用咖啡心意卡片，文字與金額皆可自然排入窄螢幕。 */
body .home-main.portal-main.support-page{width:min(100%,1120px);max-width:1120px;margin:0 auto;padding:clamp(26px,4vw,52px) clamp(16px,4vw,42px) 56px;color:#443944}
.support-page .support-panel{position:relative;width:100%;max-height:none;overflow:visible;min-width:0;margin:0 0 36px;padding:clamp(24px,4vw,44px);border:1px solid #c8b38e;border-radius:22px;background:radial-gradient(ellipse at 50% 0,#fffdf8c4,transparent 68%),#faf6eb url('assets/lu-paper.svg');box-shadow:0 12px 32px #2118221f,inset 0 0 0 5px #fffdf580}
.support-panel .support-heading-icon,.support-panel .coffee-heading-icon{display:block;width:46px;height:46px;margin:0 auto 12px;color:#a5844c}
.support-panel .support-eyebrow{margin:0 0 8px;color:#8a693c;font-size:12px;line-height:1.6;letter-spacing:1.5px;text-align:center}
.support-page .support-panel h1{margin:0;color:#62465e;font-family:'PMingLiU','Songti TC',serif;font-size:clamp(28px,4vw,36px);font-weight:600;line-height:1.5;letter-spacing:1px;text-align:center;white-space:normal;overflow-wrap:anywhere}
.support-panel .support-intro,.support-panel .coffee-dialog-intro{max-width:62ch;margin:16px auto 30px;color:#776c73;font-size:16px;line-height:1.85;text-align:center;white-space:normal;overflow-wrap:anywhere}
.support-page .support-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;min-width:0}
.support-page .support-options :is(.support-option,.coffee-option){position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:168px;padding:16px;border:1px solid #d6c6a7;border-radius:15px;background:linear-gradient(145deg,#fffdf7,#f1e9d8);color:#5c4c3b;text-decoration:none;box-shadow:inset 0 1px #fffef8,0 4px 12px #7258350a;transition:transform .18s,border-color .18s}
.support-page :is(.support-option-kind,.coffee-option-kind){display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:#a5844c16;color:#80613a;font-size:32px;line-height:1}
.support-page :is(.support-option-title,.coffee-option-title){color:inherit;font-size:19px;font-weight:600;line-height:1.6;letter-spacing:.4px;white-space:normal;overflow-wrap:anywhere}
.support-page :is(.support-option-price,.coffee-option-price){display:block;margin:0;color:#8a6637;font:500 32px/1.3 Georgia,serif;white-space:nowrap}
.support-page :is(.support-option-price,.coffee-option-price)>span{margin-right:5px;font-size:16px}
.support-page .support-options .coffee-option-custom{font-family:inherit;font-size:18px;line-height:1.6;letter-spacing:.5px}
.support-page .support-options .is-recommended{border:1px solid #b49770;background:linear-gradient(145deg,#71536b,#513a50);color:#fffaf0;box-shadow:inset 0 1px #ffffff26,0 5px 16px #513a5014}
.support-page .is-recommended :is(.support-option-kind,.coffee-option-kind){background:#fffaf01a;color:#f1d5a0}
.support-page .is-recommended :is(.support-option-price,.coffee-option-price){color:#f1d5a0}
.support-page :is(.support-recommended,.coffee-recommended){position:absolute;top:-10px;left:50%;transform:translateX(-50%);padding:3px 12px;border:1px solid #c2a36c;border-radius:999px;background:#f2dfb6;color:#624724;font-size:12px;font-weight:500;line-height:1.5;white-space:nowrap}
.support-page .support-note{margin:22px 0 0;color:#776c73;font-size:13px;line-height:1.8;text-align:center;white-space:normal;overflow-wrap:anywhere}
.support-page .support-options a:focus-visible{outline:3px solid #a5844c;outline-offset:4px}
@media(hover:hover){.support-page .support-options :is(.support-option,.coffee-option):hover{border-color:#aa834d;transform:translateY(-2px)}}
@media(max-width:700px){
  body .home-main.portal-main.support-page{padding:24px 16px 40px}
  .support-page .support-panel{padding:26px 18px;border-radius:18px}
  .support-panel .support-intro,.support-panel .coffee-dialog-intro{margin:14px auto 26px;font-size:14px;line-height:1.85}
  .support-page .support-options{grid-template-columns:1fr;gap:12px}
  .support-page .support-options :is(.support-option,.coffee-option){display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;min-height:76px;padding:12px 14px;text-align:left}
  .support-page :is(.support-option-kind,.coffee-option-kind){grid-area:1 / 1;width:44px;height:44px;font-size:28px}
  .support-page :is(.support-option-title,.coffee-option-title){grid-area:1 / 2;font-size:18px}
  .support-page :is(.support-option-price,.coffee-option-price){grid-area:1 / 3;font-size:30px}
  .support-page :is(.support-option-price,.coffee-option-price)>span{font-size:14px;margin-right:3px}
}
@media(max-width:540px){
  body .support-page .support-panel h1{font-size:clamp(20px,5.8vw,23px);letter-spacing:.3px;white-space:nowrap}
  .support-page :is(.support-option-title,.coffee-option-title){font-size:17px;white-space:nowrap}
  .support-page .support-options .coffee-option-custom{font-size:16px}
}
@media(prefers-reduced-motion:reduce){
  body .site-header .site-menu a,.support-page .support-options :is(.support-option,.coffee-option){transition:none}
  .support-page .support-options :is(.support-option,.coffee-option):hover{transform:none}
}
