/* ==========================================================
   線上求籤｜藏傳佛教風格 design tokens  v1
   用法：
   1. 下面這行 @import 必須是 <style> 內的第一條規則
      （或改成 <link rel="stylesheet" href="同一個網址">放在區塊最前面）。
   2. .lf-root{...} 裡的變數可以整段貼進現有的 .lf-root 規則。
   字型：Noto Serif TC（中文明體 400/700）＋ Noto Serif Tibetan（只給六字真言裝飾用）
   兩個 Google Fonts 家族，display=swap。
   ========================================================== */


.lf-root{
  /* ---- 底：唐卡布面與貝葉經紙 ---- */
  --lf-paper:#F4EBD9;        /* 主底色：酥油燈下的布面（呼應官網 #F3ECDA） */
  --lf-leaf:#FBF6EC;         /* 浮起卡片：貝葉經長條紙 */
  --lf-paper-2:#EADCC0;      /* 次級面：提醒框、完成狀態 */
  --lf-hairline:#D9C39A;     /* 純裝飾細線（不承擔辨識功能） */
  --lf-rule:#9A7640;         /* 元件邊框（按鈕、分頁）≥3:1 非文字對比 */

  /* ---- 墨 ---- */
  --lf-ink:#2A1A14;          /* 主文字 */
  --lf-ink-2:#5E4838;        /* 次文字、說明 */

  /* ---- 絳紅：僧袍 ---- */
  --lf-maroon:#7A1F22;       /* 品牌主色：主按鈕、目前步驟、已選方向 */
  --lf-maroon-deep:#561417;  /* 標題字、主按鈕 hover */
  --lf-vermilion:#A8262E;    /* 印章紅（對應 logo 字色）：「吉」印、貝葉邊線 */

  /* ---- 金與番紅花：酥油燈、銅器 ---- */
  --lf-gold:#B8892B;         /* 裝飾金：框線、紋樣（不可當文字） */
  --lf-gold-lt:#E9C46A;      /* 燈光、深底上的金線 */
  --lf-gold-text:#7A5A12;    /* 要當文字用的金 */
  --lf-saffron:#D98A1C;      /* 番紅花：蓮花、小菱形點綴（不可當文字） */
  --lf-copper:#8A4B2A;       /* 籤筒銅身 */
  --lf-wood:#D9B98A;         /* 籤枝竹色 */

  /* ---- 青金石：次要導覽 ---- */
  --lf-lapis:#22407A;        /* 方向分頁選中、焦點框、「宜守」、籤詩卡錦緞 */

  /* ---- 五色（風馬旗順序：藍白紅綠黃）只用在頂端 5px 彩條 ---- */
  --lf-wf-blue:#2B5BA8;
  --lf-wf-white:#F7F3EA;
  --lf-wf-red:#B8322B;
  --lf-wf-green:#2E7D4F;
  --lf-wf-yellow:#E0A526;

  /* ---- 外部品牌 ---- */
  --lf-line-bg:#00843E;      /* LINE 綠加深版：白字 4.81:1（官方 #06C755 白字只有 2.26:1） */
  --lf-line-bg-hover:#006B32;
  --lf-line-fg:#FFFFFF;
  --lf-wa-bg:#075E54;        /* WhatsApp 深綠（官方 Teal Green）：白字 7.7:1 */
  --lf-wa-bg-hover:#054640;

  /* ---- 光 ---- */
  --lf-lamp:rgba(233,196,106,.42);   /* 酥油燈光暈 */
  --lf-shadow:rgba(42,26,20,.22);

  /* ---- 字體 ---- */
  --lf-font:"Noto Serif TC","Songti TC","Source Han Serif TC","PMingLiU",serif;
  --lf-font-bo:"Noto Serif Tibetan","Microsoft Himalaya","Kokonor",serif;
  --lf-fs-xs:12px;   /* 出處、備註 */
  --lf-fs-sm:13px;   /* 步驟列、標籤、提醒 */
  --lf-fs-ui:15px;   /* 說明、次要按鈕 */
  --lf-fs-base:16px; /* 內文 */
  --lf-fs-md:18px;   /* 主按鈕、摘要 */
  --lf-fs-lg:22px;   /* 標題、籤號、籤詩 */
  --lf-fs-xl:28px;   /* 筊象名稱 */
  --lf-track-label:.12em;
  --lf-track-title:.08em;
  --lf-track-poem:.25em;
  --lf-track-seal:.3em;

  /* ---- 形狀 ---- */
  --lf-r:2px;               /* 幾近方角：經書、印章 */
  --lf-frame:5px;           /* 唐卡錦緞框寬 */
  --lf-frame-foot:12px;     /* 唐卡下緣較寬 */

  /* ---- 動態 ---- */
  --lf-ease-ritual:cubic-bezier(.33,0,.2,1);  /* 慢起、長收，不回彈 */
  --lf-ease-out:cubic-bezier(.22,.61,.36,1);
  --lf-dur-fast:.2s;
  --lf-dur-enter:.6s;
  --lf-dur-breathe:4.8s;
  --lf-dur-wheel:60s;
}

/* ==========================================================
   線上求籤｜藏傳佛教風格 元件樣式  v1
   - 取代 snippet.html 內現有 <style> 的「元件」部分；
     最終 <style> = tokens.css 內容 + 本檔內容（@import 放最前面）。
   - 全部以 .lf-root 開頭；class 對應 src/snippet.html。
   - 紋樣以 data URI 內嵌（mask），無外部參照。
   - 新增（選用）：.lf-mantra、#lf-verdict[data-v]，見 視覺規格.md §7。
   ========================================================== */

/* ---------- 0. 基礎與主題防護（Hello Elementor reset 會把 button 染成 #c36） ---------- */
.lf-root{position:relative;isolation:isolate;max-width:600px;margin:24px auto;padding:30px 18px 30px;
  background-color:var(--lf-paper);
  background-image:repeating-linear-gradient(0deg,rgba(90,60,20,.035) 0 1px,transparent 1px 3px),
                   repeating-linear-gradient(90deg,rgba(90,60,20,.028) 0 1px,transparent 1px 3px);
  border:var(--lf-frame) solid var(--lf-maroon);border-bottom-width:var(--lf-frame-foot);border-radius:0;
  box-shadow:inset 0 0 0 1px var(--lf-gold),inset 0 0 0 4px var(--lf-paper),inset 0 0 0 5px var(--lf-hairline);
  color:var(--lf-ink);font-family:var(--lf-font);font-size:var(--lf-fs-base);line-height:1.75;
  box-sizing:border-box;overflow-wrap:anywhere;-webkit-text-size-adjust:100%;container:lf/inline-size}
.lf-root *,.lf-root *::before,.lf-root *::after{box-sizing:border-box}
.lf-root [hidden]{display:none!important}
.lf-root p{margin:0}
.lf-root button{font-family:inherit;line-height:1.4;text-transform:none;white-space:normal;margin:0;-webkit-tap-highlight-color:transparent}

/* 頂端五色彩條（唐卡「虹」條／風馬旗五色） */
.lf-root::before{content:"";position:absolute;left:0;right:0;top:0;height:5px;z-index:-1;pointer-events:none;
  background:linear-gradient(90deg,var(--lf-wf-blue) 0 20%,var(--lf-wf-white) 20% 40%,var(--lf-wf-red) 40% 60%,var(--lf-wf-green) 60% 80%,var(--lf-wf-yellow) 80% 100%)}
/* 四角錦緞角飾 */
.lf-root::after{content:"";position:absolute;inset:10px;z-index:-1;pointer-events:none;background:var(--lf-gold);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='square'%3E%3Cpath stroke-width='2' d='M1 31V1H31'/%3E%3Cpath stroke-width='1' d='M6 31V6H31'/%3E%3Cpath stroke-width='1.6' d='M10.5 22V10.5H22V17.5H15V14.5H18.5'/%3E%3C/g%3E%3Ccircle cx='26' cy='26' r='1.4' fill='currentColor'/%3E%3C/svg%3E") left top/22px 22px no-repeat,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg transform='matrix(-1 0 0 1 32 0)'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='square'%3E%3Cpath stroke-width='2' d='M1 31V1H31'/%3E%3Cpath stroke-width='1' d='M6 31V6H31'/%3E%3Cpath stroke-width='1.6' d='M10.5 22V10.5H22V17.5H15V14.5H18.5'/%3E%3C/g%3E%3Ccircle cx='26' cy='26' r='1.4' fill='currentColor'/%3E%3C/g%3E%3C/svg%3E") right top/22px 22px no-repeat,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg transform='matrix(1 0 0 -1 0 32)'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='square'%3E%3Cpath stroke-width='2' d='M1 31V1H31'/%3E%3Cpath stroke-width='1' d='M6 31V6H31'/%3E%3Cpath stroke-width='1.6' d='M10.5 22V10.5H22V17.5H15V14.5H18.5'/%3E%3C/g%3E%3Ccircle cx='26' cy='26' r='1.4' fill='currentColor'/%3E%3C/g%3E%3C/svg%3E") left bottom/22px 22px no-repeat,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg transform='matrix(-1 0 0 -1 32 32)'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='square'%3E%3Cpath stroke-width='2' d='M1 31V1H31'/%3E%3Cpath stroke-width='1' d='M6 31V6H31'/%3E%3Cpath stroke-width='1.6' d='M10.5 22V10.5H22V17.5H15V14.5H18.5'/%3E%3C/g%3E%3Ccircle cx='26' cy='26' r='1.4' fill='currentColor'/%3E%3C/g%3E%3C/svg%3E") right bottom/22px 22px no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='square'%3E%3Cpath stroke-width='2' d='M1 31V1H31'/%3E%3Cpath stroke-width='1' d='M6 31V6H31'/%3E%3Cpath stroke-width='1.6' d='M10.5 22V10.5H22V17.5H15V14.5H18.5'/%3E%3C/g%3E%3Ccircle cx='26' cy='26' r='1.4' fill='currentColor'/%3E%3C/svg%3E") left top/22px 22px no-repeat,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg transform='matrix(-1 0 0 1 32 0)'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='square'%3E%3Cpath stroke-width='2' d='M1 31V1H31'/%3E%3Cpath stroke-width='1' d='M6 31V6H31'/%3E%3Cpath stroke-width='1.6' d='M10.5 22V10.5H22V17.5H15V14.5H18.5'/%3E%3C/g%3E%3Ccircle cx='26' cy='26' r='1.4' fill='currentColor'/%3E%3C/g%3E%3C/svg%3E") right top/22px 22px no-repeat,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg transform='matrix(1 0 0 -1 0 32)'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='square'%3E%3Cpath stroke-width='2' d='M1 31V1H31'/%3E%3Cpath stroke-width='1' d='M6 31V6H31'/%3E%3Cpath stroke-width='1.6' d='M10.5 22V10.5H22V17.5H15V14.5H18.5'/%3E%3C/g%3E%3Ccircle cx='26' cy='26' r='1.4' fill='currentColor'/%3E%3C/g%3E%3C/svg%3E") left bottom/22px 22px no-repeat,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg transform='matrix(-1 0 0 -1 32 32)'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='square'%3E%3Cpath stroke-width='2' d='M1 31V1H31'/%3E%3Cpath stroke-width='1' d='M6 31V6H31'/%3E%3Cpath stroke-width='1.6' d='M10.5 22V10.5H22V17.5H15V14.5H18.5'/%3E%3C/g%3E%3Ccircle cx='26' cy='26' r='1.4' fill='currentColor'/%3E%3C/g%3E%3C/svg%3E") right bottom/22px 22px no-repeat}

/* 焦點：一律青金石框 */
.lf-root .lf-btn:focus-visible,.lf-root .lf-link:focus-visible,.lf-root .lf-dir:focus-visible,.lf-root .lf-tab:focus-visible{
  outline:2px solid var(--lf-lapis);outline-offset:3px;box-shadow:none}

/* ---------- 1. 步驟列 ---------- */
.lf-root .lf-progress{display:flex;justify-content:center;align-items:center;gap:6px;margin:0 0 22px;padding:0;list-style:none;
  font-size:var(--lf-fs-sm);letter-spacing:var(--lf-track-title);color:var(--lf-ink-2)}
.lf-root .lf-progress li{display:flex;align-items:center;gap:6px;margin:0;padding:0;white-space:nowrap}
.lf-root .lf-progress li+li::before{content:"";width:20px;height:0;border-top:1px dashed var(--lf-rule)}
.lf-root .lf-progress b{display:inline-flex;width:26px;height:26px;align-items:center;justify-content:center;flex:none;
  border:1px solid var(--lf-rule);border-radius:var(--lf-r);background:var(--lf-leaf);color:var(--lf-ink-2);font-weight:700;letter-spacing:0}
.lf-root .lf-progress li.lf-cur{color:var(--lf-maroon);font-weight:700}
.lf-root .lf-progress li.lf-cur b{background:var(--lf-maroon);border-color:var(--lf-maroon);color:#fff;
  box-shadow:inset 0 0 0 2px var(--lf-maroon),inset 0 0 0 3px var(--lf-gold-lt)}
.lf-root .lf-progress li.lf-done b{background:var(--lf-paper-2);border-color:var(--lf-gold-text);color:var(--lf-gold-text)}
.lf-root .lf-progress li.lf-done+li::before{border-top-style:solid;border-color:var(--lf-gold)}

/* ---------- 2. 面板與標題 ---------- */
.lf-root .lf-panel{display:none;text-align:center}
.lf-root[data-step="0"] .lf-p0,.lf-root[data-step="1"] .lf-p1,.lf-root[data-step="2"] .lf-p2,
.lf-root[data-step="3"] .lf-p3,.lf-root[data-step="4"] .lf-p4{display:block;animation:lf-enter var(--lf-dur-enter) var(--lf-ease-out) both}
@keyframes lf-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.lf-root .lf-p0::before{content:"";display:block;width:34px;height:34px;margin:-4px auto 10px;background:var(--lf-gold);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg transform='rotate(45 24 24)' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 14H34M14 24H34M14 34H34M14 14V34M24 14V34M34 14V34'/%3E%3Cpath d='M14 14A5 5 0 0 1 24 14M24 14A5 5 0 0 1 34 14M34 14A5 5 0 0 1 34 24M34 24A5 5 0 0 1 34 34M34 34A5 5 0 0 1 24 34M24 34A5 5 0 0 1 14 34M14 34A5 5 0 0 1 14 24M14 24A5 5 0 0 1 14 14'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg transform='rotate(45 24 24)' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 14H34M14 24H34M14 34H34M14 14V34M24 14V34M34 14V34'/%3E%3Cpath d='M14 14A5 5 0 0 1 24 14M24 14A5 5 0 0 1 34 14M34 14A5 5 0 0 1 34 24M34 24A5 5 0 0 1 34 34M34 34A5 5 0 0 1 24 34M24 34A5 5 0 0 1 14 34M14 34A5 5 0 0 1 14 24M14 24A5 5 0 0 1 14 14'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat}
.lf-root .lf-title{font-size:var(--lf-fs-lg);font-weight:700;letter-spacing:var(--lf-track-title);line-height:1.5;margin:0 0 6px;color:var(--lf-maroon-deep)}
.lf-root .lf-sub{color:var(--lf-ink-2);font-size:var(--lf-fs-ui)}
.lf-root .lf-mantra{font-family:var(--lf-font-bo);font-size:18px;line-height:1.8;color:var(--lf-gold-text);margin:0 0 10px;letter-spacing:0}

/* ---------- 3. 方向按鈕 ---------- */
.lf-root .lf-dirs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:18px 0 16px}
.lf-root .lf-dir{position:relative;min-height:48px;padding:10px 0;border:1px solid var(--lf-rule);border-radius:var(--lf-r);
  background:var(--lf-leaf);color:var(--lf-ink);font-size:17px;font-weight:400;letter-spacing:.1em;cursor:pointer;
  transition:background-color var(--lf-dur-fast),border-color var(--lf-dur-fast),color var(--lf-dur-fast)}
.lf-root .lf-dir:hover,.lf-root .lf-dir:focus{background:var(--lf-paper-2);border-color:var(--lf-maroon);color:var(--lf-ink)}
.lf-root .lf-dir[aria-pressed="true"],.lf-root .lf-dir[aria-pressed="true"]:hover,.lf-root .lf-dir[aria-pressed="true"]:focus{
  background:var(--lf-maroon);border-color:var(--lf-maroon);color:#fff;font-weight:700}
.lf-root .lf-dir[aria-pressed="true"]::before{content:"";position:absolute;inset:3px;border:1px solid var(--lf-gold-lt);pointer-events:none}

/* 四步說明：貝葉經小卡 */
.lf-root .lf-how{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:4px 0 20px;text-align:left}
.lf-root .lf-how div{background:var(--lf-leaf);border:1px solid var(--lf-hairline);border-left:3px double var(--lf-vermilion);
  padding:10px 10px 10px 12px;font-size:var(--lf-fs-sm);line-height:1.6;color:var(--lf-ink-2)}
.lf-root .lf-how strong{display:block;color:var(--lf-maroon);font-size:14px;letter-spacing:var(--lf-track-title);margin-bottom:2px}

/* ---------- 4. 主按鈕 ---------- */
.lf-root .lf-btn{position:relative;overflow:hidden;display:inline-block;min-width:220px;max-width:100%;min-height:52px;
  padding:14px 32px;border:0;border-radius:var(--lf-r);background:var(--lf-maroon);color:#fff;
  font-size:var(--lf-fs-md);font-weight:700;letter-spacing:.16em;cursor:pointer;box-shadow:0 2px 0 var(--lf-maroon-deep);
  touch-action:none;-webkit-user-select:none;user-select:none;
  transition:background-color var(--lf-dur-fast),transform var(--lf-dur-fast)}
.lf-root .lf-btn::before{content:"";position:absolute;inset:4px;border:1px solid var(--lf-gold-lt);opacity:.85;pointer-events:none}
.lf-root .lf-btn:hover,.lf-root .lf-btn:focus{background:var(--lf-maroon-deep);color:#fff}
.lf-root .lf-btn:active{transform:translateY(1px);box-shadow:0 1px 0 var(--lf-maroon-deep)}
.lf-root .lf-btn[disabled],.lf-root .lf-btn[disabled]:hover{background:var(--lf-paper-2);color:var(--lf-ink-2);box-shadow:none;cursor:default;transform:none}
.lf-root .lf-btn[disabled]::before{border-color:var(--lf-hairline)}
/* 按住進度：金線由左而右 */
.lf-root .lf-btn .lf-bar{position:absolute;left:0;bottom:0;height:3px;width:0;background:var(--lf-gold-lt)}
.lf-root.lf-holding .lf-btn .lf-bar{width:100%;transition:width .8s linear}
/* 按住的按鈕：手機長按不跳選單、不選字、不當成雙擊縮放 */
.lf-root #lf-shake,.lf-root #lf-toss{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;touch-action:manipulation}

/* 次要連結按鈕 */
.lf-root .lf-link{display:inline-block;min-height:44px;padding:10px 20px;border:1px solid var(--lf-maroon);border-radius:var(--lf-r);
  background:var(--lf-leaf);color:var(--lf-maroon);font-size:var(--lf-fs-ui);font-weight:700;letter-spacing:var(--lf-track-title);
  line-height:1.5;text-decoration:none;cursor:pointer;transition:background-color var(--lf-dur-fast),color var(--lf-dur-fast)}
.lf-root .lf-link:hover,.lf-root .lf-link:focus{background:var(--lf-paper-2);color:var(--lf-maroon-deep);text-decoration:none}
.lf-root .lf-link.lf-line{background:var(--lf-line-bg);border-color:var(--lf-line-bg);color:var(--lf-line-fg)}
.lf-root .lf-link.lf-line:hover,.lf-root .lf-link.lf-line:focus{background:var(--lf-line-bg-hover);border-color:var(--lf-line-bg-hover);color:var(--lf-line-fg)}
.lf-root .lf-link.lf-wa{background:var(--lf-wa-bg);border-color:var(--lf-wa-bg);color:#fff}
.lf-root .lf-link.lf-wa:hover,.lf-root .lf-link.lf-wa:focus{background:var(--lf-wa-bg-hover);border-color:var(--lf-wa-bg-hover);color:#fff}
.lf-root .lf-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:14px}

/* 提示與所問 */
.lf-root .lf-hint{min-height:1.8em;color:var(--lf-ink-2);font-size:var(--lf-fs-ui);margin:6px 0 12px}
.lf-root .lf-q{display:inline-block;max-width:100%;margin:0 0 10px;padding:6px 14px;background:var(--lf-leaf);
  border:1px solid var(--lf-hairline);border-left:3px double var(--lf-vermilion);border-right:3px double var(--lf-vermilion);
  font-size:var(--lf-fs-ui);color:var(--lf-ink)}

/* ---------- 5. 籤筒（銅器＋轉經輪光） ---------- */
.lf-root .lf-tube-wrap,.lf-root .lf-stage{position:relative;isolation:isolate}
.lf-root .lf-tube-wrap{height:270px;display:flex;align-items:flex-end;justify-content:center;margin-bottom:6px}
/* 酥油燈光暈 */
.lf-root .lf-tube-wrap::before,.lf-root .lf-stage::before{content:"";position:absolute;left:50%;bottom:0;width:240px;height:200px;
  margin-left:-120px;z-index:-2;pointer-events:none;border-radius:50%;
  background:radial-gradient(closest-side,var(--lf-lamp),transparent);animation:lf-lamp var(--lf-dur-breathe) ease-in-out infinite alternate}
@keyframes lf-lamp{from{opacity:.55;transform:scale(.96)}to{opacity:1;transform:scale(1.04)}}
/* 法輪浮水印：順時針慢轉（轉經方向） */
.lf-root .lf-tube-wrap::after{content:"";position:absolute;left:50%;top:0;width:150px;height:150px;margin-left:-75px;z-index:-1;
  pointer-events:none;background:var(--lf-gold);opacity:.16;transition:opacity .6s;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round'%3E%3Ccircle cx='32' cy='32' r='21.5' stroke-width='3'/%3E%3Ccircle cx='32' cy='32' r='17.5' stroke-width='1'/%3E%3Ccircle cx='32' cy='32' r='5' stroke-width='2.5'/%3E%3Cpath stroke-width='2.2' d='M38.5 34.7L50.0 39.5M34.7 38.5L39.5 50.0M29.3 38.5L24.5 50.0M25.5 34.7L14.0 39.5M25.5 29.3L14.0 24.5M29.3 25.5L24.5 14.0M34.7 25.5L39.5 14.0M38.5 29.3L50.0 24.5'/%3E%3C/g%3E%3Cg fill='currentColor'%3E%3Ccircle cx='56.5' cy='42.1' r='2.4'/%3E%3Ccircle cx='42.1' cy='56.5' r='2.4'/%3E%3Ccircle cx='21.9' cy='56.5' r='2.4'/%3E%3Ccircle cx='7.5' cy='42.1' r='2.4'/%3E%3Ccircle cx='7.5' cy='21.9' r='2.4'/%3E%3Ccircle cx='21.9' cy='7.5' r='2.4'/%3E%3Ccircle cx='42.1' cy='7.5' r='2.4'/%3E%3Ccircle cx='56.5' cy='21.9' r='2.4'/%3E%3Ccircle cx='32' cy='32' r='1.8'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round'%3E%3Ccircle cx='32' cy='32' r='21.5' stroke-width='3'/%3E%3Ccircle cx='32' cy='32' r='17.5' stroke-width='1'/%3E%3Ccircle cx='32' cy='32' r='5' stroke-width='2.5'/%3E%3Cpath stroke-width='2.2' d='M38.5 34.7L50.0 39.5M34.7 38.5L39.5 50.0M29.3 38.5L24.5 50.0M25.5 34.7L14.0 39.5M25.5 29.3L14.0 24.5M29.3 25.5L24.5 14.0M34.7 25.5L39.5 14.0M38.5 29.3L50.0 24.5'/%3E%3C/g%3E%3Cg fill='currentColor'%3E%3Ccircle cx='56.5' cy='42.1' r='2.4'/%3E%3Ccircle cx='42.1' cy='56.5' r='2.4'/%3E%3Ccircle cx='21.9' cy='56.5' r='2.4'/%3E%3Ccircle cx='7.5' cy='42.1' r='2.4'/%3E%3Ccircle cx='7.5' cy='21.9' r='2.4'/%3E%3Ccircle cx='21.9' cy='7.5' r='2.4'/%3E%3Ccircle cx='42.1' cy='7.5' r='2.4'/%3E%3Ccircle cx='56.5' cy='21.9' r='2.4'/%3E%3Ccircle cx='32' cy='32' r='1.8'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
  animation:lf-wheel var(--lf-dur-wheel) linear infinite}
.lf-root.lf-holding .lf-tube-wrap::after{opacity:.32}
@keyframes lf-wheel{to{transform:rotate(360deg)}}

.lf-root .lf-tube{position:relative;width:110px;height:200px;transform-origin:50% 100%}
.lf-root .lf-tube-body{position:absolute;left:0;right:0;bottom:0;height:130px;z-index:2;border-radius:6px 6px 12px 12px;
  border-top:5px solid var(--lf-gold);border-bottom:6px solid var(--lf-gold);
  background:linear-gradient(90deg,#5A2A17 0,var(--lf-copper) 22%,#B9774A 42%,var(--lf-copper) 64%,#4E2414 100%);
  box-shadow:inset 0 1px 0 var(--lf-gold-lt),inset 0 10px 12px -8px rgba(0,0,0,.35),0 3px 8px var(--lf-shadow)}
.lf-root .lf-tube-body::before{content:"籤";position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);
  width:52px;height:52px;display:flex;align-items:center;justify-content:center;border:3px double var(--lf-gold-lt);border-radius:50%;
  color:var(--lf-gold-lt);font-size:26px;font-weight:700;line-height:1}
.lf-root .lf-stick{position:absolute;bottom:60px;width:9px;height:120px;z-index:1;border-radius:2px 2px 0 0;transform-origin:50% 100%;
  background:linear-gradient(90deg,#B98E5A,#E2C595 55%,#C9A172);border-top:6px solid var(--lf-vermilion)}
.lf-root .lf-stick.lf-pick{z-index:3;width:26px;left:42px!important;padding-top:6px;opacity:0;
  display:flex;align-items:center;justify-content:flex-start;writing-mode:vertical-rl;
  background:#EAD3A6;border-top:10px solid var(--lf-vermilion);color:var(--lf-maroon-deep);
  font-size:14px;font-weight:700;letter-spacing:3px;box-shadow:0 0 0 1px var(--lf-gold),0 3px 8px var(--lf-shadow)}
.lf-root .lf-drawn .lf-stick.lf-pick{animation:lf-rise .9s var(--lf-ease-ritual) both}
@keyframes lf-rise{0%{opacity:0;transform:translateY(0)}15%{opacity:1}100%{opacity:1;transform:translateY(-90px)}}
.lf-root.lf-holding .lf-tube{animation:lf-tilt .32s ease-in-out infinite alternate}
@keyframes lf-tilt{from{transform:rotate(-6deg)}to{transform:rotate(6deg)}}

/* ---------- 6. 筊杯（朱漆木） ---------- */
.lf-root .lf-stage{height:180px;display:flex;align-items:flex-end;justify-content:center;gap:28px;perspective:600px;margin-bottom:8px}
.lf-root .lf-stage::after{content:"";position:absolute;left:15%;right:15%;bottom:6px;height:10px;border-radius:50%;z-index:-1;
  background:radial-gradient(rgba(42,26,20,.2),transparent 70%)}
.lf-root .lf-cup{width:92px;height:46px;position:relative;transform-style:preserve-3d;margin-bottom:14px}
.lf-root .lf-face{position:absolute;inset:0;border-radius:92px 92px 0 0;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.lf-root .lf-face.lf-flat{background:linear-gradient(#B8323A,#8E1E24);box-shadow:inset 0 -3px 0 rgba(0,0,0,.18),inset 0 0 0 1px rgba(233,196,106,.35)}
.lf-root .lf-face.lf-flat::after{content:"";position:absolute;left:12%;right:12%;bottom:5px;height:2px;background:rgba(233,196,106,.45);border-radius:1px}
.lf-root .lf-face.lf-round{background:radial-gradient(circle at 35% 30%,#D2555B 0,var(--lf-vermilion) 42%,#5A1216 100%);transform:rotateX(180deg)}
.lf-root .lf-cup.lf-right{transform:scaleX(-1)}
.lf-root .lf-cup.lf-show-round .lf-face.lf-flat{transform:rotateX(180deg)}
.lf-root .lf-cup.lf-show-round .lf-face.lf-round{transform:rotateX(0)}
.lf-root .lf-cup.lf-throw{animation:lf-throw .9s cubic-bezier(.3,.6,.4,1) both}
.lf-root .lf-cup.lf-right.lf-throw{animation-name:lf-throw-r;animation-delay:.06s}
@keyframes lf-throw{0%{transform:translateY(0) rotateX(0)}45%{transform:translateY(-120px) rotateX(540deg)}80%{transform:translateY(0) rotateX(1080deg)}90%{transform:translateY(-8px) rotateX(1080deg)}100%{transform:translateY(0) rotateX(1080deg)}}
@keyframes lf-throw-r{0%{transform:scaleX(-1) translateY(0) rotateX(0)}45%{transform:scaleX(-1) translateY(-130px) rotateX(-540deg)}80%{transform:scaleX(-1) translateY(0) rotateX(-1080deg)}90%{transform:scaleX(-1) translateY(-6px) rotateX(-1080deg)}100%{transform:scaleX(-1) translateY(0) rotateX(-1080deg)}}
.lf-root.lf-holding .lf-cup{animation:lf-shake .36s ease-in-out infinite alternate}
.lf-root.lf-holding .lf-cup.lf-right{animation-name:lf-shake-r}
@keyframes lf-shake{from{transform:translateY(-4px) rotate(-2deg)}to{transform:translateY(-7px) rotate(2deg)}}
@keyframes lf-shake-r{from{transform:scaleX(-1) translateY(-4px) rotate(-2deg)}to{transform:scaleX(-1) translateY(-7px) rotate(2deg)}}

/* 筊象結果 */
.lf-root .lf-verdict{display:none;margin-top:8px}
.lf-root .lf-verdict.lf-on{display:block;animation:lf-enter var(--lf-dur-enter) var(--lf-ease-out) both}
.lf-root .lf-verdict[data-v="sheng"]::before{content:"";display:block;width:64px;height:32px;margin:0 auto 2px;background:var(--lf-saffron);
  transform-origin:50% 100%;animation:lf-bloom 1.2s var(--lf-ease-ritual) .15s both;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='94 0 52 24'%3E%3Cg fill='currentColor'%3E%3Cpath d='M120 2C126.5 8 126.5 15 120 21C113.5 15 113.5 8 120 2Z'/%3E%3Cpath d='M118.5 21C110 20.5 103 15.5 99.5 8C108 9 115.5 13.5 118.5 21Z'/%3E%3Cpath d='M121.5 21C130 20.5 137 15.5 140.5 8C132 9 124.5 13.5 121.5 21Z'/%3E%3Cpath d='M117 21.5C108 22.5 100 20.5 95 17C104 16 112 17.5 117 21.5Z'/%3E%3Cpath d='M123 21.5C132 22.5 140 20.5 145 17C136 16 128 17.5 123 21.5Z'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='94 0 52 24'%3E%3Cg fill='currentColor'%3E%3Cpath d='M120 2C126.5 8 126.5 15 120 21C113.5 15 113.5 8 120 2Z'/%3E%3Cpath d='M118.5 21C110 20.5 103 15.5 99.5 8C108 9 115.5 13.5 118.5 21Z'/%3E%3Cpath d='M121.5 21C130 20.5 137 15.5 140.5 8C132 9 124.5 13.5 121.5 21Z'/%3E%3Cpath d='M117 21.5C108 22.5 100 20.5 95 17C104 16 112 17.5 117 21.5Z'/%3E%3Cpath d='M123 21.5C132 22.5 140 20.5 145 17C136 16 128 17.5 123 21.5Z'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat}
@keyframes lf-bloom{from{opacity:0;transform:scale(.5,.2)}60%{opacity:1}to{opacity:1;transform:none}}
.lf-root .lf-vname{font-size:var(--lf-fs-xl);font-weight:700;letter-spacing:var(--lf-track-seal);padding-left:var(--lf-track-seal);color:var(--lf-maroon);line-height:1.4}
.lf-root .lf-vshape{font-size:var(--lf-fs-sm);letter-spacing:var(--lf-track-label);color:var(--lf-ink-2)}
.lf-root .lf-vtext{font-size:var(--lf-fs-base);max-width:30em;margin:8px auto 0}

/* ---------- 7. 籤詩：唐卡掛軸 ---------- */
.lf-root .lf-sign-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 10px;margin-bottom:10px}
.lf-root .lf-sign-head::after{content:"";flex-basis:100%;height:16px;margin-top:4px;background:var(--lf-gold);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 24'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round'%3E%3Cpath stroke-width='1' d='M4 19H92M148 19H236'/%3E%3Cpath stroke-width='1' d='M60 22H92M148 22H180'/%3E%3C/g%3E%3Cg fill='currentColor'%3E%3Cpath d='M120 2C126.5 8 126.5 15 120 21C113.5 15 113.5 8 120 2Z'/%3E%3Cpath d='M118.5 21C110 20.5 103 15.5 99.5 8C108 9 115.5 13.5 118.5 21Z'/%3E%3Cpath d='M121.5 21C130 20.5 137 15.5 140.5 8C132 9 124.5 13.5 121.5 21Z'/%3E%3Cpath d='M117 21.5C108 22.5 100 20.5 95 17C104 16 112 17.5 117 21.5Z'/%3E%3Cpath d='M123 21.5C132 22.5 140 20.5 145 17C136 16 128 17.5 123 21.5Z'/%3E%3Ccircle cx='4' cy='19' r='1.6'/%3E%3Ccircle cx='236' cy='19' r='1.6'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 24'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round'%3E%3Cpath stroke-width='1' d='M4 19H92M148 19H236'/%3E%3Cpath stroke-width='1' d='M60 22H92M148 22H180'/%3E%3C/g%3E%3Cg fill='currentColor'%3E%3Cpath d='M120 2C126.5 8 126.5 15 120 21C113.5 15 113.5 8 120 2Z'/%3E%3Cpath d='M118.5 21C110 20.5 103 15.5 99.5 8C108 9 115.5 13.5 118.5 21Z'/%3E%3Cpath d='M121.5 21C130 20.5 137 15.5 140.5 8C132 9 124.5 13.5 121.5 21Z'/%3E%3Cpath d='M117 21.5C108 22.5 100 20.5 95 17C104 16 112 17.5 117 21.5Z'/%3E%3Cpath d='M123 21.5C132 22.5 140 20.5 145 17C136 16 128 17.5 123 21.5Z'/%3E%3Ccircle cx='4' cy='19' r='1.6'/%3E%3Ccircle cx='236' cy='19' r='1.6'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat}
.lf-root .lf-sign-no{font-size:var(--lf-fs-lg);font-weight:700;letter-spacing:.12em;color:var(--lf-maroon-deep)}
/* 吉凶：印章 */
.lf-root .lf-tier{display:inline-block;padding:2px 8px;border:1.5px solid currentColor;border-radius:var(--lf-r);
  font-size:var(--lf-fs-sm);font-weight:700;letter-spacing:.1em;line-height:1.5;animation:lf-stamp .5s var(--lf-ease-out) .2s both}
@keyframes lf-stamp{from{opacity:0;transform:scale(1.25)}to{opacity:1;transform:none}}
.lf-root .lf-tier[data-t="吉"]{color:#fff;background:var(--lf-vermilion);border-color:var(--lf-vermilion)}
.lf-root .lf-tier[data-t="平"]{color:var(--lf-gold-text)}
.lf-root .lf-tier[data-t="宜守"]{color:var(--lf-lapis)}

.lf-root .lf-poem{position:relative;overflow:hidden;display:flex;flex-direction:row-reverse;justify-content:center;gap:16px;
  max-width:320px;margin:8px auto 14px;padding:22px 14px 26px;background:var(--lf-leaf);
  border:6px solid var(--lf-lapis);border-bottom-width:14px;
  box-shadow:inset 0 0 0 2px var(--lf-vermilion),inset 0 0 0 4px var(--lf-gold-lt),0 2px 10px var(--lf-shadow)}
.lf-root .lf-poem span{writing-mode:vertical-rl;font-size:var(--lf-fs-lg);font-weight:700;letter-spacing:var(--lf-track-poem);line-height:1;color:var(--lf-ink)}
/* 金光掃過一次 */
.lf-root .lf-poem::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(105deg,transparent 42%,rgba(233,196,106,.5) 50%,transparent 58%) no-repeat;background-size:260% 100%;
  animation:lf-gild 1.6s var(--lf-ease-out) .35s both}
@keyframes lf-gild{from{background-position:120% 0}to{background-position:-20% 0}}

.lf-root .lf-meta{font-size:var(--lf-fs-xs);letter-spacing:.06em;color:var(--lf-ink-2);margin-bottom:10px}
.lf-root .lf-summary{font-size:var(--lf-fs-md);font-weight:700;color:var(--lf-maroon-deep);margin:4px 0 12px;line-height:1.6}
.lf-root .lf-poemline{font-size:14px;letter-spacing:.15em;color:var(--lf-ink-2);margin:-2px 0 10px}
.lf-root .lf-sec{text-align:left;margin:16px 0}
.lf-root .lf-sec h4{font-size:var(--lf-fs-ui);font-weight:700;letter-spacing:var(--lf-track-label);line-height:1.5;margin:0 0 8px;color:var(--lf-maroon)}
.lf-root .lf-sec h4::before{content:"";display:inline-block;width:6px;height:6px;margin:0 10px 0 2px;vertical-align:.2em;
  background:var(--lf-saffron);transform:rotate(45deg)}
.lf-root .lf-plain{margin:0;padding-left:1.4em;font-size:var(--lf-fs-ui);line-height:1.85}
.lf-root .lf-plain li::marker{color:var(--lf-gold-text)}

/* ---------- 8. 方向分頁（青金石） ---------- */
.lf-root .lf-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.lf-root .lf-tab{min-height:40px;padding:6px 14px;border:1px solid var(--lf-rule);border-radius:var(--lf-r);background:var(--lf-leaf);
  color:var(--lf-ink);font-size:14px;font-weight:400;letter-spacing:.06em;cursor:pointer;
  transition:background-color var(--lf-dur-fast),border-color var(--lf-dur-fast),color var(--lf-dur-fast)}
.lf-root .lf-tab:hover,.lf-root .lf-tab:focus{background:var(--lf-paper-2);border-color:var(--lf-lapis);color:var(--lf-ink)}
.lf-root .lf-tab[aria-selected="true"],.lf-root .lf-tab[aria-selected="true"]:hover,.lf-root .lf-tab[aria-selected="true"]:focus{
  background:var(--lf-lapis);border-color:var(--lf-lapis);color:#fff;font-weight:700}
/* 解說內文：貝葉經頁（左右兩端朱線） */
.lf-root .lf-dirtext{margin:0;padding:14px 16px;background:var(--lf-leaf);font-size:var(--lf-fs-base);line-height:1.9;
  border:1px solid var(--lf-hairline);border-left:3px double var(--lf-vermilion);border-right:3px double var(--lf-vermilion)}
.lf-root .lf-other{margin-top:16px!important;font-size:var(--lf-fs-sm)!important;color:var(--lf-ink-2)!important}
.lf-root .lf-other::before{background:var(--lf-hairline)!important}

/* ---------- 9. 提醒框與小字 ---------- */
.lf-root .lf-remind{margin:16px 0 0;padding:10px 12px;background:var(--lf-paper-2);border-left:3px solid var(--lf-saffron);
  font-size:var(--lf-fs-sm);line-height:1.7;color:var(--lf-ink-2);text-align:left}
.lf-root .lf-small{margin-top:12px;font-size:var(--lf-fs-xs);line-height:1.7;color:var(--lf-ink-2)}

/* ---------- 10. 窄版：依元件本身寬度（container query），外加 media query 當後備 ---------- */
@container lf (max-width:470px){
  .lf-root .lf-progress span{display:none}
  .lf-root .lf-how{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lf-root .lf-dir{font-size:16px;letter-spacing:.04em}
  .lf-root .lf-btn{min-width:0;padding:14px 22px;letter-spacing:.08em}
}
@media (max-width:420px){
  .lf-root{padding:26px 12px 24px;border-width:4px;border-bottom-width:10px}
  .lf-root::after{inset:8px}
  .lf-root .lf-progress span{display:none}
  .lf-root .lf-progress li+li::before{width:16px}
  .lf-root .lf-dirs{gap:6px}
  .lf-root .lf-dir{font-size:16px;letter-spacing:.04em}
  .lf-root .lf-how{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lf-root .lf-btn{min-width:0;padding:14px 22px;letter-spacing:.08em}
  .lf-root .lf-poem{gap:12px;padding:18px 10px 22px}
  .lf-root .lf-poem span{font-size:20px;letter-spacing:.2em}
}

/* ---------- 11. 減少動態 ---------- */
@media (prefers-reduced-motion:reduce){
  .lf-root[data-step] .lf-panel,.lf-root .lf-verdict.lf-on{animation:lf-enter-rm .2s linear both}
  .lf-root .lf-tube-wrap::before,.lf-root .lf-stage::before{animation:none;opacity:.8}
  .lf-root .lf-tube-wrap::after{animation:none}
  .lf-root.lf-holding .lf-tube,.lf-root.lf-holding .lf-cup,.lf-root .lf-cup.lf-throw{animation:none}
  .lf-root .lf-drawn .lf-stick.lf-pick{animation:lf-rise-rm .3s linear both}
  .lf-root .lf-verdict[data-v="sheng"]::before,.lf-root .lf-tier{animation:none}
  .lf-root .lf-poem::after{animation:none;display:none}
  .lf-root .lf-btn:active{transform:none}
}
@keyframes lf-enter-rm{from{opacity:0}to{opacity:1}}
@keyframes lf-rise-rm{from{opacity:0;transform:translateY(-90px)}to{opacity:1;transform:translateY(-90px)}}

/* 設計規格之後才加入的元件（問題欄、稀有度、五行白話、典故一句、宜忌、搖手機、實拍圖）
   沿用 design/tokens.css 的變數。 */
.lf-root [hidden]{display:none!important}
.lf-root .lf-ask{display:block;width:100%;max-width:30em;margin:0 auto 18px;text-align:left}
.lf-root .lf-ask span{display:block;font-size:var(--lf-fs-xs);line-height:1.6;color:var(--lf-ink-2);margin-bottom:6px}
.lf-root .lf-ask textarea{display:block;width:100%;min-height:68px;margin:0;padding:10px 12px;border:1px solid var(--lf-rule);border-radius:var(--lf-r);
  background:var(--lf-leaf);color:var(--lf-ink);font-family:var(--lf-font);font-size:var(--lf-fs-base);line-height:1.7;resize:vertical;box-shadow:none}
.lf-root .lf-ask textarea:focus{outline:2px solid var(--lf-lapis);outline-offset:1px;border-color:var(--lf-lapis)}
.lf-root .lf-tiercount{margin:-4px 0 12px;font-size:var(--lf-fs-xs);letter-spacing:var(--lf-track-label);color:var(--lf-ink-2)}
.lf-root .lf-wx{margin:0 0 4px;font-size:var(--lf-fs-xs);color:var(--lf-ink-2)}
.lf-root .lf-storynote{max-width:30em;margin:0 auto 12px;font-size:var(--lf-fs-sm);line-height:1.8;color:var(--lf-ink-2)}
.lf-root .lf-yiji{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 0;text-align:left}
.lf-root .lf-yiji>div{padding:10px 12px;background:var(--lf-leaf);border:1px solid var(--lf-rule);border-radius:var(--lf-r)}
.lf-root .lf-yiji b{display:block;margin-bottom:4px;font-size:var(--lf-fs-ui);letter-spacing:var(--lf-track-seal)}
.lf-root .lf-yiji .lf-yi b{color:var(--lf-lapis)}
.lf-root .lf-yiji .lf-ji b{color:var(--lf-maroon)}
.lf-root .lf-yiji ul{margin:0;padding-left:1.1em;font-size:var(--lf-fs-sm);line-height:1.8}
.lf-root .lf-motion{display:inline-block;margin-top:12px;padding:6px 10px;background:none;border:0;box-shadow:none;
  color:var(--lf-maroon);font-family:var(--lf-font);font-size:var(--lf-fs-sm);text-decoration:underline;cursor:pointer}
.lf-root .lf-motion:hover,.lf-root .lf-motion:focus{background:none;color:var(--lf-maroon-deep)}
/* 實拍圖（assets/images.json 有設定時才會啟用） */
.lf-root.lf-img .lf-tube-body,.lf-root.lf-img .lf-stick:not(.lf-pick){display:none}
.lf-root .lf-tube-img{position:absolute;left:50%;bottom:0;transform:translateX(-50%);max-height:220px;max-width:160px;z-index:2;pointer-events:none}
.lf-root .lf-cup-img .lf-face{background-color:transparent!important;background-image:none;background-size:contain;background-repeat:no-repeat;background-position:center bottom;border-radius:0;box-shadow:none}
.lf-root .lf-cup-img .lf-face::after{display:none}
@media (max-width:420px){.lf-root .lf-yiji{grid-template-columns:1fr}}
/* 危機字眼：求助專線卡（顯示在問題欄下方，以及解說頁 LINE 按鈕之前） */
.lf-root .lf-crisis{max-width:30em;margin:0 auto 18px;padding:12px 14px;text-align:left;background:var(--lf-leaf);
  border:1px solid var(--lf-lapis);border-left:4px solid var(--lf-lapis);border-radius:var(--lf-r);font-size:var(--lf-fs-ui);line-height:1.8;color:var(--lf-ink)}
.lf-root .lf-crisis p{margin:0 0 4px}
.lf-root .lf-crisis .lf-crisis-t{font-weight:700;color:var(--lf-lapis)}
.lf-root .lf-crisis ul{margin:4px 0 0;padding-left:1.2em}
.lf-root .lf-crisis a{color:var(--lf-lapis);font-weight:700;text-decoration:underline}
.lf-root #lf-crisis4 .lf-crisis{margin-top:16px}

/* ==========================================================
   實拍素材版面（成功佛堂自攝素材）
   依賴 design/tokens.css 的變數；圖檔網址由 JS 依步驟延遲載入。
   ========================================================== */
.lf-root{max-width:720px}
.lf-root img[data-lf-img]:not([src]){visibility:hidden}
.lf-root img{max-width:100%;height:auto;border:0;box-shadow:none}

/* ---------- 開場：佛桌主視覺 ---------- */
.lf-root .lf-p0::before{display:none}
.lf-root .lf-hero{position:relative;overflow:hidden;display:flex;align-items:flex-end;min-height:300px;margin:-8px -6px 26px;
  padding:34px 30px 30px;text-align:left;color:#FBF3E2;background:var(--lf-maroon-deep);
  box-shadow:inset 0 0 0 1px var(--lf-gold),inset 0 0 0 5px var(--lf-maroon-deep),inset 0 0 0 6px rgba(233,196,106,.55)}
.lf-root .lf-hero::before{content:"";position:absolute;inset:0;z-index:0;background-image:var(--lf-hero-img,none);
  background-size:cover;background-position:50% 40%;opacity:.9;transform:scale(1.04);
  animation:lf-hero-in 2.4s var(--lf-ease-out) both}
.lf-root .lf-hero::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(90deg,rgba(40,9,10,.94) 0%,rgba(58,13,15,.82) 42%,rgba(58,13,15,.25) 72%,rgba(40,9,10,.55) 100%),
             linear-gradient(0deg,rgba(40,9,10,.7) 0%,transparent 45%)}
@keyframes lf-hero-in{from{opacity:0;transform:scale(1.1)}to{opacity:.9;transform:scale(1.04)}}
.lf-root .lf-hero-txt{position:relative;z-index:3;max-width:58%}
.lf-root .lf-hero .lf-mantra{color:var(--lf-gold-lt);font-size:16px;margin:0 0 14px;opacity:.9}
.lf-root .lf-hero-kicker{display:inline-block;margin:0 0 10px;padding:2px 0 4px;border-bottom:1px solid rgba(233,196,106,.6);
  font-size:var(--lf-fs-sm);letter-spacing:var(--lf-track-label);color:var(--lf-gold-lt)}
.lf-root .lf-hero-title{margin:0 0 12px;font-size:40px;font-weight:700;line-height:1.28;letter-spacing:.14em;color:#FFF8EA;
  text-shadow:0 2px 18px rgba(0,0,0,.45)}
.lf-root .lf-hero-sub{font-size:var(--lf-fs-ui);line-height:1.8;color:rgba(251,243,226,.88);max-width:22em}
.lf-root .lf-deity{position:absolute;right:4%;bottom:-6px;z-index:2;width:auto;height:112%;max-height:360px;
  filter:drop-shadow(0 8px 22px rgba(0,0,0,.55));animation:lf-deity-in 1.6s var(--lf-ease-out) .2s both}
@keyframes lf-deity-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
/* 光暈：酥油燈在神像背後 */
.lf-root .lf-hero-glow{position:absolute;right:2%;bottom:10%;z-index:1;width:300px;height:300px;border-radius:50%;pointer-events:none;
  background:radial-gradient(closest-side,rgba(233,196,106,.38),transparent);animation:lf-lamp var(--lf-dur-breathe) ease-in-out infinite alternate}

/* ---------- 四步小卡：實物圖示 ---------- */
.lf-root .lf-how{gap:10px}
.lf-root .lf-how div{display:flex;flex-direction:column;align-items:center;text-align:center;
  padding:14px 8px 12px;border-left-width:1px;border-left-style:solid;border-top:3px double var(--lf-vermilion)}
.lf-root .lf-how .lf-ic{width:56px;height:58px;margin-bottom:8px;display:flex;align-items:flex-end;justify-content:center}
.lf-root .lf-how .lf-ic img{max-height:58px;max-width:56px;width:auto}
.lf-root .lf-how strong{margin:0 0 2px;white-space:nowrap}
.lf-root .lf-ic-cups{gap:3px}
.lf-root .lf-ic-cups i{display:block;width:17px;height:9px;border-radius:17px 17px 0 0;background:linear-gradient(#B8323A,#8E1E24)}
.lf-root .lf-ic-cups i+i{background:radial-gradient(circle at 35% 30%,#D2555B 0,var(--lf-vermilion) 42%,#5A1216 100%);transform:scaleX(-1)}

/* ---------- ① 實拍籤筒 ---------- */
.lf-root .lf-tube-wrap{height:370px}
.lf-root.lf-img .lf-tube{width:120px;height:250px}
.lf-root.lf-img .lf-stick.lf-pick{z-index:1}
.lf-root .lf-tube-img{position:absolute;left:50%;bottom:0;z-index:2;height:240px;width:auto;max-width:none;transform:translateX(-50%);
  pointer-events:none;filter:drop-shadow(0 10px 14px rgba(42,26,20,.35))}
.lf-root.lf-img .lf-stick.lf-pick{left:47px!important;bottom:40px;height:230px;background:linear-gradient(90deg,#7C1A1C,#A8262E 55%,#7C1A1C);
  border-top:10px solid var(--lf-gold);color:var(--lf-gold-lt);box-shadow:0 0 0 1px rgba(233,196,106,.6),0 4px 10px var(--lf-shadow)}
.lf-root.lf-img .lf-drawn .lf-stick.lf-pick{animation-name:lf-rise-photo}
@keyframes lf-rise-photo{0%{opacity:1;transform:translateY(20px)}100%{opacity:1;transform:translateY(-100px)}}

/* ---------- ② 香爐前擲筊 ---------- */
.lf-root .lf-stage{height:230px}
.lf-root .lf-burner{position:absolute;left:50%;bottom:34px;z-index:-1;height:150px;width:auto;max-width:none;transform:translateX(-50%);
  opacity:.92;filter:drop-shadow(0 6px 12px rgba(42,26,20,.3))}
.lf-root .lf-stage .lf-cup{margin-bottom:6px}

/* ---------- ③ 籤詩：佛堂印章落款 ---------- */
.lf-root .lf-poem-wrap{position:relative;max-width:320px;margin:0 auto}
.lf-root .lf-poem{background-image:linear-gradient(rgba(251,246,236,.94),rgba(251,246,236,.94)),var(--lf-slips-img,none);
  background-size:cover;background-position:center}
.lf-root .lf-seal{position:absolute;left:-18px;bottom:-4px;z-index:4;width:86px;height:auto;opacity:0;pointer-events:none;
  mix-blend-mode:multiply;transform:rotate(-8deg)}
.lf-root .lf-stamped .lf-seal{animation:lf-seal .7s cubic-bezier(.2,.9,.3,1.2) .9s both}
@keyframes lf-seal{0%{opacity:0;transform:rotate(-8deg) scale(1.9)}60%{opacity:.95;transform:rotate(-8deg) scale(.94)}100%{opacity:.88;transform:rotate(-8deg) scale(1)}}

/* ---------- ①② 供桌兩側法器 ---------- */
.lf-root .lf-side{position:absolute;bottom:0;z-index:0;height:150px;width:auto;max-width:none;pointer-events:none;
  filter:drop-shadow(0 6px 10px rgba(42,26,20,.28));animation:lf-enter 1s var(--lf-ease-out) .2s both}
.lf-root .lf-side-l{left:22%}
.lf-root .lf-side-r{right:22%}
.lf-root .lf-side-wide{height:auto;width:130px;bottom:6px}
.lf-root .lf-stage .lf-side-l{left:4%}.lf-root .lf-stage .lf-side-r{right:4%}
/* 供桌檯面線 */
.lf-root .lf-tube-wrap,.lf-root .lf-stage{border-bottom:1px solid var(--lf-hairline);box-shadow:0 1px 0 var(--lf-leaf)}

/* ---------- ③ 紅帶橫幅、金銀球 ---------- */
.lf-root .lf-banner{height:74px;margin:-8px -6px 16px;background:var(--lf-maroon-deep) var(--lf-banner-img,none) center/cover;
  box-shadow:inset 0 0 0 1px var(--lf-gold),inset 0 -18px 18px -12px rgba(40,9,10,.55);
  -webkit-mask:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);mask:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
.lf-root .lf-poem-row{display:flex;align-items:flex-end;justify-content:center;gap:22px}
.lf-root .lf-poem-row .lf-poem-wrap{flex:0 1 320px;margin:0}
.lf-root .lf-flank{flex:none;height:150px;width:auto;margin-bottom:22px;filter:drop-shadow(0 6px 10px rgba(42,26,20,.25))}

/* ---------- ④ 籤詩牆照片抬頭 ---------- */
.lf-root .lf-photohead{position:relative;margin:-8px -6px 14px;padding:34px 16px 18px;overflow:hidden;
  background:var(--lf-maroon-deep) var(--lf-slips-photo,none) center 35%/cover;
  box-shadow:inset 0 0 0 1px var(--lf-gold),inset 0 0 0 5px var(--lf-maroon-deep),inset 0 0 0 6px rgba(233,196,106,.55)}
.lf-root .lf-photohead::before{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(40,9,10,.92),rgba(58,13,15,.55) 70%,rgba(58,13,15,.35))}
.lf-root .lf-photohead .lf-sign-head{position:relative;z-index:1;margin:0}
.lf-root .lf-photohead .lf-sign-no{color:#FFF8EA;text-shadow:0 2px 12px rgba(0,0,0,.5)}
.lf-root .lf-photohead .lf-sign-head::after{background:var(--lf-gold-lt)}
.lf-root .lf-photohead .lf-tier[data-t="平"]{color:var(--lf-gold-lt)}
.lf-root .lf-photohead .lf-tier[data-t="宜守"]{color:#C9D6F2}

/* ---------- ④ 解籤卡：隨機神像 ---------- */
.lf-root .lf-cta-card{display:flex;align-items:flex-end;gap:16px;margin:18px 0 6px;padding:18px 18px 0 10px;text-align:left;
  background:linear-gradient(135deg,var(--lf-leaf),var(--lf-paper-2));border:1px solid var(--lf-hairline);border-top:3px double var(--lf-vermilion)}
.lf-root .lf-cta-deity{flex:none;width:auto;height:170px;max-width:150px;object-fit:contain;object-position:bottom;
  filter:drop-shadow(0 6px 12px rgba(42,26,20,.3));animation:lf-deity-in 1s var(--lf-ease-out) both}
.lf-root .lf-cta-body{flex:1;padding-bottom:18px}
.lf-root .lf-cta-t{font-size:var(--lf-fs-md);font-weight:700;color:var(--lf-maroon-deep);letter-spacing:.08em;margin-bottom:4px}
.lf-root .lf-cta-s{font-size:var(--lf-fs-sm);line-height:1.8;color:var(--lf-ink-2);margin-bottom:12px}
.lf-root .lf-cta-btns{display:flex;flex-wrap:wrap;gap:10px}
.lf-root .lf-cta-btns .lf-nb{display:inline-block}
.lf-root .lf-wx-note{margin-top:10px;font-size:var(--lf-fs-sm);line-height:1.8;color:var(--lf-ink);-webkit-user-select:text;user-select:text;overflow-wrap:anywhere}

/* ---------- 窄版 ---------- */
@container lf (max-width:560px){
  .lf-root .lf-hero{min-height:360px;padding:26px 20px 22px;align-items:flex-end}
  .lf-root .lf-hero-txt{max-width:66%}
  .lf-root .lf-hero-title{font-size:30px}
  .lf-root .lf-deity{right:-6%;height:62%;opacity:.95}
  .lf-root .lf-hero-glow{right:-10%;bottom:30%;width:240px;height:240px}
  .lf-root .lf-hero::before{background-image:var(--lf-hero-img-sm,var(--lf-hero-img,none))}
  .lf-root .lf-hero::after{background:linear-gradient(0deg,rgba(40,9,10,.96) 0%,rgba(58,13,15,.82) 45%,rgba(58,13,15,.3) 100%)}
  .lf-root .lf-hero-sub{max-width:100%;font-size:14px}
}
@media (max-width:420px){
  .lf-root .lf-hero{min-height:360px;padding:24px 18px 20px}
  .lf-root .lf-hero-txt{max-width:66%}
  .lf-root .lf-hero-title{font-size:28px}
  .lf-root .lf-deity{right:-8%;height:60%}
  .lf-root .lf-hero::before{background-image:var(--lf-hero-img-sm,var(--lf-hero-img,none))}
  .lf-root .lf-seal{width:72px;left:-10px}
}
@container lf (max-width:520px){
  .lf-root .lf-flank{display:none}
  .lf-root .lf-side{height:96px}.lf-root .lf-side-wide{width:96px;height:auto}
  .lf-root .lf-side-l{left:4%}.lf-root .lf-side-r{right:4%}
  .lf-root .lf-stage .lf-side-wide{width:50px;bottom:4px}
  .lf-root .lf-stage .lf-side-l{left:0}.lf-root .lf-stage .lf-side-r{right:0}
  .lf-root .lf-stage{gap:18px}
  .lf-root .lf-cta-card{padding:14px 12px 0 6px;gap:10px}
  .lf-root .lf-cta-btns .lf-link{flex:1 1 100%;padding:10px 8px;text-align:center}
  .lf-root .lf-cta-deity{height:130px;max-width:96px}
}
@media (prefers-reduced-motion:reduce){
  .lf-root .lf-hero::before,.lf-root .lf-deity,.lf-root .lf-hero-glow{animation:none}
  .lf-root .lf-stamped .lf-seal{animation:none;opacity:.88}
}
