/* static/tarot.css — A1 塔罗站：洗牌 → 盲抽 → 金光翻牌仪式 + 凯尔特十字牌阵 + 白话直断版式 */
.tr-dom { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-chip { min-height: 72px; text-align: left; border: 1px solid #3a321a; border-radius: 14px; padding: 10px 12px; background: rgba(0,0,0,.35); color: #ece6d6; transition: border-color .15s, background .15s; }
.tr-chip b { display: block; color: #f6e27a; font-size: 15px; }
.tr-chip span { display: block; font-size: 12px; color: #c9c1ad; margin-top: 2px; line-height: 1.4; }
.tr-chip[aria-pressed="true"] { border-color: #d4af37; background: rgba(212,175,55,.14); box-shadow: 0 0 0 1px #d4af37 inset; }
.tr-chip:focus-visible, .tr-pick:focus-visible, .tc:focus-visible { outline: 2px solid #f6e27a; outline-offset: 2px; }
.tr-btn { min-height: 48px; }

/* 洗牌：一叠牌背左右切牌落叠 */
.tr-shuffle { position: relative; height: 170px; margin: 8px auto 0; width: 100%; max-width: 260px; }
.tr-shuffle i { position: absolute; left: 50%; top: 10px; width: 92px; height: 150px; margin-left: -46px; border-radius: 9px;
  background: var(--tr-back) center/cover no-repeat; box-shadow: 0 6px 18px rgba(0,0,0,.6); animation: tr-riffle .62s ease-in-out infinite; }
.tr-shuffle i:nth-child(odd) { animation-name: tr-riffle-l; }
.tr-shuffle i:nth-child(2) { animation-delay: .05s } .tr-shuffle i:nth-child(3) { animation-delay: .1s } .tr-shuffle i:nth-child(4) { animation-delay: .15s }
.tr-shuffle i:nth-child(5) { animation-delay: .2s } .tr-shuffle i:nth-child(6) { animation-delay: .25s } .tr-shuffle i:nth-child(7) { animation-delay: .3s }
@keyframes tr-riffle { 0%, 100% { transform: translateX(0) rotate(0) } 45% { transform: translateX(52px) rotate(9deg) } }
@keyframes tr-riffle-l { 0%, 100% { transform: translateX(0) rotate(0) } 45% { transform: translateX(-52px) rotate(-9deg) } }

/* 盲抽：78 张牌背铺开 */
.tr-fan { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 640px) { .tr-fan { grid-template-columns: repeat(13, minmax(0, 1fr)); } }
.tr-pick { position: relative; aspect-ratio: 3 / 5; min-height: 44px; border-radius: 6px; background: var(--tr-back) center/cover no-repeat;
  border: 0; padding: 0; transition: transform .18s, box-shadow .18s, opacity .18s; animation: tr-deal .35s both; }
.tr-pick:hover { transform: translateY(-3px); }
.tr-pick.on { transform: translateY(-6px) scale(1.04); box-shadow: 0 0 0 2px #f6e27a, 0 0 18px rgba(246,226,122,.55); }
.tr-pick.on::after { content: attr(data-n); position: absolute; right: -4px; top: -6px; min-width: 20px; height: 20px; border-radius: 10px; background: #f6e27a; color: #000; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; }
.tr-pick.done { opacity: .35; pointer-events: none; }
@keyframes tr-deal { from { opacity: 0; transform: translateY(12px) scale(.94) } to { opacity: 1; transform: none } }

/* 翻牌：3D 翻转 + 金光 */
.tc { position: relative; display: block; width: 100%; aspect-ratio: 3 / 5; perspective: 900px; background: none; border: 0; padding: 0; cursor: pointer; }
.tc-in { position: absolute; inset: 0; transition: transform .55s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }
.tc.flip .tc-in { transform: rotateY(180deg); }
.tc-b, .tc-f { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px; overflow: hidden; }
.tc-b { background: var(--tr-back) center/cover no-repeat; }
.tc-f { transform: rotateY(180deg); }
.tc-rev .tc-f > * { transform: rotate(180deg); }
.tc-svg, .tc-art { display: block; width: 100%; height: 100%; object-fit: cover; }
.tc.flip.glow .tc-f { animation: tr-glow 1.1s ease-out; }
@keyframes tr-glow { 0% { box-shadow: 0 0 0 0 rgba(246,226,122,.0) } 30% { box-shadow: 0 0 26px 6px rgba(246,226,122,.75) } 100% { box-shadow: 0 0 0 0 rgba(246,226,122,0) } }
.tc-lock { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); font-size: 12px; color: #000; background: #d4af37; border-radius: 99px; padding: 1px 7px; font-weight: 700; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .tc-in, .tr-pick, .tr-shuffle i { transition: none; animation: none; } }

/* 凯尔特十字：左 3 列为十字，右 1 列为权杖柱 */
.tr-cross { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); gap: 8px 10px; max-width: 460px; margin: 0 auto; }
.tr-slot { min-width: 0; text-align: center; }
.tr-slot small { display: block; font-size: 12px; color: #c9c1ad; margin-top: 3px; line-height: 1.3; }
.tr-p0 { grid-column: 2; grid-row: 2; position: relative; } .tr-p1 { grid-column: 2; grid-row: 2; z-index: 2; transform: rotate(90deg) scale(.82); transform-origin: 50% 40%; pointer-events: auto; }
.tr-p1 small { display: none; }
.tr-p2 { grid-column: 2; grid-row: 3; } .tr-p3 { grid-column: 1; grid-row: 2; } .tr-p4 { grid-column: 2; grid-row: 1; } .tr-p5 { grid-column: 3; grid-row: 2; }
.tr-p6 { grid-column: 4; grid-row: 4; } .tr-p7 { grid-column: 4; grid-row: 3; } .tr-p8 { grid-column: 4; grid-row: 2; } .tr-p9 { grid-column: 4; grid-row: 1; }

/* 白话直断 */
.tr-verdict { border: 1px solid rgba(212,175,55,.55); border-radius: 16px; padding: 16px; background: radial-gradient(500px 160px at 0% 0%, rgba(246,226,122,.12), transparent 60%), rgba(0,0,0,.35); }
.tr-badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 10px; }
.tr-badge.grn { background: #0f3b2a; color: #9ff0c8; } .tr-badge.gold { background: #3a2f0c; color: #f6e27a; }
.tr-badge.amber { background: #3b2a0a; color: #ffd18a; } .tr-badge.red { background: #45150f; color: #ffc2b8; }
.tr-part { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid #2a2414; }
.tr-part .tc { width: 56px; cursor: default; }
.tr-drawer { border: 1px solid #2f2915; border-radius: 14px; background: rgba(0,0,0,.25); }
.tr-drawer > summary { cursor: pointer; list-style: none; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; color: #d9cfb6; font-size: 14px; }
.tr-drawer > summary::-webkit-details-marker { display: none; }
.tr-drawer > summary::after { content: "▾"; color: #d4af37; font-size: 14px; }
.tr-drawer[open] > summary::after { content: "▴"; }
.tr-drawer[open] .tr-open, .tr-drawer:not([open]) .tr-close { display: none; }
.tr-drawer > div { padding: 0 14px 14px; }
.tr-mini { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tr-mini .tc { cursor: default; }
