/* ═══════════════ TAROT · 塔罗三张牌（第二颗星球）═══════════════ */

/* ── 一张牌：.tc > .tc-in > .tc-back + .tc-face ── */
.tc { --w: 120px; position: relative; width: var(--w); aspect-ratio: 200 / 340; flex: none; perspective: 1100px; }
.tc-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.8s var(--ease); }
.tc.is-face .tc-in { transform: rotateY(180deg); }
.tc.is-rev { rotate: 180deg; }
.tc-back, .tc-face {
  position: absolute; inset: 0; border-radius: calc(var(--w) * 0.075); overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.tc-back { background: var(--tc-back) center / 100% 100% no-repeat, #0a0714; }
.tc-face { transform: rotateY(180deg); background: #0b0816; }
.tc-face svg { display: block; width: 100%; height: 100%; }
/* 全息反光：一道斜光扫过 */
.tc-back::after, .tc-face::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.55) 45%, rgba(79, 247, 255, 0.4) 50%, rgba(255, 79, 216, 0.35) 55%, transparent 68%);
  background-size: 260% 100%; background-position: 130% 0; animation: tc-sheen 5.5s ease-in-out infinite;
}
@keyframes tc-sheen { 0%, 55% { background-position: 130% 0; } 85%, 100% { background-position: -30% 0; } }
.tc.glow .tc-back, .tc.glow .tc-face { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4) inset, 0 0 28px 2px rgba(255, 176, 58, 0.55), 0 0 70px -6px rgba(255, 79, 216, 0.7); }

/* ═══════════════ LANDING ═══════════════
   一整个「占卜桌上的徽章」：烛光 + 命运之轮在后，三张牌在中间，字标像大阿卡纳的烫金牌名压在轮子下沿，
   下面一条「0 · 过去 · 现在 · 未来 · XXI」牌名横幅（愚者 0 到世界 XXI，大阿卡纳的整段旅程） */
.screen-tarot, .screen-tarot-ask, .screen-tarot-table {
  --t-gold: #ffd27a; --t-amber: #ffb03a; --t-rose: #ff4f6d; --t-violet: #8b6cff; --t-cream: #fff4d6;
  --f-tarot: Didot, 'Bodoni 72', 'Bodoni MT', 'Big Caslon', 'Playfair Display', 'Noto Serif Display', 'Times New Roman', 'Songti SC', 'STSong', 'Noto Serif SC', serif;
}
.screen-tarot {
  flex-direction: column; align-items: center; justify-content: center; padding: calc(var(--safe-t) + 74px) 16px calc(var(--safe-b) + 80px); text-align: center; overflow: hidden;
}
body[data-screen='tarot'] .topbar { background: none; }
.tl-inner { display: flex; flex-direction: column; align-items: center; max-width: 760px; width: 100%; }

/* 引言：两支小烛火夹着一行烫金小字（不用全站通用的玻璃胶囊） */
.tl-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0; font-family: var(--f-tarot); font-size: clamp(10.5px, 2.9vw, 12.5px); font-weight: 700;
  letter-spacing: 0.2em; color: #ffe2b0; white-space: nowrap;
  /* 引言压在命运之轮的罗马数字圈上：一圈暗影把字和轮子分开，再加一点烛光 */
  text-shadow: 0 0 3px rgba(10, 4, 14, 0.95), 0 0 10px rgba(10, 4, 14, 0.9), 0 0 16px rgba(255, 176, 58, 0.45);
}
.tl-kicker span { padding-left: 0.2em; }
.tl-flame { flex: none; width: 8px; height: 13px; overflow: visible; fill: var(--t-amber); filter: drop-shadow(0 0 4px #ffb03a) drop-shadow(0 0 9px rgba(255, 79, 109, 0.8)); transform-origin: 50% 85%; animation: tl-flame 2.3s ease-in-out infinite; }
.tl-flame:last-child { animation-duration: 1.9s; animation-delay: -0.7s; }
@keyframes tl-flame {
  0%, 100% { transform: scale(1, 1) rotate(0deg); opacity: 1; }
  18% { transform: scale(0.92, 1.12) rotate(-5deg); }
  34% { transform: scale(1.04, 0.9) rotate(3deg); opacity: 0.85; }
  52% { transform: scale(0.96, 1.08) rotate(-2deg); opacity: 1; }
  71% { transform: scale(1.02, 0.95) rotate(4deg); opacity: 0.9; }
}

/* 主视觉：--cw 是一张牌的宽度，整个徽章都跟着它缩放 */
.tl-hero {
  --rx: 0deg; --ry: 0deg; --px: 0px; --py: 0px;
  --cw: clamp(86px, min(24vw, 16vh), 132px); --ch: calc(var(--cw) * 1.7);
  position: relative; width: min(92vw, 470px); height: calc(var(--ch) * 1.3); margin: 10px 0 0; perspective: 900px;
}
/* 烛光：牌后面一团暖光，不规则地跳 */
.tl-glow {
  position: absolute; left: 50%; top: 54%; width: calc(var(--ch) * 1.9); aspect-ratio: 1.25; translate: calc(-50% - var(--px) * 0.4) calc(-50% - var(--py) * 0.4); pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 196, 106, 0.42), rgba(255, 120, 80, 0.2) 45%, rgba(139, 108, 255, 0.1) 70%, transparent);
  animation: tl-candle 3.6s ease-in-out infinite; transition: translate 0.6s var(--ease);
}
@keyframes tl-candle { 0%, 100% { opacity: 0.9; scale: 1; } 23% { opacity: 1; scale: 1.04; } 41% { opacity: 0.78; scale: 0.98; } 63% { opacity: 0.95; scale: 1.02; } 80% { opacity: 0.84; scale: 0.99; } }
/* 命运之轮：圈住三张牌；下半圈渐隐，字标压在上面时不打架 */
.tl-wheel {
  position: absolute; left: 50%; top: 52%; width: calc(var(--ch) * 2.3); aspect-ratio: 1; pointer-events: none; opacity: 0.6;
  translate: calc(-50% + var(--px)) calc(-50% + var(--py)); transition: translate 0.6s var(--ease);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 58%, rgba(0, 0, 0, 0.25) 74%, transparent 88%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 58%, rgba(0, 0, 0, 0.25) 74%, transparent 88%);
}
.tl-wheel-spin { width: 100%; height: 100%; }
.tl-wheel svg { width: 100%; height: 100%; overflow: visible; animation: spin 80s linear infinite; }
/* 环绕星符：绕着牌转一个扁扁的椭圆，转到前面时在牌前面、变大变亮，转到后面时躲到牌后面
   x、y 两个方向各一个往返补间，y 晚四分之一圈 → 椭圆；z-index 跟着 y 切换前后 */
.tl-orbit { --T: 8s; --orx: calc(var(--cw) * 1.95); --ory: calc(var(--ch) * 0.5); position: absolute; left: 50%; top: 52%; width: 0; height: 0; pointer-events: none; }
.tl-orbit i {
  position: absolute; left: 0; top: 0; font-style: normal; z-index: 1;
  animation-name: tl-ox, tl-oz; animation-duration: var(--T); animation-timing-function: ease-in-out, linear; animation-iteration-count: infinite; animation-direction: alternate;
  animation-delay: calc(var(--i) * var(--T) * -0.25), calc(var(--i) * var(--T) * -0.25 - var(--T) * 0.5);
}
.tl-orbit s {
  display: block; translate: -50% -50%; text-decoration: none; font-size: clamp(13px, 3.6vw, 17px); line-height: 1; color: #ffd36a; text-shadow: 0 0 10px #ff8a3d, 0 0 22px rgba(255, 79, 109, 0.7);
  animation: tl-oy var(--T) ease-in-out infinite alternate; animation-delay: calc(var(--i) * var(--T) * -0.25 - var(--T) * 0.5);
}
@keyframes tl-ox { from { transform: translateX(calc(var(--orx) * -1)); } to { transform: translateX(var(--orx)); } }
@keyframes tl-oy { from { transform: translateY(calc(var(--ory) * -1)) scale(0.62); opacity: 0.35; } to { transform: translateY(var(--ory)) scale(1.18); opacity: 1; } }
@keyframes tl-oz { 0%, 49.9% { z-index: 1; } 50%, 100% { z-index: 4; } }
/* 三张牌：扇形位置只用 translate / rotate（GSAP 只碰里层 .tl-drop 的 transform，入场不会再跳位） */
.tl-fan { position: absolute; inset: 0; z-index: 2; pointer-events: none; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 0.5s var(--ease); }
.tl-card {
  --d: calc(var(--i) - 1); --sp: 0;
  position: absolute; left: 50%; top: 52%; width: var(--cw); z-index: calc(2 - var(--i)); pointer-events: auto;
  /* 一点点 Z 偏移：和 .tl-fan 自己的平面错开，3D 里点得到、叠放顺序也稳定（中间那张最靠前） */
  translate: calc(-50% + var(--d) * var(--cw) * (0.66 + var(--sp) * 0.24)) calc(-50% + var(--d) * var(--d) * var(--cw) * 0.07 - var(--sp) * 6px) 2px;
  rotate: calc(var(--d) * (12deg + var(--sp) * 6deg));
  transition: translate 0.45s var(--ease), rotate 0.45s var(--ease), filter 0.3s;
}
.tl-card:nth-child(2) { z-index: 3; translate: -50% calc(-50% - var(--cw) * 0.04 - var(--sp) * 8px) 4px; }
.tl-drop { display: block; }
.tl-card .tc { --w: var(--cw); width: 100%; animation: tl-float 4.2s ease-in-out infinite; animation-delay: calc(var(--i) * -1.3s); }
@keyframes tl-float { 50% { translate: 0 -8px; } }
.tl-hero:hover .tl-card { --sp: 1; }
.tl-card:hover { filter: brightness(1.15) drop-shadow(0 0 24px rgba(255, 176, 58, 0.7)); }

/* 字标：大阿卡纳牌名的烫金大写，烛光金从上往下由奶油金烧到玫瑰红；「O」是太阳轮 */
.tl-title { position: relative; z-index: 3; margin: 2px 0 0; font-weight: 400; line-height: 1; }
.tlt-word { display: flex; align-items: baseline; justify-content: center; gap: 0.07em; padding-left: 0.07em; font-family: var(--f-tarot); font-weight: 700; font-size: clamp(56px, min(17vw, 12.5vh), 128px); line-height: 1; }
.tlt-word b { position: relative; display: inline-block; font-weight: 700; perspective: 600px; }
.tlt-word .c, .tlt-osvg {
  display: inline-block; filter: drop-shadow(0 2px 0 rgba(40, 6, 18, 0.9)) drop-shadow(0 0 16px rgba(255, 150, 70, 0.4)) drop-shadow(0 0 34px rgba(139, 108, 255, 0.45));
}
.tlt-word .c {
  /* 色标对齐大写字母的高度（Didot：字母顶在盒子 11%、基线在 84.5%），和「O」太阳轮的渐变接得上 */
  background: linear-gradient(180deg, var(--t-cream) 11%, var(--t-gold) 36%, var(--t-amber) 56.5%, #ff6a55 74%, var(--t-rose) 84.5%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
/* 「O」和 Didot 的 O 一样大：前进宽度 0.833em，字身 0.742em，略微沉到基线下面 */
.tlt-osvg { width: 0.833em; height: 0.742em; overflow: visible; vertical-align: -0.014em; }
.tlt-sun { transform-box: view-box; transform-origin: 50% 50%; animation: spin 26s linear infinite; }
/* 每个字母背后一小团烛光，各自不规则地呼吸 */
.tlt-word b::before {
  content: ''; position: absolute; left: 50%; top: 56%; z-index: -1; width: 1.1em; height: 0.9em; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 176, 58, 0.34), rgba(255, 79, 109, 0.12) 60%, transparent);
  animation: tl-candle calc(2.6s + var(--i) * 0.43s) ease-in-out infinite; animation-delay: calc(var(--i) * -0.9s);
}
/* 点燃：入场后从左到右一支支亮一下 */
.tlt-word b::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 1.4em; height: 1.2em; translate: -50% -50%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 244, 214, 0.75), rgba(255, 176, 58, 0.35) 45%, transparent); mix-blend-mode: screen;
}
.tlt-word.ignite b::after { animation: tlt-ignite 0.9s ease-out both; animation-delay: calc(var(--i) * 0.11s); }
@keyframes tlt-ignite { 0% { opacity: 0; scale: 0.5; } 30% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.35; } }
/* 碰到一个字母：像翻一张牌一样转一圈 */
.tlt-word b.flip .c, .tlt-word b.flip .tlt-osvg { animation: tlt-flip 0.8s var(--ease); }
@keyframes tlt-flip { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }

/* 牌名横幅：0（愚者）—— 过去 · 现在 · 未来 —— XXI（世界） */
.tl-banner {
  display: flex; align-items: center; justify-content: center; gap: clamp(7px, 2vw, 12px); margin: 12px 0 0;
  font-family: var(--f-tarot); font-weight: 700; font-size: clamp(11.5px, 3.2vw, 16px); letter-spacing: 0.26em; text-transform: uppercase; color: #ffe9c4; white-space: nowrap;
}
.tl-banner span { padding-left: 0.26em; text-shadow: 0 0 14px rgba(255, 176, 58, 0.45); }
.tl-banner i { font-style: normal; font-size: 0.82em; letter-spacing: 0.08em; color: var(--t-amber); text-shadow: 0 0 10px rgba(255, 79, 109, 0.8); }
.tl-banner b { width: clamp(16px, 7vw, 64px); height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 176, 58, 0.9)); }
.tl-banner b:last-of-type { background: linear-gradient(270deg, transparent, rgba(255, 176, 58, 0.9)); }
:root:lang(zh) .tl-banner { letter-spacing: 0.4em; font-size: clamp(14px, 3.8vw, 18px); }
:root:lang(zh) .tl-banner span { padding-left: 0.4em; }
:root:lang(zh) .tl-kicker { letter-spacing: 0.3em; }
@media (max-width: 400px) {
  .tl-banner { gap: 6px; letter-spacing: 0.2em; }
  .tl-banner span { padding-left: 0.2em; }
  .tl-banner b { width: 14px; }
}
.screen-tarot .landing-sub { margin-top: 14px; text-wrap: balance; }
/* 底部三步：共用结构，编号换成琥珀色的罗马数字（大阿卡纳的牌号），箭头是烛光色 */
.screen-tarot .landing-steps { --step: var(--t-amber); --step-rgb: 255, 176, 58; --step-arrow: rgba(255, 122, 92, 0.7); --step-font: var(--f-tarot); }
.screen-tarot .landing-steps b { font-size: 12px; letter-spacing: 0.04em; }
/* 按钮用塔罗自己的烛光渐变（玫瑰 · 琥珀 · 紫），不用全站的青粉全息；提问页和牌桌也一样 */
.screen-tarot .btn-holo, .screen-tarot-ask .btn-holo, .screen-tarot-table .btn-holo {
  background: linear-gradient(100deg, #ffb03a, #ff7a5c 25%, #ff4f6d 45%, #b07bff 70%, #ffb03a); background-size: 300% 100%;
  box-shadow: 0 0 0 1px rgba(255, 240, 210, 0.45) inset, 0 12px 40px -8px rgba(255, 79, 109, 0.6), 0 0 60px -12px rgba(255, 176, 58, 0.7);
}
.screen-tarot .ticker-track span:nth-child(3n) { color: #ffd36a; }
.screen-tarot .ticker-track span:nth-child(3n + 1) { color: #ff4f6d; }

/* ═══════════════ ASK ═══════════════ */
/* 标题里的重点字用烛光金，不用全站的青粉全息字 */
.screen-tarot-ask .holo-text { background: linear-gradient(100deg, #fff4d6, #ffd27a 30%, #ffb03a 55%, #ff4f6d 85%); background-size: 100% 100%; -webkit-background-clip: text; background-clip: text; animation: none; }
.screen-tarot-ask .step-kicker { color: var(--t-gold); }
.screen-tarot-ask .progress span::after { background: linear-gradient(90deg, #ffb03a, #ff4f6d, #b07bff); }
.screen-tarot-ask .progress span.cur { box-shadow: 0 0 14px 1px rgba(255, 176, 58, 0.4); }
.screen-tarot-ask .ta-topics .tag { height: 46px; font-size: 15px; }
.ta-wishes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; perspective: 1000px; }
.ta-wish {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 10px; border-radius: 18px; text-align: center;
  border: 1px solid transparent; transition: transform 0.35s var(--ease), background 0.3s, border-color 0.3s, opacity 0.3s;
}
.ta-wish .tc { --w: min(19vw, 104px); transition: transform 0.4s var(--ease); }
.ta-wish strong { margin-top: 6px; font-size: 12.5px; font-weight: 900; line-height: 1.25; }
.ta-wish small { font-size: 11px; color: var(--ink-3); line-height: 1.35; }
.ta-wish:hover .tc { transform: translateY(-6px) rotate(-2deg); }
.ta-wish.on { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 211, 106, 0.6); box-shadow: 0 0 40px -14px #ffb03a; }
.ta-wish.on .tc { transform: translateY(-10px) scale(1.06); }
.ta-wish.on .tc-face { box-shadow: 0 0 0 1.5px #ffd36a inset, 0 0 30px 2px rgba(255, 176, 58, 0.6); }
.ta-wish.on small { color: #ffd36a; }
.screen-tarot-ask.has-wish .ta-wish:not(.on) { opacity: 0.5; }
.screen-tarot-ask.has-wish .ta-wish:not(.on):hover { opacity: 0.85; }

/* ═══════════════ TABLE · 牌桌 ═══════════════
   一张烛光牌桌：顶上一条「愿望 vs 命运」，中间三个牌位，牌位下面是读牌区；许愿入牌、洗牌、扇形、亲手翻牌、讲故事都在这一张桌上 */
.screen-tarot-table {
  flex-direction: column; align-items: center; padding: calc(var(--safe-t) + 66px) 16px calc(var(--safe-b) + 10px);
  text-align: center; overflow: hidden; user-select: none; -webkit-user-select: none;
}
body[data-screen='tarot-table'] .topbar { background: none; }

/* 顶上：返回 + 愿望牌 + 命运同步率（烛光描金的一条，不用全站的玻璃进度条） */
.tt-head {
  position: relative; z-index: 20; display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; margin-bottom: 8px;
  padding: 5px 14px 5px 5px; border-radius: 99px;
  background: linear-gradient(90deg, rgba(48, 22, 30, 0.62), rgba(22, 12, 38, 0.62));
  border: 1px solid rgba(255, 210, 122, 0.24);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, 0.08), 0 14px 36px -18px rgba(0, 0, 0, 0.8);
  transition: border-color 0.5s, box-shadow 0.5s;
}
.tt-head .back-btn { width: 36px; height: 36px; background: rgba(255, 255, 255, 0.06); border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.tt-head .back-btn svg { width: 16px; height: 16px; }
.tt-meter { --wc: #ffb03a; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; }
.tt-mw { flex: none; display: block; transition: filter 0.5s, transform 0.5s var(--ease); }
.tt-mw .tc { --w: 25px; }
.tt-mw .tc-face { box-shadow: 0 0 0 1px rgba(255, 210, 122, 0.55) inset, 0 0 14px -3px var(--wc); }
.tt-mw .tc-face::after { content: none; }
.tt-meter.tucked .tt-mw { filter: drop-shadow(0 0 7px rgba(255, 176, 58, 0.85)); }
.tt-ml { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.tt-ml small, .tt-mv small { font-family: var(--f-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; color: rgba(255, 210, 122, 0.72); white-space: nowrap; }
.tt-ml b { overflow: hidden; font-family: var(--f-tarot); font-size: 16.5px; font-weight: 700; color: var(--t-cream); white-space: nowrap; text-overflow: ellipsis; }
.tt-mv { flex: none; display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: end; column-gap: 1px; text-align: right; }
.tt-mv b { display: inline-block; min-width: 1.2em; font-family: var(--f-display); font-weight: 900; font-size: 25px; line-height: 1; color: rgba(255, 255, 255, 0.35); font-variant-numeric: tabular-nums; }
.tt-mv i { font-style: normal; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.tt-mv small { grid-column: 1 / -1; }
.tt-meter.live .tt-mv b { color: transparent; background: linear-gradient(180deg, #fff4d6, #ffd27a 45%, #ff6a55); -webkit-background-clip: text; background-clip: text; }
.tt-meter[data-dir='up'] .tt-mv small::before { content: '▲ '; color: var(--lime); }
.tt-meter[data-dir='down'] .tt-mv small::before { content: '▼ '; color: #ff7a8a; }
.tt-meter.final .tt-mv small { color: var(--t-cream); }
.tt-meter.final .tt-mv small::before { content: none; }
/* 翻出了愿望牌：整条亮成青柠色，小愿望牌歪一下 */
.tt-head:has(.tt-meter.manifested) { border-color: rgba(212, 255, 58, 0.7); box-shadow: 0 0 34px -8px var(--lime), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.tt-meter.manifested .tt-mv b { background: linear-gradient(180deg, #fff, var(--lime)); -webkit-background-clip: text; background-clip: text; }
.tt-meter.manifested .tt-mv small { color: var(--lime); }
.tt-meter.manifested .tt-mw { transform: rotate(-8deg) scale(1.15); filter: drop-shadow(0 0 10px var(--lime)); }

.tr-table {
  --cw: clamp(54px, 15vw, 84px); --sw: clamp(66px, 21vw, 108px);
  --th: min(70dvh, 640px); --sw2: min(27vw, 168px, calc(var(--th) * 0.25));
  position: relative; width: 100%; max-width: 760px; height: var(--th); touch-action: none; user-select: none; -webkit-user-select: none;
}
.tr-runes { position: absolute; left: 50%; top: 52%; width: min(130vw, 760px); aspect-ratio: 1; translate: -50% -50%; opacity: 0.18; pointer-events: none; animation: spin 90s linear infinite; transition: opacity 1s; }
.tr-runes svg { width: 100%; height: 100%; overflow: visible; }
.tr-table.charging .tr-runes { opacity: 0.6; animation-duration: 10s; filter: drop-shadow(0 0 12px rgba(255, 176, 58, 0.6)); }
.tr-slots { position: absolute; top: 0; left: 0; right: 0; z-index: 1; display: flex; justify-content: center; gap: clamp(12px, 4vw, 30px); transition: top 0.6s var(--ease); }
.tr-slot { --sc1: #ffb03a; --sc2: #ff4f6d; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: opacity 0.5s, translate 0.5s var(--ease); }
.tr-slot-frame { position: relative; width: var(--sw); aspect-ratio: 200 / 340; border-radius: calc(var(--sw) * 0.075); border: 1.5px dashed rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.02); transition: width 0.6s var(--ease), border-color 0.4s, box-shadow 0.6s; }
.tr-slot-frame::after { content: '✦'; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.18); font-size: 18px; }
/* 翻开后牌后面晕开一团这张牌的颜色；大阿卡纳再多一圈光芒 */
.tr-slot-frame::before { content: ''; position: absolute; inset: -22% -40%; z-index: -1; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 0.7s; background: radial-gradient(closest-side, color-mix(in srgb, var(--sc1) 55%, transparent), transparent); }
.tr-slot.lit .tr-slot-frame::before { opacity: 0.75; }
.tr-slot.major .tr-slot-frame::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--sc1) 55%, transparent), transparent), repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--sc1) 30%, transparent) 0deg 3deg, transparent 3deg 15deg); -webkit-mask: radial-gradient(closest-side, #000 55%, transparent); mask: radial-gradient(closest-side, #000 55%, transparent); }
.tr-slot.filled .tr-slot-frame { border-color: transparent; box-shadow: 0 0 34px -4px rgba(255, 176, 58, 0.7); }
.tr-slot.filled .tr-slot-frame::after { content: none; }
.tr-slot.lit .tr-slot-frame { box-shadow: 0 0 46px -6px var(--sc1); }
.tr-slot.glitching .tr-slot-frame { animation: tc-glitch 0.9s steps(2) 1; }
@keyframes tc-glitch { 20% { filter: hue-rotate(80deg) saturate(2); translate: -4px 0; } 40% { filter: none; translate: 3px 0; } 60% { filter: hue-rotate(-60deg); translate: -2px 0; } 80% { filter: none; translate: 0 0; } }
.tr-table.turning .tr-slots { top: 6px; }
.tr-table.turning .tr-slot-frame { width: var(--sw2); border-radius: calc(var(--sw2) * 0.075); }
/* 牌位下面：一颗星 + 位置 + 逆位标记；讲故事时金线从这三颗星上穿过去 */
.tt-pos { display: flex; flex-direction: column; align-items: center; gap: 5px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.22em; color: var(--ink-3); transition: color 0.4s; }
.tt-pos b { font-weight: 800; }
.tt-pos em { min-height: 1.1em; font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: 0.12em; color: #ff7a8a; }
.tt-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); transition: background 0.4s, box-shadow 0.4s; }
.tr-slot.filled .tt-pos { color: #ffd36a; }
.tr-slot.lit .tt-pos b { color: #fff; text-shadow: 0 0 10px var(--sc1); }
.tr-slot.lit .tt-dot { background: var(--sc1); box-shadow: 0 0 10px var(--sc1); }
.tt-thread {
  position: absolute; left: 0; top: 0; width: 0; height: 2px; margin-top: -1px; z-index: -1; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--t-amber), var(--t-gold), var(--t-rose)); box-shadow: 0 0 12px rgba(255, 176, 58, 0.85);
  transform-origin: left center; scale: 0 1; transition: scale 1.2s var(--ease);
}
.tr-table.threaded .tt-thread { scale: 1 1; }
.tr-table.waiting .tt-dot { animation: tt-dot 1.4s ease-in-out infinite; }
.tr-table.waiting .tr-slot:nth-child(2) .tt-dot { animation-delay: 0.22s; }
.tr-table.waiting .tr-slot:nth-child(3) .tt-dot { animation-delay: 0.44s; }
@keyframes tt-dot { 50% { scale: 1.9; background: #ffd27a; box-shadow: 0 0 14px #ffb03a; } }
/* 讲故事：讲到哪张牌哪张亮，其余的暗下去 */
.tr-table.telling .tr-slot { opacity: 0.42; }
.tr-table.telling .tr-slot.on { opacity: 1; translate: 0 -4px; }

/* 牌位里能翻的牌（翻面由 GSAP 逐帧驱动，去掉 .tc-in 的 CSS 过渡） */
.tt-card { position: absolute; inset: 0; display: block; padding: 0; border-radius: inherit; touch-action: none; cursor: grab; -webkit-tap-highlight-color: transparent; }
.tt-card:active { cursor: grabbing; }
.tt-card .tc { --w: var(--sw2); width: 100%; }
.tt-card .tc-in { transition: none; }
.tt-card.turned { cursor: default; }
.tt-card:focus-visible { outline: 2px solid rgba(255, 211, 106, 0.7); outline-offset: 4px; }
/* 下一张该翻的牌：描金的边一明一暗，轻轻浮起来 */
.tt-card.next .tc-back { animation: tt-next 1.6s ease-in-out infinite; }
.tt-card.next .tc { animation: tt-bob 1.6s ease-in-out infinite; }
@keyframes tt-next { 50% { box-shadow: 0 0 0 1.5px #ffd36a inset, 0 0 30px 2px rgba(255, 176, 58, 0.75), 0 0 70px -6px rgba(255, 79, 216, 0.6); } }
@keyframes tt-bob { 50% { translate: 0 -5px; } }
/* 愿望牌被翻出来：牌上盖一枚章 */
.tt-stamp {
  position: absolute; left: 50%; bottom: 26%; z-index: 5; padding: 4px 10px; border-radius: 99px; pointer-events: none;
  white-space: nowrap; font-family: var(--f-mono); font-size: 10px; font-weight: 800; letter-spacing: 0.12em; color: #07060c; background: var(--lime); box-shadow: 0 0 24px -2px var(--lime);
}
.tt-stamp.rev { background: #ffd27a; box-shadow: 0 0 24px -2px #ffb03a; }

/* 抽牌：洗牌的星河、扇形 */
.tr-fan { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; }
.tr-center { position: absolute; left: 50%; top: 58%; width: 0; height: 0; }
.tr-origin { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.tr-c {
  position: absolute; left: 0; top: 0; width: var(--cw); aspect-ratio: 200 / 340; border-radius: calc(var(--cw) * 0.075);
  background: var(--tc-back) center / 100% 100% no-repeat, #0a0714; pointer-events: none; will-change: transform;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.tr-c.hi { box-shadow: 0 0 0 1.5px #ffd36a inset, 0 0 26px 2px rgba(255, 176, 58, 0.75), 0 18px 30px -12px rgba(0, 0, 0, 0.9); }
.tr-c.picked { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4) inset, 0 0 26px -2px rgba(255, 176, 58, 0.7); }
.tr-table.fanning { cursor: pointer; }
/* 许愿入牌：愿望牌正面朝上浮在牌堆的位置，翻过去、缩成牌堆里的一张 */
.tt-wishdrop { position: absolute; left: 0; top: 0; z-index: 0; } /* 居中用 GSAP 的 xPercent / yPercent（它会补间这个元素） */
.tt-wishdrop .tc { --w: calc(var(--cw) * 1.7); }
.tt-wishdrop p { position: absolute; top: calc(100% + 12px); left: 50%; translate: -50% 0; margin: 0; display: flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.tt-wishdrop small { font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.2em; color: var(--t-gold); }
.tt-wishdrop b { font-family: var(--f-tarot); font-size: 22px; font-weight: 700; color: var(--t-cream); text-shadow: 0 0 18px rgba(255, 176, 58, 0.6); }
.tr-hold {
  --p: 0; --hy: calc(var(--cw) + 62px); position: absolute; left: 0; top: 0; z-index: 150; width: 118px; height: 118px; border-radius: 50%;
  display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  /* 平时在牌堆下方；按住时移到星河中心（transform 留给 GSAP 的弹出动画） */
  translate: -50% calc(-50% + var(--hy)); scale: calc(1 + var(--p) * 0.1); transition: translate 0.5s var(--ease);
}
.tr-hold.on, .tr-hold.ready { --hy: 0px; }
.tr-hold:not([hidden]) { animation: tt-pop 0.6s cubic-bezier(0.34, 1.8, 0.64, 1) both; }
.tr-hold.out { animation: tt-unpop 0.3s ease-in both; }
@keyframes tt-pop { from { transform: scale(0); opacity: 0; } }
@keyframes tt-unpop { to { transform: scale(0); opacity: 0; } }
.tr-hold-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#ffd36a calc(var(--p) * 360deg), rgba(255, 255, 255, 0.12) 0); -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%); mask: radial-gradient(circle, transparent 60%, #000 61%); filter: drop-shadow(0 0 8px #ffb03a); }
.tr-hold-core {
  position: absolute; inset: 12px; display: grid; place-items: center; border-radius: 50%; font-size: 40px; color: #fff8e0;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 42%), radial-gradient(circle, #ffb03a, #ff4f6d 55%, #5b3cff 100%);
  box-shadow: 0 0 calc(30px + var(--p) * 70px) calc(var(--p) * 18px) rgba(255, 140, 60, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  text-shadow: 0 0 18px #fff; animation: breathe 2.4s ease-in-out infinite;
}
.tr-hold-label { position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0; white-space: nowrap; font-family: var(--f-mono); font-size: 11px; font-weight: 800; letter-spacing: 0.18em; color: #ffd36a; }
.tr-hold.on .tr-hold-core { animation: tremble 0.08s infinite; }
.tr-hold.ready .tr-hold-label { color: #fff; text-shadow: 0 0 12px #ffb03a; }
.tr-hold.ready .tr-hold-label::after { content: ' ✦'; }

/* 读牌区：牌位下面，翻牌时讲刚翻开的那张，讲故事时讲到哪张写哪张 */
.tt-read {
  position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--sw2) * 1.7 + 76px); z-index: 2;
  display: flex; flex-direction: column; align-items: center; padding: 0 2px; opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.screen-tarot-table:is([data-phase='turn'], [data-phase='story']) .tt-read { opacity: 1; pointer-events: auto; }
.tt-line, .tt-story, .tt-end, .tt-wait { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 480px; }
.tt-k { margin: 0; font-family: var(--f-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; color: var(--t-gold); text-transform: uppercase; }
.tt-k span { color: var(--ink-3); letter-spacing: 0.06em; text-transform: none; }
.tt-k span.rev { color: #ff7a8a; }
.tt-name { margin: 6px 0 0; font-family: var(--f-tarot); font-weight: 700; font-size: clamp(26px, 7.4vw, 36px); line-height: 1.1; color: var(--t-cream); text-shadow: 0 0 26px color-mix(in srgb, var(--sc1) 65%, transparent); }
.tt-sub { margin: 6px 0 0; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-2); }
.tt-sub b { color: #fff; }
.tt-sub b.rev { color: #ff7a8a; }
.tt-mean { margin: 12px 0 0; font-size: 16px; font-weight: 700; line-height: 1.55; text-wrap: pretty; }
.tt-hint { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }
.tt-tell { margin: 10px 0 0; min-height: 4.8em; font-size: 16px; font-weight: 700; line-height: 1.6; text-wrap: pretty; }
.tt-more { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 12px 0 0; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--ink-3); opacity: 0; transition: opacity 0.4s; }
.tt-more.go { opacity: 1; }
.tt-more i { position: relative; width: 90px; height: 2px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, 0.12); }
.tt-more i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--t-amber), var(--t-gold)); transform-origin: left center; scale: 0 1; }
.tt-more.go i::after { animation: tt-more var(--d, 6s) linear forwards; }
@keyframes tt-more { to { scale: 1 1; } }
.tt-wline { min-height: 1.4em; margin: 12px 0 0; font-family: var(--f-tarot); font-weight: 700; font-size: clamp(19px, 5vw, 24px); color: var(--t-cream); }
.tt-wstat { min-height: 1.3em; margin: 6px 0 18px; font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); }
.tt-title { margin: 0; font-family: var(--f-mono); font-size: 11px; font-weight: 800; letter-spacing: 0.22em; color: var(--t-gold); text-transform: uppercase; }
.tt-verdict { margin: 10px 0 0; font-family: var(--f-tarot); font-weight: 700; font-size: clamp(22px, 6vw, 30px); line-height: 1.25; color: var(--t-cream); text-wrap: balance; text-shadow: 0 0 30px rgba(255, 176, 58, 0.45); }
.tt-tags { margin: 10px 0 0; font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); }
.tt-acts { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; max-width: 340px; margin-top: 18px; }
.tt-whisper { min-height: 26px; margin: 4px 0 0; padding: 0 8px; font-weight: 800; font-size: clamp(15px, 4.2vw, 19px); line-height: 1.35; color: var(--t-cream); text-wrap: balance; }
.tt-whisper b { color: var(--t-gold); }
.tt-skip[hidden] { display: inline-block; visibility: hidden; }
@media (min-width: 600px) {
  .tt-acts { flex-direction: row; max-width: 520px; }
  .tt-acts > * { flex: 1; }
}
/* 矮屏：读牌区的字收一点，别挤出牌桌 */
@media (max-height: 740px) {
  .tt-name { font-size: clamp(22px, 6vw, 28px); }
  .tt-mean, .tt-tell { font-size: 14.5px; line-height: 1.5; }
  .tt-hint { display: none; }
  .tt-verdict { font-size: clamp(20px, 5.4vw, 26px); }
  .tt-acts { margin-top: 12px; }
}

/* ═══════════════ DOSSIER ═══════════════ */
.td-q { margin: 10px auto 0; max-width: 560px; font-weight: 800; font-size: 15px; color: var(--ink-2); }
.td-spread { display: flex; justify-content: center; gap: clamp(10px, 3.5vw, 28px); margin-top: 18px; }
.td-spread-item { display: flex; flex-direction: column; align-items: center; min-width: 0; flex: 0 1 160px; }
.td-spread-item .tc { --w: min(25vw, 150px); }
.td-spread-item small { margin-top: 10px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--ink-3); }
.td-spread-item strong { margin-top: 2px; font-size: 14px; font-weight: 900; line-height: 1.25; }
.td-spread-item span { font-size: 12px; color: var(--ink-2); }
.td-spread-item span.rev, .td-row h4 em.rev { color: #ff7a8a; }
.td-card { display: block; border-radius: 12px; transition: transform 0.35s var(--ease), filter 0.3s; }
.td-card:hover { transform: translateY(-4px) rotate(-1.5deg); filter: drop-shadow(0 0 22px rgba(255, 176, 58, 0.45)); }
.td-rows { display: grid; gap: 14px; }
.td-row { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; padding: 14px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--sc1) 12%, transparent), transparent 60%); border: 1px solid var(--line); }
.td-row .tc { --w: clamp(84px, 24vw, 128px); }
.td-text { min-width: 0; }
.td-pos { margin: 0; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; color: #ffd36a; }
.td-pos span { color: var(--ink-3); letter-spacing: 0.04em; margin-left: 6px; }
.td-row h4 { margin: 4px 0 0; font-size: 20px; font-weight: 900; line-height: 1.25; }
.td-row h4 em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--ink-2); margin-left: 6px; white-space: nowrap; }
.td-row h4 em.wish { color: var(--lime); }
.td-sub { margin: 2px 0 8px; font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; }
.td-main { margin: 10px 0 0; font-size: 15.5px; font-weight: 700; line-height: 1.6; }
.td-alt { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); line-height: 1.6; }
.td-alt b { color: var(--ink-2); margin-right: 4px; }
.td-hint { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
.td-mirror { display: grid; gap: 14px; align-items: start; }
.td-wish { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.td-wish .tc { --w: 110px; }
.td-wish strong { margin-top: 10px; font-weight: 900; }
.td-wish small { font-size: 13px; color: var(--ink-2); }
.d-energy .bar { grid-template-columns: 96px 1fr 26px; }
.ta-how-cards { display: flex; gap: 8px; justify-content: center; margin: 14px 0 16px; }
.ta-how-cards .tc { --w: 70px; }
.ta-how-cards .tc:nth-child(odd) { translate: 0 6px; rotate: -4deg; }
.ta-how-cards .tc:nth-child(even) { rotate: 4deg; }

@media (min-width: 760px) {
  .d-spread, .d-energy { grid-column: span 6; }
  .td-mirror { grid-template-columns: 220px 1fr; }
  .td-rows { gap: 16px; }
  .td-row { padding: 18px; gap: 22px; }
}
@media (min-width: 1000px) {
  .d-energy { grid-column: span 2; }
  .d-energy .years { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .ta-wishes { gap: 6px; }
  .ta-wish { padding: 6px 2px 8px; }
  .ta-wish strong { font-size: 11px; }
  .ta-wish small { display: none; }
  .td-row { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .td-row .pills { justify-content: center; }
}
/* 很矮的横屏 / 小窗口：主视觉收一点，按钮留在第一屏 */
@media (max-height: 700px) and (min-width: 521px) {
  .tl-hero { --cw: clamp(76px, 15vh, 120px); }
}
@media (prefers-reduced-motion: reduce) {
  .tl-wheel svg, .tr-runes, .tt-card.next .tc, .tt-card.next .tc-back, .tr-table.waiting .tt-dot, .tl-card .tc, .tc-back::after, .tc-face::after,
  .tl-glow, .tl-flame, .tlt-sun, .tlt-word b::before, .tlt-word b::after, .tlt-word .c, .tlt-osvg { animation: none !important; }
  /* 环绕星符不转了，静止排在椭圆上 */
  .tl-orbit i { animation: none !important; transform: translateX(calc(cos(var(--i) * 45deg) * var(--orx))); z-index: 1; }
  .tl-orbit s { animation: none !important; transform: translateY(calc(sin(var(--i) * 45deg) * var(--ory))); opacity: 0.7; }
}
