/* 占卜：因果靈數籤（js/divine-view.js）。沿用 :root 色票：變爻只用朱砂 --seal，星色只在星字圈描邊（.st-*）。 */
.lot-intro { text-align: center; }
.lot-intro h2 { margin: 0 0 10px; color: var(--seal); letter-spacing: .3em; }
.lot-draw { margin: 14px auto 6px; min-width: 12em; }
.lot-warn { color: var(--bad); }
.lot-loading { text-align: center; padding: 40px 0; }
.lot-odds { text-align: left; margin-top: 18px; }
.lot-odds-table { width: 100%; }

.lot-stage { text-align: center; min-height: 360px; display: grid; align-content: center; justify-items: center; gap: 14px; }
.lot-try { margin: 0; color: var(--accent); letter-spacing: .2em; }
.lot-skip { justify-self: center; }

/* 靜心三息：光圈隨呼吸放大縮小，一息四秒 */
.breath-ring { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 40px rgba(211, 180, 120, .18) inset, 0 0 30px rgba(211, 180, 120, .12);
  animation: lot-breath 4s ease-in-out 3; }
@keyframes lot-breath { 0%, 100% { transform: scale(.72); opacity: .7; } 50% { transform: scale(1.08); opacity: 1; } }

/* 擲筊：兩片半月筊，平面（淺木）或凸面（深漆）朝上 */
.jiao-pair { display: flex; gap: 26px; justify-content: center; height: 150px; align-items: flex-end; }
.jiao { width: 66px; height: 132px; transition: fill .2s; }
.jiao path { stroke: #2a1a10; stroke-width: 2; }
.jiao[data-face="flat"] path:first-child { fill: #c9a26a; }
.jiao[data-face="round"] path:first-child { fill: #7c2c1f; }
.jiao-rim { fill: none; stroke: rgba(255, 240, 210, .35) !important; }
.jiao[data-face="round"] .jiao-rim { stroke: rgba(255, 200, 170, .18) !important; }
.jiao-r { transform: scaleX(-1); }
.jiao-pair.toss .jiao-l { animation: lot-toss-l 1.1s cubic-bezier(.3, .6, .4, 1); }
.jiao-pair.toss .jiao-r { animation: lot-toss-r 1.1s cubic-bezier(.3, .6, .4, 1); }
@keyframes lot-toss-l { 0% { transform: none; } 40% { transform: translateY(-150px) rotate(-300deg); } 75% { transform: translateY(0) rotate(-540deg); } 85% { transform: translateY(-16px) rotate(-560deg); } 100% { transform: rotate(-720deg); } }
@keyframes lot-toss-r { 0% { transform: scaleX(-1); } 40% { transform: scaleX(-1) translateY(-170px) rotate(320deg); } 75% { transform: scaleX(-1) translateY(0) rotate(560deg); } 85% { transform: scaleX(-1) translateY(-12px) rotate(580deg); } 100% { transform: scaleX(-1) rotate(720deg); } }

/* 跑卦：四卦、三顆星、兩條陰星 */
.lot-gua-box { width: 100%; }
.lot-gua { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 8px 4px; max-width: 520px; margin: 8px auto; }
.gua-col { grid-row: 1; display: grid; justify-items: center; }
.gua-col .yao { margin: 5px 0; gap: 7px; }
.gua-col .yao i { width: 22px; height: 9px; }
.gua-col .yao.yang i { width: 51px; }
.gua-col small { color: var(--muted); font-family: var(--num-font); font-size: 1rem; margin-top: 4px; }
.gua-col:not(.settled) .yao i { background: var(--muted); opacity: .45; }
.gua-col .yao.flip i { animation: lot-flip .6s ease-out; }
@keyframes lot-flip { 0% { transform: scaleY(1); background: var(--text); } 45% { transform: scaleY(.05); } 100% { transform: scaleY(1); } }
.gua-star { grid-row: 1; width: 34px; height: 34px; border-radius: 50%; font-size: 1.0625rem; font-weight: 900; color: var(--muted);
  border: 1px solid var(--line); opacity: .35; transition: opacity .4s, color .4s, border-color .4s, box-shadow .4s; }
.gua-star.lit { opacity: 1; color: var(--text); border-color: var(--st); box-shadow: 0 0 12px color-mix(in srgb, var(--st) 45%, transparent); }
.gua-yin { font-size: .875rem; color: var(--muted); border: 1px dashed var(--line); border-top: 0; border-radius: 0 0 14px 14px; padding: 2px 0 4px;
  text-align: center; opacity: .2; transition: opacity .5s, border-color .5s; }
.gua-yin[data-k="0"] { grid-row: 2; }
.gua-yin[data-k="1"] { grid-row: 3; }
.gua-yin.lit { opacity: 1; border-color: var(--muted); }

/* 籤卡 */
.lot-card.unfold { animation: lot-unfold .7s ease-out; }
@keyframes lot-unfold { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.lot-past { margin-top: 0; }
.lot-head { text-align: center; display: grid; justify-items: center; gap: 2px; }
.lot-kicker { margin: 0; color: var(--accent); letter-spacing: .15em; }
.lot-name { margin: 4px 0 0; font-size: 2.75rem; font-weight: 900; letter-spacing: .25em; text-indent: .25em; color: var(--seal); }
.lot-seq { margin: 0; color: var(--muted); }
.lot-grade { margin-top: 10px; font-size: 1.5rem; font-weight: 900; color: var(--seal); border: 2px solid var(--seal); padding: 4px 14px; letter-spacing: .2em; text-indent: .2em;
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 3px rgba(184, 57, 44, .5); }
.lot-replay-row { text-align: center; }
.lot-poem { margin: 18px auto; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.lot-poem p { margin: 6px 0; font-size: 1.375rem; letter-spacing: .2em; text-indent: .2em; }
.lot-sec h3 { color: var(--accent); margin: 18px 0 6px; }
.lot-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lot-chips button { font: inherit; font-size: 1rem; color: var(--text); background: #0b0907; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.lot-chips button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: rgba(211, 180, 120, .1); }
.lot-phase { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 0 0; }
.lot-phase dt { color: var(--accent); }
.lot-phase dd { margin: 0; }
.lot-lucky { color: var(--accent); }
.lot-more { border-top: 1px solid var(--line); padding: 4px 0; }
.lot-more summary { cursor: pointer; padding: 12px 0; color: var(--accent); }
.lot-steps { padding-left: 1.4em; }
.lot-steps li { margin-bottom: 12px; }
.lot-steps p { margin: 4px 0; }
.lot-force { color: var(--muted); border-left: 2px solid var(--seal-deep); padding-left: 10px; }
.lot-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 20px 0 8px; }
.lot-foot { font-size: .9375rem; color: var(--muted); text-align: center; }
.lot-again { font-size: .9375rem; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .breath-ring, .jiao-pair.toss .jiao, .gua-col .yao.flip i, .lot-card.unfold { animation: none; }
}
@media (max-width: 420px) {
  .lot-gua { gap: 6px 2px; }
  .gua-col .yao i { width: 17px; }
  .gua-col .yao.yang i { width: 40px; }
  .gua-star { width: 30px; height: 30px; font-size: 1rem; }
  .lot-name { font-size: 2.25rem; }
  .lot-poem p { font-size: 1.25rem; letter-spacing: .12em; text-indent: .12em; }
}
