/* =========================================================
   檸檬手繪家 — iOS HIG 改版層（design/ios-hig-refresh）
   載入順序：styles.css → 本檔。只覆寫，不改原始樣式；
   移除本檔 <link> 即可回到原版。
   依據：Apple Human Interface Guidelines
   ========================================================= */

/* ---------- Design tokens：保留品牌色，只加深「文字用」灰與橘 ---------- */
:root {
  --muted: #6e6e6e;          /* 原 #9a9a9a（2.6–2.8:1）→ 約 5:1 — HIG Accessibility › Vision */
  --muted-2: #6b6b6b;        /* 原 #8a8a8a（3.45:1） */
  --warm-text: #b5530f;      /* 原 #e8742a 用於文字時（2.8:1）→ 約 5:1；圖形裝飾仍用原橘 */
  --tap: 44px;               /* HIG Buttons：建議點擊範圍 44×44pt */
  --tabbar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

/* 提高對比設定（iOS「增加對比」） */
@media (prefers-contrast: more) {
  :root { --muted: #4a4a4a; --muted-2: #4a4a4a; --ink-2: #333; --warm-text: #8f3f08; }
}

/* ---------- 對比：文字色 ---------- */
.bubble-price .price-note,
.plans .amt-label { color: var(--muted-2); }
.notice-title,
.scenes-text .warm { color: var(--warm-text); }
#calc-deal, .calc-note, .calc-error { color: #a8432a; }   /* 原 #c0563b（4.18:1） */
.works-eyebrow, .faq-side .eyebrow { color: var(--muted); } /* 原 #bababa／#c5c5c5（1.6–1.9:1） */

/* ---------- 字級：最小 12px（HIG Typography：iOS 最小 11pt） ---------- */
.tag,
.plans .plan-list b.hot-title .tag,
.gp-tier-name .tag,
.pack-name .pack-badge { font-size: 12px; height: auto; min-height: 22px; padding-block: 2px; }
.step-no small, .amt small, .pack-label, .pack-price small, .bubble-price small,
.pack-tiers b small, .gp-tier-price small, .ge-tier { font-size: 12px; }
@media (max-width: 760px) {
  .ge-tier { font-size: 12px; padding: 2px 8px; }
  .ge-price { font-size: 12px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }                         /* 原 15px，接近 iOS Body 17pt */
  .info p { font-size: 12px; letter-spacing: 0; }   /* 原 10.5px */
  .plans .amt-label { font-size: 12px; }            /* 原 11.5px */
}

/* ---------- Button：按壓狀態、觸控裝置不殘留 hover 放大 ---------- */
.pill:active { transform: scale(.97); opacity: .85; }
@media (hover: none) {
  .btn:hover, .pill-outline:hover, .pill-lime:hover, .pill-navy:hover { transform: none; box-shadow: none; }
  .btn:hover .arrow { transform: none; }
  .btn:active { transform: scale(.97); opacity: .9; }
}
.btn-sm { min-height: var(--tap); }
.method-btn { height: auto; min-height: var(--tap); }

/* 外部連結（LINE / IG / Behance）：箭頭改成 ↗，預告會離開網站 */
.btn[data-line] .arrow, .btn[data-social] .arrow, .btn[target="_blank"] .arrow {
  width: auto; height: auto; transform: none;
}
.btn[data-line] .arrow::before, .btn[data-social] .arrow::before, .btn[target="_blank"] .arrow::before { display: none; }
.btn[data-line] .arrow::after, .btn[data-social] .arrow::after, .btn[target="_blank"] .arrow::after {
  content: "↗"; position: static; width: auto; height: auto; background: none; transform: none; font-size: 1.1em; line-height: 1; font-style: normal;
}
.btn[data-line]:hover .arrow, .btn[data-social]:hover .arrow, .btn[target="_blank"]:hover .arrow { transform: translate(2px, -2px); }
.pill[data-line]::after, .pill[data-social]::after, .pill[target="_blank"]::after {
  content: "↗"; font-size: .9em; line-height: 1; margin-left: 2px; opacity: .75;
}

/* ---------- 指示點：視覺大小不變，點擊範圍擴大到 44pt ---------- */
.hero-dots { gap: 0; }
.hero-dots button,
.swipe-dots button,
.gp-dots button {
  position: relative; display: grid; place-items: center;
  width: var(--tap); height: var(--tap); padding: 0; background: none !important; border-radius: 0;
}
.hero-dots button::before,
.swipe-dots button::before,
.gp-dots button::before {
  content: ""; display: block; border-radius: 99px; transition: width .3s var(--ease), height .4s var(--ease), background-color .3s;
}
.hero-dots button::before { width: 12px; height: 12px; background: #d5d2cc; }
.hero-dots button.is-active::before { background: var(--navy); height: 30px; }
.swipe-dots button::before, .gp-dots button::before { width: 8px; height: 8px; background: #b9b2a6; }
.swipe-dots button.is-active::before, .gp-dots button.is-active::before { width: 22px; background: var(--navy); }
.swipe-dots, .gp-dots { gap: 0; margin-top: 4px; }
.swipe-dots button.is-active, .gp-dots button.is-active { width: var(--tap); }
@media (max-width: 960px) {
  .hero-dots { bottom: 2px; }
  .hero-dots button.is-active { width: var(--tap); height: var(--tap); }
  .hero-dots button.is-active::before { width: 30px; height: 12px; }
}

/* ---------- Stepper／勾選列：44pt ---------- */
.stepper button { width: var(--tap); height: var(--tap); font-size: 20px; }
.stepper output { min-width: 32px; }
.calc-double { min-height: var(--tap); margin-top: 2px; gap: 10px; }
.calc-double input { width: 20px; height: 20px; flex: none; }

/* ---------- 常見問題分類標籤 ---------- */
@media (max-width: 960px) { .faq-filters button { height: var(--tap); } }

/* ---------- Navigation Bar（手機） ---------- */
@media (max-width: 960px) {
  .site-header { padding-top: var(--safe-t); }
  .header-inner { padding-left: calc(var(--gutter) + var(--safe-l)); padding-right: calc(var(--gutter) + var(--safe-r)); }
  .brand { min-height: var(--tap); }
  .mobile-menu { padding-bottom: calc(40px + var(--safe-b)); }
  .mobile-menu nav a { min-height: 56px; display: flex; align-items: center; }
  .footer-pills { flex-wrap: wrap; }
  .footer-pills .pill { height: auto; min-height: var(--tap); padding: 0 18px; }
}

/* ---------- Tab Bar：取代右側直排浮動按鈕（HIG Tab bars） ---------- */
@media (max-width: 960px) {
  .float-nav.tab-bar {
    left: 0; right: 0; bottom: 0; top: auto; z-index: 95;
    flex-direction: row; gap: 0;
    padding: 4px calc(8px + var(--safe-r)) calc(4px + var(--safe-b)) calc(8px + var(--safe-l));
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
    border-top: 1px solid var(--line);
  }
  .float-nav.tab-bar a {
    flex: 1 1 0; width: auto; height: auto; min-height: 48px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 0; border-radius: 12px; box-shadow: none; background: none;
    color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; line-height: 1.2;
  }
  .float-nav.tab-bar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; transition: fill .2s; }
  .float-nav.tab-bar a.is-active { color: var(--navy); background: none; }
  .float-nav.tab-bar a.is-active svg { fill: var(--lime); }
  .float-nav.tab-bar a:active { transform: none; background: var(--beige); }

  /* 內容避開 Tab Bar */
  body { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }
  .to-top { right: calc(16px + var(--safe-r)); bottom: calc(var(--tabbar-h) + 12px + var(--safe-b)); }
  .mobile-menu { height: calc(100dvh - 64px - var(--safe-t)); }
}

/* =========================================================
   周邊優先（design/goods-first）：首頁不再只強調 T 恤
   ========================================================= */

/* 選擇帶回家的方式：4 張卡片 */
.ge-items { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1000px; }
.ge-total { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.ge-total .num { font-family: var(--font-en); font-weight: 800; font-size: 20px; color: var(--navy); }
.ge-price { font-size: 12px; color: var(--muted); line-height: 1.4; }
.ge-soon { background: transparent; border: 2px dashed #c9c2b6; }
.ge-soon:hover { transform: none; box-shadow: none; }
.ge-soon .ge-tier { background: #e9e4da; color: var(--ink-2); }
.ge-soon-art { font-size: 40px; font-weight: 300; color: #b3aa9b; }
.ge-only { font-size: 14px; color: var(--ink-2); margin: 0 auto 22px; line-height: 1.7; }
.ge-only b { color: var(--navy); }
.ge-only .num { font-family: var(--font-en); font-weight: 800; }
@media (min-width: 961px) {
  .ge-items { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-row: 1 / span 3; }
  .ge-card { grid-template-areas: "head items" "only items" "btn items"; }
  .ge-only { grid-area: only; margin: 18px 0 0; }
}
@media (max-width: 760px) {
  .ge-items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ge-item { padding: 16px 8px; }
  .ge-total { font-size: 12px; }
  .ge-total .num { font-size: 18px; }
  .ge-only { font-size: 13px; }
}

/* 步驟 02 改用周邊手繪示意，完整顯示不裁切 */
.pstep-media .pstep-img-art { object-fit: contain; padding: 6% 8%; background: var(--beige); mix-blend-mode: normal; }

/* PLAN B 周邊分頁：iOS 分段控制樣式 */
.pb-tabs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px;
  margin: 16px 0 6px; padding: 3px; border-radius: 12px; background: rgba(45, 73, 112, .1);
}
.pb-tabs button {
  min-height: 40px; border: 0; border-radius: 9px; background: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2);
}
.pb-tabs button[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.pb-tabs button:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }
.pb-panel[hidden], .packs[hidden] { display: none !important; }
.plan-more { display: inline-block; font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.ge-total { display: grid; justify-items: center; gap: 0; }
.ge-total small { font-size: 12px; font-weight: 700; color: var(--ink-2); }
/* 桌面版：周邊卡片區高度收斂 */
@media (min-width: 961px) {
  .ge-card { padding: 44px 56px; }
  .ge-items { gap: 12px; }
  .ge-item { padding: 16px 14px 14px; gap: 4px; border-radius: 24px; }
  .ge-art { height: 68px; }
  .ge-art img { max-height: 68px; }
  .ge-soon-art { font-size: 34px; }
}

/* IG 按鈕：淡粉紅底 */
.pill[data-social] { background: #fbe6e8; border-color: #f4cdd2; color: var(--ink); }
.pill[data-social]:hover { background: #f8d6db; border-color: #f0bcc3; }

/* 周邊頁：回到首頁按鈕 */
.gp-home { display: flex; justify-content: center; margin-top: clamp(32px, 4vw, 48px); }

/* 試算器：觸控裝置不要 hover 位移，避免 iOS 第一下只觸發 hover、第二下才打開 */
@media (hover: none) {
  .calc:not([open]):hover { transform: none; box-shadow: none; }
  .calc summary:hover .q-icon { background: #fff; }
  .calc summary:hover .q-icon::before, .calc summary:hover .q-icon::after { background: var(--navy); }
}
.calc summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* 價格卡（PLAN A／B）桌面版：副標說明放在副標題旁邊、卡片高度收斂 */
@media (min-width: 961px) {
  .plan-sub { gap: 4px 12px; }
  .plan-sub .sub-line { flex: 1 1 auto; flex-basis: auto; }
  .plans .plan { padding-top: 32px; padding-bottom: 28px; }
  .plans .plan-list li { padding-block: 12px; }
}
@media (min-width: 1101px) { .plan-sub .sub-line { white-space: nowrap; } }

/* 周邊頁 T 恤套組：網頁版兩欄橫向精簡卡（圖在左、文在右） */
.pack-icon { display: none; }
@media all {
  #packages .pack-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; margin-top: 32px; padding-top: 0; }
  #packages .pack-grid .pack {
    display: grid; grid-template-columns: 88px auto minmax(0, 1fr) auto; column-gap: 20px; row-gap: 2px;
    grid-template-areas: "art label label label" "art name name price" "art save spec spec";
    align-items: center; padding: 16px 24px;
  }
  #packages .pack-grid .pack-art, #packages .pack-grid .pack-icon { grid-area: art; position: static; transform: none; width: 88px; height: auto; align-self: center; }
  #packages .pack-grid .pack-icon {
    display: grid; place-items: center; height: 72px; border-radius: 20px; background: var(--lime);
    font-family: var(--font-en); font-weight: 800; font-size: 24px; color: var(--navy);
  }
  #packages .pack-grid .pack-label { grid-area: label; }
  #packages .pack-grid .pack-name { grid-area: name; margin-top: 0; font-size: 18px; }
  #packages .pack-grid .pack-price, #packages .pack-grid .pack-tiers { grid-area: price; margin-top: 0; justify-self: end; }
  #packages .pack-grid .pack-price .num { font-size: 26px; }
  #packages .pack-grid .pack-tiers li { padding: 4px 12px; }
  #packages .pack-grid .pack-save { grid-area: save; margin-top: 4px; justify-self: start; }
  #packages .pack-grid .pack-spec { grid-area: spec; margin-top: 4px; padding-top: 0; border-top: 0; justify-self: end; color: var(--ink-2); }
  #packages .pack-grid .pack-copy { display: none; }
  #packages .pack-grid .pack .pack-name { margin: 0; min-height: 0; }
  #packages .pack-grid .pack-save, #packages .pack-grid .pack-price { white-space: nowrap; }
  #packages .pack-grid .pack > .pack-spec { text-align: right; }
  #packages .pack-grid .pack .pack-spec { min-height: 0; height: auto; margin-bottom: 0; line-height: 1.6; }
  #packages .pack-grid .pack-label { margin: 0; }
  #packages .pack-grid .pack:hover { transform: translateY(-3px); }

  /* 四人以上、大家庭：在右欄並排成兩張方形卡 */
  #packages .pack-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
  #packages .pack-grid .pack-stack .pack {
    grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "art label" "art name" "price price" "spec spec";
    row-gap: 6px; column-gap: 14px; padding: 18px 20px; align-content: center;
  }
  #packages .pack-grid .pack-stack .pack-icon { width: 56px; height: 56px; border-radius: 16px; font-size: 18px; }
  #packages .pack-grid .pack-stack .pack-tiers { justify-self: stretch; margin-top: 8px; }
  #packages .pack-grid .pack-stack .pack-tiers li { justify-content: space-between; }
  #packages .pack-grid .pack-stack .pack-spec { justify-self: start; margin-top: 2px; }
}
/* 較窄的桌面（961–1199px）：規格改放最下一行，圖與價格縮小，避免擠壓 */
@media (min-width: 961px) and (max-width: 1199px) {
  #packages .pack-grid > .pack {
    grid-template-columns: 64px auto minmax(0, 1fr) auto; column-gap: 14px; padding: 16px 20px;
    grid-template-areas: "art label label label" "art name name price" "art save save save" "art spec spec spec";
  }
  #packages .pack-grid > .pack .pack-art { width: 64px; }
  #packages .pack-grid > .pack .pack-price .num { font-size: 22px; }
  #packages .pack-grid > .pack > .pack-spec { justify-self: start; text-align: left; font-size: 13px; }
  #packages .pack-grid .pack-stack .pack-name { font-size: 16px; }
}

/* 平板／手機：套組也用橫條卡，單欄堆疊，取消左右滑 */
@media (max-width: 960px) {
  #packages .pack-grid {
    grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 24px 0 0; padding: 0;
    overflow: visible; scroll-snap-type: none;
  }
  #packages .pack-grid .pack, #packages .pack-stack { flex: none; min-width: 0; }
  #packages .pack-stack { gap: 12px; }
  #packages .swipe-dots { display: none !important; }
  #packages .pack-grid > .pack {
    grid-template-columns: 56px auto minmax(0, 1fr) auto; column-gap: 12px; padding: 14px 16px; border-radius: 24px;
    grid-template-areas: "art label label label" "art name name price" "art save save save" "art spec spec spec";
  }
  #packages .pack-grid > .pack .pack-art { width: 56px; }
  #packages .pack-grid .pack .pack-name { font-size: 16px; }
  #packages .pack-grid > .pack .pack-price .num { font-size: 20px; }
  #packages .pack-grid > .pack > .pack-spec { justify-self: start; text-align: left; font-size: 13px; }
  #packages .pack-grid .pack-stack .pack { padding: 14px; border-radius: 24px; grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; }
  #packages .pack-grid .pack-stack .pack-icon { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }
  #packages .pack-grid .pack-stack .pack-tiers li { padding: 4px 8px; font-size: 12px; flex-wrap: wrap; }
  #packages .pack-grid .pack-stack .pack-spec { font-size: 13px; }
  #packages .pack-grid .pack-label { font-size: 11px; }
}
@media (max-width: 560px) {
  #packages .pack-grid .pack-stack .pack { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "name" "price" "spec"; }
  #packages .pack-grid .pack-stack .pack-icon { display: none; }
}

/* 周邊頁頂部三張商品卡（手機）：卡片變矮、間距 22px */
@media (max-width: 760px) {
  .gp-tier-grid { gap: 22px; }
  .gp-tier { padding: 20px 24px 14px; border-radius: 32px; }
  .gp-tier-art.is-wide { top: 14px; right: 18px; width: 96px; }
  .gp-tier-name { font-size: 21px; line-height: 30px; }
  .gp-tier-price { margin-top: 4px; align-items: baseline; }
  .gp-tier-price .num { font-size: 28px; line-height: 34px; }
  .gp-tier-price small.ship { flex-basis: auto; margin: 0 0 0 6px; }
  .gp-tier-line { margin-top: 6px; }
  .gp-tier .gp-more { margin-top: 4px; }
}

/* 周邊頁頂部卡片：零錢包、帆布包手繪插圖 */
.gp-tier-art.is-sq { width: 116px; top: -62px; right: 22px; }
@media (max-width: 760px) {
  .gp-tier-art.is-sq { top: 10px; right: 16px; width: 84px; }
}

/* 周邊頁頂部商品卡：「看商品細節」固定在卡片底部，三張對齊 */
.gp-tier { display: flex; flex-direction: column; }
.gp-tier .gp-more { margin-top: auto; padding-top: 16px; }
@media (max-width: 760px) { .gp-tier .gp-more { padding-top: 4px; } }

/* 四人以上、大家庭：拿掉 4+／10+ 方塊，只留文字 */
#packages .pack-grid .pack-stack .pack { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "name" "price" "spec"; }

/* 首頁 Hero 副標：不放價格，先讓人喜歡插畫 */
.hero-sub { margin-top: 18px; max-width: 30em; font-size: 18px; line-height: 1.8; font-weight: 500; color: var(--ink-2); letter-spacing: .02em; }
.hero-more {
  display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); margin-top: 12px;
  font-size: 15px; font-weight: 700; color: var(--navy);
  text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 6px;
}
.hero-more .arrow { width: 22px; }
@media (hover: hover) { .hero-more:hover .arrow { transform: translateX(4px); } }
@media (max-width: 960px) {
  .hero-sub { margin-top: 10px; font-size: 15px; line-height: 1.7; padding-inline: 8px; }
  .hero-more { margin-top: 2px; font-size: 14px; }
}

/* 更多使用情境：字稍微放大 */
.scenes-text { font-size: 18px; }
@media (max-width: 560px) { .scenes-text { font-size: 15.5px; letter-spacing: .02em; } }
/* 更多使用情境：手機／平板不放插圖、區塊縮矮；網頁版維持左右排插圖 */
@media (max-width: 960px) {
  .scenes-art { display: none; }
  .scenes { padding-top: 32px; padding-bottom: 28px; }
  .scenes-text { margin-top: 12px; gap: 2px; }
}

/* 首頁周邊卡：純展示，不可點、無 hover 浮起 */
.ge-items .ge-item { cursor: default; }
.ge-items .ge-item:hover { transform: none; box-shadow: none; }
