/* Fly-Wei font scale (+~12%), deployed 2026-10-12. Loaded last on each page. Rollback: remove <link href="/css/fontscale.css"> lines. */
html body{font-size:18px!important;line-height:1.75;}
html body p,html body li,html body dd,html body dt,html body td,html body th{line-height:1.8;}
html body .text-xs{font-size:.84rem!important;}
html body .text-sm{font-size:.98rem!important;}
html body .text-base{font-size:1.125rem!important;}
html body .text-lg{font-size:1.25rem!important;}
html body .text-xl{font-size:1.4rem!important;}
html body .text-2xl{font-size:1.68rem!important;}
html body .text-3xl{font-size:2.1rem!important;}
html body .text-4xl{font-size:2.5rem!important;}
html body .text-5xl{font-size:3.3rem!important;}
@media(min-width:768px){
  html body .md\:text-sm{font-size:.98rem!important;}
  html body .md\:text-base{font-size:1.125rem!important;}
  html body .md\:text-lg{font-size:1.25rem!important;}
  html body .md\:text-xl{font-size:1.4rem!important;}
  html body .md\:text-2xl{font-size:1.68rem!important;}
  html body .md\:text-3xl{font-size:2.1rem!important;}
  html body .md\:text-4xl{font-size:2.5rem!important;}
  html body .md\:text-7xl{font-size:4.9rem!important;}
}
/* Desktop nav: logo stays left, menu stays right, they no longer overlap. */
@media(min-width:1024px){
  nav.fixed .navbar{flex-wrap:nowrap;align-items:center;column-gap:.75rem;}
  nav.fixed .navbar-start{width:auto!important;flex:0 0 auto!important;}
  nav.fixed .navbar-end{width:auto!important;flex:1 1 auto!important;min-width:0;justify-content:flex-end;margin-left:1.25rem;}
  nav.fixed .navbar-start>a{letter-spacing:.12em!important;white-space:nowrap;}
  nav.fixed .navbar-end>a.btn{padding-left:.4rem!important;padding-right:.4rem!important;font-size:14px!important;letter-spacing:.02em!important;white-space:nowrap;}
}
@media(max-width:768px){
  html body{font-size:16px!important;}
  html body .text-xs{font-size:13.5px!important;}
  html body .text-sm,html body .text-base{font-size:15.5px!important;}
  html body p.text-sm,html body p.text-base,html body p:not([class*="text-"]){font-size:16px!important;}
  html body .text-lg{font-size:17.5px!important;}
  html body .text-xl{font-size:19px!important;}
  html body h1{font-size:1.75rem!important;}
  html body h2{font-size:1.5rem!important;}
  html body h3{font-size:1.2rem!important;}
  html body .hero-title{font-size:2.3rem!important;letter-spacing:.2em!important;}
  html body table{font-size:15px!important;}
  html body .navbar a,html body .nav a,html body header a,html body nav a{font-size:15px!important;}
  /* very wide letter-spacing makes bigger text wrap; tone it down on phones */
  html body [class*="tracking-[8px]"]{letter-spacing:5px!important;}
  html body [class*="tracking-[6px]"]{letter-spacing:4px!important;}
  /* WeChat in-app browser paints backdrop-filter on the fixed nav as a full-screen layer, so the menu row covers the page and touches never reach it. */
  nav.fixed,
  nav.fixed #fw-mobile-nav,
  nav.fixed #fw-region-mobile-nav{
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    background-color:var(--bg900)!important;
  }
}
/* mobile-pack1 (2026-10-25): phone nav — one-line logo, nav ~64px, content not hidden under fixed nav */
:root{--fw-nav-h:64px;}
[x-cloak]{display:none!important;}
@media(max-width:1023.98px){
  html{scroll-padding-top:calc(var(--fw-nav-h) + 12px);}
  nav.fixed .navbar{min-height:var(--fw-nav-h)!important;flex-wrap:nowrap!important;padding-top:0!important;padding-bottom:0!important;}
  nav.fixed .navbar-start{flex-wrap:nowrap!important;align-items:center;min-width:0;width:auto!important;flex:1 1 auto!important;}
  html body nav.fixed .navbar-start>a.text-xl{white-space:nowrap!important;font-size:18px!important;letter-spacing:3px!important;line-height:1.2!important;flex:0 0 auto;}
  html body nav.fixed .navbar-start>a.text-xl>span{font-size:11px!important;letter-spacing:1px!important;margin-left:2px;}
}
@media(max-width:359.98px){
  html body nav.fixed .navbar-start>a.text-xl>span{display:none!important;}
}
/* mobile-pack1: form fields >=16px so iOS Safari does not auto-zoom; option rows >=44px */
@media(max-width:1023.98px){
  html body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  html body select,
  html body textarea{font-size:16px!important;}
  html body label.fw-opt{min-height:44px;padding:6px 12px 6px 0;}
  html body textarea.text-sm,html body textarea.text-base{font-size:16px!important;}
}
/* mobile-pack1: guide images tap-to-zoom (same pattern as products.html zoomImg) */
.guide-figure .guide-zoom{cursor:zoom-in;}
.guide-figure figcaption{margin-top:.5rem;text-align:center;font-size:13.5px;color:rgba(var(--g1),var(--g2),var(--g3),.6);letter-spacing:1px;}
.guide-zoom-layer{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;background:rgba(var(--b1),var(--b2),var(--b3),.92);padding:12px;overflow:auto;-webkit-overflow-scrolling:touch;}
.guide-zoom-layer img{max-width:none;width:min(1600px,250vw);height:auto;border-radius:12px;}
@media(min-width:1024px){.guide-zoom-layer img{width:min(1400px,95vw);}}
.guide-zoom-close{position:fixed;top:12px;right:12px;z-index:10001;width:44px;height:44px;border-radius:999px;background:rgba(var(--c1),var(--c2),var(--c3),.8);color:var(--fw-gold-soft);border:1px solid rgba(var(--g1),var(--g2),var(--g3),.4);font-size:22px;line-height:42px;text-align:center;}
/* mobile-pack2 (2026-10-25): forum text size + tap targets on phones (forum-shell.css loads before this file) */
@media(max-width:767.98px){
  html body .fw-alert,html body .fw-alert div,html body .fw-disclaimer{font-size:15px!important;line-height:1.7!important;}
  html body .fw-alert-close{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;margin:-10px -12px -10px 0;font-size:22px;}
  html body .fw-crumb{font-size:15px;}
  html body .fw-tab{min-height:44px;font-size:15px;}
  html body .fw-row-title,html body .fw-forum-name{font-size:16px;}
  html body .fw-row-meta,html body .fw-forum-count{font-size:13.5px;}
  html body .fw-forum-desc{font-size:14px;line-height:1.6;}
  html body .fw-stats-row,html body .fw-poll-result-top{font-size:14px;}
  html body .fw-userbox{font-size:15px;}
  html body .fw-userbox .fw-links a{display:inline-flex;align-items:center;min-height:44px;padding:0 4px;font-size:14px;}
  html body .fw-survey-item-title{font-size:15px;}
  html body .fw-survey-item-meta{font-size:13px;}
  html body .fw-poll-soft{font-size:13.5px;}
  html body .fw-poll-soft a,html body .fw-footer-note a{display:inline-flex;align-items:center;min-height:44px;}
  html body .fw-footer-note{font-size:14px;}
  html body .fw-btn,html body .fw-btn-sm{min-height:44px;}
  html body .fw-btn{font-size:15px;}
  html body .fw-btn-sm{font-size:14px;}
  html body .fw-search input,html body .fw-search button{height:44px;}
  html body .fw-search button{font-size:14px;}
  html body .fw-pager a{min-width:44px;height:44px;font-size:14px;}
  html body .fw-like,html body .fw-bookmark{min-height:44px;padding:6px 14px;font-size:14px;}
  html body .bb-content{font-size:16px!important;line-height:1.8;}
  html body a.text-xs[href^="/blog/forum/"],
  html body div.text-xs>a[href^="/blog/forum/"]{display:inline-flex;align-items:center;min-height:44px;}
}
/* mobile-pack2: footer links / social pills >=44px tap height (all pages share footer.footer markup) */
@media(max-width:1023.98px){
  html body footer.footer nav>a{display:inline-flex;align-items:center;min-height:44px;}
  html body footer.footer nav{row-gap:0!important;}
  html body footer.footer [aria-label="社群連結"]>a{min-height:44px;display:inline-flex;align-items:center;}
}
/* mobile-pack2: floating LINE button (fixed, ~70px from bottom) must not cover the last lines of the page */
@media(max-width:1023.98px){
  html body:has(a[href*="line.me/R/ti/p/@flywei"][style*="position:fixed"]){padding-bottom:84px;}
  html body a.underline-offset-4[href="/partner/login.php"]{display:inline-block;max-width:9.5em;}
}
/* ===== mobile-pack2 font (mob2) — 2026-10-25, approved by August =====
   Append to END of /css/fontscale.css, AFTER the mobile-pack2 forum/footer/LINE block (3-A/B/C).
   Order matters: this block must be last so .bb-content 18px (here) beats 16px (3-A) on phones.
   Phones only (<=600px). 601px+ unchanged. Version bump mob1->mob2 is done once (3-D).
   Rollback: delete this block. */
@media (max-width:600px){
  /* 1. Base & long-form body: 16 -> 17px, line-height 1.7 */
  html body{font-size:17px!important;line-height:1.7!important;}
  html body p,html body li,html body dd,html body dt,html body td,html body th,html body blockquote{line-height:1.7!important;}
  html body .text-base,
  html body p.text-sm,html body p.text-base,html body p:not([class*="text-"]),
  html body li,html body dd{font-size:17px!important;}

  /* 2. Secondary text: never below 14.5px */
  html body .text-sm{font-size:16px!important;}
  html body .text-xs{font-size:14.5px!important;}
  html body small,html body figcaption,html body label,html body time,html body caption{font-size:max(14.5px,1em);}
  html body .guide-figure figcaption{font-size:14.5px!important;}
  /* footer disclaimer + company line: color was text-gold-600/55 and /40 (contrast 2.2:1 / 1.7:1) -> 5.3:1 on footer bg, still dimmer than footer links (gold-500, 7:1) */
  html body footer p.text-xs{font-size:14.5px!important;line-height:1.75!important;color:rgba(184,150,46,.85)!important;}
  html body footer nav a{font-size:16px!important;}
  html body table{font-size:16px!important;}
  /* tiny arbitrary-size tags ([產品資訊], 🔒進階+) and news category pills: 10-11.2px -> 14.5px (floor) */
  html body [class*="text-[10px]"],html body [class*="text-[11px]"],html body .news-cat{font-size:14.5px!important;}

  /* blog articles + forum post body: 18px (placed after .text-sm so it wins on .bb-content.text-sm) */
  html body .prose,html body .prose p,html body .prose li,
  html body .bb-content,html body .bb-content p,html body .bb-content li{font-size:18px!important;line-height:1.75!important;}

  /* 3. Headings (body 17px -> ratio ~1.25 / 1.5 / 1.8) */
  html body .text-lg{font-size:18.5px!important;}
  html body .text-xl{font-size:20px!important;}
  html body h1{font-size:1.9rem!important;line-height:1.3!important;}   /* 30.4px */
  html body h2{font-size:1.6rem!important;line-height:1.35!important;}  /* 25.6px */
  html body h3{font-size:1.3rem!important;line-height:1.4!important;}   /* 20.8px */
  html body .hero-title{font-size:2.3rem!important;}                    /* unchanged: keeps 2-line hero */

  /* 4. Buttons & drawer menu: 14 -> 16/17px (fixed top bar untouched so nav stays ~64px) */
  html body .btn:not(.btn-sm):not(.btn-xs){font-size:16px!important;}  /* top bar only has the icon-only hamburger .btn, so no size change there */
  html body nav.fixed .btn.justify-start,
  html body #fw-mobile-nav a,html body #fw-region-mobile-nav a{font-size:17px!important;}
  /* floating "LINE 申請體驗" pill label 15 -> 16px */
  html body a[href*="line.me"] > span{font-size:16px!important;}

  /* 5. Forum (forum-shell.css uses 10-14px fixed sizes) */
  /* .fw-alert / .fw-disclaimer 15px: already in 3-A (<=767px), not repeated */
  html body .fw-crumb,html body .fw-tab,html body .fw-cat-title,html body .fw-side-card h3,
  html body .fw-poll-q,html body .fw-survey-item-title,html body .fw-survey-desc,html body .fw-survey-flash,
  html body .fw-survey-q legend,html body .fw-survey-q .fw-field,html body .fw-userbox{font-size:15.5px!important;}
  html body .fw-row-title,html body .fw-forum-name{font-size:17px!important;line-height:1.5!important;}
  html body .fw-empty,html body .fw-btn,html body .fw-field,html body .fw-search input{font-size:16px!important;}
  html body .fw-chip,html body .fw-row-meta,html body .fw-row-stat,html body .fw-cat-desc,
  html body .fw-forum-desc,html body .fw-forum-count,html body .fw-stats-row,html body .fw-poll-opt,
  html body .fw-poll-result-top,html body .fw-btn-sm,html body .fw-search button,html body .fw-userbox .fw-links a,
  html body .fw-pager a,html body .fw-footer-note,html body .fw-like,html body .fw-like-count,
  html body .fw-like-names li,html body .fw-bookmark,html body .fw-stamp-note,
  html body .fw-badge,html body .fw-poll-soft,html body .fw-poll-soft a,html body .fw-survey-item-meta,html body .fw-like-panel-title,
  html body .fw-like-names .fw-like-more{font-size:14.5px!important;}
  /* .fw-stamp / .fw-stamp-sm / .fw-survey-req / avatars are fixed-size circles or markers: left as is */
}
/* ===== mobile-pack3 font (mob3) — 2026-10-25, approved by August (elder-friendly) =====
   Append to END of /css/fontscale.css, AFTER the mob2 block (mobile_font_patch.css). Must be the last block.
   Phones + small tablets / landscape (<=768px). 769px+ unchanged. Version bump mob2->mob3 is done once.
   Rollback: delete this block (and bump ?v once more). */
@media (max-width:768px){
  /* 1. Body text 19px, line-height 1.8 */
  html body{font-size:19px!important;line-height:1.8!important;}
  html body p,html body li,html body dd,html body dt,html body td,html body th,html body blockquote{line-height:1.8!important;}
  html body .text-base,
  html body p.text-sm,html body p.text-base,html body p:not([class*="text-"]),
  html body li,html body dd{font-size:19px!important;}

  /* 2. Secondary text: .text-sm 18px; nothing below 16px */
  html body .text-sm{font-size:18px!important;}
  html body .text-xs{font-size:16px!important;}
  html body small,html body figcaption,html body label,html body time,html body caption{font-size:max(16px,1em);}
  html body .guide-figure figcaption{font-size:16px!important;}
  html body footer p.text-xs{font-size:16px!important;line-height:1.8!important;color:rgba(var(--d1),var(--d2),var(--d3),.85)!important;}
  html body footer nav a{font-size:17px!important;}
  html body table{font-size:17px!important;}
  html body [class*="text-[10px]"],html body [class*="text-[11px]"],html body [class*="text-[12px]"],html body [class*="text-[13px]"],
  html body .news-cat{font-size:16px!important;}

  /* 3. Articles + forum posts 20px (after .text-sm so it wins on .bb-content.text-sm) */
  html body .prose,html body .prose p,html body .prose li,
  html body .bb-content,html body .bb-content p,html body .bb-content li{font-size:20px!important;line-height:1.8!important;}

  /* 4. Headings (body 19px) */
  html body .text-lg{font-size:20px!important;}
  html body .text-xl{font-size:22px!important;}
  html body h1{font-size:2rem!important;line-height:1.3!important;}     /* 32px */
  html body h2{font-size:1.7rem!important;line-height:1.35!important;}  /* 27.2px */
  html body h3{font-size:1.4rem!important;line-height:1.4!important;}   /* 22.4px */
  html body .hero-title{font-size:2.3rem!important;}                    /* unchanged: keeps 2-line hero */

  /* 5. Buttons 18px, small buttons 16px, drawer menu 19px (fixed top bar untouched: nav stays ~65px) */
  html body .btn:not(.btn-sm):not(.btn-xs){font-size:18px!important;}
  html body .btn-sm{font-size:16px!important;height:auto!important;min-height:44px!important;line-height:1.3!important;}
  html body nav.fixed .btn.justify-start,
  html body #fw-mobile-nav a,html body #fw-region-mobile-nav a{font-size:19px!important;}
  html body a[href*="line.me"] > span{font-size:17px!important;}

  /* 6. Faint gold text -> >=4.5:1 on the var(--bg900)/var(--bg800) background, still dimmer than body gold */
  html body [class*="text-gold-600\/"],html body [class*="text-gold-700\/"],
  html body .text-gold-500\/50,html body .text-gold-500\/60,html body .text-gold-500\/70,html body .text-gold-500\/75{color:rgba(var(--d1),var(--d2),var(--d3),.85)!important;}  /* 5.4:1 */
  html body .text-gold-400\/25,html body .text-gold-400\/60{color:rgba(var(--g1),var(--g2),var(--g3),.72)!important;}  /* 5.3:1 */

  /* 7. Forum (forum-shell.css + inline sizes 10-14px) */
  html body .fw-alert,html body .fw-alert div,html body .fw-disclaimer{font-size:17px!important;line-height:1.75!important;}
  html body .fw-crumb,html body .fw-tab,html body .fw-cat-title,html body .fw-side-card h3,
  html body .fw-poll-q,html body .fw-survey-item-title,html body .fw-survey-desc,html body .fw-survey-flash,
  html body .fw-survey-q legend,html body .fw-survey-q .fw-field,html body .fw-userbox{font-size:17px!important;}
  html body .fw-row-title,html body .fw-forum-name{font-size:19px!important;line-height:1.5!important;}
  html body .fw-empty,html body .fw-btn,html body .fw-field,html body .fw-search input{font-size:18px!important;}
  html body .fw-chip,html body .fw-chip-row span,html body .fw-row-meta,html body .fw-row-meta span,html body .fw-row-stat,html body .fw-cat-desc,
  html body .fw-forum-desc,html body .fw-forum-count,html body .fw-stats-row,html body .fw-poll-opt,
  html body .fw-poll-result-top,html body .fw-poll-result-top span,html body .fw-btn-sm,html body .fw-search button,html body .fw-userbox .fw-links a,
  html body .fw-pager a,html body .fw-footer-note,html body .fw-footer-note a,html body .fw-like,html body .fw-like-count,
  html body .fw-like-names li,html body .fw-bookmark,html body .fw-stamp-note,
  html body .fw-badge,html body .fw-poll-soft,html body .fw-poll-soft a,html body .fw-survey-item-meta,html body .fw-like-panel-title,
  html body .fw-like-names .fw-like-more,html body .fw-links a,html body .bb-content dt{font-size:16px!important;}
  html body .fw-chip-row span{color:rgba(var(--d1),var(--d2),var(--d3),.9)!important;}
  html body{--fw-muted:rgba(var(--d1),var(--d2),var(--d3),.92);}  /* forum muted text 4.0 -> >=4.9:1 on #111 panels */
  html body .fw-forum-link.opacity-80 .fw-forum-desc,html body .fw-forum-link.opacity-80 .fw-forum-count,html body .fw-forum-link.opacity-80 .fw-forum-name span{color:rgba(var(--g1),var(--g2),var(--g3),.9)!important;}
  html body .guide-figure figcaption{color:rgba(var(--g1),var(--g2),var(--g3),.75)!important;}
  /* .fw-stamp / .fw-stamp-sm / .fw-survey-req / avatars / logo "Fly-Wei" 11px / .rh-step__n numbers: fixed-size markers, left as is */
}
/* ===== mobile-pack4 member (mob4) — 2026-10-25, approved by August — 會員中心＋夥伴中心長輩字級 =====
   Append to END of /css/fontscale.css (after the mob3 block). Phones/small tablets only (<=768px).
   Needs: member pages + partner center pages load /css/fontscale.css and have <body class="... fw-member">.
   Rollback: delete from this START line to the END line below, then bump ?v once more (mob4r). */
@media (max-width:768px){
  /* 1. 說明小字：mob3 已把 .text-xs 拉到 16px；會員頁的說明幾乎全是 text-xs，再拉到 18px */
  html body.fw-member main .text-xs{font-size:18px!important;line-height:1.8!important;}
  html body.fw-member main pre{font-size:18px!important;line-height:1.8!important;}
  html body.fw-member main dt{font-size:17px!important;}
  html body.fw-member main label{font-size:18px!important;}
  html body.fw-member main legend{font-size:18px!important;}
  /* 三格分數卡（3 欄很窄）標籤保持 16px */
  html body.fw-member main .grid-cols-3 > div > .text-xs{font-size:16px!important;}

  /* 2. 會員中心上方四個小連結 → 大按鈕（會員下單／我的訂單／我的通知／登出） */
  html body.fw-member main#checkin > div:first-child > div.flex:last-child{gap:10px!important;}
  html body.fw-member main#checkin > div:first-child > div.flex:last-child > a{
    display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:6px 16px;
    font-size:18px!important;text-decoration:none;border:1px solid rgba(var(--g1),var(--g2),var(--g3),.45);border-radius:999px;background:rgba(var(--g1),var(--g2),var(--g3),.08);}

  /* 3. 其他文字連結、小按鈕：點擊高度 >=44px */
  html body.fw-member main a.text-xs,
  html body.fw-member main .text-xs > a,
  html body.fw-member main button.text-xs{display:inline-flex;align-items:center;min-height:44px;padding:0 4px;}

  /* 4. 輸入框、下拉選單 18px、高 52px；按鈕 19px、高 52px */
  html body.fw-member main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  html body.fw-member main select,
  html body.fw-member main textarea{font-size:18px!important;min-height:52px;}
  html body.fw-member main .btn,
  html body.fw-member main button[type="submit"]:not(.text-xs){font-size:19px!important;min-height:52px;}

  /* 5. 夥伴中心六個方塊：短文 12.8px → 16px，標題 20px */
  html body .partner-tile-blurb{font-size:16px!important;line-height:1.5!important;}
  html body .partner-tile-label{font-size:20px!important;}
}
  /* 4b. 長串不可斷行（如 PARTNER_CODE_OF_CONDUCT）在 375 寬會橫向溢出；僅限於放大後的政策內文避免撐破版面 */
  html body.fw-member main .whitespace-pre-wrap{overflow-wrap:anywhere!important;}
  /* 4c. mob3 的 .btn 選擇器權重較高，補一層讓會員頁的送出按鈕如規範為 19px */
  html body.fw-member main .btn.btn{font-size:19px!important;}
/* ===== END mobile-pack4 member (mob4) ===== */
