/* ==========================================================
   線上求籤｜藏傳佛教風格 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:#E9D9B4;        /* 主底色：酥油燈下的布面（2026-10 換新色：避開 kaucim 常用色 ΔE≥10） */
  --lf-leaf:#FCEFC2;         /* 浮起卡片：貝葉經長條紙 */
  --lf-paper-2:#DDC99C;      /* 次級面：提醒框、完成狀態 */
  --lf-hairline:#D9C39A;     /* 純裝飾細線（不承擔辨識功能） */
  --lf-rule:#8C6A38;         /* 元件邊框（按鈕、分頁）≥3:1 非文字對比（新紙色下由 #9A7640 加深） */

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

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

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

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

  /* ---- 五色（風馬旗順序：藍白紅綠黃）只用在頂端 5px 彩條 ---- */
  --lf-wf-blue:#2B5BA8;
  --lf-wf-white:#FCEFC2;
  --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}
/* 專屬籤：處境鈕三欄（窄版兩欄，見第 10 節）；角色鈕（兩層選單的第一層）固定兩欄。字多時換行 */
.lf-root .lf-situs{grid-template-columns:repeat(3,minmax(0,1fr))}
.lf-root .lf-groups{grid-template-columns:repeat(2,minmax(0,1fr))}
.lf-root .lf-situs .lf-dir,.lf-root .lf-groups .lf-dir{padding:10px 8px;line-height:1.45}
.lf-root .lf-situs-t{margin:4px 0 0;font-weight:700;color:var(--lf-maroon)}

/* 四步說明：貝葉經小卡 */
.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-situ-card{margin-top:18px;padding:14px 16px 12px;background:var(--lf-paper-2);border:1px solid var(--lf-rule);border-top:3px double var(--lf-vermilion)}
.lf-root .lf-situ-card p{margin:0 0 10px;font-size:var(--lf-fs-base);line-height:1.9;color:var(--lf-ink);white-space:pre-line}
.lf-root .lf-situ-card p:last-child{margin-bottom:0}
.lf-root .lf-situ-card b{display:block;color:var(--lf-maroon);font-size:var(--lf-fs-sm);letter-spacing:var(--lf-track-label);margin-bottom:2px}
.lf-root .lf-situ-note{color:var(--lf-ink-2);border-top:1px solid var(--lf-hairline);padding-top:10px}
.lf-root .lf-situ-bridge{color:var(--lf-maroon);font-weight:700;border-bottom:1px solid var(--lf-hairline);padding-bottom:10px}
.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)}
.lf-root .lf-legal{font-size:var(--lf-fs-sm)}
/* 第三者籤的「快速離開」：掛在 body 上（不在 .lf-root 裡），固定在左下角；工具底部留空間，不蓋住最後的按鈕 */
.lf-qexit{position:fixed;left:max(12px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom));z-index:99999;
  min-height:48px;min-width:48px;padding:0 18px;border:1px solid #7b2d26;border-radius:24px;background:#fffaf2;color:#7b2d26;
  font:700 16px/1 system-ui,-apple-system,"Noto Sans TC",sans-serif;letter-spacing:.06em;box-shadow:0 2px 10px rgba(0,0,0,.18);cursor:pointer}
.lf-qexit:hover{background:#7b2d26;color:#fff}
.lf-qexit:focus-visible{outline:3px solid #c9a227;outline-offset:2px}
body.lf-has-qexit .lf-root{margin-bottom:72px}

/* ---------- 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-situs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .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-situs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .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＋components.css（.lf-root、.lf-title、.lf-btn、.lf-link、.lf-remind、.lf-small），
   這裡只加 .lf-yy-*。共用 tokens 不改；八字姻緣自己的配色放在 .lf-root.lf-yy 裡的 --lf-yy-* 變數，
   再把共用變數在這個範圍內改指向自己的色（求籤外掛不受影響）。
   視覺語言：唐卡布底、酥油燈色卡片、朱砂紅、綠松石；裝飾用風馬旗三角旗串與曼陀羅圓紋，不用雙線紅邊。 */
.lf-root.lf-yy{
  --lf-yy-cloth:#E9D9B4;      /* 唐卡布底 */
  --lf-yy-cloth-2:#DDC99C;    /* 次級面 */
  --lf-yy-butter:#FCEFC2;     /* 酥油燈色：卡片面 */
  --lf-yy-robe:#8C2E1A;       /* 朱砂紅：主色、主按鈕 */
  --lf-yy-robe-deep:#3E1D12;  /* 赭墨：標題字 */
  --lf-yy-cinnabar:#B5452B;   /* 亮朱：沖刑害記號 */
  --lf-yy-turq:#17585F;       /* 綠松石：輔色、焦點框、夫妻宮 */
  --lf-yy-turq-lt:#7FB7B0;    /* 淺綠松石：裝飾線 */
  /* 五色風馬旗（藍、白、紅、綠、黃）；白旗用酥油色 */
  --lf-yy-f1:#2B5BA8;--lf-yy-f2:var(--lf-yy-butter);--lf-yy-f3:#B8322B;--lf-yy-f4:#2E7D4F;--lf-yy-f5:#E0A526;
  --lf-yy-track-title:.14em;  /* 標題字距 */
  --lf-yy-track-btn:.22em;    /* 主鈕字距 */
  --lf-yy-track-link:.05em;   /* 次要鈕字距 */
  /* 共用變數在八字姻緣範圍內改指向自己的色 */
  --lf-paper:var(--lf-yy-cloth);--lf-leaf:var(--lf-yy-butter);--lf-paper-2:var(--lf-yy-cloth-2);
  --lf-maroon:var(--lf-yy-robe);--lf-maroon-deep:var(--lf-yy-robe-deep);--lf-vermilion:var(--lf-yy-cinnabar);
  --lf-lapis:var(--lf-yy-turq);--lf-wf-white:var(--lf-yy-butter);
  --lf-r:4px;
  text-align:left}
/* 風馬旗三角旗串：一排五色小三角旗（用在主視覺下緣、表單、諮詢卡上緣） */
.lf-yy .lf-yy-flags{position:relative}
.lf-yy .lf-yy-flags::before{content:"";position:absolute;left:0;right:0;top:0;height:9px;pointer-events:none;
  background:repeating-linear-gradient(90deg,var(--lf-yy-f1) 0 14px,var(--lf-yy-f2) 14px 28px,var(--lf-yy-f3) 28px 42px,var(--lf-yy-f4) 42px 56px,var(--lf-yy-f5) 56px 70px);
  -webkit-mask:conic-gradient(from -30deg at 50% 100%,#000 60deg,#0000 0) 0 0/14px 100% repeat-x;
          mask:conic-gradient(from -30deg at 50% 100%,#000 60deg,#0000 0) 0 0/14px 100% repeat-x}
.lf-yy .lf-yy-flags::after{content:"";position:absolute;left:0;right:0;top:0;border-top:1px solid var(--lf-rule);pointer-events:none}

.lf-yy .lf-yy-kicker{margin:0 0 4px;text-align:center;font-size:var(--lf-fs-sm);letter-spacing:.3em;color:var(--lf-yy-turq);font-weight:700}
.lf-yy .lf-title{letter-spacing:var(--lf-yy-track-title);color:var(--lf-yy-robe-deep)}
.lf-yy .lf-yy-title{text-align:center;white-space:pre-line}
.lf-yy > .lf-sub{text-align:center;margin-bottom:14px}
.lf-yy .lf-yy-left{text-align:left;margin-top:4px}
.lf-yy .lf-yy-note{margin:10px 0;padding:10px 12px;background:var(--lf-yy-butter);border-radius:var(--lf-r);border:1px solid var(--lf-yy-turq-lt);font-size:var(--lf-fs-sm);line-height:1.7;color:var(--lf-ink)}

/* 主鈕：不用內圈細金框；改成下緣一條五色風馬旗線 */
.lf-yy .lf-btn{touch-action:manipulation;letter-spacing:var(--lf-yy-track-btn);background:var(--lf-yy-robe);box-shadow:0 3px 0 var(--lf-yy-robe-deep);padding-bottom:17px}
.lf-yy .lf-btn::before{inset:auto 0 0 0;height:5px;border:0;opacity:1;
  background:linear-gradient(90deg,var(--lf-yy-f1) 0 20%,var(--lf-yy-f2) 20% 40%,var(--lf-yy-f3) 40% 60%,var(--lf-yy-f4) 60% 80%,var(--lf-yy-f5) 80%)}
.lf-yy .lf-btn:hover,.lf-yy .lf-btn:focus{background:var(--lf-yy-robe-deep)}
.lf-yy .lf-link{letter-spacing:var(--lf-yy-track-link)}
.lf-yy .lf-btn:focus-visible,.lf-yy .lf-link:focus-visible{outline:3px solid var(--lf-yy-turq);outline-offset:3px}
@container lf (max-width:470px){.lf-root.lf-yy .lf-btn{letter-spacing:.12em}}
@media (max-width:420px){.lf-root.lf-yy .lf-btn{letter-spacing:.12em}}

/* ---------- 表單 ---------- */
.lf-yy .lf-yy-form{margin:8px 0 0;padding:22px 14px 16px;background:var(--lf-yy-butter);border:1px solid var(--lf-hairline);border-radius:0 0 var(--lf-r) var(--lf-r)}
.lf-yy .lf-yy-seg{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px;padding:0;border:0;min-width:0}
.lf-yy .lf-yy-seg legend{width:100%;padding:0;margin:0 0 6px;font-size:var(--lf-fs-ui);font-weight:700;color:var(--lf-ink)}
.lf-yy .lf-yy-seg legend small{font-weight:400;color:var(--lf-ink-2);font-size:var(--lf-fs-sm)}
.lf-yy .lf-yy-seg label{flex:1 1 0;min-width:0;position:relative}
.lf-yy .lf-yy-seg input{position:absolute;opacity:0;width:1px;height:1px}
.lf-yy .lf-yy-seg span{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:8px 6px;border:1px solid var(--lf-rule);border-radius:23px;
  background:#fff;color:var(--lf-ink);font-size:var(--lf-fs-base);cursor:pointer;text-align:center}
/* 選中：綠松石底＋前面一顆白色小圓（不只靠顏色辨識） */
.lf-yy .lf-yy-seg input:checked + span{background:var(--lf-yy-turq);border-color:var(--lf-yy-turq);color:#fff;font-weight:700}
.lf-yy .lf-yy-seg input:checked + span::before{content:"";width:8px;height:8px;border-radius:50%;background:#fff;flex:none}
.lf-yy .lf-yy-seg input:focus-visible + span{outline:3px solid var(--lf-yy-robe);outline-offset:2px}
.lf-yy .lf-yy-date{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:8px;margin-bottom:10px}
.lf-yy .lf-yy-date label,.lf-yy .lf-yy-field{display:block;margin-bottom:10px;font-size:var(--lf-fs-sm);color:var(--lf-ink-2)}
.lf-yy .lf-yy-date label{margin:0}
.lf-yy .lf-yy-date span,.lf-yy .lf-yy-field > span{display:block;margin-bottom:4px}
.lf-yy select,.lf-yy input[type=time]{display:block;width:100%;min-height:46px;padding:8px 10px;border:1px solid var(--lf-rule);border-radius:var(--lf-r);
  background:#fff;color:var(--lf-ink);font-family:inherit;font-size:var(--lf-fs-base);box-sizing:border-box}
.lf-yy select:focus-visible,.lf-yy input[type=time]:focus-visible{outline:3px solid var(--lf-yy-turq);outline-offset:1px}
.lf-yy .lf-yy-chk{display:flex;align-items:center;gap:10px;min-height:44px;margin:4px 0;font-size:var(--lf-fs-ui);color:var(--lf-ink);cursor:pointer}
.lf-yy .lf-yy-chk input{width:22px;height:22px;flex:none;accent-color:var(--lf-yy-turq)}
.lf-yy .lf-yy-mini{min-height:44px;padding:8px 14px;font-size:var(--lf-fs-sm)}
.lf-yy .lf-yy-err{margin:10px 0 0;padding:10px 12px;background:#fff;border:1px solid var(--lf-yy-cinnabar);border-radius:var(--lf-r);color:var(--lf-yy-robe);font-size:var(--lf-fs-ui);font-weight:700}

/* ---------- 結果 ---------- */
.lf-yy .lf-yy-result{margin-top:22px;outline:none}
.lf-yy .lf-yy-status{padding:12px 14px 12px 46px;position:relative;background:var(--lf-yy-butter);border:1px solid var(--lf-yy-turq-lt);border-radius:var(--lf-r);font-size:var(--lf-fs-ui);line-height:1.8;color:var(--lf-ink)}
.lf-yy .lf-yy-status::before{content:"";position:absolute;left:12px;top:14px;width:24px;height:24px;background:var(--lf-yy-turq);-webkit-mask:var(--lf-yy-mandala) center/contain no-repeat;mask:var(--lf-yy-mandala) center/contain no-repeat}
.lf-yy .lf-yy-status.lf-yy-partial{background:var(--lf-yy-cloth-2);border-color:var(--lf-rule)}
.lf-yy .lf-yy-status.lf-yy-partial::before{background:var(--lf-gold-text)}
.lf-yy .lf-yy-warn{margin:8px 0 0;padding:0 0 0 18px;font-size:var(--lf-fs-sm);line-height:1.7;color:var(--lf-ink-2)}
/* 曼陀羅圓紋（四門方城＋外圓＋八點），當區塊記號用 */
.lf-root.lf-yy{--lf-yy-mandala:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%23000'%3E%3Ccircle cx='16' cy='16' r='14.5' stroke-width='1.6'/%3E%3Ccircle cx='16' cy='16' r='11.5' stroke-width='.8'/%3E%3Cpath stroke-width='1.4' d='M9 9H13.5V7H18.5V9H23V13.5H25V18.5H23V23H18.5V25H13.5V23H9V18.5H7V13.5H9Z'/%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='3.2' fill='%23000'/%3E%3C/svg%3E")}
.lf-yy .lf-yy-card{margin:16px 0 0;padding:6px 14px 16px;background:var(--lf-yy-butter);border:1px solid var(--lf-hairline);border-radius:var(--lf-r);
  box-shadow:0 1px 0 var(--lf-yy-cloth-2)}
/* 結果第一次出現時，畫面外的卡片先不排版（排盤結果很長，手機上第一次排版會卡一下） */
.lf-yy .lf-yy-card{content-visibility:auto;contain-intrinsic-size:auto 560px}
.lf-yy .lf-yy-h{margin:0;font-size:var(--lf-fs-md)}
.lf-yy .lf-yy-h button{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:8px 0;border:0;border-bottom:1px dotted var(--lf-rule);
  background:none;color:var(--lf-yy-robe-deep);font-size:var(--lf-fs-md);font-weight:700;letter-spacing:var(--lf-yy-track-title);text-align:left;cursor:pointer}
.lf-yy .lf-yy-h button::before{content:"";flex:none;width:22px;height:22px;background:var(--lf-yy-turq);-webkit-mask:var(--lf-yy-mandala) center/contain no-repeat;mask:var(--lf-yy-mandala) center/contain no-repeat}
.lf-yy .lf-yy-h button:focus-visible{outline:3px solid var(--lf-yy-turq);outline-offset:2px}
.lf-yy .lf-yy-q{margin-left:auto;flex:none;display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border:1px solid var(--lf-yy-turq-lt);border-radius:12px;
  font-size:var(--lf-fs-xs);font-weight:400;letter-spacing:0;color:var(--lf-yy-turq)}
.lf-yy .lf-yy-q::before{content:"讀法"}
.lf-yy .lf-yy-how{margin:10px 0 0;padding:10px 12px;background:var(--lf-yy-cloth);border-radius:var(--lf-r);font-size:var(--lf-fs-sm);line-height:1.8;color:var(--lf-ink)}
.lf-yy .lf-yy-how p + p{margin-top:8px}
.lf-yy .lf-yy-sh{display:flex;align-items:center;gap:8px;margin:20px 0 0;font-size:var(--lf-fs-ui);font-weight:700;letter-spacing:.1em;color:var(--lf-yy-robe)}
.lf-yy .lf-yy-sh::after{content:"";flex:1;height:0;border-top:1px solid var(--lf-hairline)}
.lf-yy .lf-yy-intro{margin:8px 0 0;font-size:var(--lf-fs-sm);line-height:1.7;color:var(--lf-ink-2)}
.lf-yy .lf-yy-texts p,.lf-yy .lf-yy-ss > p:not(.lf-yy-ssh):not(.lf-yy-basis),.lf-yy .lf-yy-yb p{margin:10px 0 0;font-size:var(--lf-fs-base);line-height:1.9;color:var(--lf-ink)}
.lf-yy .lf-yy-ev{margin:10px 0 0;padding:0;list-style:none}
.lf-yy .lf-yy-ev li{margin:6px 0 0;padding:6px 10px;border:1px solid var(--lf-hairline);border-radius:var(--lf-r);background:#fff;font-size:var(--lf-fs-ui);line-height:1.6}
/* 合／沖刑害：用前面的記號形狀分（圓＝合、菱形＝沖刑害），框線一樣 */
.lf-yy .lf-yy-ev li.lf-yy-close,.lf-yy .lf-yy-ev li.lf-yy-tense{position:relative;padding-left:34px}
.lf-yy .lf-yy-ev li.lf-yy-close::before,.lf-yy .lf-yy-ev li.lf-yy-tense::before{content:"";position:absolute;left:11px;top:12px;width:12px;height:12px}
.lf-yy .lf-yy-ev li.lf-yy-close::before{border-radius:50%;border:3px solid var(--lf-yy-turq);background:var(--lf-yy-butter)}
.lf-yy .lf-yy-ev li.lf-yy-tense::before{background:var(--lf-yy-cinnabar);transform:rotate(45deg) scale(.9)}
.lf-yy .lf-yy-ev li.lf-yy-now{background:var(--lf-yy-cloth);font-weight:700}
.lf-yy .lf-yy-basis{display:block;margin:4px 0 0;font-size:var(--lf-fs-xs);line-height:1.6;color:var(--lf-ink-2);font-weight:400}

/* 四柱：直式欄，畫面由右往左（年柱在最右）；程式與讀屏順序仍是年月日時。頂端各掛一面風馬旗色 */
.lf-yy .lf-yy-pillars{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:12px;text-align:center;direction:rtl}
.lf-yy .lf-yy-col{direction:ltr;position:relative;padding:14px 2px 10px;border:1px solid var(--lf-hairline);border-radius:var(--lf-r);background:#fff}
.lf-yy .lf-yy-col::before{content:"";position:absolute;left:8px;right:8px;top:-1px;height:8px;background:var(--lf-yy-f1);
  -webkit-clip-path:polygon(0 0,100% 0,50% 100%);clip-path:polygon(0 0,100% 0,50% 100%)}
.lf-yy .lf-yy-col:nth-child(2)::before{background:var(--lf-yy-f4)}
.lf-yy .lf-yy-col:nth-child(3)::before{background:var(--lf-yy-turq)}
.lf-yy .lf-yy-col:nth-child(4)::before{background:var(--lf-yy-f5)}
.lf-yy .lf-yy-daycol{background:var(--lf-yy-cloth);border-color:var(--lf-yy-turq-lt)}
.lf-yy .lf-yy-none{opacity:.75;border-style:dashed}
.lf-yy .lf-yy-pl{font-size:var(--lf-fs-xs);line-height:1.4;color:var(--lf-ink-2);min-height:2.8em}
.lf-yy .lf-yy-daycol .lf-yy-pl{color:var(--lf-yy-turq);font-weight:700}
.lf-yy .lf-yy-gz{margin:6px 0 4px;font-size:32px;line-height:1.2;font-weight:700;color:var(--lf-ink);display:flex;flex-direction:column;align-items:center;gap:4px}
/* 夫妻宮：地支外畫一圈曼陀羅圓（綠松石實圈＋外圈金點），不用紅框 */
.lf-yy .lf-yy-br.lf-yy-palace{display:inline-flex;align-items:center;justify-content:center;width:1.55em;height:1.55em;border-radius:50%;
  border:2px solid var(--lf-yy-turq);background:var(--lf-yy-butter);color:var(--lf-yy-turq);outline:2px dotted var(--lf-gold);outline-offset:3px}
.lf-yy .lf-yy-tag{margin-top:6px;font-size:var(--lf-fs-xs);color:var(--lf-yy-turq);line-height:1.4}
.lf-yy .lf-yy-sm{font-size:var(--lf-fs-xs);line-height:1.5;color:var(--lf-ink-2);margin-top:2px}
.lf-yy .lf-yy-dt{margin-top:4px;padding-top:4px;border-top:1px dotted var(--lf-hairline)}
.lf-yy .lf-yy-cap{margin:6px 0 0;font-size:var(--lf-fs-xs);color:var(--lf-ink-2);text-align:center}

/* 神煞：一串小旗（有＝五色旗面、沒有＝空心旗），併在四柱卡裡 */
.lf-yy .lf-yy-stamps{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 2px}
.lf-yy .lf-yy-stamp{display:inline-flex;align-items:flex-start;justify-content:center;min-width:3.4em;padding:3px 8px 10px;border:1px dashed var(--lf-rule);border-bottom:0;
  font-size:var(--lf-fs-sm);letter-spacing:.06em;color:var(--lf-ink-2);background:transparent;
  -webkit-clip-path:polygon(0 0,100% 0,100% 100%,50% 78%,0 100%);clip-path:polygon(0 0,100% 0,100% 100%,50% 78%,0 100%)}
.lf-yy .lf-yy-stamp.lf-yy-on{border:0;color:#fff;font-weight:700;background:var(--lf-yy-f1)}
.lf-yy .lf-yy-stamp.lf-yy-on:nth-child(5n+2){background:var(--lf-yy-turq)}
.lf-yy .lf-yy-stamp.lf-yy-on:nth-child(5n+3){background:var(--lf-yy-f3)}
.lf-yy .lf-yy-stamp.lf-yy-on:nth-child(5n+4){background:var(--lf-yy-f4)}
.lf-yy .lf-yy-stamp.lf-yy-on:nth-child(5n+5){background:#8A5A0B}
.lf-yy .lf-yy-ss{margin:8px 0 0;padding:8px 10px;border:1px solid var(--lf-hairline);border-radius:var(--lf-r);background:#fff}
.lf-yy .lf-yy-ss:not(.lf-yy-on){background:transparent}
.lf-yy .lf-yy-ssh{display:flex;justify-content:space-between;gap:10px;font-size:var(--lf-fs-ui)}
.lf-yy .lf-yy-ssh b{color:var(--lf-yy-robe-deep)}
.lf-yy .lf-yy-ss.lf-yy-on .lf-yy-ssh b::before{content:"";display:inline-block;width:8px;height:8px;margin-right:8px;vertical-align:.12em;border-radius:50%;background:var(--lf-yy-turq)}
.lf-yy .lf-yy-ss:not(.lf-yy-on) .lf-yy-ssh span{color:var(--lf-ink-2)}

/* 夫妻宮關係圖（SVG）：夫妻宮在上方畫成曼陀羅圓，其他三柱在下；
   合與沖刑害用「記號形狀＋字」分：圓形章＝合，菱形章＝沖刑害；連線一律同一種細線 */
.lf-yy .lf-yy-map{margin:12px 0 0;padding:8px 6px 4px;background:#fff;border:1px solid var(--lf-hairline);border-radius:var(--lf-r)}
.lf-yy .lf-yy-svg{display:block;max-width:420px;height:auto;margin:0 auto;overflow:visible}
.lf-yy .lf-yy-link{stroke:var(--lf-rule);stroke-width:1.5}
.lf-yy .lf-yy-mk-h{fill:var(--lf-yy-butter);stroke:var(--lf-yy-turq);stroke-width:2.5}
.lf-yy .lf-yy-mk-t{fill:var(--lf-yy-cinnabar);stroke:#fff;stroke-width:1.5}
.lf-yy .lf-yy-mkt{font-size:13px;font-weight:700;font-family:inherit;fill:var(--lf-yy-turq)}
.lf-yy .lf-yy-mkt-t{fill:#fff}
.lf-yy .lf-yy-hub{fill:var(--lf-yy-butter);stroke:var(--lf-yy-turq);stroke-width:2}
.lf-yy .lf-yy-halo{fill:none;stroke:var(--lf-gold);stroke-width:1.5;stroke-dasharray:1.5 4;stroke-linecap:round}
.lf-yy .lf-yy-hubt{font-size:24px;font-weight:700;fill:var(--lf-yy-turq);font-family:inherit}
.lf-yy .lf-yy-hubl{font-size:13px;font-weight:700;fill:var(--lf-yy-turq);font-family:inherit}
.lf-yy .lf-yy-node{fill:var(--lf-yy-cloth);stroke:var(--lf-rule);stroke-width:1}
.lf-yy .lf-yy-node-off{opacity:.5}
.lf-yy .lf-yy-nodet{font-size:20px;font-weight:700;fill:var(--lf-ink);font-family:inherit}
.lf-yy .lf-yy-nodel{font-size:12px;fill:var(--lf-ink-2);font-family:inherit}
.lf-yy .lf-yy-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 18px;margin:4px 0 4px;font-size:var(--lf-fs-xs);color:var(--lf-ink-2)}
.lf-yy .lf-yy-legend span{display:inline-flex;align-items:center;gap:6px}
.lf-yy .lf-yy-legend span::before{content:"";width:11px;height:11px;flex:none}
.lf-yy .lf-yy-legend .lf-yy-lg-h::before{border-radius:50%;border:2.5px solid var(--lf-yy-turq);background:var(--lf-yy-butter)}
.lf-yy .lf-yy-legend .lf-yy-lg-t::before{background:var(--lf-yy-cinnabar);transform:rotate(45deg) scale(.85)}

/* 流年：許願卡點綴＋強度柱（只畫目前顯示的年份；柱高與顏色深淺連續變化，沒有門檻）＋清單 */
.lf-yy .lf-yy-wish{float:right;width:34px;height:auto;margin:8px 0 4px 10px;pointer-events:none}
.lf-yy .lf-yy-key{display:flex;flex-wrap:wrap;gap:4px 16px;margin:10px 0 0;font-size:var(--lf-fs-xs);color:var(--lf-ink-2)}
.lf-yy .lf-yy-key span{display:inline-flex;align-items:center;gap:6px}
.lf-yy .lf-yy-bars{display:flex;gap:4px;margin:10px 0 0;padding:8px 4px 4px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;background:#fff;border:1px solid var(--lf-hairline);border-radius:var(--lf-r);clear:both}
.lf-yy .lf-yy-bar{flex:1 0 44px;min-width:44px;min-height:80px;scroll-snap-align:center;display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:0 2px;border:0;background:none;cursor:pointer;color:var(--lf-ink-2);font-family:inherit}
.lf-yy .lf-yy-bar:focus-visible{outline:3px solid var(--lf-yy-turq);outline-offset:1px}
.lf-yy .lf-yy-barw{display:flex;align-items:flex-end;height:56px;border-bottom:2px solid var(--lf-hairline)}
.lf-yy .lf-yy-barf{display:block;width:100%;min-height:4px;border-radius:7px 7px 0 0;background:var(--lf-yy-cinnabar)}
.lf-yy .lf-yy-bar.lf-yy-now .lf-yy-barw{border-bottom-color:var(--lf-yy-turq)}
.lf-yy .lf-yy-barl{font-size:var(--lf-fs-xs);line-height:1.3;text-align:center}
.lf-yy .lf-yy-bar.lf-yy-now .lf-yy-barl{color:var(--lf-yy-turq);font-weight:700}
.lf-yy .lf-yy-years{margin:8px 0 0;padding:0;list-style:none}
.lf-yy .lf-yy-yr{margin:6px 0 0;border:1px solid var(--lf-hairline);border-radius:var(--lf-r);background:#fff}
.lf-yy .lf-yy-yr.lf-yy-now{border-color:var(--lf-yy-turq);box-shadow:inset 0 0 0 1px var(--lf-yy-turq)}
.lf-yy .lf-yy-yh{display:block;width:100%;min-height:52px;padding:8px 10px;border:0;background:none;color:var(--lf-ink);text-align:left;cursor:pointer}
.lf-yy .lf-yy-yh:focus-visible{outline:3px solid var(--lf-yy-turq);outline-offset:-3px}
.lf-yy .lf-yy-yt{display:flex;gap:10px;align-items:baseline;font-size:var(--lf-fs-ui)}
.lf-yy .lf-yy-yt b{font-size:var(--lf-fs-md);color:var(--lf-yy-robe-deep)}
/* 每年一條細強度線：寬度與深淺連續變化 */
.lf-yy .lf-yy-gauge{display:block;height:4px;margin:6px 0 2px;border-radius:2px;background:var(--lf-yy-cloth)}
.lf-yy .lf-yy-gauge i{display:block;height:100%;border-radius:2px;background:var(--lf-yy-cinnabar)}
.lf-yy .lf-yy-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.lf-yy .lf-yy-chip{display:inline-flex;align-items:center;gap:5px;padding:1px 8px;border:1px solid var(--lf-hairline);border-radius:12px;background:var(--lf-yy-butter);font-size:var(--lf-fs-xs);line-height:1.8;color:var(--lf-ink)}
.lf-yy .lf-yy-chip::before,.lf-yy .lf-yy-key span::before{content:"";flex:none;width:8px;height:8px}
/* 兩個家族：和夫妻宮的互動（圓）、古書星曜（菱形） */
.lf-yy .lf-yy-bond::before{border-radius:50%;border:2px solid var(--lf-yy-turq)}
.lf-yy .lf-yy-star::before{background:var(--lf-gold);transform:rotate(45deg) scale(.85)}
.lf-yy .lf-yy-chip.lf-yy-calm{color:var(--lf-ink-2);background:transparent}
.lf-yy .lf-yy-chip.lf-yy-calm::before{display:none}
.lf-yy .lf-yy-yb{padding:0 10px 10px}
.lf-yy .lf-yy-more{margin:8px 0 0;text-align:center}
/* 大運橫條 */
.lf-yy .lf-yy-dstrip{display:flex;gap:4px;margin:12px 0 0;overflow-x:auto}
.lf-yy .lf-yy-dec{flex:1 0 56px;display:flex;flex-direction:column;align-items:center;padding:6px 2px;border:1px solid var(--lf-hairline);border-radius:var(--lf-r);background:#fff;font-size:var(--lf-fs-xs);color:var(--lf-ink-2)}
.lf-yy .lf-yy-dec b{font-size:var(--lf-fs-md);color:var(--lf-ink);letter-spacing:.04em}
.lf-yy .lf-yy-dec.lf-yy-now{border-color:var(--lf-yy-turq);background:var(--lf-yy-turq);color:#fff}
.lf-yy .lf-yy-dec.lf-yy-now b,.lf-yy .lf-yy-dec.lf-yy-now .lf-yy-dect{color:#fff;font-weight:700}
.lf-yy .lf-yy-dect{min-height:1.4em;line-height:1.4}
.lf-yy .lf-yy-id{margin:12px 0 0;font-size:var(--lf-fs-sm);color:var(--lf-ink-2)}
.lf-yy .lf-yy-id b{font-family:ui-monospace,Consolas,monospace;color:var(--lf-ink);letter-spacing:.1em}

/* 開場佛桌照：先留位置（不跳版），載入後淡入；下緣掛一串風馬旗 */
.lf-yy .lf-yy-hero{margin:0 0 4px;aspect-ratio:12/5;overflow:hidden;background:var(--lf-yy-cloth-2);border-radius:var(--lf-r) var(--lf-r) 0 0}
.lf-yy .lf-yy-hero img{pointer-events:none;-webkit-user-select:none;user-select:none;display:block;width:100%;height:100%;object-fit:cover;object-position:50% 45%}
.lf-yy .lf-yy-hero-flags{height:12px;margin:0 0 12px}
.lf-yy .lf-yy-im{opacity:0}
.lf-yy .lf-yy-im.lf-yy-loaded{opacity:1}
@supports not (aspect-ratio:1/1){.lf-yy .lf-yy-hero{height:0;padding-top:41.6%;position:relative}.lf-yy .lf-yy-hero img{position:absolute;top:0;left:0}}
@media (prefers-reduced-motion:no-preference){.lf-yy .lf-yy-im{transition:opacity .6s var(--lf-ease-out)}}

/* 落款：成功佛堂印；區塊之間的法器點綴 */
.lf-yy .lf-yy-sign{display:flex;align-items:flex-end;gap:12px}
.lf-yy .lf-yy-sign .lf-remind{flex:1 1 auto;min-width:0;border-left:0;border-radius:var(--lf-r);background:var(--lf-yy-cloth)}
.lf-yy .lf-yy-seal{flex:none;width:64px;height:auto;transform:rotate(-4deg);pointer-events:none}
.lf-yy .lf-yy-orn{display:flex;align-items:center;gap:12px;margin:18px 0 0;pointer-events:none}
.lf-yy .lf-yy-orn::before,.lf-yy .lf-yy-orn::after{content:"";flex:1;border-top:1px dotted var(--lf-rule)}
.lf-yy .lf-yy-orn img{width:auto;height:40px}

/* 諮詢卡；旁邊的神像只是裝飾，不能點 */
.lf-yy .lf-yy-cta{display:flex;align-items:flex-end;gap:12px}
.lf-yy .lf-yy-cta .lf-cta-body{flex:1 1 auto;min-width:0}
.lf-yy .lf-yy-deity{flex:none;order:2;width:84px;height:auto;align-self:flex-start;pointer-events:none;-webkit-user-select:none;user-select:none}
.lf-yy .lf-cta-card{margin:18px 0 6px;padding:24px 18px 18px;text-align:left;background:var(--lf-yy-butter);border:1px solid var(--lf-hairline);border-radius:0 0 var(--lf-r) var(--lf-r)}
.lf-yy .lf-cta-t{font-size:var(--lf-fs-md);font-weight:700;color:var(--lf-yy-robe-deep);letter-spacing:var(--lf-yy-track-title);margin-bottom:4px}
.lf-yy .lf-cta-s{font-size:var(--lf-fs-sm);line-height:1.8;color:var(--lf-ink-2);margin-bottom:12px}
.lf-yy .lf-cta-btns{display:flex;flex-wrap:wrap;gap:10px}
.lf-yy .lf-cta-btns .lf-nb{display:inline-block}
.lf-yy .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}
.lf-yy #yy-share-ok{overflow-wrap:anywhere;-webkit-user-select:text;user-select:text}

@media (max-width:420px){
  .lf-yy .lf-yy-form{padding:20px 10px 14px}
  .lf-yy .lf-yy-card{padding:4px 10px 14px}
  .lf-yy .lf-yy-pillars{gap:4px}
  .lf-yy .lf-yy-gz{font-size:28px}
  .lf-yy .lf-yy-deity{width:60px}
  .lf-yy .lf-cta-card{padding:22px 12px 14px}
  .lf-yy .lf-cta-btns .lf-link{flex:1 1 100%;padding:10px 8px;text-align:center}
}
