/* 無毒農 11 週年慶 LDP V1 原型
   版型：主 Banner → 導航列 → ①天天搖好康（A/B/C 三層）→ ②推薦農友 → ③週週抽 → ④新客 → ⑤會員獨享 → ⑥頁尾 CTA
   單一淺色外觀（活動頁不做深色模式）。間距 4px 倍數，圓角 16px（橢圓窗 / 圓點為 50%）。 */
:root {
  --bg: #ffffff;
  --bg-soft: #eff5e5;
  --fg: #1a1a1a;
  --fg-2: #595757;
  --line: #d9e3cc;
  --green: #4ba83b;
  --green-deep: #008000;
  --gold: #b8912a;
  --gold-fg: #7a5f12;
  --zhou-bg: #f8d2cc;
  --zhou-fg: #805033;
  --water: #3d8fc4;
  --font: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --h1: 32px; --h2: 26px; --h3: 22px; --body: 16px; --small: 14px;
  --radius: 16px;
  color-scheme: light;
}
@media (min-width: 768px) { :root { --h1: 40px; --h2: 32px; --h3: 26px; --body: 17px; --small: 16px; } }
@media (min-width: 1200px) { :root { --h1: 48px; --h2: 39px; --h3: 30px; --body: 19px; --small: 16px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: var(--body); line-height: 1.8; margin: 0; overflow-x: hidden; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--green-deep); }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--green-deep); outline-offset: 2px; }
section[id] { scroll-margin-top: 56px; }
.wrap { max-width: 960px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.demo-banner { background: #fff4c2; color: #5c4a00; font-size: 14px; text-align: center; padding: 8px 16px; line-height: 1.5; }

/* header / hero / nav */
/* 主 Banner：文字做進圖裡。手機 488px、桌機 552px 固定高，圖片 cover 置中裁切。
   手機用 hero-m、桌機（≥768px）用 hero-d；正式主視覺（文字已做進圖裡）。 */
.hero { position: relative; overflow: hidden; height: 488px; background: var(--bg-soft); }
@media (min-width: 768px) { .hero { height: 552px; } }

/* 動態主視覺：舞台照原圖比例、像 cover 一樣蓋滿 hero 並置中；7 層圖疊在舞台裡，所以位置 % 跟原圖一致 */
.hero-stage { --ar: 3841 / 1105; --hh: 552px; position: absolute; left: 50%; top: 50%; width: max(100%, calc(var(--hh) * 3841 / 1105)); aspect-ratio: var(--ar); transform: translate(-50%, -50%); }
.hero-stage .hl, .hero-stage .hl img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* 每層的轉動中心（禮物底部中間），桌機 / 手機各一組 */
.hero-stage .hl-0 { --o: 50% 57%; }
.hero-stage .hl-1 { --o: 49.5% 95.4%; }
.hero-stage .hl-2 { --o: 39.3% 94.6%; }
.hero-stage .hl-3 { --o: 60% 94%; }
@media (max-width: 767px) {
  .hero-stage { --ar: 3871 / 4393; --hh: 488px; width: max(100%, calc(var(--hh) * 3871 / 4393)); }
  .hero-stage .hl-0 { --o: 50% 55%; }
  .hero-stage .hl-1 { --o: 50% 83.3%; }
  .hero-stage .hl-2 { --o: 25.4% 79.6%; }
  .hero-stage .hl-3 { --o: 74.2% 80.6%; }
}
.hero-stage .hl img { transform-origin: var(--o, 50% 50%); }

@media (prefers-reduced-motion: no-preference) {
  /* 圖還沒載完前先藏起標籤和禮物；main.js 等 7 層都載好才加 .is-ready 開始播（最多等 4 秒） */
  .hero:not(.is-ready) .hl-00 img, .hero:not(.is-ready) .hl-4 img, .hero:not(.is-ready) .hl-0 img, .hero:not(.is-ready) .hl-1 img, .hero:not(.is-ready) .hl-2 img, .hero:not(.is-ready) .hl-3 img { opacity: 0; }
  /* 進場：標籤彈出；三顆禮物依序從上方掉下來、落地壓扁回彈 */
  .hero.is-ready .hl-0 img { animation: hero-pop .7s cubic-bezier(.34,1.56,.64,1) .1s both; }
  .hero.is-ready .hl-2 img { animation: gift-drop .9s ease-out .35s both, gift-hop 3.6s ease-in-out 1.6s infinite; }
  .hero.is-ready .hl-1 img { animation: gift-drop .9s ease-out .55s both, gift-hop 3.6s ease-in-out 2.8s infinite; }
  .hero.is-ready .hl-3 img { animation: gift-drop .9s ease-out .75s both, gift-hop 3.6s ease-in-out 4s infinite; }
  /* 吊飾、彩帶：輕輕上下晃 */
  /* _00 對話泡泡（最上層）：禮物落地後彈一下進場，之後固定不動 */
  .hero.is-ready .hl-00 img { animation: bubble-in .8s ease-out 1.4s both; }
  .hero.is-ready .hl-4 img { animation: hang-drop 1.3s ease-out .2s both, hero-float 5s ease-in-out 1.5s infinite; }
  /* _5 彩帶跟 _4 吊飾反方向：同樣 5 秒一輪，錯開半輪（吊飾往下時彩帶往上） */
  .hero.is-ready .hl-5 img { animation: hero-float 5s ease-in-out -1s infinite; }
}
@keyframes hero-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes gift-drop {
  0%   { opacity: 0; transform: translateY(-60%); }
  45%  { opacity: 1; transform: translateY(0) scale(1); }
  58%  { transform: translateY(0) scale(1.08, .9); }
  72%  { transform: translateY(-6%) scale(.97, 1.04); }
  86%  { transform: translateY(0) scale(1.03, .97); }
  100% { opacity: 1; transform: none; }
}
/* 待機：每顆禮物輪流跳一下（3.6 秒一輪，錯開 1.2 秒） */
@keyframes gift-hop {
  0%, 30%, 100% { transform: none; }
  6%  { transform: scale(1.03, .96); }
  14% { transform: translateY(-3%) scale(.98, 1.02) rotate(-1deg); }
  22% { transform: translateY(0) scale(1.02, .98); }
}
/* 吊飾、彩帶只往上晃、不往下（往下會露出上緣的斷口） */
@keyframes bubble-in {
  0%   { opacity: 0; transform: translateY(-5%); }
  55%  { opacity: 1; transform: translateY(1.2%); }
  78%  { transform: translateY(-.6%); }
  100% { opacity: 1; transform: none; }
}
/* _4 吊飾進場：從畫面上方垂下來，彈一下停在原位（不會低於原位，上緣不露破綻），接著接上下輕晃 */
@keyframes hang-drop {
  0%   { transform: translateY(-45%); animation-timing-function: ease-in; }
  60%  { transform: none; animation-timing-function: ease-out; }
  80%  { transform: translateY(-3%); animation-timing-function: ease-in-out; }
  100% { transform: translateY(-1.2%); }
}
@keyframes hero-float { 0%, 100% { transform: translateY(-1.2%); } 50% { transform: none; } }
/* 文字只給 SEO／讀螢幕，畫面上不顯示 */
.hero-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.anchor-nav { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.anchor-nav ul { list-style: none; margin: 0 auto; max-width: 960px; display: flex; overflow-x: auto; scrollbar-width: none; padding: 0 8px; }
.anchor-nav ul::-webkit-scrollbar { display: none; }
.anchor-nav li { flex: 0 0 auto; }
/* 置中：用左右 auto 邊距（手機項目太多時仍可左右滑，不會被切掉） */
.anchor-nav li:first-child { margin-left: auto; } .anchor-nav li:last-child { margin-right: auto; }
.anchor-nav a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; color: var(--fg); text-decoration: none; font-size: var(--small); font-weight: 500; white-space: nowrap; border-bottom: 3px solid transparent; }
.anchor-nav a[aria-current="true"] { color: var(--green-deep); border-bottom-color: var(--green-deep); }

/* ───────── ① 天天搖好康 ───────── */
/* B 層：畫框，全寬包住整個區塊；相對區塊固定（不是 position:fixed） */
.daily { padding: 0; }
.frame { position: relative; width: 100%; background: var(--bg-soft); padding: 24px max(16px, env(safe-area-inset-left, 0px)) 16px; display: grid; gap: 12px; justify-items: center; }
.daily-head { text-align: center; display: grid; gap: 4px; }
.daily-head h2 { font-size: var(--h2); font-weight: 500; line-height: 1.3; }
.week-line { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.week-name { font-size: 20px; font-weight: 500; }
.week-range { font-size: var(--small); color: var(--fg-2); }
.badge { display: inline-block; padding: 0 8px; border-radius: var(--radius); font-size: 14px; font-weight: 700; line-height: 24px; }
.badge.current { background: var(--green-deep); color: #fff; }
.badge.history { background: #e6e6e6; color: #595757; }

/* 按鈕底條：上留 16 → 按鈕 56 → 間距 12 → 說明 52（手機 68）。
   底條圖固定尺寸置中，窄螢幕左右裁切；下緣會被橢圓外框的上緣蓋住一段。
   正式圖到了把下面兩行 background-image 打開（img/btn-strip-d.png 2112×272、img/btn-strip-m.png 1290×456） */
.act-zone { width: 100%; display: grid; gap: 12px; justify-items: center; padding-top: 16px; margin-top: -16px; background: center top / 1056px 136px no-repeat; }
/* .act-zone { background-image: url(../img/btn-strip-d.png); } */

/* 按鈕大字（祝福／搖樹／澆水）用圓體：源泉圓體 M（SIL OFL）。
   fonts/ 裡是只含這 6 個字的子集（約 2.5KB），每台裝置都看得到；按鈕改字要重做子集（見 fonts/README.txt）。 */
@font-face { font-family: "LDP Rounded"; font-weight: 500; font-display: swap; src: url(../fonts/gensen-rounded-m-btn.woff2) format("woff2"), url(../fonts/gensen-rounded-m-btn.woff) format("woff"); }
.act { font-family: "LDP Rounded", var(--font); font-weight: 500; }
.act small { font-family: var(--font); }

/* A 層：三個按鈕（位置固定）：桌機 180×56、間距 10；手機 108×56、間距 8 */
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 560px; position: relative; z-index: 3; }
.act { min-height: 56px; border-radius: var(--radius); border: 2px solid var(--green-deep); background: #fff; color: var(--green-deep); font-size: 18px; font-weight: 500; cursor: pointer; display: grid; align-content: center; justify-items: center; line-height: 1.3; padding: 4px; }
.act small { font-size: 12px; font-weight: 400; color: var(--fg-2); }
.act[aria-pressed="true"] { background: var(--green-deep); color: #fff; }
.act[aria-pressed="true"] small { color: #e6f2e6; }
.act.locked { border-color: #bdbdbd; color: #595757; }
.act.locked[aria-pressed="true"] { background: #595757; border-color: #595757; color: #fff; }
.act:disabled { cursor: progress; }
.act.ended, .act.ended:disabled { border-color: #d0d0d0; background: #f1f1f1; color: #9a9a9a; cursor: not-allowed; }
/* 說明區高度固定（桌機 2 行、手機 3 行），文字長短不會推動橢圓，外框和按鈕底條才對得準 */
.act-hint { position: relative; z-index: 3; width: 100%; max-width: 560px; height: 52px; display: grid; align-content: center; text-align: center; white-space: pre-line; text-wrap: balance; font-size: var(--small); line-height: 1.6; color: var(--fg); }
.act-hint.off { color: #595757; font-weight: 700; }

/* 舞台：週次箭頭｜橢圓｜週次箭頭 */
.stage { display: grid; grid-template-columns: 64px minmax(0, 880px) 64px; gap: 16px; align-items: center; justify-content: center; width: 100%; }
.week-arrow { display: grid; justify-items: center; gap: 4px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--fg); font: inherit; }
.week-arrow .arr { width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 2px solid var(--green-deep); color: var(--green-deep); font-size: 32px; line-height: 50px; text-align: center; }
.week-arrow:hover .arr { background: var(--green-deep); color: #fff; }
.week-arrow[hidden] { display: grid; visibility: hidden; }

.oval { position: relative; width: 100%; }
/* 橢圓觀看窗：桌機橫向 */
.viewport { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 50%; overflow: hidden; background: #fbfaf4; border: 8px solid #fff; box-shadow: 0 0 0 2px var(--green); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.viewport.dragging { cursor: grabbing; }

/* 農友祝福對話框：壓在樹上，不被橢圓裁切 */
.greets { position: absolute; inset: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 3; }
.greets.off { opacity: 0; }
.bubble { position: absolute; max-width: 30%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px; font-size: var(--small); line-height: 1.5; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.bubble cite { display: block; font-style: normal; color: var(--fg-2); margin-top: 4px; }
.bubble::after { content: ""; position: absolute; width: 12px; height: 12px; background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); bottom: -7px; transform: rotate(45deg); }
.bubble.b1 { left: 9%; top: 12%; } .bubble.b1::after { right: 32px; }
.bubble.b2 { right: 9%; top: 20%; } .bubble.b2::after { left: 32px; }
.bubble.b3 { left: 11%; top: 54%; } .bubble.b3::after { right: 32px; }
.bubble.b4 { right: 7%; top: 60%; } .bubble.b4::after { left: 32px; }

/* 手機：直向橢圓 */
@media (max-width: 767px) {
  .frame { padding-inline: 8px; }
  .stage { grid-template-columns: 44px minmax(0, 300px) 44px; gap: 4px; }
  .week-arrow .arr { width: 40px; height: 40px; font-size: 26px; line-height: 36px; }
  .viewport { aspect-ratio: 3 / 4; border-width: 6px; }
  .act-hint { height: 68px; }
  .act-zone { background-size: 430px 152px; }
  /* .act-zone { background-image: url(../img/btn-strip-m.png); } */
  .actions { max-width: 340px; gap: 8px; }
  .bubble { max-width: 68%; font-size: 12px; line-height: 1.4; padding: 4px 8px; }
  .bubble cite { margin-top: 0; }
  .bubble.b1 { left: 4%; top: 10%; }
  .bubble.b2 { right: 4%; top: 30%; }
  .bubble.b3 { left: 4%; top: 50%; }
  .bubble.b4 { right: 4%; top: 70%; }
  .drag-hint { display: none; }   /* 手機不能拖曳，只用按鈕 */
  .viewport { touch-action: pan-y; cursor: default; }
}

/* C 層：植物長圖，在窗內上下移動（translateY），由 JS 算寬度與位置 */
.artwork { position: absolute; top: 0; left: 0; will-change: transform; }
.artwork.snap { transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.3, 1); }
.artwork img { display: block; width: 100%; height: auto; pointer-events: none; }
.sway { transform-origin: 50% 71.7%; }
.sway.shaking { animation: shake 1s ease-in-out; }
@keyframes shake { 0%,100% { transform: rotate(0); } 15% { transform: rotate(-3deg); } 35% { transform: rotate(3deg); } 55% { transform: rotate(-2deg); } 75% { transform: rotate(1.5deg); } }
.root-glow { position: absolute; left: 20%; right: 20%; top: 76%; height: 16%; border-radius: 50%; background: radial-gradient(closest-side, rgba(61, 143, 196, 0.55), rgba(61, 143, 196, 0)); opacity: 0; pointer-events: none; }
.root-glow.on { animation: glow 1.6s ease-out; }
@keyframes glow { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; } }

.fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fruit { position: absolute; width: 28px; height: 28px; border-radius: 50%; top: 30%; }
/* 水果圖：桌機約橢圓寬 6%（≈52px），手機 12%（≈36px） */
.fruit.pic { width: 6%; height: auto; aspect-ratio: 1; border-radius: 0; }
@media (max-width: 767px) { .fruit.pic { width: 12%; } }
.drop { position: absolute; width: 8px; height: 12px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #7fbfe8; top: 4%; }
.can { position: absolute; width: 22%; top: 8%; right: 20%; }
.drag-hint { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); background: rgba(255, 255, 255, 0.92); border-radius: var(--radius); padding: 4px 12px; font-size: 14px; color: var(--fg-2); white-space: nowrap; transition: opacity 0.3s; pointer-events: none; }
.drag-hint.gone { opacity: 0; }
.down-hint { font-size: var(--small); font-weight: 500; text-decoration: none; padding: 8px 16px; }

/* ───── 木板：橢圓外框 + 按鈕區 + 按鈕 + 說明 + 樹窗 + 箭頭 ─────
   全部用「1 倍畫布」座標，--u = 1 倍的 1px，整組跟著寬度等比例縮放。
   桌機（≥768）畫布寬 1056、手機（≤767）畫布寬 375，兩個都是外框在上、按鈕區在下。
   --s＝按鈕區（底條）高度；--fy＝外框上緣、--by＝按鈕區上緣（都從木板頂端算）。
   --btn-y、--hint-y 從按鈕區上緣算；--ov-*＝樹窗、--arr-*＝換週箭頭（y 從外框上緣算、x 從左右邊算）。
   數值可以用「版位調整」面板調，調好貼給工程改這裡的預設值。 */
.board {
  display: flex; flex-direction: column; position: relative; width: min(100%, 1056px); margin-inline: auto; container-type: inline-size;
  /* 桌機：外框 frame-pc.png 4224×2376（4 倍，1 倍 1056×594）、按鈕區 strip-pc.png 4224×720（1 倍 1056×180）
     外框洞口實測 (101,58)–(955,536)；樹窗 16:9 比洞口略大，邊緣藏在木頭下面 */
  --s: 180; --fy: 0; --by: 594;
  --btn-x: 204.5; --btn-y: -62; --btn-w: 647; --btn-h: 141.5; --btn-gap: 14;
  --btn-fs: 24.5; --btn-ls: 1.5; --sm-fs: 15.5; --sm-ls: 1; --sm-gap: -1.5;
  --hint-x: 212.5; --hint-y: 84; --hint-w: 631; --hint-h: 56; --hint-fs: 16; --hint-ls: 1;
  --ov-x: 98; --ov-y: 55; --ov-w: 860;              /* 樹窗 16:9 → 860×483.75，蓋住洞口 */
  --arr-y: 297; --arr-w: 61; --arr-x: 17.5;
  --u: calc(100cqw / 1056);
}
@media (max-width: 767px) {
  /* 手機：外框 frame-mb.png 3375×3996（9 倍，1 倍 375×444）、按鈕區 strip-mb.png 3375×1297（1 倍 375×144.1）
     外框洞口實測 (50.2,38.8)–(324.8,404.9)；樹窗 3:4 比洞口略大，邊緣藏在木頭下面 */
  .board {
    width: 100%;
    --s: 144.1; --fy: 0; --by: 444;
    --btn-x: 22.5; --btn-y: -42; --btn-w: 330; --btn-h: 118.2; --btn-gap: 9;
    --btn-fs: 16; --btn-ls: 3; --sm-fs: 10; --sm-ls: 0; --sm-gap: 0;
    --hint-x: 27.5; --hint-y: 80; --hint-w: 320; --hint-h: 56; --hint-fs: 12; --hint-ls: 0.5;
    --ov-x: 45.5; --ov-y: 32.5; --ov-w: 284;          /* 樹窗 3:4 → 284×378.7，蓋住洞口 */
    --arr-y: 221.2; --arr-w: 36; --arr-x: 5.5;
    --u: calc(100cqw / 375);
  }
  .frame:has(.board) { padding-inline: 0; }
}
.board picture { display: contents; }
.board-strip, .board-frame { display: block; position: relative; width: 100%; pointer-events: none; user-select: none; -webkit-user-select: none; z-index: 2; }
.board-strip { height: calc(var(--u) * var(--s)); }
.board-frame { height: auto; order: -1; }          /* 外框在上 */
.board-strip { margin-top: -1px; }                  /* 跟外框重疊 1px，避免小數點造成的接縫亮線 */
.board .act-zone { display: contents; }
.board .actions { position: absolute; left: calc(var(--u) * var(--btn-x)); top: calc(var(--u) * (var(--by) + var(--btn-y))); width: calc(var(--u) * var(--btn-w)); height: calc(var(--u) * var(--btn-h)); max-width: none; margin: 0; gap: calc(var(--u) * var(--btn-gap)); z-index: 3; }
/* 按鈕狀態：
   可以玩（祝福、還沒搖／澆、還有名額）→ 一般按鈕圖＋白黃光一閃一閃
   今天已經搖／澆過、已發完、歷史週 → 灰色按鈕圖（btn-off），不發光、不變淡
   每個狀態都明確給 background，避免被舊規則的 background 簡寫清掉而「消失」 */
/* 三顆按鈕＝設計的禮物盒圖（1120 版，字已做在圖上；按鈕文字留給讀屏，畫面上隱藏）
   桌機 gift-*-d.png 790×542、手機 gift-*-m.png 564×641
   狀態：一般 → 搶到了（locked.got，看優惠）→ 搶完了（locked.out）；歷史週（ended）用一般圖變灰 */
.board .act, .board .act[aria-pressed="true"] { position: relative; min-height: 0; height: 100%; border: 0; border-radius: 0; padding: 0; background: none; font-size: 0; color: transparent; -webkit-tap-highlight-color: transparent; transition: transform .38s cubic-bezier(.34, 1.9, .5, 1); }
.board .act small { display: none; }
.board .act::before { content: ""; position: absolute; inset: 0; background: var(--img) center / contain no-repeat; transform-origin: 50% 90%; pointer-events: none; }
.board .act[data-pos="shake"] { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-shake-d.c817789c.webp"); --wd: .8s; }
.board .act[data-pos="water"] { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-water-d.f834a1b2.webp"); --wd: 3.8s; }
.board .act[data-pos="bless"] { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-bless-d.4279992b.webp"); --wd: 6.8s; }
.board .act[data-pos="shake"].locked.got { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-shake-got-d.1717a70f.webp"); }
.board .act[data-pos="shake"].locked.out { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-shake-out-d.9a2bb8f5.webp"); }
.board .act[data-pos="water"].locked.got { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-water-got-d.fb173a6e.webp"); }
.board .act[data-pos="water"].locked.out { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-water-out-d.41392cfa.webp"); }
@media (max-width: 767px) {
  .board .act[data-pos="shake"] { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-shake-m.d684d329.webp"); }
  .board .act[data-pos="water"] { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-water-m.d546712a.webp"); }
  .board .act[data-pos="bless"] { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-bless-m.996709b2.webp"); }
  .board .act[data-pos="shake"].locked.got { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-shake-got-m.9700ed83.webp"); }
  .board .act[data-pos="shake"].locked.out { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-shake-out-m.e972231c.webp"); }
  .board .act[data-pos="water"].locked.got { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-water-got-m.804bde14.webp"); }
  .board .act[data-pos="water"].locked.out { --img: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/gift-water-out-m.3662a7bd.webp"); }
}
.board .act.ended, .board .act.ended:disabled { filter: grayscale(1); opacity: .55; cursor: default; }
.board .act-hint { position: absolute; left: calc(var(--u) * var(--hint-x)); top: calc(var(--u) * (var(--by) + var(--hint-y))); width: calc(var(--u) * var(--hint-w)); height: calc(var(--u) * var(--hint-h)); max-width: none; margin: 0; font-size: calc(var(--u) * var(--hint-fs)); letter-spacing: calc(var(--u) * var(--hint-ls)); z-index: 3; color: #5a3e24; }
.board .stage { position: absolute; inset: 0; display: block; }
.board .oval { position: absolute; left: calc(var(--u) * var(--ov-x)); top: calc(var(--u) * (var(--fy) + var(--ov-y))); width: calc(var(--u) * var(--ov-w)); z-index: 1; }
.board .viewport { border: 0; border-radius: 0; box-shadow: none; background: #fbfaf4; }
.board .week-arrow { position: absolute; top: calc(var(--u) * (var(--fy) + var(--arr-y))); transform: translateY(-50%); width: calc(var(--u) * var(--arr-w)); height: calc(var(--u) * var(--arr-w)); z-index: 4; }
.board .week-arrow.prev { left: calc(var(--u) * var(--arr-x)); } .board .week-arrow.next { right: calc(var(--u) * var(--arr-x)); }
/* 換週箭頭：愛心圓按鈕圖（arrow-l / arrow-r 341×341），沒有上／下一週時淡淡顯示、不能點 */
.board .week-arrow .arr { width: 100%; height: 100%; border: 0; border-radius: 50%; background: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/arrow-l.bcb0a833.webp") center / contain no-repeat; font-size: 0; color: transparent; transition: transform 0.15s ease; }
.board .week-arrow.next .arr { background-image: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/arrow-r.309b7f0d.webp"); }
.board .week-arrow:hover .arr { background-color: transparent; transform: scale(1.08); }
.board .week-arrow:focus-visible { outline: 3px solid var(--green-deep); outline-offset: 2px; border-radius: 50%; }
.board .week-arrow[hidden] { visibility: hidden; pointer-events: none; }   /* 沒有上／下一週（例如第 1 週的左箭頭）就不顯示 */

/* 按鈕動態（設計 1120「天天搶優惠_按鈕動態規則」）
   1 輪流搖一下（::before，搖樹 0.8s → 澆水 3.8s → 祝福 6.8s，一輪 9 秒）
   2 白黃光一閃一閃（按鈕本身 filter，1.8 秒）
   3 按下壓扁、放開彈回　4 滑鼠移上去浮起（只有電腦）　5 目前位置那顆放大 4%
   6 點過一次（.tapped）就停掉 1、2；搶到了／搶完了／歷史週本來就不搖不發光 */
.board .act[aria-pressed="true"]:not(.locked):not(.ended) { transform: scale(1.04); }
@media (prefers-reduced-motion: no-preference) {
  .board .actions .act:not(.locked):not(.ended):not(.tapped) { animation: btn-glow 1.8s ease-in-out infinite; }
  .board .actions .act:not(.locked):not(.ended):not(.tapped)::before { animation: btn-wobble 9s ease-in-out var(--wd, 0s) infinite; }
  .board .act:not(.locked):not(.ended):active { transform: scale(1.05, .9); transition: transform .1s ease-out; }
  .board .act.locked:active { transform: scale(.97); transition: transform .1s ease-out; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .board .act:not(.locked):not(.ended):hover::before { animation-play-state: paused; }
  .board .act:not(.locked):not(.ended):hover:not(:active) { transform: translateY(calc(var(--u) * -4)); }
  .board .act[aria-pressed="true"]:not(.locked):not(.ended):hover:not(:active) { transform: translateY(calc(var(--u) * -4)) scale(1.04); }
}
@keyframes btn-wobble {
  0%, 10%, 100% { transform: none; }
  2% { transform: translateY(-2.5%) rotate(-3deg); }
  4% { transform: translateY(-3.5%) rotate(2.5deg); }
  6% { transform: translateY(-1%) rotate(-1.5deg); }
  8% { transform: rotate(.7deg); }
}
@keyframes btn-glow {
  0%, 100% { filter: drop-shadow(0 0 calc(var(--u) * 2) rgba(255, 255, 255, .7)) drop-shadow(0 0 calc(var(--u) * 4) rgba(255, 214, 90, .35)); }
  50% { filter: drop-shadow(0 0 calc(var(--u) * 6) rgba(255, 255, 255, 1)) drop-shadow(0 0 calc(var(--u) * 14) rgba(255, 206, 70, .9)); }
}
@media (prefers-reduced-motion: reduce) {
  .board .actions .act:not(.locked):not(.ended):not(.tapped) { filter: drop-shadow(0 0 calc(var(--u) * 5) rgba(255, 255, 255, .95)) drop-shadow(0 0 calc(var(--u) * 10) rgba(255, 206, 70, .7)); }
}

/* 彈跳視窗 */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.45); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: var(--radius); padding: 24px 20px 20px; display: grid; gap: 12px; }
.modal-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--fg-2); border-radius: 50%; }
#modalBody { display: grid; gap: 12px; }
.m-name { font-size: 14px; color: var(--fg-2); padding-right: 40px; }
#modalBody h3 { font-size: var(--h3); font-weight: 500; line-height: 1.4; }
.m-prize { font-size: 20px; font-weight: 700; color: var(--green-deep); line-height: 1.4; }
.m-desc { font-size: var(--small); line-height: 1.7; }
.m-note { font-size: 14px; color: var(--fg-2); line-height: 1.6; }
.m-state { font-size: var(--small); font-weight: 700; padding: 8px 12px; border-radius: var(--radius); background: var(--bg-soft); color: var(--green-deep); line-height: 1.6; }
.m-state.off { background: #f1f1f1; color: #595757; }
.m-state.err { background: #fdecea; color: #a12a1e; }
.m-only { font-size: 20px; font-weight: 700; text-align: center; padding: 24px 8px 8px; line-height: 1.5; }
/* 彈跳視窗的圖：放在最上方、稍微凸出視窗外，打開時「啵」一下彈出 */
.modal-card:has(.m-pic) { margin-top: 64px; overflow: visible; max-height: none; }
.m-pic { display: block; width: 200px; height: 200px; margin: -100px auto -4px; }
.m-pic + .m-only { padding-top: 0; }
@media (max-width: 767px) { .modal-card:has(.m-pic) { margin-top: 48px; } .m-pic { width: 160px; height: 160px; margin-top: -80px; } }
@media (prefers-reduced-motion: no-preference) {
  .m-pic { animation: pic-pop .45s cubic-bezier(.34,1.56,.64,1) both; }
}
@keyframes pic-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
/* 彈跳視窗大標置中 */
.modal-card h3 { text-align: center; }
.result { border-radius: var(--radius); background: var(--bg-soft); padding: 16px; text-align: center; display: grid; gap: 4px; }
.result.zhou { background: #fcefec; }
.result .amt { font-size: var(--h2); font-weight: 700; color: var(--green-deep); line-height: 1.3; font-variant-numeric: tabular-nums; }
.result.zhou .amt { color: var(--zhou-fg); }
.result .label { font-size: 14px; color: var(--fg-2); line-height: 1.6; }
html.modal-open { overflow: hidden; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: var(--radius); font-size: var(--small); font-weight: 700; text-decoration: none; border: 2px solid var(--green-deep); color: var(--green-deep); background: #fff; cursor: pointer; font-family: inherit; }
.cta:hover { background: var(--green-deep); color: #fff; }
.cta.zhou { border-color: var(--zhou-fg); color: var(--zhou-fg); }
.cta.zhou:hover { background: var(--zhou-fg); color: #fff; }

/* ───────── 共用區塊 ───────── */
.sec { padding-block: 48px; }
.sec .wrap { display: grid; gap: 24px; }
.sec.soft { background: var(--bg-soft); }
.sec-head { display: grid; gap: 4px; text-align: center; justify-items: center; }   /* 各區大標＋說明置中 */
.sec-head h2 { font-size: var(--h2); font-weight: 500; line-height: 1.3; }
.sec-head p { color: var(--fg-2); max-width: 40em; }
/* 設計師做的圖片主標（2561×721 透明 PNG）：桌機顯示 640 寬，手機跟著畫面寬縮，置中 */
h2.title-img { line-height: 0; width: 100%; margin: 0; }
h2.title-img img { display: block; width: min(100%, 640px); height: auto; margin: 0 auto; }

/* ② 推薦農友 */
.farmer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 900px) { .farmer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.farmer { background: #fff; border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto 1fr; color: inherit; }
.farmer img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #dfe6d6; }
.farmer .bd { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.farmer h3 { font-size: 20px; font-weight: 500; line-height: 1.4; }
.farmer .area { font-size: 14px; color: var(--fg-2); }
.farmer blockquote { margin: 0; font-size: var(--small); line-height: 1.6; }
.farmer .go { margin-top: auto; padding-top: 8px; display: flex; justify-content: center; }
/* 馬上看：用統一按鈕 .cta（黃色按鈕圖）；已售完維持原本的灰字樣式 */
.farmer .go .cta { width: 100%; max-width: 200px; }
@media (max-width: 767px) { .farmer .go .cta { max-width: 164px; } }
.farmer .go span { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 120px; padding: 0 16px; border-radius: var(--radius); font-size: var(--small); font-weight: 700; text-decoration: none; }
.farmer .go span { background: #e6e6e6; color: #595757; }
.farmer .tbd { font-size: 12px; color: #a12a1e; }

/* ③ 週週抽 */
/* 週週抽說明圖：桌機兩張並排（橫式），手機上下排（方形） */
.draw-fig img { display: block; width: 100%; height: auto; border-radius: var(--radius); }   /* 週週抽 BN 一張，滿版內容寬 */
.draw-fig { margin: 0; display: grid; gap: 12px; align-content: start; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gift-main { border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
@media (min-width: 768px) { .gift-main { grid-template-columns: 2fr 3fr; } }
.gift-main .pts { min-height: 160px; background: var(--bg-soft); color: var(--green-deep); font-size: var(--small); display: grid; align-content: center; text-align: center; line-height: 1.3; }
.gift-main .pts span { font-size: var(--h1); font-weight: 700; font-variant-numeric: tabular-nums; }
.gift-main .bd { padding: 24px; display: grid; gap: 8px; align-content: center; }
.gift-main .wk { color: var(--green-deep); font-weight: 700; }
.gift-main h3 { font-size: var(--h3); font-weight: 500; line-height: 1.4; }
.gift-main dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 8px 0 0; font-size: var(--small); line-height: 1.6; }
.gift-main dt { color: var(--fg-2); }
.gift-main dd { margin: 0; }
.bonus { border: 2px solid var(--gold); border-radius: var(--radius); padding: 24px; display: grid; gap: 8px; }
.bonus .tag { color: var(--gold-fg); font-weight: 700; font-size: var(--small); }
.bonus h3 { font-size: var(--h3); font-weight: 500; line-height: 1.4; }
.bonus p { font-size: var(--small); line-height: 1.6; color: var(--fg-2); }
.schedule { width: 100%; border-collapse: collapse; font-size: var(--small); line-height: 1.6; }
.schedule th, .schedule td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.schedule th { color: var(--fg-2); font-weight: 500; }
.schedule tr.now td { font-weight: 700; color: var(--green-deep); }
@media (max-width: 767px) {
  .schedule thead { display: none; }
  .schedule tr { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .schedule td { border: 0; padding: 0; }
  .schedule td:nth-child(3) { grid-column: 1 / -1; }
}

/* ④ 新客 */
/* 新客：BN 直接放在綠底上（不要白框），按鈕和註冊連結在圖下方置中 */
.newbie { display: grid; gap: 16px; justify-items: center; }
.newbie picture { display: block; width: 100%; }
.newbie-pic { display: block; width: 100%; height: auto; }
.newbie .big { font-size: var(--h1); font-weight: 700; color: var(--green-deep); line-height: 1.2; }
.newbie ul { margin: 8px 0 0; padding-left: 20px; font-size: var(--small); line-height: 1.8; color: var(--fg-2); }
.new-side { display: grid; gap: 8px; justify-items: center; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; width: 100%; border: 0; border-radius: var(--radius); background: var(--green-deep); color: #fff; font-size: 20px; font-weight: 700; cursor: pointer; text-decoration: none; padding: 0 24px; }
.btn-primary:hover { background: #006b00; }
.btn-primary:disabled { background: #e6e6e6; color: #595757; cursor: default; }
.new-note { margin: 0; font-size: var(--small); font-weight: 700; color: var(--green-deep); line-height: 1.6; text-align: center; }
.new-msg { font-size: var(--small); line-height: 1.6; }
.new-msg:empty { display: none; }
.text-link { font-size: var(--small); }

/* ⑤ 會員 */
.tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 900px) { .tiers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tier { background: #fff; border-radius: var(--radius); padding: 16px; display: grid; gap: 4px; align-content: start; border: 2px solid var(--line); }
.tier.top { border-color: var(--gold); }
.tier h3 { font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--green-deep); }
.tier.top h3 { color: var(--gold-fg); }
.tier .need { font-size: var(--small); font-weight: 500; line-height: 1.6; }
.tier dl { margin: 8px 0 0; display: grid; gap: 4px; font-size: var(--small); line-height: 1.6; }
.tier dt { color: var(--fg-2); margin-top: 4px; }
.tier dd { margin: 0; }

/* ⑥ 頁尾 CTA */
.final { text-align: center; }
.final .wrap { justify-items: center; }
.final h2 { font-size: var(--h2); font-weight: 500; }
.final p { color: var(--fg-2); }
.big-cta { width: auto; min-width: 200px; }

/* 統一按鈕（天天搖以外的 6 顆＋彈窗裡的按鈕）：黃色按鈕圖 btn-cta.png（601×169），滑過換橘色 btn-cta-hover.png
   桌機 200×56、字 18；手機 164×46、字 16（兩顆並排放得下 375 寬） */
.cta, .cta.zhou, .btn-primary, .btn-primary.big-cta {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  width: 200px; min-width: 0; height: 56px; min-height: 0; padding: 0 12px; border: 0; border-radius: 0;
  background: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/btn-cta.67497cbd.webp") center / 100% 100% no-repeat; color: #6b4423;
  font-size: 18px; font-weight: 700; letter-spacing: 1px; text-decoration: none; cursor: pointer; font-family: inherit;
  transition: transform .15s ease;
}
/* 橘色那張先疊在後面、透明，滑過再淡入（事先載好，不會閃） */
.cta::before, .btn-primary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/btn-cta-hover.cee12f06.webp") center / 100% 100% no-repeat; opacity: 0; transition: opacity .15s ease; }
.cta:hover, .cta.zhou:hover, .btn-primary:hover { background-color: transparent; color: #5a3519; transform: translateY(-1px); }
.cta:hover::before, .btn-primary:hover::before, .cta:focus-visible::before, .btn-primary:focus-visible::before { opacity: 1; }
.cta:active, .btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled, .btn-primary:disabled:hover { background: url("https://greenboxcdn.azureedge.net/upload/prod/campaign/anniversary-2026/btn-disabled.525649d8.webp") center / 100% 100% no-repeat; color: #6b6b6b; cursor: default; transform: none; }
.btn-primary:disabled::before { display: none; }
@media (max-width: 767px) {
  .cta, .cta.zhou, .btn-primary, .btn-primary.big-cta { width: 164px; height: 46px; font-size: 16px; letter-spacing: .5px; }
}
.foot { border-top: 1px solid var(--line); }
.foot .wrap { padding-block: 24px 96px; font-size: 14px; color: var(--fg-2); line-height: 1.6; display: grid; gap: 8px; }

/* 預覽工具 */
.preview-panel { position: fixed; left: 12px; bottom: 12px; z-index: 50; font-size: 14px; line-height: 1.5; }
.pp-toggle { background: #5c4a00; color: #fff; border: 0; border-radius: var(--radius); padding: 8px 16px; font-weight: 700; cursor: pointer; min-height: 40px; }
.pp-body { margin-top: 8px; background: #fffbe6; border: 2px solid #5c4a00; border-radius: var(--radius); padding: 12px; display: grid; gap: 8px; width: 260px; }
.pp-body select, .pp-body button { font: inherit; min-height: 36px; width: 100%; }
.pp-body label { display: grid; gap: 4px; }
.pp-body .pp-check { display: flex; gap: 8px; align-items: center; }
.pp-note { color: #5c4a00; font-size: 12px; }
.preview-panel[hidden], .pp-body[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .artwork.snap, .greets { transition: none; }
  .sway.shaking, .root-glow.on { animation: none; }
}

/* ───── 版位調整面板（預覽用，上線前連同 js/layout-tuner.js 移除） ───── */
.lt-open { position: fixed; right: 12px; bottom: 12px; z-index: 55; padding: 8px 16px; border: 0; border-radius: 999px; background: #5a3e24; color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.lt-open[hidden], .lt-panel[hidden], .lt-warn[hidden] { display: none; }
.lt-panel { position: fixed; right: 12px; top: 72px; z-index: 55; width: 300px; max-height: calc(100vh - 88px); overflow-y: auto; background: #fff; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.25); padding: 12px 14px; font-size: 13px; line-height: 1.5; color: #333; display: grid; gap: 8px; }
.lt-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.lt-panel.left { right: auto; left: 12px; }
.lt-side { border: 1px solid #c9b08f; border-radius: 6px; background: #fff; font: inherit; font-size: 12px; padding: 2px 8px; cursor: pointer; margin-right: 6px; }
.lt-x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: #666; }
.lt-note, .lt-calc { color: #666; font-size: 12px; margin: 0; }
.lt-calc { color: #5a3e24; font-weight: 700; }
.lt-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.lt-tabs button { padding: 6px 2px; font-size: 12px; }
.lt-tabs button, .lt-row button, .lt-copy { padding: 6px 8px; border: 1px solid #c9b08f; border-radius: 8px; background: #fff; font: inherit; cursor: pointer; }
.lt-tabs button.on { background: #5a3e24; border-color: #5a3e24; color: #fff; font-weight: 700; }
.lt-f { display: grid; grid-template-columns: 72px 1fr 64px; gap: 6px; align-items: center; }
.lt-f input[type=number] { width: 100%; padding: 2px 4px; font: inherit; border: 1px solid #ccc; border-radius: 6px; }
.lt-f input[type=range] { width: 100%; accent-color: #5a3e24; }
.lt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.lt-out { width: 100%; font: 12px/1.5 ui-monospace, Menlo, monospace; border: 1px solid #ddd; border-radius: 6px; padding: 6px; resize: vertical; color: #333; }
.lt-copy { background: #008000; border-color: #008000; color: #fff; font-weight: 700; }
.lt-msg { margin: 0; min-height: 1.5em; color: #008000; font-weight: 700; }
.lt-warn { margin: 0; color: #b42318; font-weight: 700; }
.lt-on .board .actions, .lt-on .board .act-hint, .lt-on .board .down-hint { outline: 2px dashed rgba(90,62,36,.6); outline-offset: 2px; cursor: move; }
.lt-on .board .actions.lt-sel, .lt-on .board .act-hint.lt-sel, .lt-on .board .down-hint.lt-sel { outline: 2px dashed #e5484d; }
.lt-on .board .act { cursor: move; }
/* 手機：面板改成下方抽屜，不擋住木板上半部 */
@media (max-width: 767px) {
  .lt-panel, .lt-panel.left { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 46vh; padding: 10px 12px; gap: 6px; }
  .lt-side, .lt-note { display: none; }
  .lt-out { height: 4.5em; }
  .lt-tabs button { font-size: 11px; padding: 4px 1px; white-space: nowrap; overflow: hidden; }
}

/* 按鈕小字：手機才換行 */
.m-br { display: none; }
@media (max-width: 767px) { .m-br { display: inline; } .d-only { display: none; } }

/* 祝福語輪換：淡入淡出 */
.bubble { opacity: 0; transition: opacity 1s ease; }
.bubble.in { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .bubble { transition: none; } }

/* 搖樹／澆水彈窗（設計稿 1119） */
.m-pv { margin: 0; text-align: center; font-size: 13px; color: var(--fg-2); }
.m-title { margin: 0; text-align: center; font-size: 26px; font-weight: 700; color: #222; line-height: 1.4; }
.m-sub { margin: -4px 0 0; text-align: center; font-size: 15px; color: var(--fg-2); }
.m-amt { margin: 0; text-align: center; font-size: 44px; font-weight: 900; color: #2e8b1e; line-height: 1.2; font-variant-numeric: tabular-nums; }
.m-amt.zhou { color: #7a4a24; }
.m-cond { margin: 0 auto; width: 100%; max-width: 420px; box-sizing: border-box; padding: 14px 16px; border-radius: 16px; background: #eef5e4; text-align: center; font-size: 17px; line-height: 1.8; color: #444; }
.m-cond.zhou { background: #fcecec; }
.cta-row.three { flex-wrap: nowrap; gap: 10px; }
.cta-row.three .cta { width: 150px; }
@media (max-width: 767px) {
  .m-title { font-size: 20px; }
  .m-amt { font-size: 34px; }
  .m-cond { font-size: 14px; padding: 10px 12px; }
  .cta-row.three { gap: 6px; }
  .cta-row.three .cta { width: 98px; height: 40px; font-size: 14px; letter-spacing: 0; padding: 0 4px; }
}

/* 按鈕下方提示：奶油底紅字框（1120） */
.board .act-hint { display: grid; place-items: center; }
.board .act-hint .hint-pill { display: inline-block; padding: calc(var(--u) * 6) calc(var(--u) * 18); border-radius: 999px; background: #fff8e6; color: #c0392b; font-weight: 900; font-size: calc(var(--u) * 18); letter-spacing: calc(var(--u) * 1); line-height: 1.4; box-shadow: 0 calc(var(--u) * 2) 0 #e8c98a; white-space: nowrap; }
.board .act-hint.off .hint-pill { color: #7a5230; }
@media (max-width: 767px) {
  .board .act-hint .hint-pill { font-size: calc(var(--u) * 12.5); padding: calc(var(--u) * 6) calc(var(--u) * 12); letter-spacing: 0; }
}

/* 長祝福語自己一格：置中、比較寬（1120） */
.bubble.solo { left: 50%; top: 44%; right: auto; max-width: 58%; transform: translate(-50%, -50%); font-size: 15px; line-height: 1.7; padding: 12px 20px; }
.bubble.solo::after { left: calc(50% - 6px); right: auto; }
@media (max-width: 767px) {
  .bubble.solo { max-width: 88%; width: 88%; top: 46%; font-size: 12.5px; line-height: 1.6; padding: 8px 12px; }
}

/* 頁尾活動辦法（1125） */
.foot .wrap { gap: 16px; }
.foot .rules-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--fg); }
.foot .rule h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--fg); }
.foot .rule ul { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.foot .rule li { line-height: 1.7; }
.foot .rule a { color: var(--green-deep); text-decoration: underline; }
.foot .rule-note { margin: 0; }

/* ───────── 導覽列（1201）─────────
   電腦版：logo 在最左邊（點了回首頁），錨點維持置中；icon 只有手機版顯示
   手機版：上方 sticky 只剩置中 logo；錨點變成固定在底部的 4 格（上 icon 下字，白底），會員獨享不放 */
.anchor-nav { display: flex; align-items: center; }
.anchor-nav .nav-logo { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); display: flex; align-items: center; min-height: 0; padding: 0; border: 0; }
.anchor-nav .nav-logo img { display: block; height: 34px; width: auto; }
.anchor-nav ul { flex: 1 1 auto; }
.anchor-nav .nav-ic { display: none; }
@media (min-width: 768px) and (max-width: 1100px) {
  /* 中等寬度：logo 佔位，錨點往右讓開，避免疊在一起 */
  .anchor-nav { padding-left: 156px; }
}
@media (max-width: 767px) {
  .anchor-nav { justify-content: center; min-height: 52px; }
  .anchor-nav .nav-logo { position: static; transform: none; }
  .anchor-nav .nav-logo img { height: 32px; }
  .anchor-nav ul { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-width: none; margin: 0; padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px)); overflow: visible; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06); }
  .anchor-nav li { flex: 1 1 0; min-width: 0; }
  .anchor-nav li:first-child, .anchor-nav li:last-child { margin: 0; }
  .anchor-nav li.nav-vip { display: none; }
  .anchor-nav ul a { flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 2px 0; border-bottom: 0; font-size: 12px; line-height: 1.2; letter-spacing: 0; }
  .anchor-nav ul a span { white-space: nowrap; }
  .anchor-nav .nav-ic { display: block; width: 30px; height: 30px; object-fit: contain; }
  .anchor-nav ul a[aria-current="true"] { color: var(--green-deep); font-weight: 700; }
  /* 底部導覽列佔掉的高度：頁尾多留空白，不被蓋住 */
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
}
