/* tea-tarot.css — 🃏 茶塔羅 M3（tarot-plan.md，2026-07-22）
   overlay 家族（z 10060）：深綠夜色 veil＋宣紙面板（骨架同 tea-cellar）；
   卡面 4:7、3D 翻牌（reduced-motion 直接顯示）；缺圖走 CSS 占位卡。
   高度 vh fallback＋dvh；勿再往內加 backdrop-filter（手機穩定性規範）。 */
.hh-tt-overlay {
  position: fixed; inset: 0; z-index: 10060;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(20, 30, 24, 0);
  transition: background 0.25s ease;
  pointer-events: none;
}
.hh-tt-overlay.is-open { background: rgba(20, 30, 24, 0.6); pointer-events: auto; }
.hh-tt-panel {
  width: 100%; max-width: 560px;
  max-height: 90vh; max-height: 90dvh;
  overflow-y: auto;
  background: linear-gradient(180deg, #faf6ec, #f0e8d3);
  border-radius: 22px 22px 0 0;
  padding: 20px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  position: relative;
  transform: translateY(30px); opacity: 0;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.24s ease;
}
.hh-tt-overlay.is-open .hh-tt-panel { transform: translateY(0); opacity: 1; }
.hh-tt-close {
  appearance: none; -webkit-appearance: none;
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px;
  border: none; background: none;
  font-size: 17px; color: #8a8069; cursor: pointer; z-index: 2;
}
.hh-tt-head { text-align: center; margin: 6px 0 14px; }
.hh-tt-eyebrow {
  font: 600 10px/1 "Cormorant Garamond", serif;
  letter-spacing: 0.34em; color: #a8894f;
}
.hh-tt-head h3 { font: 700 21px/1.3 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #2c3a2e; margin: 6px 0 0; letter-spacing: 0.16em; }
.hh-tt-sub { font: 500 12px/1.6 var(--font-ui, sans-serif); color: #8a7a5c; margin: 4px 0 0; }
/* 頂部免責章（2026-07-30 業主指示「AI 運算推衍・娛樂要直接寫在 header 下方、要顯眼」）：
   淺色 sheet 版＝每日一牌 header 尾；深色場景版＝.is-scene（問事場景題字列下，
   進洗牌儀式時隨 .hh-tt-fam 一起 is-away 淡出、結語頁再回來）。
   長版免責（tt_disclaimer）仍留在解讀尾端，這裡是開場就看得到的短版。 */
.hh-tt-aibadge {
  display: block; /* block＋width:max-content＋margin auto＝置中且放得下就一行 */
  width: max-content; max-width: calc(100% - 24px);
  margin: 10px auto 0;
  padding: 7px 15px;
  border: 1px solid rgba(168, 137, 79, 0.6);
  border-radius: 14px;
  background: rgba(168, 137, 79, 0.1);
  font: 700 12.5px/1.6 var(--font-ui, sans-serif);
  letter-spacing: 0.1em;
  color: #7a6234; /* 對米白 sheet 5.3:1 */
}
.hh-tt-aibadge.is-scene {
  margin-top: 12px;
  z-index: 46; position: relative; /* 同 .hh-tt-fam：浮在結語層之上 */
  transition: opacity 0.5s;
  border-color: rgba(207, 169, 106, 0.62);
  background: rgba(30, 26, 18, 0.55);
  color: #e8cd93;
}
.hh-tt-loading { text-align: center; padding: 48px 0; color: #8a7a5c; }
.hh-tt-date { text-align: center; font: 600 11px/1 "Cormorant Garamond", serif; letter-spacing: 0.22em; color: #a8894f; margin: 0 0 12px; }

/* ── 翻牌台（4:7 卡、3D flip）────────────────────────── */
.hh-tt-flip {
  appearance: none; -webkit-appearance: none;
  display: block; border: none; background: none; cursor: pointer;
  width: min(216px, 56vw); aspect-ratio: 4 / 7;
  margin: 0 auto;
  perspective: 1200px;
  padding: 0;
}
.hh-tt-flip-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.3, 0.1, 0.25, 1);
}
.hh-tt-flip.is-flipped .hh-tt-flip-inner { transform: rotateY(180deg); }
.hh-tt-flip.no-anim .hh-tt-flip-inner { transition: none; }
.hh-tt-face {
  position: absolute; inset: 0;
  border-radius: 12px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 10px 28px rgba(24, 32, 26, 0.35);
}
/* 燙金牌框（前端疊加，圖面本身無框） */
.hh-tt-face::after {
  content: ""; position: absolute; inset: 5px;
  border: 1px solid rgba(197, 164, 90, 0.75);
  border-radius: 8px; pointer-events: none;
}
.hh-tt-face img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
  user-select: none; -webkit-user-select: none;
}
.hh-tt-front { transform: rotateY(180deg); background: #223227; }
.hh-tt-front.is-rev img { transform: rotate(180deg); }
/* 缺圖占位卡（生圖未到位；img onerror 移除後露出） */
.hh-tt-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(120% 90% at 50% 20%, #33493a, #1d2b22);
}
.hh-tt-front.is-rev .hh-tt-ph { transform: rotate(180deg); }
.hh-tt-ph-num { font: 600 15px/1 "Cormorant Garamond", serif; letter-spacing: 0.2em; color: #c5a45a; }
.hh-tt-ph-name {
  font: 700 22px/1.4 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #efe6cd;
  writing-mode: vertical-rl; letter-spacing: 0.3em;
}
/* 卡背：CSS 紋樣（back.webp 就位後 img 蓋過） */
.hh-tt-back { background: radial-gradient(130% 100% at 50% 0%, #2c4234, #16241c); }
.hh-tt-backfx {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.hh-tt-backfx::before {
  content: ""; position: absolute; inset: 14px;
  border: 1px solid rgba(197, 164, 90, 0.5);
  border-radius: 7px;
}
.hh-tt-backfx span {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(197, 164, 90, 0.75);
  box-shadow: 0 0 0 5px rgba(197, 164, 90, 0.16);
  font: 700 26px/1 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #d8bd7f;
}
.hh-tt-hint {
  text-align: center; font: 500 12px/1.6 var(--font-ui, sans-serif);
  color: #8a7a5c; margin: 12px 0 0;
  animation: hh-tt-breathe 2.4s ease-in-out infinite;
}
@keyframes hh-tt-breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* ── 解讀面板 ─────────────────────────────────────── */
.hh-tt-reading { margin-top: 18px; opacity: 0; transform: translateY(10px); }
.hh-tt-reading.is-in { opacity: 1; transform: none; transition: opacity 0.4s ease, transform 0.4s ease; }
.hh-tt-name-en { text-align: center; font: 600 10px/1 "Cormorant Garamond", serif; letter-spacing: 0.3em; color: #a8894f; text-transform: uppercase; margin: 0 0 6px; }
.hh-tt-name {
  text-align: center; font: 700 19px/1.4 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #2c3a2e;
  letter-spacing: 0.1em; margin: 0 0 10px;
}
.hh-tt-side {
  display: inline-block; vertical-align: 2px;
  margin-left: 8px; padding: 2px 8px;
  border-radius: 999px; border: 1px solid rgba(90, 122, 96, 0.5);
  font: 600 10.5px/1.4 var(--font-ui, sans-serif); color: #4a6a52; letter-spacing: 0.1em;
}
.hh-tt-side.is-rev { border-color: rgba(160, 82, 62, 0.5); color: #9a5036; }
.hh-tt-kw { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 14px; }
.hh-tt-kw span {
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(148, 114, 62, 0.3);
  font: 600 11px/1.5 var(--font-ui, sans-serif); color: #6b5a3c;
}
.hh-tt-core {
  margin: 0 6px 12px; padding: 10px 14px;
  border-left: 2px solid #c5a45a;
  font: 600 14.5px/1.9 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #3a4a3c;
}
.hh-tt-text { font: 500 13.5px/2 var(--font-ui, sans-serif); color: #4a4536; margin: 0 6px 10px; }
.hh-tt-domain {
  margin: 0 6px 14px; padding: 10px 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(148, 114, 62, 0.26);
  border-radius: 12px;
  font: 500 12.5px/1.9 var(--font-ui, sans-serif); color: #5a5240;
}
/* 免責（AI 運算・僅供娛樂參考）——淺色 sheet 版；深色場景在結論頁段另有覆寫 */
.hh-tt-disclaimer {
  margin: 20px 6px 0; padding-top: 10px;
  border-top: 1px solid rgba(148, 114, 62, 0.26);
  text-align: center;
  font: 400 11.5px/1.9 var(--font-ui, sans-serif); color: #6f6656;
}
/* 宜飲 */
.hh-tt-tea-label { font: 700 12px/1 var(--font-ui, sans-serif); color: #6b5a3c; letter-spacing: 0.08em; margin: 0 6px 8px; }
.hh-tt-tea-card {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  width: calc(100% - 12px); margin: 0 6px; text-align: left;
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 114, 62, 0.32);
  border-radius: 14px; padding: 9px 12px 9px 9px;
}
.hh-tt-tea-card img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #e8e0cc; }
.hh-tt-tea-name { flex: 1; font: 700 14px/1.5 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #2c3a2e; }
.hh-tt-tea-go { font-size: 18px; color: #a8894f; }

@media (prefers-reduced-motion: reduce) {
  .hh-tt-flip-inner { transition: none; }
  .hh-tt-hint { animation: none; }
  .hh-tt-reading { transition: none; }
}

/* ═══════════ M4 問事牌陣 v2（夜觀星象沉浸場景）═══════════
   流程：河流氛圍 → 選領域亮 CTA → 收束洗牌 → 天穹弧選牌 → 逐張慢翻＋解讀 sheet → 結論頁。
   手機＝基底；桌機覆寫在檔尾 @media(min-width:1024px)。
   ⚠️ veil 已是模糊面，卡片/面板內勿再疊 backdrop-filter（手機穩定性規範）。 */
.hh-tt-askentry {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  width: 100%; margin-top: 16px;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  background: linear-gradient(160deg, #24382c, #16241c);
  border: 1px solid rgba(197, 164, 90, 0.5);
  border-radius: 14px; text-align: left;
}
.hh-tt-askentry-t { font: 700 14px/1.4 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #efe6cd; letter-spacing: 0.08em; }
.hh-tt-askentry-s { flex: 1; font: 500 11px/1.4 var(--font-ui, sans-serif); color: rgba(239, 230, 205, 0.55); }
.hh-tt-askentry-go { color: #c5a45a; font-size: 18px; }

/* 全螢幕夜空舞台 */
.hh-tt-overlay.is-ask { align-items: stretch; }
/* is-ask 全螢幕態：鎖橫向（fixed 卡若被殘留 transform 推出右緣，iOS 會整層可橫滑）*/
.hh-tt-overlay.is-ask { overflow-x: hidden; }
.hh-tt-overlay.is-ask .hh-tt-panel {
  max-width: none; max-height: none;
  height: 100vh; height: 100dvh;
  border-radius: 0;
  padding: max(14px, env(safe-area-inset-top)) 0 0;
  background:
    radial-gradient(140% 80% at 50% -20%, rgba(35, 65, 49, 0.6) 0%, transparent 60%),
    radial-gradient(100% 50% at 15% 108%, rgba(29, 53, 39, 0.35) 0%, transparent 55%),
    linear-gradient(175deg, #101f16 0%, #0b1610 45%, #071009 100%);
  color: #efe6cd;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
}
.hh-tt-overlay.is-ask .hh-tt-close { color: rgba(239, 230, 205, 0.75); z-index: 80; } /* > readsheet(70)/summary(45)——低了會被結語層蓋住點不到 */
/* 獨立頁模式（/tarot）的 ✕＝回首頁（2026-07-22 業主回饋補回；樣式同 sky scene 圓框） */
.hh-tt-overlay.is-page .hh-tt-close {
  position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06);
  color: rgba(239, 230, 205, 0.75); font-size: 14px; line-height: 1; z-index: 80;
}
.hh-tt-gate-home { display: block; margin-top: 16px; text-align: center;
  font: 500 12px/1.6 var(--font-ui, sans-serif); letter-spacing: 0.14em;
  color: rgba(239, 230, 205, 0.55); text-decoration: none; }
.hh-tt-sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hh-tt-sky i { position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: rgba(232, 220, 188, 0.8); animation: hh-tt-tw 4s ease-in-out infinite; }
.hh-tt-sky i:nth-child(odd) { width: 1px; height: 1px; }
@keyframes hh-tt-tw { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.9; } }
.hh-tt-moon { position: absolute; left: 50%; top: -140px; width: 420px; height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(216, 189, 127, 0.13) 0%, transparent 62%); }

/* 問事場景載入佔位（JSON 載完前的夜色空台；先前這段是每日一牌淺色 sheet＝進 /tarot 會閃每日一牌）*/
.hh-tt-boot { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: relative; z-index: 2; text-align: center; }
.hh-tt-boot-t { font: 700 20px/1.3 "Noto Serif TC", "Noto Serif TC Fallback", serif; letter-spacing: 0.22em; text-indent: 0.22em;
  color: rgba(242, 234, 214, 0.9); }
.hh-tt-boot-s { font: 500 12px/1.6 var(--font-ui, sans-serif); letter-spacing: 0.14em;
  color: rgba(239, 230, 205, 0.5); }

/* 掛軸題字家族切換（紫微｜星座｜茶塔羅） */
/* 掛軸題字家族列＝與 sky scene 的 .hh-sky-fam 同語彙（案 A 統一頂層，改樣式兩邊一起改） */
.hh-tt-fam { display: flex; align-items: center; gap: 13px; margin-top: 4px; z-index: 46; position: relative; transition: opacity 0.5s; }
/* z 46＝浮在結語層(45)之上（結語頁保留家族 header）；veil(50) 翻牌暗場仍蓋住 */
.hh-tt-fam button, .hh-tt-fam span {
  appearance: none; border: none; background: none; cursor: pointer;
  font: 600 13.5px/1.4 "Noto Serif TC", "Noto Serif TC Fallback", serif; letter-spacing: 0.24em; text-indent: 0.24em;
  color: rgba(239, 230, 205, 0.42); position: relative; padding: 4px 1px 9px; white-space: nowrap;
}
.hh-tt-fam i { width: 1px; height: 14px; background: linear-gradient(180deg, transparent, rgba(197, 164, 90, 0.7), transparent); }
.hh-tt-fam .is-on { color: #f2ead6; cursor: default; }
.hh-tt-fam .is-on::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 22px; height: 3px;
  transform: translateX(-50%) rotate(-1deg); border-radius: 2px; background: #a63d2a;
  box-shadow: 0 0 6px rgba(166, 61, 42, 0.5); }
.hh-tt-famsub { margin-top: 7px; font: 600 9px/1 "Cormorant Garamond", serif;
  letter-spacing: 0.42em; text-indent: 0.42em; color: #b99b57; z-index: 46; position: relative; transition: opacity 0.5s; }

/* 每日一牌入口（問事領域選擇畫面底下，2026-07-24）：金框膠囊，進洗牌 is-away 淡出 */
.hh-tt-daily-entry {
  appearance: none; -webkit-appearance: none; cursor: pointer; align-self: center;
  margin: 16px auto 0; padding: 9px 20px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(197, 164, 90, 0.42); border-radius: 999px;
  font: 600 12.5px/1.3 "Noto Serif TC", "Noto Serif TC Fallback", serif; letter-spacing: 0.16em; text-indent: 0.16em;
  color: #d8bd7f; z-index: 5; transition: opacity 0.4s, background 0.3s, border-color 0.3s;
}
.hh-tt-daily-entry:hover { background: rgba(216, 189, 127, 0.14); border-color: rgba(216, 189, 127, 0.7); }

/* 領域直書四柱（線繪 SVG、選中金框＋紅印） */
.hh-tt-doms { display: flex; gap: 14px; margin-top: 18px; z-index: 5; transition: opacity 0.5s; }
.hh-tt-dm { appearance: none; cursor: pointer; position: relative;
  width: 56px; padding: 15px 0 12px;
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.028));
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.hh-tt-dm svg { width: 18px; height: 18px; stroke: #b99b57; fill: none; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }
.hh-tt-dm b { writing-mode: vertical-rl; font: 600 13px/1 "Noto Serif TC", "Noto Serif TC Fallback", serif;
  letter-spacing: 0.3em; color: rgba(239, 230, 205, 0.6); }
.hh-tt-dm-dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; transition: background 0.25s; }
.hh-tt-dm.is-on { border-color: rgba(197, 164, 90, 0.8); transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(197, 164, 90, 0.28), 0 14px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.hh-tt-dm.is-on b { color: #f2ead6; }
.hh-tt-dm.is-on svg { stroke: #d8bd7f; opacity: 1; }
.hh-tt-dm.is-on .hh-tt-dm-dot { background: #a63d2a; box-shadow: 0 0 6px rgba(166, 61, 42, 0.6); }
/* 直排單欄（2026-07-22 業主回報：雙欄各 ~155px 塞不下 placeholder＝截字破相） */
.hh-tt-opts { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px;
  width: min(320px, calc(100% - 36px)); position: relative; z-index: 5; }
.hh-tt-opts[hidden] { display: none !important; } /* [hidden] 防禦——display:grid 會蓋掉 hidden（家規雷） */
.hh-tt-opt { width: 100%; padding: 10px 12px;
  font-size: 16px; /* iOS 防聚焦放大鐵則 */
  font-family: var(--font-ui, sans-serif); color: #efe6cd;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 12px; outline: none; }
.hh-tt-opt::placeholder { color: rgba(239, 230, 205, 0.38); }

/* 牌域（河流/弧共用） */
.hh-tt-zone { position: relative; flex: 1; width: 100%; touch-action: pan-y; }
.hh-tt-fcard { position: absolute; left: 0; top: 0; width: 66px; height: 116px;
  border-radius: 7px; overflow: hidden; cursor: pointer; will-change: transform;
  background: radial-gradient(130% 100% at 50% 0%, #2c4234, #16241c);
  /* 陰影收斂：78 張洗牌堆疊時大 blur＋金邊描邊會累積成一片髒陰影（業主 2026-07-24 回報）
     → 減小 blur/alpha、去金邊（卡背 img 自帶金框）；單張選中/放大態另有強陰影 */
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.38); }
.hh-tt-fcard > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  user-select: none; -webkit-user-select: none; pointer-events: none; }
.hh-tt-fcard.is-sel { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6), 0 0 0 1.5px rgba(216, 189, 127, 0.95), 0 0 26px rgba(216, 189, 127, 0.55); }

/* 進度＋提示 */
.hh-tt-prog { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); z-index: 5;
  font: 600 10.5px/1 "Cormorant Garamond", serif; letter-spacing: 0.3em; color: #b99b57; transition: opacity 0.5s; }
.hh-tt-prog b { color: #e8d9ae; font-size: 14px; }
.hh-tt-overlay.is-ask .hh-tt-hint { position: absolute; left: 0; right: 0;
  bottom: calc(86px + env(safe-area-inset-bottom, 0px)); text-align: center; margin: 0;
  font: 500 11px/1.7 var(--font-ui, sans-serif); letter-spacing: 0.12em; color: rgba(239, 230, 205, 0.45);
  animation: hh-tt-breathe 2.8s ease-in-out infinite; pointer-events: none; z-index: 5; transition: opacity 0.5s; }

/* CTA：選了才亮＋掃光 */
.hh-tt-cta { appearance: none; -webkit-appearance: none; cursor: pointer;
  position: relative; overflow: hidden;
  width: min(300px, 80vw); padding: 15px 0; text-align: center; border: none; border-radius: 999px;
  font: 700 14.5px/1 "Noto Serif TC", "Noto Serif TC Fallback", serif; letter-spacing: 0.32em; text-indent: 0.32em; color: #1d2b22;
  background: linear-gradient(160deg, #f2ead6, #d8c9a4);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  opacity: 0.22; pointer-events: none; transition: opacity 0.45s; }
.hh-tt-cta.is-on { opacity: 1; pointer-events: auto; }
.hh-tt-cta.is-on::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: hh-tt-shine 2.6s ease-in-out infinite; }
@keyframes hh-tt-shine { 0% { left: -50%; } 60%, 100% { left: 110%; } }
#ttCta { position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 6; }
.hh-tt-cta-ghost { background: linear-gradient(160deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
  color: #e9dfc4; border: 1px solid rgba(255, 255, 255, 0.25); box-shadow: none; }
.hh-tt-cta-line { display: block; text-decoration: none; background: linear-gradient(160deg, #08bf5b, #06a94f);
  color: #fff; opacity: 1; pointer-events: auto; margin: 0 auto; }
.hh-tt-gate { width: min(360px, calc(100% - 40px)); margin: 26px auto 0; text-align: center; z-index: 5; }
.is-away { opacity: 0 !important; pointer-events: none !important; }

/* 翻牌（雙面卡＋放大態） */
.hh-tt-fcard.is-flipcard { perspective: 900px; overflow: visible; background: none; box-shadow: none; }
.hh-tt-cinner { position: absolute; inset: 0; transform-style: preserve-3d; }
.hh-tt-fcard.css-flip .hh-tt-cinner { transition: transform 1.1s cubic-bezier(0.3, 0.1, 0.25, 1); transform: rotateY(180deg); }
.hh-tt-fcard.css-flip .hh-tt-cinner.is-open { transform: rotateY(0deg); }
.hh-tt-cface { position: absolute; inset: 0; border-radius: 9px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1px solid rgba(197, 164, 90, 0.5);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
  background: radial-gradient(130% 100% at 50% 0%, #2c4234, #16241c); }
.hh-tt-cface img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.hh-tt-cface-f.is-rev img { transform: rotate(180deg); }
.hh-tt-cface-f.is-rev .hh-tt-cph { transform: rotate(180deg); }
.hh-tt-cph { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 9px;
  background: radial-gradient(120% 90% at 50% 20%, #33493a, #1d2b22); }
.hh-tt-cph i { font: 600 12px/1 "Cormorant Garamond", serif; letter-spacing: 0.2em; color: #c5a45a; font-style: normal; }
.hh-tt-cph b { font: 700 17px/1.4 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #efe6cd; writing-mode: vertical-rl; letter-spacing: 0.28em; }
.hh-tt-cface-b { transform: rotateY(180deg); }
/* 三等份 slot：已選卡大牌常駐排列（--slot-x/--slot-w 由 JS slotGeom 設）；
   宣告必須在 is-zoomed 之前＝當前升起的卡由 is-zoomed 蓋過 slot 定位 */
.hh-tt-fcard.is-slot { position: fixed; left: var(--slot-x, 16px);
  top: calc(46px + env(safe-area-inset-top, 0px));
  width: var(--slot-w, 112px); height: calc(var(--slot-w, 112px) * 7 / 4); z-index: 55; }
.hh-tt-fcard.is-zoomed { position: fixed; left: calc(50% - 100px); top: 9%;
  width: 200px; height: 350px; z-index: 60; }
.hh-tt-veil { position: fixed; inset: 0; z-index: 50; background: rgba(5, 11, 7, 0.78);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity 0.55s; }
.hh-tt-veil.is-on { opacity: 1; }
.hh-tt-big { position: fixed; left: 0; right: 0; top: calc(9% + 362px); z-index: 60;
  text-align: center; opacity: 0; pointer-events: none; }
.hh-tt-big-e { display: block; font: 600 10.5px/1.4 "Noto Serif TC", "Noto Serif TC Fallback", serif; letter-spacing: 0.34em; color: #c5a45a; }
.hh-tt-big-n { display: block; margin-top: 7px; font: 700 20px/1.5 "Noto Serif TC", "Noto Serif TC Fallback", serif;
  letter-spacing: 0.18em; color: #f2ead6; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7); }

/* 逐張解讀 sheet（底部玻璃） */
.hh-tt-readsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  max-height: 46vh; max-height: 46dvh; overflow-y: auto;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(22, 36, 28, 0.92), rgba(12, 21, 16, 0.96));
  border-top: 1px solid rgba(197, 164, 90, 0.4);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(102%); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1); }
.hh-tt-readsheet.is-in { transform: translateY(0); }
.hh-tt-readsheet[hidden] { display: none !important; }
.hh-tt-sheet-grip { width: 40px; height: 4px; border-radius: 2px; margin: 2px auto 12px;
  background: rgba(197, 164, 90, 0.4); }
.hh-tt-readsheet .hh-tt-ptag { font: 600 10px/1.4 "Noto Serif TC", "Noto Serif TC Fallback", serif; letter-spacing: 0.3em; color: #c5a45a; }
.hh-tt-readsheet h4 { font: 700 16.5px/1.5 "Noto Serif TC", "Noto Serif TC Fallback", serif; letter-spacing: 0.1em; margin: 5px 0 9px; color: #f2ead6; }
.hh-tt-kw { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.hh-tt-kw span { padding: 3px 10px; border-radius: 999px;
  font: 600 10.5px/1.5 var(--font-ui, sans-serif); color: #d8c9a4;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); }
.hh-tt-readsheet blockquote { padding: 8px 12px; border-left: 2px solid #c5a45a; margin: 0 0 10px;
  font: 600 14px/1.9 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #e9dfc4; }
.hh-tt-readsheet p { font: 500 13px/2 var(--font-ui, sans-serif); color: rgba(239, 230, 205, 0.8); margin: 0 0 9px; }
.hh-tt-posnote { padding-top: 9px; border-top: 1px dashed rgba(197, 164, 90, 0.3); }
.hh-tt-domnote { padding: 9px 11px; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; }
.hh-tt-sheet-next { display: block; margin: 14px auto 0; }

/* 結論頁 */
.hh-tt-summary { position: absolute; inset: 0; z-index: 45; overflow-y: auto; overflow-x: hidden;
  padding: max(96px, calc(env(safe-area-inset-top, 0px) + 88px)) 20px calc(30px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center;
  opacity: 0; transform: translateY(16px); transition: opacity 0.6s, transform 0.6s; }
.hh-tt-summary.is-in { opacity: 1; transform: none; }
.hh-tt-summary[hidden] { display: none !important; }
.hh-tt-sum-cards { display: flex; gap: 14px; margin-top: 18px; justify-content: center; flex-wrap: wrap; }
/* figure 有 UA 預設 margin 1em 40px——不歸零＝三張被擠成直排（真機回報「縮圖過大」的一半元凶）*/
.hh-tt-sum-card { margin: 0; text-align: center; cursor: pointer; }
/* 抉擇陣 4 張（含明燈指引）：80px 縮圖 4 張塞不下 350px 容器會 wrap 成 3+1 → 自動縮 68px 保同列 */
.hh-tt-sum-cards:has(> :nth-child(4)) { gap: 10px; }
.hh-tt-sum-cards:has(> :nth-child(4)) .hh-tt-sum-thumb { width: 68px; height: 119px; }
.hh-tt-sum-thumb { position: relative; width: 80px; height: 140px; border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(197, 164, 90, 0.5); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  background: radial-gradient(130% 100% at 50% 0%, #2c4234, #16241c); }
.hh-tt-sum-thumb img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.hh-tt-sum-thumb.is-rev img, .hh-tt-sum-thumb.is-rev .hh-tt-cph { transform: rotate(180deg); }
.hh-tt-sum-thumb .hh-tt-cph b { font-size: 11px; }
.hh-tt-sum-thumb .hh-tt-cph i { font-size: 9px; }
.hh-tt-sum-card figcaption { margin-top: 8px; font: 600 10px/1.6 "Noto Serif TC", "Noto Serif TC Fallback", serif;
  letter-spacing: 0.14em; color: #b99b57; }
.hh-tt-sum-card figcaption b { display: block; font-size: 12.5px; color: #f2ead6; letter-spacing: 0.08em; }
.hh-tt-sum-card figcaption em { font-style: normal; display: inline-block; margin-top: 3px; padding: 1px 7px;
  border-radius: 999px; font: 600 9px/1.5 var(--font-ui, sans-serif); letter-spacing: 0.08em;
  border: 1px solid rgba(160, 200, 170, 0.45); color: #a9d0b5; }
.hh-tt-sum-card figcaption em.is-rev { border-color: rgba(224, 150, 120, 0.5); color: #e0a184; }
.hh-tt-panelcard { position: relative; width: min(420px, 100%); margin-top: 16px; padding: 17px 17px 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 14px 30px rgba(0, 0, 0, 0.4); }
.hh-tt-panelcard::after { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197, 164, 90, 0.8), transparent); }
.hh-tt-panelcard .hh-tt-ptag { font: 600 10px/1.4 "Noto Serif TC", "Noto Serif TC Fallback", serif; letter-spacing: 0.3em; color: #c5a45a; }
.hh-tt-panelcard h4 { font: 700 15.5px/1.5 "Noto Serif TC", "Noto Serif TC Fallback", serif; letter-spacing: 0.1em; margin: 5px 0 8px; color: #d8bd7f; }
.hh-tt-panelcard p { font: 500 12.5px/2 var(--font-ui, sans-serif); color: rgba(239, 230, 205, 0.78); margin: 0; }
/* 結論頁逐張「原本解析」卡（過去/現在/未來全文，內容同逐張 sheet） */
.hh-tt-panelcard.is-cardread h4 { color: #f2ead6; margin-bottom: 9px; }
.hh-tt-panelcard.is-cardread blockquote { padding: 8px 12px; border-left: 2px solid #c5a45a; margin: 0 0 10px;
  font: 600 13.5px/1.9 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #e9dfc4; }
.hh-tt-panelcard.is-cardread p { margin: 0 0 9px; }
.hh-tt-panelcard.is-cardread p:last-child { margin-bottom: 0; }
.hh-tt-asktea { width: min(420px, 100%); margin-top: 16px; }
.hh-tt-asktea .hh-tt-tea-card { width: 100%; margin: 0; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 10px; cursor: pointer; appearance: none;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 14px; }
.hh-tt-asktea .hh-tt-tea-card img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.hh-tt-asktea .hh-tt-tea-name { flex: 1; text-align: left; font: 700 13px/1.5 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #f2ead6; }
.hh-tt-asktea .hh-tt-tea-go { color: #c5a45a; font-size: 18px; }
.hh-tt-summary .hh-tt-disclaimer {
  width: min(560px, 100%); margin: 22px 0 0; padding-top: 12px;
  border-top: 1px solid rgba(197, 164, 90, 0.28);
  color: rgba(240, 234, 216, 0.58);
}
.hh-tt-askacts { display: flex; gap: 10px; margin-top: 20px; width: min(420px, 100%); }
.hh-tt-askacts .hh-tt-cta { flex: 1; width: auto; padding: 13px 0; font-size: 13px; letter-spacing: 0.2em; }

/* ── 桌機覆寫（>=1024，同檔集中）── */
@media (min-width: 1024px) {
  .hh-tt-overlay { align-items: center; }
  .hh-tt-panel { border-radius: 22px; max-height: 92vh; max-height: 92dvh; }
  .hh-tt-overlay.is-ask .hh-tt-panel { border-radius: 0; }
  .hh-tt-fam button, .hh-tt-fam span { font-size: 15px; }
  .hh-tt-doms { gap: 18px; margin-top: 24px; }
  .hh-tt-dm { width: 62px; }
  .hh-tt-fcard { width: 84px; height: 147px; }
  .hh-tt-fcard:hover { filter: brightness(1.15); }
  .hh-tt-fcard.is-zoomed { left: calc(50% - 130px); top: 8%; width: 260px; height: 455px; }
  .hh-tt-big { top: calc(8% + 470px); }
  .hh-tt-readsheet { left: 50%; right: auto; width: 560px; transform: translate(-50%, 102%);
    border-radius: 20px 20px 0 0; }
  .hh-tt-readsheet.is-in { transform: translate(-50%, 0); }
  .hh-tt-summary { padding-top: 104px; }
  .hh-tt-sum-thumb { width: 104px; height: 182px; }
}

@media (prefers-reduced-motion: reduce) {
  .hh-tt-cta.is-on::after { animation: none; }
  .hh-tt-sky i { animation: none; opacity: 0.4; }
  .hh-tt-overlay.is-ask .hh-tt-hint { animation: none; }
}
