/* 占卜：因果靈數籤（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-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; }

/* 靜心一息：光圈隨呼吸放大縮小，一息兩秒（divine-view.js RITE.breath） */
.breath-ring { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; font-size: var(--step-3); 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 2s ease-in-out 1; }
@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 .75s cubic-bezier(.3, .6, .4, 1); }
.jiao-pair.toss .jiao-r { animation: lot-toss-r .75s 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-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: var(--step-11); 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: var(--step-3); 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-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: var(--step-2); letter-spacing: .2em; text-indent: .2em; }
.lot-sec h3 { color: var(--accent); margin: 18px 0 6px; }
.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-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 20px 0 8px; }
.lot-foot { font-size: var(--step--4); color: var(--muted); text-align: center; }
.lot-again { font-size: var(--step--4); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .breath-ring, .jiao-pair.toss .jiao, .lot-card.unfold { animation: none; }
}
@media (max-width: 420px) {
  .lot-name { font-size: var(--step-8); }
  .lot-poem p { font-size: var(--step-1); letter-spacing: .12em; text-indent: .12em; }
}

/* ---------- 籤 v2：搖籤、竹籤、翻籤（lots verdict 9） ---------- */
.lot-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.lot-check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--step--4); cursor: pointer; }
.lot-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.lot-skip-all { opacity: .85; }
.lot-tube-box { height: 170px; display: grid; place-items: end center; transition: opacity .3s, transform .3s; }
.lot-tube-box.rest { opacity: .45; transform: scale(.8); height: 120px; }
.lot-tube { width: 120px; height: 170px; overflow: visible; }
.lot-tube .tube-sticks rect { fill: #c9a26a; stroke: #4a3220; stroke-width: 1; }
.lot-tube .tube-body { fill: #3b2117; stroke: var(--seal-deep); stroke-width: 2; }
.lot-tube .tube-band { fill: none; stroke: var(--accent); stroke-width: 2; opacity: .7; }
.lot-tube text { fill: var(--accent); font: 900 26px "Noto Serif TC", serif; }
.lot-tube-box.shaking .lot-tube { animation: lot-shake .15s ease-in-out 3; transform-origin: 50% 100%; }
.lot-tube-box.shaking .tube-sticks { animation: lot-rattle .075s linear 6; }
@keyframes lot-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-11deg); } 75% { transform: rotate(11deg); } }
@keyframes lot-rattle { 50% { transform: translateY(-4px); } }
.lot-sticks { display: flex; gap: 18px; justify-content: center; min-height: 128px; align-items: center; }
.lot-sticks.back .stick { animation: lot-back .6s ease-in forwards; }
@keyframes lot-back { to { transform: translateY(-120px) rotate(-8deg); opacity: 0; } }
.stick { position: relative; width: 46px; height: 120px; perspective: 400px; animation: lot-fall .5s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes lot-fall { from { transform: translateY(-140px) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.stick-back, .stick-face { position: absolute; inset: 0; border-radius: 6px; backface-visibility: hidden; transition: transform .3s ease-in-out; display: grid; place-items: center; }
.stick-back { background: linear-gradient(90deg, #8a6a3c, #c9a26a 45%, #8a6a3c); border: 1px solid #4a3220; color: var(--seal-deep); font-weight: 900; font-size: var(--step-1); writing-mode: vertical-rl; }
.stick-face { background: linear-gradient(90deg, #e9dfc8, #f6efe0 45%, #e2d6ba); border: 1px solid #8a6a3c; transform: rotateY(180deg); align-content: center; gap: 9px; padding: 8px 0; }
.stick-face small { color: #4a3220; font-family: var(--num-font); font-weight: 700; }
.stick.turned .stick-back, .lot-board.all .stick-back { transform: rotateY(180deg); }
.stick.turned .stick-face, .lot-board.all .stick-face { transform: rotateY(0); }
.syao { display: flex; gap: 5px; width: 30px; justify-content: center; }
.syao b { height: 7px; background: #1c140c; flex: 1; border-radius: 1px; }
.syao.yang b + b { display: none; }
.syao.moved b { background: #b5322a; }
.lot-flip .syao { opacity: 0; transform: scaleX(.2); transition: opacity .2s, transform .2s; }
.stick.turned .syao { opacity: 1; transform: none; transition-delay: calc(.3s + (2 - var(--k)) * 0s + var(--k) * .06s); }
.lot-board.all .syao { opacity: 1; transform: none; }
.lot-board { display: grid; grid-template-columns: 46px 1fr 46px 1fr 46px; align-items: center; gap: 10px 6px; width: min(100%, 360px); margin: 8px auto; }
.lot-board .stick { grid-row: 1; animation: none; }
.stick-seal { grid-row: 1; justify-self: center; font-weight: 900; color: var(--seal); border: 2px solid var(--seal); padding: 2px 4px; font-size: var(--step--4); writing-mode: vertical-rl;
  opacity: 0; transform: scale(1.8); transition: opacity .3s, transform .3s; }
.lot-board.sealed .stick-seal, .lot-board.all .stick-seal { opacity: 1; transform: none; }
.stick-yin { grid-row: 2; grid-column: 1 / 6; font-size: var(--step--4); color: var(--muted); border: 1px dashed var(--line); border-top: 0; border-radius: 0 0 18px 18px; padding: 2px 0 6px;
  opacity: 0; transition: opacity .4s; }
.stick-yin.good { color: var(--good); }
.stick-yin.bad { color: var(--bad); }
.lot-board.arc .stick-yin, .lot-board.all .stick-yin { opacity: 1; }
.lot-board.fade { animation: lot-fade .15s ease-out; }
@keyframes lot-fade { from { opacity: 0; } }

/* ---------- 籤頁（占卜卡與籤譜共用） ---------- */
.lot-title { margin: 6px 0 0; color: var(--accent); letter-spacing: .2em; }
.lot-shengyi { letter-spacing: .08em; }
.lot-turn { color: var(--good); }
.lot-this { border: 1px solid var(--seal-deep); border-radius: var(--radius); padding: 4px 14px 8px; margin-top: 16px; }
.lot-force-line { font-size: var(--step--2); letter-spacing: .04em; }
.lot-aspect { border-top: 1px solid var(--line); }
.lot-aspect summary { cursor: pointer; padding: 10px 0; color: var(--text); }
.lot-aspect[open] summary { color: var(--accent); }
.lot-aspect p { margin: 0 0 12px; }
.lot-lore h4 { margin: 12px 0 4px; color: var(--accent); }
.lot-lore cite { font-style: normal; font-size: var(--step--4); color: var(--muted); margin-left: 4px; }
.lot-linemap { padding-left: 1.4em; }
.lot-linemap li { margin-bottom: 8px; }
.lot-force-table td { white-space: normal; }
/* Q7: the three digits beside the lot's name; 白話, the asked aspect, everyday examples, the eight numbers on tap */
.lot-id { display: flex; align-items: baseline; justify-content: center; gap: 14px; flex-wrap: wrap; }
.lot-digits { font-family: var(--num-font); font-size: var(--step-11); font-weight: 900; letter-spacing: .1em; color: var(--accent); font-variant-numeric: lining-nums tabular-nums; }
.lot-poem + .lot-plain { border-top: 0; }
.lot-plain-lines { padding-left: 1.4em; margin: 0 0 8px; }
.lot-plain-lines li { margin-bottom: 8px; }
.lot-qplain { display: block; color: var(--muted); font-size: var(--step--4); margin-top: 2px; }
.lot-ask { border: 1px solid var(--accent); border-radius: var(--radius); padding: 2px 14px 6px; margin-top: 4px; }
.lot-ask-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 12px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: var(--step--4); }
.lot-ask-pill .ico, .lot-aspect summary .ico { color: var(--accent); }
.lot-ask h3 .ico { vertical-align: -3px; }
.lot-read { margin: 0 0 6px; }
.lot-way b { display: block; color: var(--accent); font-size: var(--step--4); font-weight: 700; }
.lot-aspect summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lot-aspect summary small { color: var(--muted); font-size: var(--step--5); margin-left: auto; }
.lot-aspect .lot-read { margin-top: 0; }
.lot-ex { border-left: 2px solid var(--line); padding-left: 12px; margin: 10px 0; }
.lot-ex p { margin: 0 0 4px; }
.lot-who { display: block; color: var(--accent); font-size: var(--step--4); }
.lot-way { color: var(--good); }
.lot-scope { color: var(--muted); }
.lot-nums { display: grid; gap: 0; }
.lot-num { border-top: 1px solid var(--line); }
.lot-num summary { cursor: pointer; padding: 10px 0; display: flex; gap: 12px; align-items: baseline; }
.lot-num-d { font-family: var(--num-font); font-size: var(--step-1); color: var(--accent); letter-spacing: .08em; }
.lot-num summary small { margin-left: auto; color: var(--seal); }
.lot-num.mine { background: color-mix(in srgb, var(--seal-deep) 22%, transparent); }
.lot-num p { margin: 0 0 8px; }
/* 這次問: the site's one dropdown (js/select.js), each option with its icon and scope line (lots aspect verdict A2, A4) */
/* label and dropdown on one row, the pair centred on the card, both centred on one line (owner 2026-11-23: a centred
   label over a left-reading menu looked lopsided); the inline "label: [menu ▾]" of a single picker, as in a store's sort box */
.lot-asks { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px auto 0; max-width: 22rem; }
.lot-asks-label { flex: none; color: var(--muted); font-size: var(--step--1); letter-spacing: .08em; line-height: 1.4; }
.lot-asks .sel { flex: 1 1 auto; width: auto; min-width: 0; text-align: left; }
.lot-why { color: var(--muted); }
.lot-pager { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.lot-pager a { color: var(--accent); }

/* ---------- 籤譜公開頁 /lots/ ---------- */
body.lots-book { background: var(--bg); color: var(--text); font-family: "Noto Serif TC", "Source Han Serif TC", serif; margin: 0; line-height: 1.75; }
.lots-top { display: flex; gap: 18px; justify-content: center; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 2; }
.lots-top a { color: var(--accent); text-decoration: none; letter-spacing: .1em; }
.lots-main { max-width: 760px; margin: 0 auto; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.lots-main .card { margin: 0; }
.lot-catalog h2, .lot-force-table h2 { color: var(--seal); letter-spacing: .2em; text-align: center; }
.lot-grid { width: 100%; border-collapse: collapse; text-align: center; font-size: var(--step--4); }
.lot-grid caption { color: var(--muted); font-size: var(--step--5); padding-bottom: 6px; }
.lot-grid th { color: var(--accent); font-weight: 700; padding: 4px 2px; }
.lot-grid td { padding: 0; border: 1px solid var(--line); }
.lot-grid td a { display: grid; padding: 6px 0; color: var(--text); text-decoration: none; }
.lot-grid td small { font-size: var(--step--5); color: var(--muted); }
.g1 { background: color-mix(in srgb, var(--good) 26%, transparent); }
.g2 { background: color-mix(in srgb, var(--good) 13%, transparent); }
.g3 { background: transparent; }
.g4 { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.g5 { background: color-mix(in srgb, var(--bad) 24%, transparent); }
.lot-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; }
.lot-list a { display: grid; grid-template-columns: 2.2em 3em 3em 1fr; gap: 2px 8px; padding: 8px 10px; color: var(--text); text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); }
.lot-list .no { color: var(--accent); font-family: var(--num-font); }
.lot-list .key { color: var(--seal); font-weight: 900; }
.lot-list .pm { grid-column: 2 / 5; color: var(--muted); font-size: var(--step--4); }
.lot-force-table td { font-size: var(--step--4); }
@media (max-width: 560px) {
  .lot-digits { font-size: var(--step-8); }
}
@media (max-width: 420px) {
  .lot-grid { font-size: var(--step--5); }
  .lot-grid td small { display: none; }
  .lot-list a { grid-template-columns: 2em 2.6em 2.8em 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .stick, .lot-tube-box.shaking .lot-tube, .lot-tube-box.shaking .tube-sticks, .lot-sticks.back .stick { animation: none; }
  .stick-back, .stick-face, .syao, .stick-seal, .stick-yin { transition: none; }
}
/* 籤譜入口與 PDF 下載（占卜首頁、學說頁、/lots/ 籤譜頁）：大按鈕、可換行 */
.lot-book-links, .lots-entry-links, .lots-dl { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.lots-dl { margin: 0; }
.lots-pdf, .lot-book-links .btn, .lots-entry-links .btn { min-height: 48px; display: inline-flex; align-items: center; }
