:root {
  --amber: #ffb000; --amber-d: #8a5f00; --amber-dd: #3a2800;
  --cyan: #4df0ff; --red: #ff4d4d; --green: #4dff88; --white: #fff3d6;
  --nerv: #ff5a00; --bg: #000;
  --mono: Menlo, "SF Mono", ui-monospace, "PingFang SC", monospace;
  --mincho: "Hiragino Mincho ProN", "Songti SC", "STSong", serif;
  --glow: 0 0 6px rgba(255,176,0,.55), .6px 0 rgba(255,40,80,.35), -.6px 0 rgba(40,220,255,.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; overflow: hidden; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body { font: 13px/1.5 var(--mono); color: var(--amber); -webkit-tap-highlight-color: transparent; }

/* ---------- 输入框基础样式：所有输入框一律深底、细边、16px（iPhone 小于 16px 会放大整页），原生选择器用深色。
   :where() 不加权重，各页自己的输入框样式照旧优先 ---------- */
:where(input:not([type=checkbox], [type=radio], [type=file], [type=range]), textarea, select) {
  -webkit-appearance: none; appearance: none; border-radius: 0; background-color: rgba(0,0,0,.45); border: 1px solid var(--line-dim, rgba(255,176,0,.22));
  color: var(--white); font-family: inherit; font-size: 16px; line-height: 1.5; padding: 8px 10px; color-scheme: dark; outline: none;
  -webkit-user-select: text; user-select: text; caret-color: var(--sel, var(--amber)); }
:where(input, textarea)::placeholder { color: var(--amber-d); opacity: 1; }
:where(input, textarea, select):focus { border-color: var(--sel, var(--amber)); box-shadow: 0 0 10px rgba(201,164,92,.22); }
:where(select) { padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--amber-d) 50%), linear-gradient(-45deg, transparent 50%, var(--amber-d) 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
:where(select option) { background: #0b0d12; color: var(--white); }
:where(input[type=checkbox]) { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; flex: none; margin: 0 6px 0 0; vertical-align: -4px;
  border: 1px solid var(--line, rgba(255,176,0,.55)); background: rgba(0,0,0,.45); display: inline-grid; place-content: center; cursor: pointer; }
:where(input[type=checkbox]):checked { background: var(--sel, var(--amber)); border-color: var(--sel, var(--amber)); }
:where(input[type=checkbox]):checked::after { content: ''; width: 5px; height: 10px; border: solid #0b0d12; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
:where(input[type=radio]) { accent-color: var(--sel, var(--amber)); }
:where(input[type=date], input[type=time], input[type=datetime-local]) { min-height: 44px; font-family: Menlo, "SF Mono", monospace; }
:where(input:-webkit-autofill) { -webkit-text-fill-color: var(--white); -webkit-box-shadow: 0 0 0 40px #0b0d12 inset; }

/* 高度用 100dvh：手机浏览器地址栏伸缩、折叠屏展开合上时都跟着变；不支持 dvh 的旧浏览器退回 100vh。
   刘海与底部横条由各页的 padding（env(safe-area-inset-*)）让开 */
/* 牌面按原图比例锁定，不随容器宽度被拉扁或拉长 */
:where(img[src^="cards/"]) { aspect-ratio: 420 / 723; height: auto; object-fit: contain; }
:where(img[src^="cards/lenormand/"]) { aspect-ratio: 352 / 520; }

#app { position: fixed; left: 0; right: 0; top: 0; height: 100vh; height: 100dvh; margin: 0 auto; max-width: 480px; background: #000; overflow: hidden; }
/* 横屏时左右的刘海与圆角也让开 */
#app > #screen { left: env(safe-area-inset-left, 0px); right: env(safe-area-inset-right, 0px); }
#screen { position: absolute; inset: 0; transform-origin: 50% 50%; }
#table { position: absolute; left: 0; top: 0; touch-action: none; }

/* ---------- CRT 覆盖层 ---------- */
.crt { position: absolute; inset: 0; pointer-events: none; z-index: 50; }
.scan { position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.16) 0 1px, transparent 1px 3px);
  animation: flicker 4s steps(40) infinite; }
@keyframes flicker { 0%, 100% { opacity: 1; } 47% { opacity: .92; } 48% { opacity: 1; } 73% { opacity: .95; } }
.band { position: absolute; left: 0; right: 0; height: 14%; top: -20%;
  background: linear-gradient(to bottom, transparent, rgba(255,200,120,.045), transparent); animation: roll 8s linear infinite; }
@keyframes roll { to { top: 110%; } }
.vig { position: absolute; inset: 0; border-radius: 22px;
  box-shadow: inset 0 0 60px 12px rgba(0,0,0,.55), inset 0 0 6px 2px rgba(0,0,0,.8);
  background: radial-gradient(ellipse at center, transparent 68%, rgba(0,0,0,.3) 100%); }

/* ---------- 转场 ---------- */
#screen.tv-off { animation: tvoff .32s ease-in forwards; }
#screen.tv-on { animation: tvon .46s ease-out; }
@keyframes tvoff {
  0% { transform: scale(1, 1); filter: brightness(1); }
  55% { transform: scale(1, .006); filter: brightness(3); }
  100% { transform: scale(0, .006); filter: brightness(6); }
}
@keyframes tvon {
  0% { transform: scale(0, .006); filter: brightness(6); }
  40% { transform: scale(1, .006); filter: brightness(3); }
  70% { transform: scale(1, 1.03); filter: brightness(1.4); }
  100% { transform: scale(1, 1); filter: brightness(1); }
}
.page.wipe-in { animation: wipein .45s cubic-bezier(.3,.7,.3,1); }
@keyframes wipein { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
#wipe { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--white); opacity: 0; pointer-events: none; z-index: 30;
  box-shadow: 0 0 12px 3px rgba(255,200,100,.7); }
#wipe.run { animation: wipeline .45s cubic-bezier(.3,.7,.3,1); }
@keyframes wipeline { 0% { top: 0; opacity: 1; } 95% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* ---------- 页面通用 ---------- */
.page { position: absolute; inset: 0; display: none; flex-direction: column; pointer-events: none; z-index: 10;
  padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 12px); text-shadow: var(--glow); }
.page.active { display: flex; }
.page.solid { background: rgba(8,10,15,.72); pointer-events: auto; }
.page button, .page textarea, .page .hdr, .page .ftr { pointer-events: auto; }

button { font: inherit; background: none; border: 0; color: var(--amber); padding: 8px 4px; cursor: pointer; white-space: nowrap; text-shadow: inherit; }
button:disabled { color: var(--amber-d); opacity: .6; cursor: default; }
button:not(:disabled):active { color: var(--white); animation: jit .1s steps(2) infinite; }
@media (hover: hover) { button:not(:disabled):hover { color: var(--white); animation: jit .1s steps(2) infinite; } }
@keyframes jit { 0% { transform: translate(1px, 0); } 50% { transform: translate(-1px, 1px); } 100% { transform: translate(1px, -1px); } }
button.big { font-size: 15px; padding: 10px 8px; letter-spacing: .05em; }
button.on { color: var(--cyan); }

.hdr { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 8px;
  border-bottom: 1px solid rgba(255,176,0,.3); padding-bottom: 6px; pointer-events: auto; }
.hdr .back { padding-left: 0; }
.hdr .step { font-size: 15px; color: var(--white); }
.hdr .step .n { color: var(--amber); font-size: 12px; margin-right: 4px; }
.hdr .step small { font-size: 10px; color: var(--amber-d); letter-spacing: .15em; margin-left: 4px; }
.hdr .steps { color: var(--cyan); letter-spacing: 2px; font-size: 11px; }
.hdr .q-echo { grid-column: 1 / -1; font-size: 11px; color: var(--amber-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 2px; }
#p-read .hdr { grid-template-columns: 1fr auto; }
.hdr .nav button { padding: 8px 6px; }

.ftr { margin-top: auto; border-top: 1px solid rgba(255,176,0,.3); padding-top: 6px; display: flex; flex-direction: column; align-items: center; pointer-events: auto; }
.ftr.thin { pointer-events: none; }
.status { align-self: stretch; min-height: 2.9em; font-size: 12px; color: var(--amber); }
.status.ok { color: var(--green); } .status.err { color: var(--red); } .status.hi { color: var(--cyan); }
.stat { align-self: stretch; font-size: 11px; color: var(--amber-d); }
.btns { display: flex; flex-wrap: wrap; justify-content: center; }

/* ---------- 开机 ---------- */
#p-boot { justify-content: space-between; }
.sys { font: 11px/1.45 var(--mono); color: var(--amber); white-space: pre; min-height: 7.5em; }
#p-boot .title { text-align: center; margin-top: -10vh; margin-top: -10dvh; }
#p-boot h1 { font: 900 64px/1 var(--mincho); color: var(--white); letter-spacing: .12em; transform: scaleX(.86);
  text-shadow: 0 0 18px rgba(255,176,0,.8), 0 0 2px #fff, 2px 0 rgba(255,40,80,.5), -2px 0 rgba(40,220,255,.5); }
#p-boot .sub { color: var(--amber); letter-spacing: .4em; font-size: 12px; margin-top: 6px; }
.boot-bottom { display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: auto; }
.sky { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; font-size: 11px; color: var(--cyan); align-self: stretch; }
.start { animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }

/* ---------- 提问 ---------- */
.q-body { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; overflow-y: auto; flex: 1; }
.q-body label { color: var(--cyan); font-size: 12px; margin-top: 6px; }
#q, #mq { background: rgba(255,176,0,.05); border: 1px solid rgba(255,176,0,.4); color: var(--white); font: 16px/1.5 var(--mono);
  padding: 10px; resize: none; outline: none; caret-color: var(--amber); text-shadow: var(--glow); -webkit-user-select: text; user-select: text; border-radius: 0; }
#q:focus, #mq:focus { border-color: var(--amber); box-shadow: 0 0 10px rgba(255,176,0,.25); }
#q::placeholder, #mq::placeholder { color: var(--amber-d); }
.tip { font-size: 11px; color: var(--amber-d); }
#spreadList { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; text-align: left;
  border: 1px solid rgba(255,176,0,.3); padding: 8px; white-space: normal; }
.sp svg { grid-row: 1 / 3; width: 52px; height: 52px; }
.sp rect { fill: none; stroke: var(--amber-d); stroke-width: 1.2; }
.sp .t { font-size: 13px; color: var(--amber); } .sp .c { font-size: 11px; color: var(--amber-d); }
.sp.on { border-color: var(--cyan); box-shadow: 0 0 12px rgba(77,240,255,.25), inset 0 0 12px rgba(77,240,255,.08); }
.sp.on rect { stroke: var(--cyan); } .sp.on .t { color: var(--cyan); }

/* ---------- 详解 ---------- */
#p-detail { background: #000; }
#detailBody { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 2px 30px; pointer-events: auto; }
#detailBody.swap { animation: swap .35s ease-out; }
@keyframes swap { 0% { opacity: 0; transform: translateX(8px); filter: brightness(2); } 100% { opacity: 1; transform: none; filter: none; } }
.d-hero { display: grid; grid-template-columns: 42% 1fr; gap: 14px; align-items: end; }
.d-imgbox { border: 1px solid rgba(255,176,0,.5); padding: 4px; box-shadow: 0 0 16px rgba(255,176,0,.2); position: relative; width: 100%; max-width: 300px; margin: 0 auto; box-sizing: border-box; }
.d-imgbox img { display: block; width: 100%; border-radius: 3px; }
.d-imgbox.rev img { transform: rotate(180deg); }
.d-imgbox::after { content: ""; position: absolute; inset: 4px; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); pointer-events: none; }
.d-pos { font-size: 11px; color: var(--cyan); }
.d-meta h2 { font: 900 30px/1.15 var(--mincho); color: var(--white); margin: 4px 0 2px; }
.d-en { font-size: 11px; color: var(--amber-d); }
.badge { display: inline-block; margin: 8px 0 6px; padding: 2px 8px; font-size: 11px; border: 1px solid currentColor; }
.badge.up { color: var(--green); } .badge.rev { color: var(--red); }
.d-astro { font-size: 12px; color: var(--cyan); }
.core { margin: 18px 0 4px; font: 700 18px/1.5 var(--mincho); color: var(--white); text-align: center; }
#detailBody section { margin-top: 18px; }
#detailBody h3 { font-size: 12px; font-weight: normal; color: var(--cyan); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; letter-spacing: .1em; }
#detailBody h3::before { content: "▌"; color: var(--nerv); }
#detailBody h3::after { content: ""; flex: 1; border-top: 1px dashed rgba(77,240,255,.3); }
#detailBody p { color: var(--amber); line-height: 1.75; margin-bottom: 6px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { border: 1px solid rgba(255,176,0,.5); padding: 2px 8px; font-size: 12px; color: var(--white); }
.imagery { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 13px; line-height: 1.6; }
.imagery dt { color: var(--white); white-space: nowrap; } .imagery dt::before { content: "◇ "; color: var(--nerv); }
.imagery dd { color: var(--amber); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fields div { border-left: 2px solid var(--amber-d); padding-left: 8px; }
.fields b { color: var(--white); font-weight: normal; font-size: 12px; }
.fields p { font-size: 12px !important; line-height: 1.6 !important; }
.advice { color: var(--green) !important; }
.pending { color: var(--amber-d) !important; font-size: 12px !important; }
.skynow { color: var(--cyan) !important; }
.kab { color: var(--nerv) !important; }
.tree { display: block; width: 80%; margin: 6px auto 0; overflow: visible; }
.tree line { stroke: var(--amber-dd); stroke-width: 3; }
.tree line.on { stroke: var(--nerv); stroke-width: 7; filter: drop-shadow(0 0 6px var(--nerv)); }
.tree circle { fill: #000; stroke: var(--amber-d); stroke-width: 3; }
.tree circle.on { fill: var(--nerv); stroke: #ffd080; filter: drop-shadow(0 0 8px var(--nerv)); }
.tree circle.daath { stroke-dasharray: 5 5; stroke: #553a00; }
.tree text { fill: var(--amber-d); font: 18px var(--mono); text-anchor: middle; }
.tree text.on { fill: #000; }
.tree text.lb { font-size: 17px; fill: var(--amber-d); text-anchor: start; }
.tree text.lb.l { text-anchor: end; }
.tree text.lb.on { fill: var(--white); }
.tree text.pl { fill: var(--white); font-size: 18px; text-anchor: start; }
.d-end { text-align: center; color: var(--amber-dd); font-size: 11px; margin-top: 26px; letter-spacing: .2em; }

/* ---------- EVA 横幅 ---------- */
#eva { position: absolute; left: 0; right: 0; top: 40%; opacity: 0; transform: scaleY(0); pointer-events: none; z-index: 40; background: rgba(8,0,0,.86); }
#eva.show { animation: eva 2.3s ease forwards; }
@keyframes eva {
  0% { opacity: 0; transform: scaleY(0); } 6% { opacity: 1; transform: scaleY(1.15); } 10% { transform: scaleY(1); }
  12% { opacity: .3; } 14% { opacity: 1; } 85% { opacity: 1; transform: scaleY(1); } 100% { opacity: 0; transform: scaleY(0); }
}
#eva .stripe { height: 8px; background: repeating-linear-gradient(-45deg, var(--nerv) 0 8px, #000 8px 16px); }
#eva .eva-main { font: 900 28px/1.15 var(--mincho); color: var(--nerv); text-align: center; transform: scaleX(.84); padding-top: 6px;
  text-shadow: 0 0 12px rgba(255,90,0,.7); white-space: nowrap; }
#eva .eva-sub { font-size: 11px; color: var(--amber); text-align: center; padding: 2px 8px 6px; letter-spacing: .06em; }

/* ======================= v1.1 交互与动画 ======================= */

/* 按钮：最小触控 44px，带边框与按压闪光 */
.bigbtn { width: 100%; min-height: 50px; font-size: 16px; letter-spacing: .12em; border: 1px solid rgba(255,176,0,.55);
  background: linear-gradient(to bottom, rgba(255,176,0,.10), rgba(255,176,0,.03)); margin-top: 8px; position: relative; overflow: hidden; }
.bigbtn.primary { border-color: var(--amber); color: var(--white); box-shadow: 0 0 14px rgba(255,176,0,.25), inset 0 0 18px rgba(255,176,0,.12); }
.bigbtn.primary:not(:disabled)::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(90deg, transparent, rgba(255,230,170,.18), transparent); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.iconbtn { min-width: 44px; min-height: 44px; font-size: 20px; border: 1px solid rgba(255,176,0,.35); padding: 0 10px; }
.textbtn { min-height: 44px; font-size: 14px; }
.hdr .nav { display: flex; gap: 8px; }
.btns.g3, .btns.g4 { display: grid; gap: 8px; width: 100%; margin-top: 4px; }
.btns.g3 { grid-template-columns: repeat(3, 1fr); }
.btns.g4 { grid-template-columns: repeat(4, 1fr); }
.tbtn { min-height: 58px; border: 1px solid rgba(255,176,0,.4); background: rgba(255,176,0,.05); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; padding: 6px 2px; position: relative; overflow: hidden; white-space: normal; }
.tbtn b { font-weight: normal; font-size: 14px; color: var(--white); }
.tbtn small { font-size: 9px; letter-spacing: .15em; color: var(--amber-d); }
.tbtn.on { border-color: var(--cyan); box-shadow: inset 0 0 14px rgba(77,240,255,.2); }
.tbtn.on b { color: var(--cyan); }
.tbtn.hot { border-color: var(--amber); box-shadow: 0 0 12px rgba(255,176,0,.25); }
.tbtn.danger b { color: var(--red); }
.tbtn:disabled b { color: var(--amber-d); }
button:not(:disabled):active { animation: none; transform: scale(.97); }
button.zap::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; top: 0; background: var(--white);
  box-shadow: 0 0 10px 2px rgba(255,220,150,.8); animation: zap .35s ease-out forwards; pointer-events: none; }
@keyframes zap { from { top: 0; opacity: 1; } to { top: 100%; opacity: 0; } }
.iconbtn, .textbtn, .chip, .sp, .hitem, .rcard { position: relative; overflow: hidden; }

/* 提问页 */
.q-body { gap: 6px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 38px; padding: 6px 14px; border: 1px solid rgba(255,176,0,.35); font-size: 14px; color: var(--amber); }
.chip.on { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 10px rgba(77,240,255,.25), inset 0 0 10px rgba(77,240,255,.08); }
.namerow { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.namerow.show { max-height: 60px; }
#askerName { width: 100%; margin-top: 2px; background: rgba(255,176,0,.05); border: 1px solid rgba(255,176,0,.35); color: var(--white);
  font: 16px var(--mono); padding: 8px 10px; outline: none; -webkit-user-select: text; user-select: text; border-radius: 0; }
.sp { min-height: 68px; }

/* 页面内滚动区 */
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; pointer-events: auto; padding: 12px 2px 28px; }

/* 详解页：分段依次浮现 */
section.rv { opacity: 0; animation: rise .5s ease-out forwards; animation-delay: calc(var(--i) * 70ms + 120ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); filter: brightness(1.8); } to { opacity: 1; transform: none; filter: none; } }
.d-bt { margin-top: 6px; font: 700 14px var(--mincho); color: var(--white); }
.d-bt span { display: block; font: 10px var(--mono); color: var(--amber-d); }
.mean { border-left: 2px solid var(--amber-d); padding: 4px 0 4px 10px; margin-bottom: 10px; opacity: .7; }
.mean.cur { opacity: 1; border-left-color: var(--amber); background: linear-gradient(90deg, rgba(255,176,0,.08), transparent); }
.mean.cur.is-rev { border-left-color: var(--red); background: linear-gradient(90deg, rgba(255,77,77,.08), transparent); }
.mh { font-size: 12px; color: var(--cyan); margin-bottom: 2px; }
.mh em { font-style: normal; margin-left: 8px; padding: 0 6px; border: 1px solid currentColor; font-size: 10px; color: var(--white); }
.mean p { color: var(--white) !important; }
details.orig { margin: 2px 0 6px; }
details summary { font-size: 11px; color: var(--amber-d); cursor: pointer; list-style: none; padding: 6px 0; }
details summary::before { content: "▸ "; }
details[open] summary::before { content: "▾ "; }
details p[lang="en"] { font-family: Georgia, "Times New Roman", serif; font-size: 13px !important; color: #c9b58a !important; line-height: 1.6 !important; white-space: pre-line; }
.src { font-size: 10px; color: var(--amber-d); margin-top: 4px; letter-spacing: .02em; }
.ed { color: #9a8a6a !important; font-size: 12px !important; }
.kb-item { border: 1px solid rgba(255,90,0,.3); padding: 10px 12px; margin: 10px 0; background: rgba(255,90,0,.04); }
.kb-item.main { border-color: var(--nerv); box-shadow: inset 0 0 18px rgba(255,90,0,.08); }
.kb-h { font: 700 15px var(--mincho); color: var(--white); margin-bottom: 6px; }
.kb-h span { display: block; font: 10px var(--mono); color: var(--amber-d); margin-top: 2px; }
.quote { font: 15px/1.8 var(--mincho) !important; color: var(--white) !important; }
.en-line { font: italic 12px Georgia, serif !important; color: #c9b58a !important; }
.he { font-size: 18px; color: var(--nerv); }
details.intro { margin-bottom: 4px; }

/* 历史记录 */
.filter { padding: 10px 0 4px; pointer-events: auto; }
.hitem { display: block; width: 100%; text-align: left; border: 1px solid rgba(255,176,0,.3); padding: 12px; margin-bottom: 10px;
  white-space: normal; opacity: 0; animation: rise .4s ease-out forwards; animation-delay: calc(var(--i) * 50ms); }
.hrow { display: flex; justify-content: space-between; font-size: 11px; color: var(--amber-d); }
.hc { color: var(--cyan); }
.hq { font: 700 16px/1.5 var(--mincho); color: var(--white); margin: 6px 0; overflow-wrap: anywhere; }
.hcards { font-size: 12px; color: var(--amber); }
.hcards i { font-style: normal; color: var(--red); font-size: 10px; margin-left: 1px; }
.hn { font-size: 13px; line-height: 1.55; color: var(--green); margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { color: var(--amber-d); padding: 30px 4px; }

/* 单条记录 */
.rmeta { font-size: 11px; color: var(--cyan); }
.rq { font: 700 20px/1.5 var(--mincho); color: var(--white); margin: 8px 0 14px; }
.rgrid { display: grid; gap: 10px; }
.rgrid.n1 { grid-template-columns: 45%; justify-content: center; }
.rgrid.n2, .rgrid.n3 { grid-template-columns: repeat(3, 1fr); }
.rgrid.n4, .rgrid.n5 { grid-template-columns: repeat(3, 1fr); }
.rcard { display: flex; flex-direction: column; align-items: center; padding: 4px; white-space: normal; opacity: 0; animation: rise .45s ease-out forwards; animation-delay: calc(var(--i) * 80ms); }
.rimg { width: 100%; max-width: 240px; margin-left: auto; margin-right: auto; box-sizing: border-box; border: 1px solid rgba(255,176,0,.4); padding: 3px; box-shadow: 0 0 10px rgba(255,176,0,.15); }
.rimg img { display: block; width: 100%; border-radius: 2px; }
.rimg.rev img { transform: rotate(180deg); }
.rpos { font-size: 10px; color: var(--cyan); margin-top: 4px; }
.rname { font: 700 14px var(--mincho); color: var(--white); }
.rv-t { font-size: 10px; color: var(--red); } .up-t { font-size: 10px; color: var(--green); }
.nl { display: block; color: var(--cyan); font-size: 12px; margin: 16px 0 6px; }
#recNote, #yrNote, #lotNote, #jiaoNote, #lenNote, #runeNote { width: 100%; min-height: 88px; max-height: 320px; background: rgba(77,255,136,.04); border: 1px solid rgba(77,255,136,.35); color: var(--white); font: 16px/1.5 var(--mono);
  padding: 10px; resize: vertical; outline: none; -webkit-user-select: text; user-select: text; border-radius: 0; overflow-wrap: anywhere; }
.rsky { font-size: 10px; color: var(--amber-d); margin-top: 12px; line-height: 1.7; }

/* 导出面板 */
#exportBox { position: absolute; inset: 0; z-index: 45; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 16px) 14px calc(env(safe-area-inset-bottom) + 16px); }
#exportBox.show { display: flex; animation: tvon .4s ease-out; }
.ex-panel { width: 100%; max-height: 100%; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--amber); padding: 12px;
  box-shadow: 0 0 30px rgba(255,176,0,.25); background: #000; text-shadow: var(--glow); }
.ex-title { color: var(--white); font-size: 15px; } .ex-title small { color: var(--amber-d); font-size: 10px; letter-spacing: .2em; margin-left: 6px; }
.ex-img { flex: 1; min-height: 0; overflow-y: auto; border: 1px solid rgba(255,176,0,.3); background: #050505; }
.ex-img img { display: block; width: 100%; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.ex-msg { font-size: 12px; color: var(--green); min-height: 1.5em; }

/* 提示 */
#toast { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 120px); transform: translateX(-50%); z-index: 46;
  border: 1px solid var(--cyan); background: rgba(0,0,0,.9); color: var(--cyan); padding: 8px 16px; font-size: 13px; line-height: 1.45; opacity: 0; pointer-events: none;
  white-space: normal; text-align: center; max-width: min(92%, 420px); width: max-content; }
#toast.show { animation: toast 2.6s ease forwards; }
#toast.warn { border-color: var(--red); color: var(--red); }
#toast.warn.show { animation: toast 3.6s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* 开机页按钮区 */
.boot-bottom .bigbtn { max-width: 340px; }
.boot-bottom .hist { margin-top: 0; }
.start { animation: none; }

/* ======================= v1.2 ======================= */

/* 主题皮肤：只改变量 */
#app[data-skin="phosphor"] { --amber: #4dff88; --amber-d: #1f8a45; --amber-dd: #0b3a1c; --cyan: #c8ff4d; --white: #e6ffe9; --nerv: #c8ff4d;
  --glow: 0 0 6px rgba(77,255,136,.55), .6px 0 rgba(255,40,80,.25), -.6px 0 rgba(40,220,255,.25); }
#app[data-skin="eva"] { --amber: #ff5a1f; --amber-d: #9a3410; --amber-dd: #3a1306; --cyan: #ffd400; --white: #fff0e0; --nerv: #ff2a4a;
  --glow: 0 0 7px rgba(255,90,31,.6), .6px 0 rgba(255,40,80,.35), -.6px 0 rgba(255,212,0,.25); }
#app[data-skin="glass"] { --amber: #e9c46a; --amber-d: #8a7240; --amber-dd: #2e2a40; --cyan: #7aa7ff; --white: #f4ecff; --nerv: #ff6b8a; --bg: #04051a;
  --glow: 0 0 6px rgba(233,196,106,.45), .6px 0 rgba(255,107,138,.3), -.6px 0 rgba(122,167,255,.3); }
#app[data-skin="glass"], #app[data-skin="glass"] .page.solid { background-color: #04051a; }
#app[data-skin="glass"] #p-detail { background: #04051a; }
.tbtn small, .hdr .step small { color: var(--amber-d); }

/* 初次登记 */
#p-hello { justify-content: center; pointer-events: auto; }
.hello { display: flex; flex-direction: column; gap: 16px; padding: 0 6px; }
.hello .sys { min-height: 4.5em; font-size: 14px; }
.hello-in { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--amber); padding-bottom: 6px; }
.hello-in span { font: 900 28px var(--mincho); color: var(--white); }
#helloName { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--white); font: 900 28px var(--mincho); caret-color: var(--amber); -webkit-user-select: text; user-select: text; }
#helloName::placeholder { color: var(--amber-dd); }

/* 开机：右上角小图标 + 按住开始 */
.boot-top { display: flex; justify-content: space-between; align-items: flex-start; pointer-events: auto; }
.icons { display: flex; gap: 8px; }
.icon { width: 44px; height: 44px; border: 1px solid rgba(255,176,0,.3); display: grid; place-items: center; padding: 0; opacity: .75; }
.icon svg { width: 22px; height: 22px; fill: none; stroke: var(--amber); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon:not(:disabled):hover, .icon:active { opacity: 1; }
.boot-hello { font: 700 16px var(--mincho); color: var(--white); letter-spacing: .2em; margin-bottom: 4px; }
.hold { --p: 0; width: 100%; max-width: 340px; min-height: 64px; position: relative; overflow: hidden; border: 1px solid var(--amber);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; touch-action: none; -webkit-user-select: none; user-select: none;
  box-shadow: 0 0 calc(10px + var(--p) * 30px) rgba(255,176,0,calc(.2 + var(--p) * .5)); }
.hold b { font-weight: normal; font-size: 16px; letter-spacing: .25em; color: var(--white); position: relative; }
.hold small { font-size: 9px; letter-spacing: .3em; color: var(--amber-d); position: relative; }
.hold .ring { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 100%); background: linear-gradient(90deg, rgba(255,176,0,.10), rgba(255,176,0,.35)); }
.hold.holding { animation: holdpulse .5s ease-in-out infinite alternate; }
@keyframes holdpulse { to { filter: brightness(1.3); } }
.hold:not(.holding) { animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 22px rgba(255,176,0,.35); } }

/* 提问页 */
.hscroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hscroll::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: baseline; gap: 6px; }
.chip small { font-size: 10px; color: var(--amber-d); }
.chip.on small { color: var(--cyan); }
.chip.add { border-style: dashed; color: var(--cyan); }
.chip.mini { min-height: 32px; padding: 4px 10px; font-size: 12px; justify-self: end; }
.chip.danger { color: var(--red); border-color: rgba(255,77,77,.4); }
.examples { display: flex; flex-wrap: wrap; gap: 6px; }
.ex { font-size: 12px; color: var(--amber-d); border: 1px dashed rgba(255,176,0,.25); padding: 6px 10px; white-space: normal; text-align: left; }
.qhint { font-size: 12px; color: var(--amber-d); min-height: 1.5em; }
.qhint.warn { color: var(--cyan); } .qhint.ok { color: var(--green); }
.sync-banner { border: 1px solid var(--cyan); padding: 10px 12px; color: var(--cyan); font-size: 13px; box-shadow: inset 0 0 14px rgba(77,240,255,.1); }
.sync-banner b { color: var(--white); }
.sp:disabled { opacity: .45; }

/* 底部弹层 */
#sheet { position: absolute; inset: 0; z-index: 44; pointer-events: none; }
#sheet .scrim, #drawer .scrim { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .25s; }
.sheet-p { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82%; overflow-y: auto; background: #050403; border-top: 1px solid var(--amber);
  box-shadow: 0 -10px 40px rgba(255,176,0,.15); padding: 8px 16px calc(env(safe-area-inset-bottom) + 18px); transform: translateY(105%); transition: transform .32s cubic-bezier(.2,.8,.2,1); text-shadow: var(--glow); }
#app[data-skin="glass"] .sheet-p, #app[data-skin="glass"] .dr-panel { background: #070826; }
#sheet.show { pointer-events: auto; } #sheet.show .scrim { opacity: 1; } #sheet.show .sheet-p { transform: none; }
.sheet-top { position: sticky; top: -8px; z-index: 3; margin: -8px -16px 8px; height: 40px; display: flex; align-items: center; justify-content: center; background: inherit; touch-action: none; }
.sheet-grip { width: 40px; height: 3px; background: var(--amber-d); }
.sheet-x { position: absolute; right: 6px; top: 0; width: 44px; height: 40px; font-size: 26px; line-height: 1; color: var(--amber-d); background: none; border: 0; }
.sheet-b { display: flex; flex-direction: column; gap: 12px; }
.sh-t { font: 900 20px var(--mincho); color: var(--white); }
.sh-sub { font-size: 12px; color: var(--amber-d); line-height: 1.7; }
.sheet-b input, .code { width: 100%; background: rgba(255,176,0,.05); border: 1px solid rgba(255,176,0,.4); color: var(--white); font: 16px var(--mono);
  padding: 10px; outline: none; border-radius: 0; -webkit-user-select: text; user-select: text; }
.code { font-size: 12px; resize: none; word-break: break-all; }
.code:not([readonly]) { font-size: 16px; }   /* 可输入的同抽码框不能小于 16px，否则 iPhone 会放大整页 */
.btns.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }

/* 菜单 */
#drawer { position: absolute; inset: 0; z-index: 43; pointer-events: none; }
.dr-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(84%, 340px); background: #050403; border-left: 1px solid var(--amber);
  padding: calc(env(safe-area-inset-top) + 16px) 14px calc(env(safe-area-inset-bottom) + 20px); display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
  transform: translateX(105%); transition: transform .32s cubic-bezier(.2,.8,.2,1); text-shadow: var(--glow); }
#drawer.show { pointer-events: auto; } #drawer.show .scrim { opacity: 1; } #drawer.show .dr-panel { transform: none; }
.dr-t { font: 900 18px var(--mincho); color: var(--white); margin-bottom: 8px; } .dr-t small { font: 10px var(--mono); color: var(--amber-d); letter-spacing: .2em; margin-left: 6px; }
.dr-panel > button { text-align: left; border: 1px solid rgba(255,176,0,.25); padding: 10px 12px; white-space: normal; display: flex; flex-direction: column; gap: 2px; }
.dr-panel > button b { font-weight: normal; color: var(--white); font-size: 15px; }
.dr-panel > button small { font-size: 11px; color: var(--amber-d); }
.dr-k { font-size: 11px; color: var(--cyan); margin: 14px 0 4px; letter-spacing: .1em; }

/* 牌阵总览 */
.ov-q { font: 700 16px/1.5 var(--mincho); color: var(--white); }
.ov { display: flex; flex-direction: column; gap: 8px; }
.ov-i { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; text-align: left; border: 1px solid rgba(255,176,0,.25); padding: 8px; white-space: normal; }
.ov-img img { width: 54px; display: block; border-radius: 2px; } .ov-img.rev img { transform: rotate(180deg); }
.ov-pos { font-size: 11px; color: var(--cyan); }
.ov-n { font: 700 17px var(--mincho); color: var(--white); }
.ov-n em { font: 11px var(--mono); font-style: normal; margin-left: 8px; } .ov-n em.rv { color: var(--red); } .ov-n em.up { color: var(--green); }
.ov-k { font-size: 13px; color: var(--amber); margin-top: 2px; }
.ov-go { font-size: 22px; color: var(--amber-d); }

/* 详解（精简版） */
.essence { margin: 20px 0 8px; text-align: center; padding: 18px 8px; border-top: 1px solid rgba(255,176,0,.25); border-bottom: 1px solid rgba(255,176,0,.25); }
.ess-k { font: 900 26px/1.5 var(--mincho); color: var(--white); text-wrap: balance; }
.ess-k i { font-style: normal; color: var(--amber-d); margin: 0 8px; font-weight: normal; }
.ess-src { font-size: 11px; color: var(--amber-d); margin-top: 8px; letter-spacing: .1em; }
.poshint { font-size: 13px !important; color: var(--amber) !important; margin: 12px 0 !important; }
.poshint b { color: var(--cyan); font-weight: normal; margin-right: 4px; }
.lines { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 16px; }
.line { display: grid; grid-template-columns: 40px 1fr; gap: 8px; opacity: .55; }
.line span { font-size: 12px; color: var(--cyan); padding-top: 3px; }
.line p { margin: 0 !important; font-size: 14px !important; color: var(--white) !important; }
.line.cur { opacity: 1; } .line.cur.is-rev span { color: var(--red); } .line.cur:not(.is-rev) span { color: var(--green); }
.accs { display: flex; flex-direction: column; gap: 8px; }
details.acc { border: 1px solid rgba(255,176,0,.25); opacity: 0; animation: rise .45s ease-out forwards; animation-delay: calc(var(--i) * 70ms + 120ms); }
details.acc > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 12px; min-height: 48px; font-size: 14px; }
details.acc > summary::before { content: none; }
details.acc > summary b { font-weight: normal; color: var(--white); }
details.acc > summary span { font-size: 11px; color: var(--amber-d); text-align: right; }
details.acc > summary::after { content: "+"; color: var(--amber); font-size: 18px; flex: none; }
details.acc[open] > summary::after { content: "−"; }
details.acc[open] { border-color: rgba(255,176,0,.55); }
.acc-b { padding: 0 12px 14px; }
.bi-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.bi-tabs button { border: 1px solid rgba(255,176,0,.3); padding: 6px 12px; font-size: 12px; min-height: 34px; }
.bi-tabs button.on { border-color: var(--cyan); color: var(--cyan); }
.bi-pair { margin-bottom: 10px; }
.bi-pair p { margin: 0 0 4px !important; }
.bi .bi-en { font-family: Georgia, "Times New Roman", serif !important; font-size: 13.5px !important; color: #cdb98d !important; line-height: 1.65 !important; }
.bi[data-mode="zh"] .bi-en, .bi[data-mode="en"] .bi-zh { display: none; }
.bi[data-mode="both"] .bi-pair { border-left: 2px solid var(--amber-dd); padding-left: 10px; }

/* 档案 */
.people { display: flex; flex-direction: column; gap: 10px; }
.person { text-align: left; border: 1px solid rgba(255,176,0,.3); padding: 14px; white-space: normal; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.pn { font: 700 18px var(--mincho); color: var(--white); } .ps { grid-column: 1; font-size: 11px; color: var(--amber-d); }
.pc { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 11px; color: var(--amber-d); text-align: right; } .pc b { font-size: 20px; color: var(--cyan); font-weight: normal; }
#personHead { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.ph-note { font-size: 12px; color: var(--amber-d); overflow-wrap: anywhere; white-space: pre-wrap; }
.verify { font-size: 11px; color: var(--amber-d); border-left: 2px solid var(--amber-d); padding: 4px 8px; margin-bottom: 12px; }
.verify.ok { color: var(--green); border-color: var(--green); } .verify.bad { color: var(--red); border-color: var(--red); }
.rkey { font-size: 10px; color: var(--amber); text-align: center; line-height: 1.4; margin: 2px 0; }
.sync-row { margin-top: 14px; } .sync-cards { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--white); }
.sync-cards i { font-style: normal; color: var(--red); font-size: 10px; margin-left: 2px; }
.photo { width: 100%; border: 1px solid rgba(255,176,0,.35); margin-top: 6px; }
.rv-badge { font-size: 11px; justify-self: end; } .rv-badge .ok { color: var(--green); } .rv-badge .bad { color: var(--red); }

/* 天象日历 */
.cal-title { font: 900 22px var(--mincho); color: var(--white); padding: 12px 0 4px; }
.cal-d { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px dashed rgba(255,176,0,.2); opacity: 0; animation: rise .4s ease-out forwards; animation-delay: calc(var(--i) * 50ms); }
.cal-d.today .cal-n { color: var(--cyan); }
.cal-n { font: 700 26px Georgia, serif; color: var(--white); text-align: center; line-height: 1.1; } .cal-n small { display: block; font: 11px var(--mono); color: var(--amber-d); }
.cal-t { font-size: 14px; color: var(--white); } .cal-tip { font-size: 12px; color: var(--amber); margin: 2px 0 4px; }
.cal-go { font-size: 12px; color: var(--cyan); padding: 4px 0 8px; }

/* 年鉴 */
.alm-big { text-align: center; padding: 10px 0 18px; } .alm-big b { display: block; font: 700 64px Georgia, serif; color: var(--white); }
.alm-big span { font-size: 12px; color: var(--amber-d); }
.alm-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; border: 1px solid rgba(255,176,0,.3); padding: 10px; margin-bottom: 16px; }
.alm-card img { width: 96px; display: block; }
.alm-k { font-size: 11px; color: var(--cyan); letter-spacing: .1em; margin: 8px 0 6px; } .alm-n { font: 900 24px var(--mincho); color: var(--white); } .alm-s { font-size: 12px; color: var(--amber); }
.alm-top { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; text-align: center; font-size: 11px; color: var(--white); }
.alm-top img { width: 100%; display: block; margin-bottom: 4px; } .alm-top small { display: block; color: var(--amber-d); }
.alm-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 110px; align-items: end; text-align: center; font-size: 10px; color: var(--amber-d); }
.alm-bars div { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; } .alm-bars i { display: block; background: var(--amber-d); min-height: 1px; } .alm-bars i.hot { background: var(--amber); }
.alm-lines p { font-size: 13px !important; color: var(--amber) !important; margin: 4px 0 !important; }

/* 书架与选牌 */
.shelf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-content: start; }
.sc { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px; white-space: normal; font-size: 11px; color: var(--white); opacity: 0; animation: rise .35s ease-out forwards; animation-delay: calc(var(--i, 0) * 30ms); }
.pk-grid .sc { opacity: 1; animation: none; }
.sc img { width: 100%; display: block; border: 1px solid rgba(255,176,0,.3); border-radius: 2px; }
.sc.used { opacity: .25 !important; }
.pk-grid { max-height: 52vh; max-height: 52dvh; overflow-y: auto; }

/* 实体牌录入 */
.mslot { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed rgba(255,176,0,.2); }
.mp { font-size: 12px; color: var(--cyan); }
.mpick { min-height: 40px; border: 1px solid rgba(255,176,0,.35); padding: 6px 12px; font-size: 14px; color: var(--amber-d); }
.mpick.set { color: var(--white); border-color: var(--amber); }
.photo-in { display: block; border: 1px dashed rgba(255,176,0,.35); padding: 14px; margin-top: 10px; text-align: center; font-size: 13px; color: var(--amber-d); pointer-events: auto; }
.photo-in input { display: none; }

/* 导出样式切换 */
.seg { float: right; display: inline-flex; gap: 0; border: 1px solid rgba(255,176,0,.4); }
.seg button { padding: 4px 12px; font-size: 12px; min-height: 30px; }
.seg button.on { background: rgba(255,176,0,.18); color: var(--white); }
.seg[hidden] { display: none; }

/* ======================= v1.3 全局演算进程条 ======================= */

:root { --line: rgba(255,176,0,.55); --line-dim: rgba(255,176,0,.22); --bar: var(--amber); --bar-dim: rgba(0,0,0,.85); --sel: var(--amber); --sel-ink: #000; --glass: rgba(0,0,0,.6); }
#calcBar { grid-column: 1 / -1; margin-top: 8px; pointer-events: none; --p: 0%; }
#calcBar[hidden] { display: none; }
.cb-head { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--amber-d); }
.cb-head b { color: var(--white); font-weight: 600; }
.cb-line { flex: 1; height: 1px; background: var(--line-dim); }
.cb-slabs { position: relative; display: flex; gap: 3px; align-items: center; height: 40px; margin: 18px 0 6px; }
.cb-slab { flex: 1; height: 22px; border: 1px solid var(--line-dim); background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,0)); transition: height .5s, border-color .5s, background .5s; }
.cb-slab.g { height: 30px; border-color: var(--line); }
.cb-slab.past { background: linear-gradient(160deg, rgba(255,255,255,.18), rgba(255,255,255,.04)); }
.cb-slab.cur { height: 40px; border: 2px solid var(--white); background: linear-gradient(160deg, rgba(255,255,255,.32), rgba(255,255,255,.06)); box-shadow: 0 0 12px rgba(255,255,255,.35); }
.cb-lab { position: absolute; top: -17px; transform: translateX(-50%); font-size: 10px; color: var(--amber-d); white-space: nowrap; transition: color .4s; }
.cb-lab.cur { color: var(--white); } .cb-lab.past { color: var(--amber); }
.cb-mark { position: absolute; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; transform: translateX(-50%); transition: left .7s cubic-bezier(.3,.7,.3,1); }
.cb-mark.up { top: -4px; border-top: 6px solid var(--white); } .cb-mark.dn { bottom: -16px; border-bottom: 6px solid var(--white); }
.cb-bar { position: relative; height: 14px; border: 1px solid var(--line); background: var(--bar-dim); overflow: hidden; }
.cb-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); background: repeating-linear-gradient(-45deg, var(--bar) 0 4px, transparent 4px 8px); }
#calcBar.busy .cb-fill { animation: cbstripe .5s linear infinite; }
@keyframes cbstripe { to { background-position: 11.3px 0; } }
.cb-pct { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 0 10px; background: var(--bar-dim); color: var(--white);
  font: 600 13px/14px "DIN Alternate", "Avenir Next Condensed", "Helvetica Neue", sans-serif; letter-spacing: .04em; }
.cb-note { text-align: right; font-size: 10px; color: var(--amber-d); min-height: 14px; margin-top: 3px; }
#calcBar.busy .cb-note { color: var(--cyan); animation: blink .6s steps(2) infinite; }
#calcBar.done .cb-bar { animation: cbdone .8s ease-out; }
@keyframes cbdone { 0% { box-shadow: 0 0 0 rgba(255,255,255,0); } 30% { box-shadow: 0 0 18px rgba(255,255,255,.7); } 100% { box-shadow: 0 0 0 rgba(255,255,255,0); } }
.cb-host { pointer-events: none; }
#p-boot .cb-host, #p-hello .cb-host { margin-top: 10px; }

/* ======================= v1.3 「演算」主题 ======================= */

#app[data-skin="calc"] {
  --amber: #e6ebff; --amber-d: #b4bce6; --amber-dd: #3c3a7e; --cyan: #9fd0ff; --white: #ffffff; --red: #ff8fa3; --green: #8ef0c0; --nerv: #ff9ccf;
  --bg: #16123d; --mono: -apple-system, "PingFang SC", "Hiragino Sans GB", sans-serif; --mincho: -apple-system, "PingFang SC", "Hiragino Sans GB", sans-serif;
  --glow: 0 0 8px rgba(160,190,255,.35);
  --line: rgba(235,240,255,.7); --line-dim: rgba(235,240,255,.3); --bar: #8cc4ff; --bar-dim: rgba(18,20,58,.9);
  --sel: #9fd0ff; --sel-ink: #10183a; --glass: rgba(26,22,72,.5);
  background: #16123d;
}
#app.alarm[data-skin="calc"] {
  --amber: #ffe3e6; --amber-d: #d98a96; --amber-dd: #6a1c2c; --cyan: #ff9aa6; --nerv: #ffd36b; --red: #ffd36b; --green: #ffc2c8;
  --line: rgba(255,225,228,.66); --line-dim: rgba(255,225,228,.24); --bar: #ff7a88; --bar-dim: rgba(48,8,16,.9);
  --sel: #ff8f9b; --sel-ink: #2a060c; --glass: rgba(70,12,24,.5); --glow: 0 0 8px rgba(255,140,150,.35);
  background: #2a0711;
}
#app[data-skin="calc"] .scan { opacity: .1; }
#app[data-skin="calc"] .band { display: none; }
#app[data-skin="calc"] .vig { background: radial-gradient(ellipse at center, transparent 70%, rgba(10,6,30,.45) 100%); box-shadow: inset 0 0 50px 8px rgba(10,6,30,.35); }
#app[data-skin="calc"] .page { text-shadow: none; }
#app[data-skin="calc"] .page.solid, #app[data-skin="calc"] #p-detail { background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

/* 页头：仿「如我所书 / xxx.exe」 */
#app[data-skin="calc"] .hdr { border-bottom: 1px solid var(--line-dim); }
#app[data-skin="calc"] .hdr .step { font-size: 16px; font-weight: 600; letter-spacing: .02em; }
#app[data-skin="calc"] .hdr .step small { color: var(--amber-d); letter-spacing: .08em; }
#app[data-skin="calc"] .hdr .step .n { color: var(--cyan); }
#app[data-skin="calc"] .hdr .steps { display: none; }
#app[data-skin="calc"] .q-echo { color: var(--amber-d); }

/* 按钮：玻璃方块，按下或选中时填浅蓝 */
#app[data-skin="calc"] button { text-shadow: none; }
#app[data-skin="calc"] .tbtn, #app[data-skin="calc"] .bigbtn, #app[data-skin="calc"] .iconbtn, #app[data-skin="calc"] .chip,
#app[data-skin="calc"] .sp, #app[data-skin="calc"] .icon, #app[data-skin="calc"] .hold, #app[data-skin="calc"] .ex,
#app[data-skin="calc"] .hitem, #app[data-skin="calc"] .person, #app[data-skin="calc"] .ov-i, #app[data-skin="calc"] details.acc,
#app[data-skin="calc"] .dr-panel > button, #app[data-skin="calc"] .mpick, #app[data-skin="calc"] .bi-tabs button {
  border: 1.5px solid var(--line-dim); background: rgba(210,220,255,.07); box-shadow: none; border-radius: 0; }
#app.alarm[data-skin="calc"] .tbtn, #app.alarm[data-skin="calc"] .bigbtn, #app.alarm[data-skin="calc"] .chip { background: rgba(255,200,205,.07); }
#app[data-skin="calc"] .tbtn b, #app[data-skin="calc"] .bigbtn { color: var(--white); }
#app[data-skin="calc"] .tbtn small { color: var(--amber-d); letter-spacing: .12em; }
#app[data-skin="calc"] .bigbtn.primary, #app[data-skin="calc"] .tbtn.hot { border-color: var(--line); background: rgba(210,220,255,.12); }
#app[data-skin="calc"] .bigbtn.primary::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); }
#app[data-skin="calc"] .chip.on, #app[data-skin="calc"] .sp.on, #app[data-skin="calc"] .bi-tabs button.on, #app[data-skin="calc"] .seg button.on {
  background: var(--sel); color: var(--sel-ink); border-color: var(--sel); box-shadow: 0 0 14px rgba(160,200,255,.35); }
#app[data-skin="calc"] .chip.on small, #app[data-skin="calc"] .sp.on .t, #app[data-skin="calc"] .sp.on .c { color: var(--sel-ink); }
#app[data-skin="calc"] .sp.on rect { stroke: var(--sel-ink); }
#app[data-skin="calc"] .sp rect { stroke: var(--amber-d); }
#app[data-skin="calc"] .tbtn.on { background: var(--sel); border-color: var(--sel); } #app[data-skin="calc"] .tbtn.on b { color: var(--sel-ink); }
#app[data-skin="calc"] button:not(:disabled):active { background: var(--sel); color: var(--sel-ink); animation: none; }
#app[data-skin="calc"] button:not(:disabled):active b { color: var(--sel-ink); }
@media (hover: hover) { #app[data-skin="calc"] button:not(:disabled):hover { animation: none; color: var(--white); border-color: var(--line); } }
#app[data-skin="calc"] button.zap::before { background: #fff; box-shadow: 0 0 10px 2px rgba(200,220,255,.8); }
#app[data-skin="calc"] .chip.danger, #app[data-skin="calc"] .tbtn.danger b { color: var(--red); }
#app[data-skin="calc"] .icon svg { stroke: var(--white); }
#app[data-skin="calc"] .hold { border-color: var(--line); box-shadow: 0 0 calc(10px + var(--p) * 30px) rgba(160,200,255,calc(.15 + var(--p) * .5)); }
#app[data-skin="calc"] .hold .ring { background: repeating-linear-gradient(-45deg, rgba(140,196,255,.55) 0 4px, transparent 4px 8px); }
#app[data-skin="calc"] .hold:not(.holding) { animation: breathe-c 3.2s ease-in-out infinite; }
@keyframes breathe-c { 50% { box-shadow: 0 0 22px rgba(160,200,255,.4); } }

/* 输入框、日志、标题 */
#app[data-skin="calc"] #q, #app[data-skin="calc"] #mq, #app[data-skin="calc"] #askerName, #app[data-skin="calc"] .sheet-b input, #app[data-skin="calc"] .code, #app[data-skin="calc"] #recNote {
  background: rgba(255,255,255,.07); border: 1.5px solid var(--line-dim); color: var(--white); text-shadow: none; }
#app[data-skin="calc"] #q:focus, #app[data-skin="calc"] #mq:focus { border-color: var(--line); box-shadow: 0 0 12px rgba(160,200,255,.25); }
#app[data-skin="calc"] .status { color: var(--white); }
#app[data-skin="calc"] .status.hi { color: var(--cyan); } #app[data-skin="calc"] .status.ok { color: var(--green); }
#app[data-skin="calc"] .ftr { border-top: 1px solid var(--line-dim); }
#app[data-skin="calc"] .sys { color: var(--amber); }
#app[data-skin="calc"] #p-boot h1 { font: 800 60px/1 -apple-system, "Helvetica Neue", sans-serif; letter-spacing: .28em; transform: none;
  text-shadow: 0 0 22px rgba(170,190,255,.8), 0 0 2px #fff; color: #fff; }
#app[data-skin="calc"] #p-boot .sub { color: var(--amber); }
#app[data-skin="calc"] .sky { color: var(--cyan); }
#app[data-skin="calc"] .qhint.warn { color: var(--cyan); }
#app[data-skin="calc"] .sync-banner { border-color: var(--line); color: var(--white); background: rgba(160,200,255,.1); box-shadow: none; }

/* 详解、记录、档案 */
#app[data-skin="calc"] .essence { border-color: var(--line-dim); }
#app[data-skin="calc"] .ess-k { font-weight: 700; }
#app[data-skin="calc"] .d-imgbox, #app[data-skin="calc"] .rimg, #app[data-skin="calc"] .alm-card { border-color: var(--line); box-shadow: 0 0 18px rgba(160,190,255,.25); }
#app[data-skin="calc"] #detailBody h3::before { color: var(--cyan); }
#app[data-skin="calc"] .kb-item { border-color: var(--line-dim); background: rgba(255,255,255,.05); }
#app[data-skin="calc"] .kb-item.main { border-color: var(--line); box-shadow: none; }
#app[data-skin="calc"] .kab, #app[data-skin="calc"] .he { color: var(--cyan) !important; }
#app[data-skin="calc"] .tree line { stroke: rgba(220,230,255,.25); } #app[data-skin="calc"] .tree circle { stroke: rgba(220,230,255,.55); fill: #1b1650; }
#app[data-skin="calc"] .tree line.on { stroke: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); }
#app[data-skin="calc"] .tree circle.on { fill: var(--cyan); stroke: #fff; filter: drop-shadow(0 0 8px var(--cyan)); }
#app[data-skin="calc"] .tree text { fill: var(--amber-d); } #app[data-skin="calc"] .tree text.on { fill: var(--sel-ink); } #app[data-skin="calc"] .tree text.lb.on { fill: #fff; }
#app[data-skin="calc"] .verify.ok { color: var(--green); border-color: var(--green); }
#app[data-skin="calc"] .bi .bi-en { color: #c6cdf5 !important; }
#app[data-skin="calc"] .bi[data-mode="both"] .bi-pair { border-left-color: var(--line-dim); }
#app[data-skin="calc"] .line span { color: var(--cyan); }

/* 弹层、菜单、导出面板、提示 */
#app[data-skin="calc"] .sheet-p, #app[data-skin="calc"] .dr-panel, #app[data-skin="calc"] .ex-panel {
  background: rgba(30,24,80,.82); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-color: var(--line); box-shadow: 0 0 40px rgba(120,140,255,.25); text-shadow: none; }
#app.alarm[data-skin="calc"] .sheet-p, #app.alarm[data-skin="calc"] .ex-panel { background: rgba(70,12,24,.85); }
#app[data-skin="calc"] .sheet-grip { background: var(--line); }
#app[data-skin="calc"] #toast { border-color: var(--line); color: var(--white); background: rgba(30,24,80,.9); }
#app[data-skin="calc"] .ex-img { border-color: var(--line-dim); background: rgba(0,0,0,.25); }
#app[data-skin="calc"] .seg { border-color: var(--line); }

/* 横幅：白色细线玻璃条，代替 EVA 的警示斜纹 */
#app[data-skin="calc"] #eva { background: rgba(26,22,72,.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#app[data-skin="calc"] #eva .stripe { height: 2px; background: var(--line); box-shadow: 0 0 10px rgba(200,220,255,.6); }
#app[data-skin="calc"] #eva .eva-main { font: 700 26px/1.2 -apple-system, "PingFang SC", sans-serif; color: #fff; transform: none; letter-spacing: .06em; text-shadow: 0 0 14px rgba(170,190,255,.8); padding-top: 10px; }
#app[data-skin="calc"] #eva .eva-sub { color: var(--amber); padding-bottom: 10px; }
#app.alarm[data-skin="calc"] #eva { background: rgba(70,12,24,.82); }
#app.alarm[data-skin="calc"] #eva .stripe { height: 6px; background: repeating-linear-gradient(-45deg, #ff7a88 0 6px, transparent 6px 12px); }

/* v1.3 修正 */
.hscroll { flex: none; min-height: 46px; align-items: center; }
#p-boot .title { margin-top: 0; }
#p-boot .cb-host { margin-top: 14px; }
#app[data-skin="calc"] .tbtn, #app[data-skin="calc"] .bigbtn, #app[data-skin="calc"] .iconbtn, #app[data-skin="calc"] .icon, #app[data-skin="calc"] .hold {
  background: rgba(22,18,62,.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-color: var(--line); }
#app.alarm[data-skin="calc"] .tbtn, #app.alarm[data-skin="calc"] .bigbtn, #app.alarm[data-skin="calc"] .iconbtn, #app.alarm[data-skin="calc"] .hold { background: rgba(50,8,18,.62); }
#app[data-skin="calc"] .ftr .status, #app[data-skin="calc"] .stat, #app[data-skin="calc"] .q-echo { text-shadow: 0 0 6px rgba(10,6,30,.9), 0 0 2px rgba(10,6,30,.9); }
#app[data-skin="calc"] .badge.up { color: var(--green); }
.q-body > * { flex: none; }
.q-body { min-height: 0; padding-bottom: 12px; }
#p-boot .cb-host { margin-top: 26px; }

/* ======================= v1.4 黑底云室 + 黄绿点阵 ======================= */
#app[data-skin="calc"] {
  --amber: #e6eae0; --amber-d: #8f9688; --amber-dd: #2c3026; --cyan: #c6e04f; --white: #ffffff; --green: #c6e04f; --red: #ff8fa3; --nerv: #c6e04f;
  --bg: #030304; --glow: 0 0 6px rgba(198,224,79,.25);
  --line: rgba(235,240,230,.6); --line-dim: rgba(235,240,230,.2); --bar: #c6e04f; --bar-dim: rgba(10,12,8,.92);
  --sel: #c6e04f; --sel-ink: #0b0d05; --glass: rgba(6,7,6,.62);
  background: #030304;
}
#app[data-skin="calc"] .vig { background: radial-gradient(ellipse at center, transparent 62%, rgba(0,0,0,.6) 100%); box-shadow: inset 0 0 60px 10px rgba(0,0,0,.6); }
#app[data-skin="calc"] .scan { opacity: .22; }
#app[data-skin="calc"] .tbtn, #app[data-skin="calc"] .bigbtn, #app[data-skin="calc"] .iconbtn, #app[data-skin="calc"] .icon, #app[data-skin="calc"] .hold { background: rgba(6,7,6,.72); }
#app[data-skin="calc"] .chip, #app[data-skin="calc"] .sp, #app[data-skin="calc"] .hitem, #app[data-skin="calc"] .person, #app[data-skin="calc"] .ov-i, #app[data-skin="calc"] details.acc { background: rgba(230,240,220,.04); }
#app[data-skin="calc"] .sheet-p, #app[data-skin="calc"] .dr-panel, #app[data-skin="calc"] .ex-panel { background: rgba(6,7,6,.9); box-shadow: 0 0 40px rgba(198,224,79,.12); }
#app[data-skin="calc"] #toast { background: rgba(6,7,6,.92); }
#app[data-skin="calc"] #eva { background: rgba(4,5,4,.86); }
#app[data-skin="calc"] #eva .eva-main { text-shadow: 0 0 14px rgba(198,224,79,.6); }
#app[data-skin="calc"] .hold .ring { background: repeating-linear-gradient(-45deg, rgba(198,224,79,.55) 0 4px, transparent 4px 8px); }
#app[data-skin="calc"] .hold { box-shadow: 0 0 calc(8px + var(--p) * 30px) rgba(198,224,79,calc(.12 + var(--p) * .5)); }
@keyframes breathe-c { 50% { box-shadow: 0 0 22px rgba(198,224,79,.35); } }
#app[data-skin="calc"] .chip.on, #app[data-skin="calc"] .sp.on, #app[data-skin="calc"] .bi-tabs button.on, #app[data-skin="calc"] .seg button.on { box-shadow: 0 0 14px rgba(198,224,79,.3); }
#app[data-skin="calc"] #p-boot h1 { text-shadow: 0 0 22px rgba(198,224,79,.5), 0 0 2px #fff; }
#app[data-skin="calc"] .d-imgbox, #app[data-skin="calc"] .rimg, #app[data-skin="calc"] .alm-card { box-shadow: 0 0 18px rgba(198,224,79,.18); }
#app[data-skin="calc"] .tree circle { fill: #0a0b08; }
.d-imgbox { position: relative; }
.ascii-veil { position: absolute; left: 4px; top: 4px; pointer-events: none; border-radius: 3px; }

/* 进度条压缩：一行标题 + 细切片 + 细条 */
#calcBar { margin-top: 6px; }
.cb-head { font-size: 11px; gap: 8px; }
.cb-slabs { height: 18px; margin: 14px 0 3px; gap: 2px; }
.cb-slab { height: 8px; border-width: 1px; }
.cb-slab.g { height: 13px; }
.cb-slab.cur { height: 18px; border-width: 1.5px; box-shadow: 0 0 8px rgba(255,255,255,.35); }
.cb-lab { top: -14px; font-size: 9px; }
.cb-mark.up { top: -3px; border-top-width: 4px; border-left-width: 4px; border-right-width: 4px; }
.cb-mark.dn { display: none; }
.cb-bar { height: 8px; }
.cb-fill { background: repeating-linear-gradient(-45deg, var(--bar) 0 3px, transparent 3px 6px); }
@keyframes cbstripe { to { background-position: 8.5px 0; } }
.cb-pct { position: static; transform: none; background: none; padding: 0; font-size: 12px; line-height: 1; margin-left: auto; color: var(--white); }
.cb-note { position: absolute; right: 0; top: 0; margin: 0; font-size: 10px; line-height: 14px; }
#calcBar { position: relative; }
.cb-head .cb-line { max-width: 40px; }
#p-boot .cb-host { margin: 0 0 10px; align-self: stretch; }
#p-boot .boot-bottom .sky { grid-template-columns: 1fr 1fr 1fr; font-size: 10px; gap: 0 8px; }
.cb-note { position: static; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; text-align: right; }
.cb-pct { margin-left: 8px; min-width: 32px; text-align: right; }
.cb-head .cb-line { flex: 1; max-width: none; min-width: 10px; }
#p-boot { justify-content: flex-start; }
#p-boot .title { margin-top: 18px; }
#app[data-skin="calc"] #p-boot h1 { font-size: 46px; letter-spacing: .32em; }
#p-boot .sub { margin-top: 2px; }
#p-boot .boot-bottom { margin-top: auto; }
#p-hello { justify-content: flex-start; }
#p-hello .hello { margin: auto 0; }

/* ===== v1.5 赛博非遗：玄青 · 朱砂 · 鎏金（开屏与东方演算页） ===== */
#app.east, #app.east[data-skin] {
  --amber: #f1eadb; --amber-d: #c2bba6; --amber-dd: #4a4535; --cyan: #c9a45c; --white: #f6f0de; --green: #5fae94; --red: #d0412f; --nerv: #d0412f;
  --glow: 0 0 6px rgba(201,164,92,.25);
  --line: rgba(236,228,207,.68); --line-dim: rgba(236,228,207,.28); --bar: #d6b26a; --bar-dim: rgba(14,17,26,.92);
  --sel: #d6b26a; --sel-ink: #12100a; --glass: rgba(20,24,34,.62);
  --serif: "Songti SC", "STSong", "Noto Serif SC", serif;
}
#app.east .vig { background: radial-gradient(ellipse at center, transparent 66%, rgba(2,4,14,.4) 100%); box-shadow: inset 0 0 50px 10px rgba(2,4,14,.42); }
#app.east .scan { opacity: .55; }
#app.east .tbtn, #app.east .bigbtn, #app.east .iconbtn, #app.east .icon, #app.east .hold { background: rgba(22,26,38,.7); }
#app.east .sheet-p, #app.east .dr-panel, #app.east .ex-panel { background: rgba(18,21,31,.95); box-shadow: 0 0 40px rgba(201,164,92,.12); }
#app.east .step { font-family: var(--serif); }
.page input { pointer-events: auto; }

/* 开屏 */
#p-boot { justify-content: space-between; }
#p-boot .seal { width: 34px; padding: 4px 0; border: 1.5px solid var(--red); color: var(--red); font: 900 14px/1.15 var(--serif, serif); text-align: center; transform: rotate(-4deg); opacity: .9; margin: 6px 0 0 4px; }
.boot-lunar { font: 12px var(--serif, serif); color: var(--amber-d); letter-spacing: .08em; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; }
.boot-lunar b { color: var(--amber); font-weight: normal; }
.boot-lunar i { width: 3px; height: 3px; background: var(--cyan); display: inline-block; }
.mode-seg { display: flex; border: 1px solid var(--line-dim); margin: 6px 0 2px; }
.mode-seg button { min-width: 92px; height: 34px; background: transparent; color: var(--amber-d); font: 13px var(--serif, serif); letter-spacing: .3em; border: 0; }
.mode-seg button.on { background: var(--sel); color: var(--sel-ink); }
#app.east .hold { border-color: rgba(201,164,92,.7); box-shadow: 0 0 calc(8px + var(--p) * 30px) rgba(201,164,92,calc(.12 + var(--p) * .5)); }
#app.east .hold .ring { background: repeating-linear-gradient(-45deg, rgba(201,164,92,.5) 0 4px, transparent 4px 8px); }
#app.east .hold b { font-family: var(--serif); letter-spacing: .6em; }
#app.east .hold small { color: var(--cyan); letter-spacing: .5em; font-size: 10px; }
#app.east .hold:not(.holding) { animation: breathe-e 3.2s ease-in-out infinite; }
@keyframes breathe-e { 50% { box-shadow: 0 0 22px rgba(201,164,92,.35); } }

/* 问事 */
.ymethods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ym { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto auto; column-gap: 8px; text-align: left; padding: 10px; min-height: 92px;
  border: 1px solid var(--line-dim); background: rgba(236,228,207,.03); color: var(--amber); }
.ym svg { grid-row: 1 / 4; width: 34px; height: 34px; fill: none; stroke: var(--cyan); stroke-width: 1.4; }
.ym .t { font: 15px var(--serif, serif); color: var(--white); }
.ym .e { font-size: 8px; letter-spacing: .2em; color: var(--amber-d); }
.ym .d { font-size: 11px; color: var(--amber-d); line-height: 1.45; margin-top: 4px; grid-column: 1 / 3; }
.ym.on { border-color: var(--sel); box-shadow: inset 0 0 0 1px var(--sel), 0 0 14px rgba(201,164,92,.18); }
.ym.on svg { stroke: var(--red); }
.ynums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ynums input, #yq { background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); color: var(--white); font: 16px var(--serif, serif); padding: 10px; border-radius: 0; }

/* 起卦 */
.yc-calc { position: absolute; left: 16px; right: 16px; top: 132px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; z-index: 2; }
.ycl { font: 14px/1.5 var(--serif, serif); color: var(--amber); text-shadow: 0 0 6px #000, 0 0 2px #000; }
.ycl b { color: var(--cyan); font-weight: normal; }
.ycl b.hot, .ycl.hotline b { color: var(--red); }
.ycl.dim { color: var(--amber-d); font-size: 12px; }
.yc-go { display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--serif, serif) !important; letter-spacing: .5em; }
.yc-go small { font-size: 10px; letter-spacing: .3em; opacity: .7; margin-top: 2px; }
#p-yicast .status.warn { color: var(--red); }

/* 卦象 */
.yr { padding: 12px 2px 20px; display: flex; flex-direction: column; gap: 12px; }
.yr-meta { font-size: 11px; color: var(--amber-d); letter-spacing: .05em; }
.yr-q { font: 17px/1.5 var(--serif, serif); color: var(--white); }
.yr-hero { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 10px 0 4px; }
.yr-h { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hexsvg rect { fill: var(--white); }
.hexsvg rect.mv { fill: var(--red); }
.yr-h.zhi .hexsvg rect { fill: var(--amber-d); }
.yr-sym { font-size: 22px; color: var(--cyan); line-height: 1; margin-top: 4px; }
.yr-name { font: 700 22px var(--serif, serif); color: var(--white); letter-spacing: .1em; }
.yr-no { font-size: 10px; color: var(--amber-d); letter-spacing: .15em; }
.yr-arrow { color: var(--cyan); font-size: 22px; }
.yr-keys { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.yr-keys span { border: 1px solid var(--cyan); color: var(--white); font: 13px var(--serif, serif); padding: 4px 10px; letter-spacing: .1em; }
.yr-k { font: 700 15px var(--serif, serif); color: var(--cyan); border-bottom: 1px solid var(--line-dim); padding-bottom: 6px; margin-bottom: 8px; }
.yr-k small { font-weight: normal; font-size: 11px; color: var(--amber-d); margin-left: 8px; }
.yr-focus, .yr-ty { border: 1px solid var(--line-dim); padding: 12px; background: rgba(22,26,38,.55); }
.yr-f { padding: 6px 0 8px 12px; border-left: 2px solid var(--line-dim); margin-bottom: 8px; }
.yr-f.main { border-left-color: var(--red); }
.yr-fh { font-size: 12px; color: var(--amber-d); margin-bottom: 4px; }
.yr-fh i { font-style: normal; color: var(--red); border: 1px solid var(--red); font-size: 10px; padding: 0 3px; margin-left: 4px; }
.yr-ft { font: 18px/1.65 var(--serif, serif); color: var(--white); }
.yr-bh { font-size: 13px; line-height: 1.6; color: var(--amber); margin-top: 6px; }
.yr-bh small { display: block; font-size: 10px; color: var(--amber-d); margin-top: 2px; }
.yr-src { font-size: 10px; color: var(--amber-d); margin-top: 6px; }
.ty-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ty-b { font: 15px var(--serif, serif); color: var(--white); }
.ty-b i { font-style: normal; color: var(--cyan); margin-left: 4px; font-size: 12px; }
.ty-rel { font: 700 14px var(--serif, serif); padding: 3px 8px; border: 1px solid currentColor; }
.yr-ty.good .ty-rel { color: var(--green); }
.yr-ty.bad .ty-rel { color: var(--red); }
.ty-q { font: 18px/1.6 var(--serif, serif); color: var(--white); margin-top: 10px; }
.ty-sub, .ty-calc, .yr-note { font-size: 12px; line-height: 1.6; color: var(--amber-d); margin-top: 6px; }
.ty-calc { font-family: Menlo, monospace; font-size: 11px; }
.yr-judg { font: 16px/1.7 var(--serif, serif); color: var(--white); }
.yr-yao { margin: 8px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.yr-yao li { font: 14px/1.6 var(--serif, serif); color: var(--amber); }
.yr-yao li.mv { color: var(--red); }
.yr-yao .yr-bh, .yr-yong .yr-bh { font-family: var(--mono); margin-top: 2px; }
.yr-yong, .yr-dx, .yr-tuan { font: 14px/1.65 var(--serif, serif); color: var(--amber); margin-top: 8px; overflow-wrap: anywhere; }
.yr-dx { color: var(--cyan); }
.yr-tuan { color: var(--white); }
.yr-xiao { font-size: 13px; line-height: 1.55; color: var(--cyan); margin-top: 4px; overflow-wrap: anywhere; }
table.nj { width: 100%; border-collapse: collapse; font: 13px var(--serif, serif); color: var(--amber); }
table.nj th { font-weight: normal; font-size: 10px; color: var(--amber-d); text-align: left; padding: 2px 4px; }
table.nj td { padding: 5px 4px; border-top: 1px solid var(--line-dim); }
table.nj td.bar { font-family: Menlo, monospace; letter-spacing: -.05em; color: var(--white); }
table.nj tr.mv td { color: var(--red); }
table.nj td i { font-style: normal; font-size: 10px; color: var(--amber-d); border: 1px solid var(--amber-d); margin-left: 3px; padding: 0 2px; }
#yrNote { background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); }

/* 书架：六十四卦 */
.hx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 0 20px; align-content: start; }
.hx { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border: 1px solid var(--line-dim); background: rgba(236,228,207,.03); color: var(--amber);
  opacity: 0; animation: fadeUp .4s ease-out forwards; animation-delay: calc(var(--i) * 18ms); }
.hx .s { font-size: 26px; color: var(--white); line-height: 1.1; }
.hx .n { font-size: 9px; color: var(--amber-d); }
.hx .t { font: 12px var(--serif, serif); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hx-s { color: var(--cyan); }
.ym, .ym .d { white-space: normal; overflow-wrap: anywhere; }
.ym { min-width: 0; overflow: hidden; }
.ynums[hidden] { display: none; }
[hidden] { display: none !important; }

/* ===== v1.6 ===== */
#p-boot .seal { background: transparent; cursor: pointer; pointer-events: auto; min-height: 0; transition: transform .2s; }
#p-boot .seal:active { transform: rotate(-4deg) scale(.92); }
#app:not(.east) #p-boot .seal { border-color: var(--cyan); color: var(--cyan); }
.mode-seg button { font-weight: 600; }

/* 此刻天象：自左滑出 */
#skyPanel { position: absolute; inset: 0; z-index: 45; pointer-events: none; }
#skyPanel .scrim { position: absolute; inset: 0; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .3s; }
#skyPanel .sp-panel { position: absolute; left: 0; top: 0; bottom: 0; width: min(88%, 420px); transform: translateX(-104%); transition: transform .42s cubic-bezier(.2,.8,.2,1);
  background: var(--glass, rgba(7,9,16,.94)); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-right: 1px solid var(--line-dim);
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 20px; display: flex; flex-direction: column; box-shadow: 10px 0 40px rgba(0,0,0,.5); }
#skyPanel.show { pointer-events: auto; }
#skyPanel.show .scrim { opacity: 1; }
#skyPanel.show .sp-panel { transform: none; }
#skyPanel .sp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line-dim); flex: none; }
#skyPanel .sp-top span { font: 11px var(--mono); color: var(--amber-d); letter-spacing: .12em; }
#skyPanel .sp-top small { margin-left: 6px; letter-spacing: 0; opacity: .7; }
#skyPanel .sp-x { min-height: 36px; min-width: 40px; }
#skyPanel .sp-b { overflow-y: auto; flex: 1; padding-right: 4px; -webkit-overflow-scrolling: touch; }
.sp-t { font: 700 20px var(--serif, serif); color: var(--white); letter-spacing: .1em; }
.sp-t small { display: block; font: 11px var(--mono); color: var(--amber-d); letter-spacing: .05em; margin-top: 4px; }
.sp-gz { font: 16px/1.6 var(--serif, serif); color: var(--cyan); margin: 12px 0 4px; }
.sp-gz small { font-size: 12px; color: var(--amber-d); }
#skyPanel section { border-top: 1px solid var(--line-dim); padding: 12px 0 6px; }
#skyPanel h4 { margin: 0 0 6px; font: 600 14px var(--serif, serif); color: var(--cyan); letter-spacing: .08em; }
#skyPanel p { margin: 4px 0; font-size: 13px; line-height: 1.65; color: var(--amber); }
.sp-hou b { color: var(--white); font: 600 15px var(--serif, serif); }
.sp-hou small, .sp-mute { color: var(--amber-d) !important; font-size: 11px !important; }
.sp-row { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 7px 0; border: 0; border-bottom: 1px dashed var(--line-dim); background: none; color: var(--amber); font-size: 13px; text-align: left; min-height: 0; }
.sp-row b { font-weight: normal; color: var(--white); text-align: right; }
button.sp-row b::after { content: ' ›'; color: var(--cyan); }
.sp-l { background: none; border: 0; border-bottom: 1px solid var(--cyan); color: var(--white); font: inherit; padding: 0 2px; min-height: 0; }
.sp-legend { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.6; color: var(--amber); }
.sp-legend li { margin-bottom: 6px; }
.sp-legend b { color: var(--white); font-weight: 600; margin-right: 6px; }
#skyPanel .btns { margin-top: 14px; }

/* 星体信息卡 */
.si-h { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.si-g { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border: 1px solid var(--cyan); color: var(--cyan); font: 700 22px var(--serif, serif); }
.si-t { font: 700 18px var(--serif, serif); color: var(--white); }
.si-s { font-size: 12px; color: var(--amber-d); margin-top: 2px; }
.si-r { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-dim); font-size: 13px; color: var(--amber-d); }
.si-r b { color: var(--white); font-weight: normal; text-align: right; }
.si-k { margin: 12px 0 6px; font-size: 12px; color: var(--cyan); }
.si-asp, .si-hou { display: flex; flex-wrap: wrap; gap: 6px; }
.si-asp span, .si-hou span { border: 1px solid var(--line-dim); padding: 4px 8px; font-size: 12px; color: var(--white); }
.si-asp small { color: var(--amber-d); margin-left: 4px; }
.si-hou span.on { border-color: var(--red); color: var(--red); }
.si-p { font-size: 13px; line-height: 1.7; color: var(--amber); margin: 10px 0 6px; }
.si-q { font: 17px var(--serif, serif); color: var(--white); margin: 6px 0 8px; }
.si-q small { font-size: 11px; color: var(--amber-d); margin-left: 6px; }
#sheet { z-index: 47; }
.sp-row { justify-content: space-between !important; align-items: baseline; }

/* 书架：塔罗 / 周易 */
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; pointer-events: auto; }
.seg2 button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-dim); background: rgba(255,255,255,.02); color: var(--amber-d); text-align: left; }
.seg2 button b { font: 600 17px var(--serif, var(--mincho)); color: var(--white); letter-spacing: .2em; }
.seg2 button small { font-size: 10px; letter-spacing: .05em; }
.seg2 button.on { border-color: var(--sel); box-shadow: inset 0 0 0 1px var(--sel); }
.seg2 button.on b { color: var(--sel); }
.gua-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0 20px; align-content: start; }
.gu { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px; border: 1px solid var(--line-dim); background: rgba(236,228,207,.03); text-align: left; white-space: normal;
  opacity: 0; animation: fadeUp .4s ease-out forwards; animation-delay: calc(var(--i) * 40ms); }
.gu .s { font-size: 34px; line-height: 1; color: var(--white); }
.gu .t { font: 600 15px var(--serif, serif); color: var(--cyan); }
.gu .d { font: 14px var(--serif, serif); color: var(--white); }
.gu .e { font-size: 11px; color: var(--amber-d); }

/* 天象 */
#p-skycal { display: none; flex-direction: column; }
#p-skycal.active { display: flex; }
.cal-sky { flex: 0 0 31%; position: relative; pointer-events: none; }
.cal-cap { position: absolute; left: 0; bottom: 6px; font: 12px var(--serif, var(--mono)); color: var(--white); text-shadow: 0 0 6px #000; }
.cal-cap small { color: var(--amber-d); font-size: 10px; }
.cal-panel { flex: 1; min-height: 0; overflow-y: auto; pointer-events: auto; margin: 0 -14px; padding: 10px 14px 24px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-dim); -webkit-overflow-scrolling: touch; }
.cal-month { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12px; color: var(--amber-d); margin-bottom: 8px; }
.cal-month > span { margin-right: auto; font: 13px var(--serif, var(--mono)); color: var(--amber); }
.cal-jq { border: 1px solid var(--red); color: var(--amber-d); background: none; padding: 3px 8px; font-size: 11px; min-height: 0; }
.cal-jq b { color: var(--red); font-weight: 600; margin-right: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-grid .w { font-style: normal; text-align: center; font-size: 10px; color: var(--amber-d); padding: 2px 0; }
.cd { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 0 4px; min-height: 0; border: 1px solid transparent; background: rgba(255,255,255,.02); color: var(--white); }
.cd b { font: 600 15px var(--mono); line-height: 1.1; }
.cd em { font-style: normal; font-size: 9px; color: var(--amber-d); white-space: nowrap; }
.cd em.jq { color: var(--red); } .cd em.lm { color: var(--cyan); }
.cd .moon { margin-top: 1px; }
.cd.today b { color: var(--sel); }
.cd.today { border-color: var(--line-dim); }
.cd.sel { border-color: var(--sel); box-shadow: inset 0 0 0 1px var(--sel); }
.cd.e::after, .cd.m::after { content: ''; position: absolute; top: 4px; right: 4px; width: 4px; height: 4px; background: var(--cyan); }
.cd.m::after { background: var(--red); }
.moon .m0 { fill: rgba(255,255,255,.08); stroke: var(--line-dim); stroke-width: .6; }
.moon .m1 { fill: var(--white); }
.cal-day { margin-top: 12px; }
.cal-dh { font: 600 16px var(--serif, var(--mono)); color: var(--white); padding: 6px 0; }
.cal-dh i { font-style: normal; font-size: 11px; color: var(--sel-ink); background: var(--sel); padding: 1px 6px; margin-left: 8px; }
.cal-day section { border-top: 1px solid var(--line-dim); padding: 10px 0 4px; }
.cal-day h4 { margin: 0 0 6px; font: 600 13px var(--serif, var(--mono)); color: var(--cyan); letter-spacing: .1em; }
.cal-day .si-r b { display: inline-flex; align-items: center; gap: 4px; }
.cal-planets { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-planets span { border: 1px solid var(--line-dim); padding: 4px 8px; font-size: 12px; color: var(--amber-d); }
.cal-planets b { color: var(--white); font-weight: normal; margin-left: 4px; }
.cal-planets i { font-style: normal; color: var(--red); margin-left: 3px; font-size: 10px; }
.cal-ev { padding: 4px 0 6px; }
.cal-day .btns { margin-top: 12px; }
.yr details.acc > :not(summary) { margin-left: 12px; margin-right: 12px; }
.yr details.acc > :last-child { margin-bottom: 12px; }
.yr details.acc table.nj { width: calc(100% - 24px); }
.yr *, #sheet .yr-judg, #sheet .yr-yao li, #sheet .yr-dx { white-space: normal; overflow-wrap: anywhere; }
.yr-q { word-break: break-all; }

/* 实体牌录入 · 拍照识别 */
.scan-in { position: relative; display: flex !important; flex-direction: column; gap: 3px; padding: 14px 14px 12px 56px !important; margin: 10px 0 4px; border: 1px solid var(--sel); color: var(--amber) !important;
  background: rgba(198,224,79,.05); pointer-events: auto; cursor: pointer; }
.scan-in::before { content: ''; position: absolute; left: 14px; top: 50%; width: 26px; height: 20px; margin-top: -10px; border: 1.5px solid var(--sel); border-radius: 3px;
  box-shadow: inset 0 0 0 4px transparent; background: radial-gradient(circle at 50% 55%, var(--sel) 0 3px, transparent 4px); }
.scan-in input { position: absolute; inset: 0; opacity: 0; }
.scan-in b { font-size: 16px; color: var(--white); font-weight: 600; letter-spacing: .1em; }
.scan-in small { font-size: 11px; color: var(--amber-d); }
.mslot { grid-template-columns: auto 1fr !important; }
.mslot .mbody { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mslot .mrow { display: flex; gap: 8px; align-items: center; }
.mslot .mrow .mpick { flex: 1; text-align: left; }
.mslot:not(.scanned) { grid-template-columns: 1fr !important; }
.mcrop { width: 46px; border: 1px solid var(--line-dim); align-self: start; margin-top: 4px; }
.mcand { font-size: 11px; color: var(--amber-d); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mcand i { font-style: normal; color: var(--red); }
.mcand button { min-height: 0; padding: 2px 6px; border: 1px dashed var(--line-dim); font-size: 11px; color: var(--white); }
.mmore { display: flex; gap: 8px; margin: 8px 0; }
.chip.dim { opacity: .38; }
#personFilter .sep { width: 1px; align-self: stretch; background: var(--line-dim); margin: 4px 2px; flex: none; }

/* 求签 */
.lot-books, .lot-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.lot-poem { font: 20px/1.85 var(--serif, serif); color: var(--white); margin: 12px 0; overflow-wrap: anywhere; }
.lot-grade { color: var(--cyan); letter-spacing: .12em; font-size: 13px; }
.lot-title { font: 16px/1.5 var(--serif, serif); color: var(--amber); margin: 4px 0 8px; overflow-wrap: anywhere; }
.lot-block { margin: 10px 0; overflow-wrap: anywhere; }
.lot-block b { display: block; font-weight: normal; color: var(--cyan); font-size: 12px; margin-bottom: 4px; }
.lot-notes { margin: 8px 0 0; font-size: 11px; line-height: 1.55; color: var(--amber-d); }
.lot-notes span { display: block; overflow-wrap: anywhere; }
.lot-asp { display: grid; grid-template-columns: 3.2em 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line-dim); font-size: 13px; line-height: 1.5; }
.lot-asp b { color: var(--cyan); font-weight: normal; }
.lot-tube { width: 78px; height: 230px; margin: 28px auto 12px; border: 1px solid var(--cyan); border-radius: 40px; position: relative; overflow: hidden; background: rgba(0,0,0,.35); }
.lot-tube i { position: absolute; left: 16px; right: 16px; height: 7px; background: var(--amber); border-radius: 2px; animation: lotstick .7s ease-in-out infinite; }
.lot-tube.on i { animation-duration: .16s; }
@keyframes lotstick { 50% { transform: translateY(-10px) rotate(7deg); } }
.lot-wait, .lot-hint { text-align: center; color: var(--amber-d); font-size: 13px; line-height: 1.6; }
.lot-lock { font-size: 12px; color: var(--cyan); margin: 4px 0 8px; }

/* 求签页的「所问何事」与周易问事框同一套样式（原来没有样式，显示成白色小框） */
#lotQ, #jiaoQ { display: block; width: 100%; min-height: 64px; resize: none; background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); border-radius: 0;
  color: var(--white); font: 16px/1.5 var(--serif, serif); padding: 10px; margin: 2px 0 4px; -webkit-appearance: none; appearance: none; -webkit-user-select: text; user-select: text; }
#lotQ:focus, #jiaoQ:focus, .jiao-opts input:focus { outline: none; border-color: var(--sel); box-shadow: 0 0 10px rgba(201,164,92,.22); }
#lotQ::placeholder, #jiaoQ::placeholder, .jiao-opts input::placeholder { color: var(--amber-d); }
#lotBody label, #jiaoBody label { display: block; color: var(--cyan); font-size: 12px; margin-top: 10px; }

/* ===== v1.8 排版统一：4pt 栅格、页头两行、进度条减层、组件同高 ===== */
.hdr { row-gap: 4px; padding-bottom: 8px; }
.hdr .step { font: 600 17px/1.25 var(--serif, var(--mincho)); letter-spacing: .06em; color: var(--white); }
.hdr .step small { font: 400 10px var(--mono); letter-spacing: .2em; margin-left: 6px; }
.hdr .q-echo { font-size: 11px; line-height: 16px; padding-top: 0; }

/* 演算进程：只留「标题行 + 阶段块」两层，条纹条改成一条 2px 进度线 */
#calcBar { margin-top: 6px; }
.cb-head { font-size: 11px; gap: 8px; line-height: 16px; }
.cb-head .cb-title { white-space: nowrap; }
.cb-slabs { height: 12px; margin: 15px 0 0; gap: 2px; }
.cb-slab { height: 5px; border-width: 1px; background: none; }
.cb-slab.g { height: 8px; }
.cb-slab.past { background: var(--line-dim); }
.cb-slab.cur { height: 12px; border-width: 1px; background: var(--line-dim); box-shadow: 0 0 6px rgba(255,255,255,.25); }
.cb-lab { top: -14px; font-size: 9px; letter-spacing: .05em; }
.cb-mark.up { display: none; }
.cb-bar { height: 2px; border: 0; background: var(--line-dim); margin-top: 5px; }
.cb-fill, #app[data-skin] .cb-fill { background: var(--bar) !important; }
#calcBar.busy .cb-fill { animation: none; opacity: .75; }

/* 段落标题与间距 */
.q-body { gap: 8px; padding-top: 12px; }
.q-body > label, #lotBody > label { font-size: 12px; letter-spacing: .04em; margin-top: 8px; }
.qhint, .lot-hint { font-size: 11px; line-height: 1.5; color: var(--amber-d); }

/* 组件同高：按钮 52（主按钮）/ 56（双行按钮）/ 40（筛选片） */
.bigbtn { min-height: 52px; letter-spacing: .3em; }
.tbtn { min-height: 56px; gap: 2px; }
.tbtn b { font-size: 14px; }
.tbtn small { font-size: 9px; letter-spacing: .18em; }
.chip { min-height: 40px; padding: 6px 14px; font-size: 14px; }
.chip.mini { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.btns.g2, .btns.g3, .btns.g4 { gap: 8px; }
.ftr { padding-top: 8px; gap: 8px; }
.ftr .status { font-size: 12px; line-height: 1.5; min-height: 18px; }
.stat { font-size: 10px; opacity: .75; }

/* 开屏：术数入口与模式切换同一行（设计稿 v4：只移前景，星盘不动） */
.mode-row { display: flex; gap: 8px; align-items: stretch; margin: 6px 0 2px; }
.mode-row .mode-seg { margin: 0; }
.shu-btn { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line); background: rgba(7,9,16,.6);
  color: var(--white); font: 600 13px var(--serif, serif); letter-spacing: .3em; min-height: 0; }
.shu-btn i { font-style: normal; color: var(--cyan); letter-spacing: 0; }
.shu-btn::before, .shu-btn::after { content: none; }
.mode-seg button { height: 36px; }

/* 术数入口 */
.shu-grid { padding: 12px 0 20px; }
.shu-grid .ym { min-height: 104px; }

/* 小六壬 */
#xlrBody > label, #liurenBody > label, #qimenBody > label { display: block; color: var(--cyan); font-size: 12px; margin-top: 10px; }
#xlrQ, #liurenQ, #qimenQ { display: block; width: 100%; min-height: 64px; resize: none; background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); border-radius: 0;
  color: var(--white); font: 16px/1.5 var(--serif, serif); padding: 10px; margin: 2px 0 4px; -webkit-appearance: none; appearance: none; -webkit-user-select: text; user-select: text; }
#xlrQ:focus, #liurenQ:focus, #qimenQ:focus { outline: none; border-color: var(--sel); }
#xlrQ::placeholder, #liurenQ::placeholder, #qimenQ::placeholder { color: var(--amber-d); }
.xlr-now { font: 15px var(--serif, serif); color: var(--white); margin: 2px 0 10px; }
.xlr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.xlr-p { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 4px 12px; border: 1px solid var(--line-dim); background: rgba(236,228,207,.03); transition: border-color .1s, background .1s; }
.xlr-p b { font: 700 20px var(--serif, serif); color: var(--white); letter-spacing: .1em; }
.xlr-p small { font-size: 11px; color: var(--amber-d); }
.xlr-p i { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 10px; color: var(--cyan); letter-spacing: .1em; }
.xlr-p.hot { border-color: var(--sel); background: rgba(201,164,92,.12); }
.xlr-p.res { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.xlr-p.res b { color: var(--red); }
.xlr-steps { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.xlr-steps > div { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line-dim); }
.xlr-steps > div.last { border-color: var(--sel); }
.xlr-steps span { color: var(--amber-d); font-size: 12px; }
.xlr-steps b { font: 15px var(--serif, serif); color: var(--white); font-weight: normal; }
.xlr-steps em { font-style: normal; color: var(--cyan); font: 15px var(--serif, serif); }
#xlrNote, #liurenNote, #qimenNote { width: 100%; min-height: 88px; background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); color: var(--white); font: 16px/1.5 var(--serif, serif); padding: 10px; -webkit-user-select: text; user-select: text; }
#xlrBody .btns, #liurenBody .btns, #qimenBody .btns { margin: 12px 0; }

/* 纳甲表旺衰 */
table.nj td.ws { font-size: 12px; text-align: center; }
.ws-旺, .ws-相 { color: var(--green); }
.ws-休 { color: var(--amber); }
.ws-囚, .ws-死 { color: var(--amber-d); }

/* ===== v1.9 黄历 · 八字 · 射覆 ===== */
#p-huangli { display: none; flex-direction: column; }
#p-huangli.active { display: flex; }
.hl-panel { margin-top: 8px; }
.cd.hl em.gz { font-size: 9px; color: var(--amber); }
.cd.hl em.gz.po, .hl-big.po { color: var(--red); }
.hl-gz { display: block; font: 12px var(--serif, serif); color: var(--amber-d); margin-top: 2px; }
.hl-card { border: 1px solid var(--line-dim); padding: 12px; margin: 10px 0; background: rgba(22,26,38,.55); }
.hl-row { display: grid; grid-template-columns: 40px auto 1fr; gap: 10px; align-items: baseline; padding: 6px 0; }
.hl-k { font-size: 12px; color: var(--amber-d); }
.hl-big { font: 700 20px var(--serif, serif); color: var(--white); }
.hl-v { font-size: 13px; color: var(--amber); }
.hl-src { font: 12px/1.7 var(--serif, serif); color: var(--amber-d); margin-top: 8px; }
.hl-src mark { background: none; color: var(--red); }
.hl-h { font: 600 13px var(--serif, serif); color: var(--cyan); margin: 10px 0 6px; }
.hl-h small { color: var(--amber-d); font-weight: normal; margin-left: 6px; }
.hl-hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.hl-hours > div { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; border: 1px solid var(--line-dim); }
.hl-hours b { font: 600 15px var(--serif, serif); color: var(--white); }
.hl-hours span { font-size: 10px; color: var(--amber); }
.hl-hours i { font-style: normal; font-size: 9px; }
.hl-hours .huang i { color: var(--green); } .hl-hours .hei i { color: var(--amber-d); }
.hl-hours .cur { border-color: var(--sel); box-shadow: inset 0 0 0 1px var(--sel); }

#baziBody > label, #shefuBody > label { display: block; color: var(--cyan); font-size: 12px; margin-top: 10px; }
.bz-row { display: flex; gap: 8px; }
.bz-row input, .bz-row select, #sfClue, .ynums.one input { flex: 1; min-width: 0; background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); color: var(--white); font: 16px var(--serif, serif); padding: 10px; border-radius: 0; -webkit-appearance: none; appearance: none; }
#sfClue { display: block; width: 100%; min-height: 60px; resize: none; -webkit-user-select: text; user-select: text; }
.ynums.one { grid-template-columns: 1fr; }
.ynums.three { grid-template-columns: repeat(3, 1fr); }
.ynums.three input { min-width: 0; text-align: center; background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); color: var(--white); font: 16px var(--mono, monospace); padding: 10px 4px; border-radius: 0; -webkit-appearance: none; appearance: none; }
.bz-hint { font: 13px var(--serif, serif); color: var(--green); margin-top: 6px; }
.bz-check { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--amber); margin-top: 8px; }
.bz-pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.bz-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bz-n { font-size: 11px; color: var(--amber-d); }
.bz-sh { font-size: 12px; color: var(--cyan); }
.bz-sh.me { color: var(--red); }
.bz-gz { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; padding: 10px 0; border: 1px solid var(--line-dim); background: rgba(22,26,38,.55); }
.bz-col.me .bz-gz { border-color: var(--sel); }
.bz-gz b { font: 700 30px/1.15 var(--serif, serif); color: var(--white); }
.bz-cang { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.bz-cang span { font: 13px var(--serif, serif); color: var(--amber); }
.bz-cang i { font-style: normal; font-size: 10px; color: var(--amber-d); margin-left: 3px; }
.bz-wx { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.bz-wx > div { display: grid; grid-template-columns: 20px 1fr 16px; gap: 8px; align-items: center; font-size: 12px; color: var(--amber); }
.bz-wx i { height: 6px; background: linear-gradient(90deg, var(--sel) var(--w), var(--line-dim) var(--w)); }
.bz-yun { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bz-yun > div { display: flex; flex-direction: column; align-items: center; padding: 8px 0; border: 1px solid var(--line-dim); }
.bz-yun b { font: 600 16px var(--serif, serif); color: var(--white); }
.bz-yun span { font-size: 11px; color: var(--amber-d); }
.bz-yun i { font-style: normal; font-size: 10px; color: var(--cyan); }
#baziBody .btns { margin: 12px 0; }

.sf-card .sf-t { padding: 8px 0; border-top: 1px dashed var(--line-dim); }
.sf-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sf-h b { color: var(--red); font: 600 14px var(--serif, serif); }
.sf-h span { color: var(--white); font: 15px var(--serif, serif); }
.sf-h i { font-style: normal; font-size: 11px; color: var(--amber-d); }
.sf-x { font: 14px/1.7 var(--serif, serif); color: var(--amber); margin-top: 4px; }
.sf-a { font: 13px var(--serif, serif); color: var(--cyan); margin-top: 2px; }

/* 测字 */
#ceziBody > label { display: block; color: var(--cyan); font-size: 12px; margin-top: 10px; }
#czQ { display: block; width: 100%; min-height: 60px; resize: none; background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); color: var(--white); font: 16px var(--serif, serif); padding: 10px; border-radius: 0; -webkit-user-select: text; user-select: text; }
.cz-box { display: flex; gap: 12px; align-items: center; border: 1px solid var(--sel); padding: 12px; margin-top: 4px; background: rgba(22,26,38,.55); }
#czIn { width: 120px; height: 120px; flex: none; padding: 0; text-align: center; font: 700 64px var(--serif, serif); color: var(--white); background: transparent; border: 1px dashed var(--line-dim); border-radius: 0; -webkit-user-select: text; user-select: text; }
.cz-strokes { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--amber); }
.cz-strokes b { font: 600 18px var(--serif, serif); color: var(--white); margin-right: 8px; }
.cz-strokes em { font-style: normal; font-size: 11px; color: var(--red); }
.cz-strokes span { display: flex; align-items: center; gap: 4px; }
.cz-strokes .cz-n { width: 3em; text-align: center; background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); color: var(--white); font: 16px var(--mono, monospace); padding: 4px 2px; border-radius: 0; -webkit-appearance: none; appearance: none; }
.cz-strokes small { font-size: 11px; color: var(--amber-d); margin-left: 4px; }
.cz-chars { display: flex; gap: 12px; justify-content: center; margin: 8px 0; }
.cz-chars > div { display: flex; flex-direction: column; align-items: center; padding: 8px 16px; border: 1px solid var(--line-dim); }
.cz-chars b { font: 700 44px var(--serif, serif); color: var(--white); }
.cz-chars span { font-size: 12px; color: var(--amber-d); }

/* ---------- v2.0 紫微 · 六壬 · 奇门 ---------- */
.bz-tabs { margin: 0 0 8px; }
.ring { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(84px, auto); gap: 2px; margin: 8px 0 12px; }
.ring .rc { position: relative; border: 1px solid var(--line-dim); background: rgba(22,26,38,.6); padding: 4px; min-width: 0; transition: border-color .12s, background .12s; }
.ring .rmid { grid-row: 2 / 4; grid-column: 2 / 4; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-dim); background: rgba(201,164,92,.04); padding: 8px; }
.zw-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; font-size: 11px; color: var(--amber); line-height: 1.35; }
.zw-mid b { font: 600 14px var(--serif, serif); color: var(--white); }
.zw-mid .zw-ju { font: 700 16px var(--serif, serif); color: var(--cyan); letter-spacing: .1em; }
.zw-mid .zw-hua { font-size: 11px; color: var(--white); }
.ring.zw .rc { display: flex; flex-direction: column; justify-content: space-between; min-height: 104px; cursor: pointer; }
.ring.zw .rc.sel { border-color: var(--sel); box-shadow: inset 0 0 0 1px var(--sel); background: rgba(201,164,92,.1); }
.ring.zw .rc.fang { border-color: rgba(201,164,92,.55); background: rgba(201,164,92,.05); }
.zw-st { display: flex; flex-wrap: wrap; gap: 1px 4px; align-content: flex-start; }
.zs { font-size: 10px; line-height: 1.3; white-space: nowrap; }
.zs.major { font: 600 12.5px var(--serif, serif); color: var(--white); }
.zs.good { color: var(--cyan); }
.zs.bad { color: #b86a5c; }
.zs.lu, .zs.ma { color: var(--amber); }
.hua { display: inline-block; font-style: normal; font-size: 9px; line-height: 12px; padding: 0 2px; margin-left: 1px; border: 1px solid currentColor; vertical-align: 1px; }
.hua.lu { color: var(--green); } .hua.quan { color: var(--amber); } .hua.ke { color: var(--cyan); } .hua.ji { color: var(--red); }
.zw-ft { display: flex; flex-direction: column; align-items: flex-end; margin-top: 4px; }
.zw-ft b { font: 600 11.5px var(--serif, serif); color: var(--amber); }
.zw-ft b i { font-style: normal; font-size: 9px; color: var(--bg, #000); background: var(--amber); padding: 0 2px; margin-left: 2px; }
.zw-ft span { font-size: 10px; color: var(--amber-d); }
.zw-ft em { font-style: normal; font-size: 9px; color: var(--amber-d); opacity: .8; }
.zw-detail .zw-k { font: 13px var(--serif, serif); color: var(--white); margin-bottom: 6px; }
.zw-detail .zw-k small { color: var(--amber-d); margin-left: 6px; }
.zw-row { display: grid; grid-template-columns: 34px 42px 1fr; gap: 6px; padding: 5px 0; border-top: 1px dashed var(--line-dim); font-size: 12px; align-items: baseline; }
.zw-row span { color: var(--amber-d); } .zw-row b { color: var(--amber); font-weight: normal; } .zw-row em { font-style: normal; color: var(--white); font-family: var(--serif, serif); }
.zw-legend, .qm-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 10px; color: var(--amber-d); margin: 8px 0; }

.ring.lr { grid-auto-rows: minmax(64px, auto); }
.lr-c { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 2px; }
.lr-c b { font: 700 20px var(--serif, serif); color: var(--white); }
.lr-c span { font-size: 10.5px; color: var(--cyan); }
.lr-c .lr-di { position: absolute; left: 4px; bottom: 2px; font-size: 9px; color: var(--amber-d); }
.lr-c i { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: 10px; color: var(--red); }
.lr-c.chuan b { color: var(--red); }
.lr-c.kong b { opacity: .45; }
.lr-type { font: 700 17px var(--serif, serif) !important; color: var(--cyan) !important; letter-spacing: .12em; }
.lr-ke { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.lr-ke > div, .lr-chuan > div { border: 1px solid var(--line-dim); }
.lr-ke > div { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; gap: 1px; }
.lr-ke span { font-size: 10px; color: var(--cyan); }
.lr-ke b { font: 700 18px var(--serif, serif); color: var(--white); }
.lr-ke em { font-style: normal; font: 15px var(--serif, serif); color: var(--amber); border-top: 1px solid var(--line-dim); padding-top: 2px; }
.lr-ke small { font-size: 9px; color: var(--amber-d); margin-top: 2px; text-align: center; }
.lr-chuan { display: flex; flex-direction: column; gap: 4px; }
.lr-chuan > div { display: grid; grid-template-columns: 34px 20px 28px 42px 1fr; gap: 6px; align-items: baseline; padding: 6px 10px; }
.lr-chuan span { font-size: 12px; color: var(--amber-d); }
.lr-chuan em { font-style: normal; color: var(--amber); font: 14px var(--serif, serif); }
.lr-chuan b { font: 700 18px var(--serif, serif); color: var(--white); }
.lr-chuan i { font-style: normal; font-size: 12px; color: var(--cyan); }
.lr-chuan small { font-size: 12px; color: var(--amber); text-align: right; }

.qm-meta { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; font-size: 12px; color: var(--amber); }
.qm-meta b { font: 700 17px var(--serif, serif); color: var(--cyan); letter-spacing: .08em; }
.qm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin: 8px 0; }
.qm-c { position: relative; border: 1px solid var(--line-dim); background: rgba(22,26,38,.6); padding: 18px 8px 8px; min-height: 104px; display: flex; flex-direction: column; gap: 5px; }
.qm-c > small { position: absolute; top: 3px; left: 6px; font-size: 10px; color: var(--amber-d); }
.qm-c > small i { font-style: normal; color: var(--red); margin-left: 4px; }
.qm-god { font-size: 12px; color: var(--cyan); text-align: center; }
.qm-row { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.qm-row span { font: 13px var(--serif, serif); color: var(--white); white-space: nowrap; }
.qm-row b { font: 700 17px var(--serif, serif); color: var(--amber); }
.qm-row b.di { color: var(--amber-d); font-weight: 600; }
.qm-c.mid { align-items: center; justify-content: center; background: rgba(201,164,92,.04); }
.qm-c.mid b { font: 700 20px var(--serif, serif); color: var(--amber-d); }
.qm-c.mid span { font-size: 10px; color: var(--amber-d); }
.qm-c.fu { border-color: var(--sel); box-shadow: inset 0 0 0 1px var(--sel); }
.qm-c.shi { background: rgba(201,164,92,.08); }
.qm-legend .fu, .qm-legend .shi { padding: 0 4px; border: 1px solid var(--sel); }
.qm-legend .shi { border-color: var(--line-dim); background: rgba(201,164,92,.12); }
.bz-check[hidden] { display: none; }

/* ---------- v2.1 图标、分组与动线 ---------- */
.ym svg { stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ym svg .w { fill: var(--white); stroke: none; filter: drop-shadow(0 0 2.5px rgba(255,248,230,.45)); }
.ym svg .k { fill: #10121a; stroke: none; }
.ym svg .f { fill: var(--cyan); stroke: none; }
.ym.on svg .w { fill: #fff7e6; filter: drop-shadow(0 0 4px rgba(255,236,190,.8)); }
.ym-g, .shu-sec { grid-column: 1 / -1; font: 12px var(--serif, serif); color: var(--cyan); letter-spacing: .2em; margin: 6px 0 -2px; display: flex; align-items: center; gap: 8px; }
.ym-g::after, .shu-sec::after { content: ''; flex: 1; height: 1px; background: var(--line-dim); }
.shu-sec { margin: 14px 0 0; }
.shu-sec:first-child { margin-top: 6px; }
.shu-grid { padding: 8px 0 4px; }
.shu-grid:last-child { padding-bottom: 20px; }
.ym.wide { grid-column: 1 / -1; min-height: 0; }
.ym.to .e { color: var(--cyan); }

/* ---------- v2.2 求签 · ORACLE.SYS（玄青） ---------- */
.or-ftr { flex-direction: row; align-items: stretch; gap: 10px; }
.or-ftr .bigbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; letter-spacing: .2em; }
.or-ftr .bigbtn b { font-weight: normal; font-family: var(--serif, serif); }
.or-ftr .bigbtn small { font-size: 9px; letter-spacing: .3em; color: var(--amber-d); }
.or-ftr .spec { flex: 1; } .or-ftr .next { flex: 2.4; } .or-ftr .spec[hidden] { display: none; }
.or-ftr .next b { color: var(--sel); }
.or-ftr .next.or-hold { --p: 0; position: relative; overflow: hidden; }
.or-ftr .next.or-hold::before { content: ''; position: absolute; inset: 0; width: calc(var(--p) * 100%); background: linear-gradient(90deg, rgba(201,164,92,.12), rgba(201,164,92,.38)); }
.or-ftr .next.or-hold b, .or-ftr .next.or-hold small { position: relative; }
.or-head { display: flex; justify-content: space-between; align-items: center; font: 11px Menlo, monospace; color: var(--amber-d); letter-spacing: .12em; margin: 2px 0 6px; }
.or-sys::before { content: ''; display: inline-block; width: 0; height: 0; border-top: 9px solid var(--amber-d); border-right: 9px solid transparent; margin-right: 6px; vertical-align: -1px; }
.or-pg { color: var(--sel); }
.or-dial { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; margin: 4px 0 8px; }
.or-side { display: flex; flex-direction: column; gap: 3px; font: 9px/1.4 Menlo, monospace; color: var(--amber-d); min-width: 0; overflow-wrap: anywhere; }
.or-side.r { align-items: flex-end; text-align: right; }
.or-side b { font-weight: normal; } .or-side .ok { color: var(--green); } .or-side .hot { color: var(--red); font-family: var(--serif, serif); font-size: 12px; }
.or-ring { display: block; width: min(176px, 46vw); height: auto; }
.or-ring .rim { fill: none; stroke: rgba(236,228,207,.35); stroke-width: .8; }
.or-ring .tick { stroke: rgba(236,228,207,.4); stroke-width: .8; }
.or-ring .oct { fill: none; stroke: rgba(95,174,148,.75); stroke-width: .9; } .or-ring .oct.in { stroke-opacity: .5; }
.or-ring .yao line { stroke: var(--green); stroke-width: 2.4; stroke-linecap: butt; }
.or-ring .yao .hot line { stroke: var(--red); }
.or-ring .ji { font: 700 34px var(--serif, serif); fill: var(--white); text-anchor: middle; dominant-baseline: middle; }
.or-ring .lotn { font: 9px Menlo, monospace; fill: var(--amber-d); text-anchor: middle; letter-spacing: .2em; }
.or-cmd { display: flex; justify-content: space-between; align-items: baseline; font: 12px Menlo, monospace; color: var(--green); margin: 14px 0 6px; padding-top: 10px; border-top: 1px dashed var(--line-dim); }
.or-cmd em { font-style: normal; font-size: 10px; color: var(--amber-d); letter-spacing: .1em; }
.or-specs { display: flex; flex-direction: column; gap: 8px; }
.or-spec { display: grid; grid-template-columns: 26px 1fr auto; grid-template-areas: "ix nm n" "ix ds ds" "ix bars bars" "ix axis axis"; column-gap: 8px; row-gap: 3px; text-align: left; padding: 10px 10px 8px; border: 1px solid var(--line-dim); background: rgba(22,26,38,.5); }
.or-spec.on { border-color: var(--sel); box-shadow: inset 3px 0 0 var(--sel), 0 0 14px rgba(201,164,92,.16); background: rgba(201,164,92,.06); }
.or-spec .ix { grid-area: ix; font: 12px Menlo, monospace; color: var(--amber-d); padding-top: 4px; }
.or-spec.on .ix { color: var(--sel); }
.or-spec > b { grid-area: nm; font: 700 19px var(--serif, serif); color: var(--white); letter-spacing: .06em; }
.or-spec > b + em { display: none; }
.or-spec .n { grid-area: n; font: 11px Menlo, monospace; color: var(--amber-d); } .or-spec.on .n { color: var(--sel); }
.or-spec .ds { grid-area: ds; font-size: 13px; color: var(--amber); }
.or-bars { grid-area: bars; display: flex; gap: 1px; height: 16px; margin-top: 4px; }
.or-bars i { flex: 1; background: rgba(236,228,207,.3); }
.or-bars .g-u { background: var(--sel); } .or-bars .g-d { background: rgba(208,65,47,.75); } .or-bars .g-m { background: rgba(236,228,207,.38); } .or-bars .g-n { background: rgba(95,174,148,.5); }
.or-axis { grid-area: axis; display: flex; justify-content: space-between; font: 8px Menlo, monospace; color: var(--amber-d); opacity: .8; }
.or-meta { display: grid; grid-template-columns: 3em 1fr; gap: 6px 10px; font-size: 13px; }
.or-meta dt { color: var(--amber-d); } .or-meta dd { color: var(--white); font-family: var(--serif, serif); }
.or-cite { margin-top: 8px; } .or-cite .src { font-size: 11px; line-height: 1.6; }
.or-scope-w { display: flex; justify-content: center; margin: 4px 0; }
.or-scope { display: block; }
.or-tele { font: 10px/1.4 Menlo, monospace; color: var(--green); text-align: center; margin: 4px 0 10px; overflow-wrap: anywhere; }
.or-lot { display: flex; align-items: baseline; gap: 10px; justify-content: center; }
.or-lot span { font: 13px Menlo, monospace; color: var(--amber-d); }
.or-lot b { font: 700 52px/1 Menlo, "SF Mono", monospace; color: var(--sel); letter-spacing: .08em; text-shadow: 0 0 14px rgba(201,164,92,.35); }
.or-lot i { font: 16px Menlo, monospace; color: var(--amber-d); font-style: normal; }
.or-lot em { font: 10px Menlo, monospace; color: var(--green); font-style: normal; letter-spacing: .15em; }
.or-lot em.ok { color: var(--red); }
.or-say { text-align: center; font: 15px/1.7 var(--serif, serif); color: var(--white); letter-spacing: .2em; margin: 18px 0 6px; }
.or-say small { font-size: 11px; color: var(--amber-d); letter-spacing: .1em; }
.or-kv { display: grid; grid-template-columns: 3.6em 1fr; gap: 3px 10px; font: 11.5px/1.5 Menlo, monospace; color: var(--amber-d); margin: 2px 0 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--line-dim); }
.or-kv dd { color: var(--white); overflow-wrap: anywhere; } .or-kv .ok { color: var(--green); }
.or-hero { position: relative; display: flex; align-items: flex-end; justify-content: space-between; margin-top: 6px; min-height: 92px; }
.or-big { font: 700 84px/.9 Menlo, "SF Mono", monospace; color: #f2ecdc; letter-spacing: -.02em; text-shadow: 0 0 18px rgba(236,228,207,.25); }
.or-stamp { display: flex; align-items: center; justify-content: center; width: 74px; height: 74px; border: 3px double var(--red); color: var(--red); font: 700 22px/1.05 var(--serif, serif); writing-mode: vertical-rl; letter-spacing: .1em; transform: rotate(-6deg); margin: 0 6px 6px 0; box-shadow: inset 0 0 0 2px rgba(208,65,47,.25); opacity: .92; }
.or-stamp.g-u { color: #e05a43; border-color: #e05a43; } .or-stamp.g-m { color: var(--sel); border-color: var(--sel); } .or-stamp.g-d { color: #a9a39a; border-color: #a9a39a; }
.or-cn { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 4px 0 8px; }
.or-cn b { font: 700 22px var(--serif, serif); color: var(--white); letter-spacing: .08em; }
.or-cn em { font-style: normal; font: 15px var(--serif, serif); color: var(--sel); }
.or-cn small { font-size: 12px; color: var(--amber-d); }
.or-level { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "k bar" ". em"; gap: 4px 10px; align-items: center; margin: 6px 0 4px; }
.or-level > span { grid-area: k; font: 10px Menlo, monospace; color: var(--amber-d); letter-spacing: .15em; }
.or-level.none { grid-template-areas: "k em"; } .or-level > em { grid-area: em; font: 11px var(--serif, serif); color: var(--amber-d); font-style: normal; }
.or-dist { grid-area: bar; display: flex; gap: 2px; height: 22px; }
.or-dist i { position: relative; min-width: 18px; opacity: .45; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.or-dist i b { font: 9px var(--serif, serif); color: #10121a; font-weight: normal; white-space: nowrap; }
.or-dist .g-u { background: var(--sel); } .or-dist .g-m { background: rgba(236,228,207,.7); } .or-dist .g-d { background: #c0503f; }
.or-dist i.on { opacity: 1; outline: 2px solid var(--white); outline-offset: 1px; }
.or-sec { display: flex; align-items: baseline; gap: 8px; font: 13px var(--serif, serif); color: var(--sel); margin: 16px 0 6px; padding-top: 10px; border-top: 1px dashed var(--line-dim); }
.or-sec::before { content: '┌─'; font-family: Menlo, monospace; color: var(--amber-d); }
.or-sec small { font: 10px Menlo, monospace; color: var(--amber-d); letter-spacing: .15em; }
.or-poem { list-style: none; margin: 4px 0 6px; padding: 0; }
.or-poem li { display: grid; grid-template-columns: 28px 1fr; align-items: baseline; padding: 4px 0; border-left: 1px solid var(--line-dim); }
.or-poem li span { font: 10px Menlo, monospace; color: var(--amber-d); padding-left: 6px; }
.or-poem li b { font: var(--fs, 22px)/1.5 var(--serif, serif); color: var(--white); letter-spacing: .28em; font-weight: normal; min-height: 1.5em; overflow-wrap: anywhere; }
.or-poem .cur { display: inline-block; width: .55em; height: 1.05em; margin-left: .15em; vertical-align: -.12em; background: var(--green); animation: or-blink .9s steps(2) infinite; }
.or-poem .cur.end { animation-duration: 1.4s; }
@keyframes or-blink { 50% { opacity: 0; } }
.or-int { margin: 8px 0; padding: 8px 10px; border-left: 2px solid var(--sel); background: rgba(201,164,92,.05); }
.or-int b { display: block; font: 12px var(--serif, serif); color: var(--sel); font-weight: normal; margin-bottom: 4px; }
.or-int b small { color: var(--amber-d); font-size: 10px; margin-left: 6px; }
.or-int p { font: 15px/1.75 var(--serif, serif); color: var(--white); overflow-wrap: anywhere; }
.or-int.app { border-left-color: var(--line); background: none; } .or-int.app p { font-size: 14px; color: var(--amber); }
.or-asp { display: grid; gap: 6px; margin: 8px 0; }
.or-asp > div { display: grid; grid-template-columns: 3.2em 1fr; gap: 8px; align-items: baseline; }
.or-asp span { font: 13px var(--serif, serif); color: var(--green); }
.or-asp span::after { content: ' →'; color: var(--amber-d); }
.or-asp p { font: 14px/1.6 var(--serif, serif); color: var(--white); }
.or-warn { font-size: 12px; color: var(--red); margin: 8px 0; line-height: 1.6; }
.or-note { position: relative; margin: 16px 0 10px; padding: 10px 12px 8px; border: 1px solid rgba(95,174,148,.6); }
.or-note::before, .or-note::after { content: ''; position: absolute; width: 8px; height: 8px; border-color: var(--green); border-style: solid; }
.or-note::before { left: -3px; top: -3px; border-width: 2px 0 0 2px; } .or-note::after { right: -3px; bottom: -3px; border-width: 0 2px 2px 0; }
.or-np { font: 11px Menlo, monospace; color: var(--green); margin-bottom: 6px; }
#lotNote, #jiaoNote, #lenNote, #runeNote { width: 100%; min-height: 72px; background: transparent; border: 0; border-bottom: 1px dashed var(--line-dim); color: var(--white); font: 16px/1.6 var(--serif, serif); resize: none; -webkit-user-select: text; user-select: text; }
#lotNote:focus, #jiaoNote:focus, #lenNote:focus, #runeNote:focus { outline: none; border-bottom-color: var(--green); }
.or-acts { margin-top: 6px; }
.or-del { display: block; margin: 10px auto 18px; font-size: 12px; color: var(--red); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; }
.or-spec-h { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.or-spec-h b { font: 700 18px var(--serif, serif); color: var(--white); } .or-spec-h small { font-size: 11px; color: var(--amber-d); }
.or-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.or-grid button { display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; border: 1px solid var(--line-dim); background: rgba(22,26,38,.6); }
.or-grid button b { font: 13px Menlo, monospace; color: var(--white); font-weight: normal; }
.or-grid button small { font: 10px var(--serif, serif); color: var(--amber-d); min-height: 1.2em; }
.or-grid .g-u { border-color: rgba(201,164,92,.7); } .or-grid .g-u small { color: var(--sel); }
.or-grid .g-d { border-color: rgba(208,65,47,.55); } .or-grid .g-d small { color: #e07a68; }
.or-grid .on { box-shadow: inset 0 0 0 2px var(--white); }
.or-back { font-size: 12px; color: var(--cyan); background: none; border: 0; margin-bottom: 8px; }
#screen.navlock .page, #screen.navlock #table { pointer-events: none !important; }

/* ---------- v2.2 类象卡（射覆 · 书架） ---------- */
.sf-how { font-size: 12px; color: var(--amber-d); line-height: 1.6; margin: 2px 0 8px; }
.lx-list { display: flex; flex-direction: column; gap: 10px; }
.lx-card { border: 1px solid var(--line-dim); background: rgba(22,26,38,.55); padding: 10px 12px 8px; }
.lx-hd { display: grid; grid-template-columns: auto auto 1fr; grid-template-areas: "role yao nm" "role yao tags"; column-gap: 10px; align-items: center; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px dashed var(--line-dim); }
.lx-role { grid-area: role; font: 700 15px var(--serif, serif); color: var(--red); writing-mode: vertical-rl; letter-spacing: .2em; }
.lx-yao { grid-area: yao; fill: var(--white); filter: drop-shadow(0 0 3px rgba(255,248,230,.35)); }
.lx-nm { grid-area: nm; display: flex; align-items: baseline; gap: 8px; }
.lx-nm b { font: 700 20px var(--serif, serif); color: var(--white); }
.lx-nm span { font: 14px var(--serif, serif); color: var(--sel); }
.lx-tags { grid-area: tags; display: flex; flex-wrap: wrap; gap: 4px; }
.lx-tags i { font-style: normal; font-size: 11px; color: var(--cyan); border: 1px solid var(--line-dim); padding: 0 6px; line-height: 18px; }
.lx-row { display: grid; grid-template-columns: 2.6em 1fr; gap: 8px; align-items: baseline; padding: 5px 0; }
.lx-row > span { font: 12px var(--serif, serif); color: var(--green); }
.lx-row p { font: 14px/1.65 var(--serif, serif); color: var(--white); overflow-wrap: anywhere; }
.lx-row p small { font-size: 11px; color: var(--amber-d); }
.lx-sw { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.lx-sw em { font-style: normal; font: 14px var(--serif, serif); color: var(--white); display: inline-flex; align-items: center; gap: 3px; }
.lx-sw i { display: inline-block; width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(236,228,207,.45); }
.lx-sg { margin-top: 4px; } .lx-sg summary { font-size: 12px; color: var(--amber-d); padding: 4px 0; }
.lx-sg p { font: 13px/1.7 var(--serif, serif); color: var(--amber); }
.sf-lib { width: 100%; margin-top: 10px; }
.lx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; padding-bottom: 20px; }
.lx-intro { grid-column: 1 / -1; font-size: 12px; color: var(--amber-d); line-height: 1.6; margin: 4px 0 2px; }
.lx-mini { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "yao nm" "yao xs" "sw sw" "sh sh"; column-gap: 10px; row-gap: 4px; text-align: left; padding: 10px; border: 1px solid var(--line-dim); background: rgba(22,26,38,.55); }
.lx-mini .lx-yao { grid-area: yao; align-self: center; }
.lx-mini > b { grid-area: nm; font: 700 18px var(--serif, serif); color: var(--white); }
.lx-mini > span { grid-area: xs; font: 13px var(--serif, serif); color: var(--sel); }
.lx-mini .lx-sw { grid-area: sw; gap: 4px; } .lx-mini .lx-sw em { gap: 2px; }
.lx-mini > small { grid-area: sh; font-size: 11px; color: var(--amber-d); }
.lx-grid .or-spec { grid-column: 1 / -1; }
.lx-sheet .lx-card { border: 0; background: none; padding: 0; }

/* ---------- v2.2 紫微：亮度、流年 ---------- */
.zs sup.br, .zw-legend sup.br { font-size: 8px; vertical-align: 4px; margin-left: 1px; font-family: var(--serif, serif); }
.br.hi { color: var(--sel); } .br.mid { color: rgba(236,228,207,.75); } .br.lo { color: var(--amber-d); } .br.bad { color: #c0503f; }
.zw-lb { display: flex; gap: 2px; position: absolute; left: 4px; bottom: 5px; }
.zw-lb i, .zw-legend i.ln, .zw-legend i.lm { font-style: normal; font: 9px/14px var(--serif, serif); width: 14px; text-align: center; color: #10121a; }
.zw-lb .ln, .zw-legend .ln { background: var(--sel); } .zw-lb .lm, .zw-legend .lm { background: var(--green); }
.zw-yh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.zw-yh b { font: 600 15px var(--serif, serif); color: var(--white); letter-spacing: .06em; }
.zw-yh .iconbtn { width: 34px; height: 30px; font-size: 18px; }
.zw-year .zw-row { grid-template-columns: 4.6em 3.2em 1fr; }
.zw-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 8px 0 4px; }
.zw-months > div { display: flex; flex-direction: column; align-items: center; padding: 5px 0; border: 1px solid var(--line-dim); }
.zw-months span { font-size: 10px; color: var(--amber-d); } .zw-months b { font: 13px var(--serif, serif); color: var(--white); font-weight: normal; }
.zw-months .on { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }

/* ---------- v2.2 八字：神煞、流年 ---------- */
.ss-list { display: flex; flex-direction: column; gap: 4px; }
.ss { border: 1px solid var(--line-dim); }
.ss summary { display: grid; grid-template-columns: 6.2em auto 1fr; gap: 8px; align-items: baseline; padding: 8px 10px; list-style: none; }
.ss summary::-webkit-details-marker { display: none; }
.ss summary b { font: 14px var(--serif, serif); color: var(--white); font-weight: normal; }
.ss summary span { font: 15px var(--serif, serif); color: var(--sel); letter-spacing: .1em; }
.ss summary em { font-style: normal; font-size: 12px; color: var(--amber-d); text-align: right; }
.ss.hit summary em { color: var(--green); }
.ss .q { font: 13.5px/1.75 var(--serif, serif); color: var(--amber); padding: 0 10px; }
.ss .src { font-size: 11px; color: var(--amber-d); padding: 4px 10px 8px; line-height: 1.6; }
.ss .src small { color: var(--amber-dd); }
.ss-note { font-size: 11px; color: var(--cyan); padding: 0 10px 8px; line-height: 1.6; }
.bz-ln { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.bz-ln > div { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; border: 1px solid var(--line-dim); min-width: 0; }
.bz-ln > div.on { border-color: var(--sel); box-shadow: inset 0 0 0 1px var(--sel); }
.bz-ln b { font: 16px var(--serif, serif); color: var(--white); font-weight: normal; }
.bz-ln span { font-size: 9.5px; color: var(--amber-d); }
.bz-ln i { font-style: normal; font-size: 11px; color: var(--cyan); }
.bz-ln small { font-size: 9px; color: var(--green); text-align: center; line-height: 1.3; padding: 0 2px; }
.qm-c > small i.gj { color: #10121a; background: var(--sel); padding: 0 2px; margin-left: 3px; }
.ss-none { font-size: 12px; color: var(--amber-d); line-height: 1.6; }
.ss summary span:empty { display: none; }
/* 键盘弹出：内容区底部留出键盘高度，可把输入框滚到键盘上方；底栏暂时收起 */
#app.kb .scroll { padding-bottom: calc(var(--kb, 0px) + 28px); }
#app.kb .page .ftr { visibility: hidden; }

/* ---------- 掷筊 ---------- */
.jiao-gl { position: absolute; left: 0; right: 0; width: 100%; pointer-events: auto; touch-action: none; z-index: 1; }
.jiao-hud { position: absolute; left: 14px; right: 14px; pointer-events: none; z-index: 2; display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
#p-jiao .scroll { position: relative; z-index: 3; }
#p-jiao.jiao-cast .scroll { display: none; }
#p-jiao.jiao-mini .scroll { border-top: 1px dashed var(--line-dim); }
#p-jiao .ftr { position: relative; z-index: 4; }
.jh-top { display: flex; justify-content: space-between; font: 10px Menlo, monospace; letter-spacing: .14em; color: var(--amber-d); }
.jh-q { font: 14px var(--serif, serif); color: var(--white); border-left: 2px solid var(--amber); padding-left: 8px; }
.jh-row { display: flex; gap: 6px; align-items: center; }
.jh-row em { margin-left: auto; font: 11px var(--serif, serif); font-style: normal; color: var(--amber-d); letter-spacing: .2em; }
.jh-c { min-width: 28px; height: 24px; border: 1px solid var(--line-dim); color: var(--amber-d); font: 11px Menlo, monospace; display: inline-flex; align-items: center; justify-content: center; }
.jh-c.cur { border-color: var(--amber); color: var(--amber); }
.jh-c.ok { background: rgba(201,164,92,.22); border-color: #c9a45c; color: #f3e6c2; font: 13px var(--serif, serif); }
.jh-c.mid { border-color: #5fae94; color: #5fae94; font: 13px var(--serif, serif); }
.jh-c.no { border-color: #d0412f; color: #e2603f; font: 13px var(--serif, serif); }
.jh-res { margin: 18px auto 0; text-align: center; animation: jhIn .5s cubic-bezier(.2,.9,.3,1.3); }
.jh-res b { display: block; font: 700 46px/1.1 var(--serif, serif); letter-spacing: .3em; text-indent: .3em; color: #f2ecdc; text-shadow: 0 0 22px rgba(236,228,207,.35); }
.jh-res small { font: 11px Menlo, monospace; letter-spacing: .2em; color: var(--amber-d); }
.jh-res.ok b { color: #f6e3b0; text-shadow: 0 0 26px rgba(224,184,101,.55); }
.jh-res.no b { color: #ef8a6e; }
.jh-res.mid b { color: #9fdcc4; }
@keyframes jhIn { from { opacity: 0; transform: scale(.7); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.jh-say { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font: 13px var(--serif, serif); color: var(--amber-d); letter-spacing: .1em; }
.jh-say small { font-size: 11px; opacity: .8; }
.jiao-intro { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-left: 2px solid var(--red, #d0412f); background: rgba(208,65,47,.06); margin: 4px 0 2px; }
.jiao-intro .q, .jiao-src .q { font: 15px var(--serif, serif); color: var(--white); }
.jiao-intro small, .jiao-src small { font-size: 11px; color: var(--amber-d); }
.jiao-modes { display: flex; flex-direction: column; gap: 8px; }
.jiao-modes .or-spec { text-align: left; grid-template-columns: 1fr auto; grid-template-areas: "nm n" "ds ds" "bars bars"; }
.jiao-modes .or-spec > b + em { display: block; grid-area: n; font: 10px Menlo, monospace; font-style: normal; color: var(--amber-d); letter-spacing: .12em; align-self: center; }
.jiao-modes .jm-src { display: block; grid-area: bars; font-size: 11px; color: var(--green, #5fae94); margin-top: 2px; }
.jiao-opts { display: flex; flex-direction: column; gap: 6px; }
.jiao-opts .jo { display: flex; align-items: center; gap: 8px; }
.jiao-opts .jo span { font: 12px Menlo, monospace; color: var(--amber); width: 1.4em; }
.jiao-opts input { flex: 1; min-width: 0; background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); color: var(--white); font: 16px var(--serif, serif); padding: 8px 10px; border-radius: 0; -webkit-appearance: none; appearance: none; -webkit-user-select: text; user-select: text; }
.jiao-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jiao-big { font: 700 64px/1 var(--serif, serif); color: #f2ecdc; letter-spacing: .2em; text-shadow: 0 0 18px rgba(236,228,207,.25); }
.jiao-big.pick { font-size: 34px; letter-spacing: .06em; line-height: 1.2; }
.jiao-throws { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 6px; }
.jiao-throws li { display: grid; grid-template-columns: 2.2em auto 1fr; align-items: baseline; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--line-dim); background: rgba(0,0,0,.25); }
.jiao-throws li span { font: 11px Menlo, monospace; color: var(--amber-d); }
.jiao-throws li em { grid-column: 2 / -1; font-style: normal; font-size: 12px; color: var(--amber-d); }
.jiao-throws li b { font: 18px var(--serif, serif); color: var(--white); letter-spacing: .15em; }
.jiao-throws li small { font-size: 11px; color: var(--amber-d); }
.jiao-throws li.ok { border-color: rgba(201,164,92,.6); } .jiao-throws li.ok b { color: #f3e6c2; }
.jiao-throws li.no b { color: #ef8a6e; } .jiao-throws li.mid b { color: #9fdcc4; }
.jiao-line { font: 15px var(--serif, serif); color: var(--white); margin: 4px 0; }
.jiao-tip { font-size: 12px; color: #9fdcc4; line-height: 1.6; }
.jiao-src { display: flex; flex-direction: column; gap: 10px; }
.jiao-src > div { display: flex; flex-direction: column; gap: 2px; padding-left: 10px; border-left: 1px solid var(--line-dim); }
.jiao-modes .or-spec .ds { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.55; }

/* 焦氏易林 */
.yr-yl { margin: 14px 0; padding: 12px; border: 1px solid rgba(201,164,92,.45); background: rgba(201,164,92,.05); }
.yl-t { font: 20px/1.7 var(--serif, serif); color: var(--white); letter-spacing: .18em; overflow-wrap: anywhere; margin-top: 6px; }
.yl-s { font: 14px/1.6 var(--serif, serif); color: var(--amber); letter-spacing: .1em; margin-top: 4px; overflow-wrap: anywhere; }
.yl-s small { display: block; font-size: 10px; letter-spacing: 0; color: var(--amber-d); }
.yl-n { margin-top: 6px; } .yl-n summary { font-size: 12px; color: var(--cyan); min-height: 32px; padding: 6px 0; }
.yl-n p { margin: 0; font: 13px/1.6 var(--serif, serif); color: var(--amber); overflow-wrap: anywhere; }
.yl-miss { font: 14px/1.6 var(--serif, serif); color: var(--amber-d); margin-top: 6px; }
.yl-row { display: grid; grid-template-columns: 4.5em 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px dotted var(--line-dim); font: 14px/1.6 var(--serif, serif); }
.yl-row b { font-weight: normal; color: var(--sel); } .yl-row span { color: var(--white); overflow-wrap: anywhere; }
.yl-t i, .yl-s i { display: inline-block; width: .7em; }

/* 今日 */
#todayBody .td-date { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 6px; }
.td-date b { font: 700 28px var(--serif, serif); color: var(--white); letter-spacing: .08em; }
.td-date span { font-size: 13px; color: var(--amber); }
.td-lead { font: 13px/1.6 var(--serif, serif); color: var(--amber-d); margin: 4px 0 10px; }
.td-card { display: block; width: 100%; text-align: left; margin: 10px 0; padding: 12px; border: 1px solid var(--line-dim); background: rgba(22,26,38,.5); }
.td-card:active { border-color: var(--sel); }
.td-k { display: flex; align-items: baseline; gap: 8px; font: 18px var(--serif, serif); color: var(--sel); }
.td-k small { font-size: 11px; color: var(--amber-d); }
.td-k i { margin-left: auto; font: 12px var(--serif, serif); font-style: normal; padding: 2px 6px; border: 1px solid currentColor; }
.td-k i.g-u { color: #e05a43; } .td-k i.g-m { color: var(--sel); } .td-k i.g-d { color: #a9a39a; }
.td-poem { margin-top: 8px; font: 17px/1.8 var(--serif, serif); color: var(--white); letter-spacing: .1em; }
.td-sub { margin-top: 6px; font: 13px/1.6 var(--serif, serif); color: var(--amber); }
.td-sub small { display: block; font-size: 10px; color: var(--amber-d); }
.td-gua { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.td-gua span { font-size: 40px; line-height: 1; color: var(--white); }
.td-gua b { font: 22px var(--serif, serif); color: var(--white); font-weight: normal; letter-spacing: .1em; }
.td-tarot { display: grid; grid-template-columns: 72px 1fr; gap: 12px; margin-top: 8px; align-items: start; }
.td-tarot img { width: 72px; border: 1px solid var(--line-dim); }
.td-tarot img.rev { transform: rotate(180deg); }
.td-tarot b { display: block; font: 20px var(--serif, serif); color: var(--white); font-weight: normal; }
.td-tarot span { font-size: 12px; color: var(--amber-d); }
.td-tarot p { margin: 6px 0 2px; font: 14px/1.6 var(--serif, serif); color: var(--amber); }
.td-tarot small { font-size: 10px; color: var(--amber-d); }

/* 择日 */
#zeriBody label { display: block; color: var(--cyan); font-size: 12px; margin-top: 12px; }
#zeriBody .chips-row { margin-top: 6px; flex-wrap: wrap; }
.zr-rule { margin: 12px 0 8px; padding: 10px 12px; border: 1px solid var(--line-dim); background: rgba(22,26,38,.5); display: flex; flex-direction: column; gap: 6px; }
.zr-rule div { display: grid; grid-template-columns: 1.6em 1fr; gap: 6px; font: 13px/1.6 var(--serif, serif); color: var(--amber); }
.zr-rule b { font-weight: normal; color: var(--green); } .zr-rule b.ji { color: var(--red); }
.zr-rule small { font-size: 10px; color: var(--amber-d); }
.zr-sum { display: flex; gap: 16px; font: 13px Menlo, monospace; color: var(--amber-d); margin: 8px 0; }
.zr-sum .y { color: var(--green); } .zr-sum .j { color: var(--red); }
.zr-list { display: flex; flex-direction: column; gap: 6px; }
.zr-day { display: grid; grid-template-columns: 3.4em 6.4em 1fr 1.8em; gap: 8px; align-items: center; text-align: left; padding: 8px; border: 1px solid var(--line-dim); min-height: 52px; }
.zr-day.v-y { border-left: 3px solid var(--green); } .zr-day.v-j { opacity: .62; border-left: 3px solid var(--red); }
.zr-d b { display: block; font: 15px Menlo, monospace; color: var(--white); font-weight: normal; } .zr-d small { font-size: 10px; color: var(--amber-d); }
.zr-g { font: 16px var(--serif, serif); color: var(--white); } .zr-g small { display: block; font-size: 10px; color: var(--amber-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zr-h { display: flex; flex-wrap: wrap; gap: 3px; min-width: 0; }
.zr-h i { font: 11px var(--serif, serif); font-style: normal; padding: 1px 4px; border: 1px solid currentColor; }
.zr-h i.y { color: var(--green); } .zr-h i.j { color: var(--red); }
.zr-day em { font: 16px var(--serif, serif); font-style: normal; color: var(--amber); text-align: center; }
.zr-day.v-y em { color: var(--green); } .zr-day.v-j em { color: var(--red); }
.zr-note { margin: 14px 0; padding: 10px 12px; border: 1px solid rgba(77,240,255,.25); font: 12px/1.7 var(--serif, serif); color: var(--amber); }
.zr-note b { display: block; font: 10px Menlo, monospace; color: var(--cyan); letter-spacing: .15em; font-weight: normal; margin-bottom: 4px; }
.zr-s { padding: 6px 0; border-bottom: 1px dotted var(--line-dim); }
.zr-s b { font: 15px var(--serif, serif); color: var(--sel); font-weight: normal; margin-right: 8px; }
.zr-s span { font: 12px/1.6 var(--serif, serif); color: var(--amber); overflow-wrap: anywhere; }
.zr-s small { display: block; font-size: 10px; color: var(--amber-d); }
.zr-h i.n { color: var(--amber-d); text-decoration: line-through; }
.zr-s em { font: 11px var(--serif, serif); font-style: normal; color: var(--amber-d); margin-left: 4px; }
.zr-s.ji em, .zr-s.all em { color: var(--red); } .zr-s.not em, .zr-s.none em { color: var(--green); }
.zr-s span { display: block; }

/* 雷诺曼 */
#lenBody label { display: block; color: var(--cyan); font-size: 12px; margin-top: 12px; }
#lenBody .chips-row { margin-top: 6px; }
#lenQ { display: block; width: 100%; min-height: 56px; resize: none; background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); border-radius: 0; -webkit-appearance: none; appearance: none;
  color: var(--white); font: 16px/1.5 var(--serif, serif); padding: 8px 10px; margin-top: 6px; box-sizing: border-box; user-select: text; -webkit-user-select: text; }
#lenQ:focus { outline: none; border-color: var(--sel); }
#lenQ::placeholder { color: var(--amber-d); }
.ln-lead { font: 14px/1.7 var(--serif, serif); color: var(--amber); margin: 6px 0; }
.ln-fan { position: relative; height: 150px; margin: 18px 0 8px; }
.ln-fan i { position: absolute; left: 50%; top: 10px; width: 78px; height: 118px; margin-left: -39px; border: 1px solid var(--sel); background: repeating-linear-gradient(45deg, rgba(201,164,92,.12) 0 4px, rgba(10,12,18,.9) 4px 8px);
  transform: rotate(calc(var(--k) * 9deg)) translateX(calc(var(--k) * 22px)); transform-origin: 50% 120%; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.ln-fan.go i { transform: rotate(0) translateX(0) translateY(-6px); }
.ln-row { display: flex; justify-content: center; gap: 8px; margin: 12px 0; }
.ln-row img { width: 31%; max-width: 150px; border: 1px solid var(--line-dim); box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.ln-row.n1 img { width: 52%; max-width: 220px; }
.ln-line { margin: 10px 0; padding: 10px 12px; border: 1px solid rgba(201,164,92,.45); background: rgba(201,164,92,.05); }
.ln-line b { font: 12px var(--serif, serif); color: var(--sel); font-weight: normal; }
.ln-line p { margin: 4px 0; font: 18px/1.6 var(--serif, serif); color: var(--white); }
.ln-line em { font-style: normal; color: var(--sel); }
.ln-line small { display: block; font-size: 11px; line-height: 1.6; color: var(--amber-d); }
.ln-c { display: grid; grid-template-columns: 74px 1fr; gap: 10px; margin: 12px 0; padding: 10px; border: 1px solid var(--line-dim); background: rgba(22,26,38,.5); }
.ln-c > img { width: 74px; border: 1px solid var(--line-dim); }
.ln-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ln-h span { font: 11px Menlo, monospace; color: var(--amber-d); }
.ln-h b { font: 20px var(--serif, serif); color: var(--white); font-weight: normal; }
.ln-h em { font-style: normal; font-size: 12px; color: var(--amber-d); }
.ln-h small { font-size: 12px; color: var(--sel); }
.ln-k { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ln-k i { font-style: normal; font: 13px var(--serif, serif); padding: 2px 6px; border: 1px solid rgba(95,174,148,.6); color: var(--green); }
.ln-src { display: block; font-size: 10px; color: var(--amber-d); margin-top: 4px; }
.ln-old { grid-column: 1 / -1; }
.ln-old summary { font-size: 12px; color: var(--cyan); min-height: 32px; padding: 6px 0; cursor: pointer; }
.ln-old p { margin: 4px 0; font: 14px/1.6 var(--serif, serif); }
.ln-old .fr { font-family: Georgia, serif; font-style: italic; color: var(--amber-d); font-size: 13px; }
.ln-old .zh { color: var(--white); }
.ln-old .zh small { display: block; font-size: 10px; color: var(--amber-d); }
.ln-sheet .ln-c { border: 0; background: none; padding: 0; }

/* 卢恩 */
#runeBody label { display: block; color: var(--cyan); font-size: 12px; margin-top: 12px; }
#runeBody .chips-row { margin-top: 6px; flex-wrap: wrap; }
#runeQ { display: block; width: 100%; min-height: 56px; resize: none; background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); border-radius: 0; -webkit-appearance: none; appearance: none;
  color: var(--white); font: 16px/1.5 var(--serif, serif); padding: 8px 10px; margin-top: 6px; box-sizing: border-box; user-select: text; -webkit-user-select: text; }
#runeQ:focus { outline: none; border-color: var(--sel); } #runeQ::placeholder { color: var(--amber-d); }
.rn-g path { fill: none; stroke: var(--sel); stroke-width: 2.6; stroke-linecap: square; stroke-linejoin: miter; }
.rn-stone { display: inline-flex; align-items: center; justify-content: center; padding: 10px 12px; border-radius: 46% 54% 50% 48% / 52% 46% 54% 48%; background: radial-gradient(circle at 35% 30%, #4a4f58, #23262c 70%); box-shadow: inset 0 -3px 6px rgba(0,0,0,.6), 0 4px 10px rgba(0,0,0,.5); }
.rn-bag { position: relative; height: 110px; margin: 18px 0 6px; }
.rn-bag i { position: absolute; left: 50%; top: 20px; margin-left: -24px; transform: translateX(calc(var(--k) * 44px)) rotate(calc(var(--k) * 8deg)); transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.rn-bag i svg { display: block; padding: 8px 10px; border-radius: 48%; background: radial-gradient(circle at 35% 30%, #4a4f58, #23262c 70%); }
.rn-bag.go i { transform: translateX(0) translateY(-8px) rotate(0); }
.rn-row { display: flex; justify-content: center; gap: 14px; margin: 14px 0; }
.rn-row > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rn-row b { font: 18px var(--serif, serif); color: var(--white); font-weight: normal; } .rn-row small { font-size: 11px; color: var(--amber-d); }
.rn-note { font-size: 11px; line-height: 1.6; color: var(--amber-d); margin: 4px 0 8px; }
.rn-c { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; margin: 12px 0; padding: 10px; border: 1px solid var(--line-dim); background: rgba(22,26,38,.5); }
.rn-c .ln-old { grid-column: 1 / -1; }
.rn-p { margin: 8px 0 10px; padding-left: 10px; border-left: 2px solid rgba(201,164,92,.5); }
.rn-p b { display: block; font: 13px var(--serif, serif); color: var(--sel); font-weight: normal; }
.rn-p b small { margin-left: 8px; font-size: 11px; color: var(--amber-d); }
.rn-p .o { margin: 4px 0; font: italic 13px/1.55 Georgia, serif; color: var(--amber-d); }
.rn-p .t { margin: 4px 0; font: 13px/1.55 Georgia, serif; color: var(--amber); }
.rn-p .zh { margin: 4px 0; font: 15px/1.6 var(--serif, serif); color: var(--white); }
.rn-none { font-size: 12px; color: var(--amber-d); }
.rn-tr { display: block; font-size: 10px; color: var(--amber-d); margin-top: 4px; }
.rn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-content: start; }
.rn-mini { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--line-dim); }
.rn-mini b { font: 14px var(--serif, serif); color: var(--white); font-weight: normal; } .rn-mini small { font-size: 9px; color: var(--amber-d); }

/* 星与数 */
#modBody label, #numBody label { display: block; color: var(--cyan); font-size: 12px; margin-top: 12px; }
#modBody label small, #numBody label small { color: var(--amber-d); margin-left: 6px; }
#modBody .chips-row, #numBody .chips-row { margin-top: 6px; }
.md-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 10px; }
.md-tabs button { padding: 10px 2px; border: 1px solid var(--line-dim); font: 14px var(--serif, serif); color: var(--amber); min-height: 44px; }
.md-tabs .on { border-color: var(--sel); color: var(--sel); background: rgba(201,164,92,.08); box-shadow: inset 0 -2px 0 var(--sel); }
.md-yr { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 6px 0; }
.md-yr b { font: 18px Menlo, monospace; color: var(--white); font-weight: normal; } .md-yr button { min-width: 44px; min-height: 36px; color: var(--sel); border: 1px solid var(--line-dim); }
.md-now { margin: 8px 0; padding: 8px 10px; border: 1px solid rgba(95,174,148,.5); font: 14px/1.6 var(--serif, serif); color: var(--white); }
.md-now b { color: var(--sel); font-weight: normal; } .md-now b.hot { color: var(--red); }
.md-list { display: flex; flex-direction: column; gap: 8px; }
.md-r { padding: 10px; border: 1px solid var(--line-dim); background: rgba(22,26,38,.5); }
.md-r.on { border-color: var(--sel); box-shadow: inset 3px 0 0 var(--sel); } .md-r.hg .md-rh b { color: var(--cyan); }
.md-rh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.md-rh b { font: 16px var(--serif, serif); color: var(--white); font-weight: normal; } .md-rh span { font: 12px Menlo, monospace; color: var(--sel); }
.md-rd { font-size: 12px; color: var(--amber-d); margin-top: 4px; }
.md-r p { margin: 6px 0 0; font: 13px/1.6 var(--serif, serif); color: var(--amber); }
.md-note { margin: 14px 0; padding: 10px 12px; border: 1px solid rgba(77,240,255,.25); font: 12px/1.7 var(--serif, serif); color: var(--amber); }
.md-note b { display: block; font: 10px Menlo, monospace; color: var(--cyan); letter-spacing: .15em; font-weight: normal; margin-bottom: 4px; }
.md-birth { display: flex; gap: 8px; margin-top: 6px; }
.md-birth input { flex: 1; min-width: 0; min-height: 44px; background: rgba(0,0,0,.4); border: 1px solid var(--line-dim); color: var(--white); font: 16px Menlo, monospace; padding: 6px 10px; -webkit-appearance: none; appearance: none; border-radius: 0; color-scheme: dark; }
.md-ret { margin: 12px 0; padding: 10px; border: 1px solid var(--line-dim); }
.md-g { display: grid; grid-template-columns: 4em 1fr; gap: 2px 10px; padding: 6px 0; border-top: 1px dotted var(--line-dim); }
.md-g em { font-style: normal; font: 14px Menlo, monospace; color: var(--sel); } .md-g span { font: 14px var(--serif, serif); color: var(--white); }
.md-g small { grid-column: 2; font-size: 10px; color: var(--amber-d); }
.md-g.done { opacity: .5; } .md-g.next { background: rgba(201,164,92,.08); }
.md-num { display: flex; align-items: center; gap: 14px; margin: 14px 0 8px; }
.md-num > b { font: 700 64px/1 Menlo, monospace; color: var(--sel); text-shadow: 0 0 16px rgba(201,164,92,.35); }
.md-num span { display: block; font: 16px var(--serif, serif); color: var(--white); } .md-num small { font: 11px Menlo, monospace; color: var(--amber-d); }
.md-q { margin: 12px 0; padding: 8px 12px; border-left: 2px solid var(--sel); background: rgba(201,164,92,.05); }
.md-q .en { margin: 0; font: italic 14px/1.6 Georgia, serif; color: var(--amber); } .md-q .zh { margin: 6px 0 0; font: 15px/1.6 var(--serif, serif); color: var(--white); }
.md-q .zh small, .md-q > small { display: block; font-size: 10px; color: var(--amber-d); }
.md-yearn { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line-dim); }
.md-yearn b { font: 15px var(--serif, serif); color: var(--sel); font-weight: normal; } .md-yearn p { margin: 4px 0; font: 14px/1.6 var(--serif, serif); color: var(--white); }
.md-yearn small { font-size: 10px; color: var(--amber-d); }
.sp-calc { margin-top: 8px; } .sp-calc .tbtn { min-height: 44px; } .sp-calc .tbtn b { font-size: 13px; }

/* 雷诺曼 · 牌阵 */
#lenBody label { display: block; color: var(--cyan); font-size: 12px; margin-top: 12px; } #lenBody label small { color: var(--amber-d); margin-left: 6px; }
.ln-backs { display: grid; justify-content: center; gap: 6px; margin: 18px auto 10px; }
.ln-backs i { position: relative; display: block; aspect-ratio: 2 / 3; transform-style: preserve-3d; opacity: 0; animation: lnIn .4s ease-out forwards; animation-delay: calc(var(--i) * 25ms); }
.ln-backs i s { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1px solid var(--sel); }
.ln-backs i .bk { background: repeating-linear-gradient(45deg, rgba(201,164,92,.14) 0 3px, rgba(10,12,18,.92) 3px 6px); }
.ln-backs i .fr { transform: rotateY(180deg); background: #111 center / cover no-repeat; border-color: var(--line-dim); }
.ln-backs i.flip { transform: rotateY(180deg) !important; transition: transform .55s cubic-bezier(.3,.7,.2,1) !important; }
.ln-backs.hide { visibility: hidden; }
.ln-backs.s-one { grid-template-columns: 110px; } .ln-backs.s-line3 { grid-template-columns: repeat(3, 84px); } .ln-backs.s-line5 { grid-template-columns: repeat(5, 58px); }
.ln-backs.s-box9 { grid-template-columns: repeat(3, 72px); } .ln-backs.s-gt { grid-template-columns: repeat(9, 1fr); width: 100%; gap: 3px; }
@keyframes lnIn { to { opacity: 1; transform: none; } }
/* 洗牌：一叠牌左右分开，再交错落回 */
.ln-deck { position: relative; width: 90px; height: 135px; margin: 18px auto 6px; transition: opacity .3s, transform .3s; }
.ln-deck i { position: absolute; inset: 0; border: 1px solid var(--sel); border-radius: 3px; background: repeating-linear-gradient(45deg, rgba(201,164,92,.14) 0 3px, rgba(10,12,18,.95) 3px 6px);
  transform: translateY(calc(var(--i) * -1px)); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.ln-deck.riffle i:nth-child(odd) { animation: lnRiffL .7s cubic-bezier(.45,0,.3,1) 2; animation-delay: calc(var(--i) * 8ms); }
.ln-deck.riffle i:nth-child(even) { animation: lnRiffR .7s cubic-bezier(.45,0,.3,1) 2; animation-delay: calc(var(--i) * 8ms); }
@keyframes lnRiffL { 0%, 100% { transform: translateY(calc(var(--i) * -1px)); } 35% { transform: translate(-62px, 8px) rotate(-14deg); } 60% { transform: translate(-46px, calc(var(--i) * -2px)) rotate(-8deg); } }
@keyframes lnRiffR { 0%, 100% { transform: translateY(calc(var(--i) * -1px)); } 35% { transform: translate(62px, 8px) rotate(14deg); } 60% { transform: translate(46px, calc(var(--i) * -2px)) rotate(8deg); } }
.ln-deck.done { opacity: 0; transform: scale(.7); }
.ln-row img.core { outline: 2px solid var(--sel); }
.ln-row.n5 img { width: 18%; }
.ln-line p span.hot { color: var(--sel); } .ln-line p i { font-style: normal; color: var(--amber-d); margin: 0 6px; }
.ln-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 300px; margin: 12px auto; }
.ln-gt { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; margin: 12px 0; }
.ln-box button, .ln-gt button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; border: 1px solid transparent; }
.ln-box img, .ln-gt img { width: 100%; display: block; border: 1px solid var(--line-dim); }
.ln-box span, .ln-gt span { font: 10px var(--serif, serif); color: var(--amber); white-space: nowrap; overflow: hidden; max-width: 100%; }
.ln-gt span { font-size: 8px; }
.ln-box .core { border-color: var(--sel); } .ln-box .core span { color: var(--sel); }
.ln-box .sig img, .ln-gt .sig img { outline: 2px solid var(--red); }
.ln-gt .near img { outline: 1.5px solid var(--green); } .ln-gt .far { opacity: .45; }
.ln-note { font-size: 12px; line-height: 1.6; color: var(--amber-d); margin: 6px 0; } .ln-note b { color: var(--white); font-weight: normal; }
.ln-dist { display: inline-block; margin-top: 6px; font: 12px var(--serif, serif); padding: 1px 6px; border: 1px solid currentColor; }
.ln-dist.near { color: var(--green); } .ln-dist.mid { color: var(--amber); } .ln-dist.far { color: var(--amber-d); }
.ln-house { margin-top: 6px; font: 12px var(--serif, serif); color: var(--sel); } .ln-house small { display: block; font-size: 10px; color: var(--amber-d); }

/* 全屏看牌 */
#cardView { position: absolute; inset: 0; z-index: 60; display: none; touch-action: none; }
#cardView.show { display: block; animation: cvFade .3s ease-out; }
@keyframes cvFade { from { opacity: 0; } to { opacity: 1; } }
.cv-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(201,164,92,.16), rgba(0,0,0,.96) 62%), #000; }
.cv-stage { position: absolute; inset: 56px 0 96px; display: flex; align-items: center; justify-content: center; }
.cv-card { position: absolute; display: flex; align-items: center; justify-content: center; transition: transform .42s cubic-bezier(.2,.8,.2,1), opacity .42s; }
.cv-card.in-o { animation: cvIn .5s cubic-bezier(.2,.8,.2,1); }
.cv-card.in-r { animation: cvInR .42s cubic-bezier(.2,.8,.2,1); } .cv-card.in-l { animation: cvInL .42s cubic-bezier(.2,.8,.2,1); }
.cv-card.out-l { transform: translateX(-70%) rotate(-8deg); opacity: 0; } .cv-card.out-r { transform: translateX(70%) rotate(8deg); opacity: 0; }
@keyframes cvIn { from { transform: scale(.82); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cvInR { from { transform: translateX(70%) rotate(8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cvInL { from { transform: translateX(-70%) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.cv-breath { animation: cvBreath 5.2s ease-in-out infinite; border-radius: 10px; }
.cv-breath img { display: block; max-width: min(84vw, 400px); max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); border-radius: 10px; user-select: none; -webkit-user-drag: none; pointer-events: auto; }
.cv-breath img.rev { transform: rotate(180deg); }
@keyframes cvBreath {
  0%, 100% { transform: scale(1) translateY(0); box-shadow: 0 0 22px 2px rgba(201,164,92,.18), 0 18px 40px rgba(0,0,0,.6); }
  50% { transform: scale(1.028) translateY(-4px); box-shadow: 0 0 46px 10px rgba(201,164,92,.42), 0 26px 50px rgba(0,0,0,.55); } }
.cv-arrow { position: absolute; top: 50%; margin-top: -32px; width: 44px; height: 64px; font-size: 34px; color: var(--sel, var(--amber)); opacity: .75; z-index: 2; }
.cv-arrow.l { left: 2px; } .cv-arrow.r { right: 2px; }
#cardView.single .cv-arrow { display: none; }
.cv-foot { position: absolute; left: 0; right: 0; bottom: 24px; text-align: center; padding: 0 20px; pointer-events: none; }
.cv-title b { display: block; font: 22px var(--serif, serif); color: var(--white); font-weight: normal; letter-spacing: .08em; }
.cv-title small { display: block; margin-top: 4px; font-size: 12px; color: var(--amber-d); }
.cv-count { margin-top: 6px; font: 12px Menlo, monospace; color: var(--sel, var(--amber)); letter-spacing: .2em; }
.cv-close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 14px; width: 44px; height: 44px; font-size: 30px; line-height: 1; color: var(--white); opacity: .8; z-index: 2; }
.cv-able { cursor: zoom-in; }
.cv-able::after { content: '⤢'; position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; display: grid; place-content: center; font-size: 15px; color: var(--white); background: rgba(0,0,0,.55); border: 1px solid var(--line-dim); }

/* 求签、掷筊页底部：去录入实物结果 */
.or-alt { display: block; width: 100%; margin: 14px 0 4px; padding: 10px 0; background: none; border: 0; border-top: 1px dashed var(--line-dim); color: var(--gold, #c9a45c); font: 13px var(--mono, monospace); text-align: left; opacity: .85; }
.pk-runes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pk-runes [disabled] { opacity: .3; }
#mTarot[hidden] { display: none; }

/* 菜单标题行：右侧关闭 */
.dr-t { display: flex; align-items: center; justify-content: space-between; }
.dr-x { width: 40px; height: 36px; font-size: 24px; line-height: 1; color: var(--amber-d); background: none; border: 0; padding: 0; }

/* 两个字时缩小字号，免得第二个字被裁掉 */
#czIn.two { font-size: 46px; letter-spacing: -2px; }

/* ---------- 塔罗首页叠加图层（src/bootdeco.js）：只装饰，不挡操作；周易模式隐藏 ---------- */
/* 只排在「顶栏下沿 → 星盘上沿」「星盘下沿 → 日期行上沿」两段空白里；字号不小于 10px，放不下的块由脚本加 .bd-off 隐藏 */
#p-boot > .boot-top, #p-boot > .boot-bottom { position: relative; z-index: 1; }
#bootDeco { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; transition: opacity .6s; font: 10px/1.25 var(--mono, Menlo, monospace); color: var(--amber-d); letter-spacing: .04em; text-shadow: none; }
#app.east #bootDeco { opacity: 0; visibility: hidden; }
/* 周易模式整层不可见（visibility: hidden 下 CSS 动画照样每帧重算样式），扫描线、光标、波形一并暂停 */
#app.east #bootDeco .bd-scan::after, #app.east #bootDeco .bd-cur, #app.east #bootDeco .bd-wave path { animation-play-state: paused; }
#bootDeco.dim { opacity: .08; transition: opacity .25s; }
#bootDeco b { color: var(--white); font-weight: normal; }
#bootDeco .bd-off { display: none !important; }
.bd-grid { position: absolute; inset: 0; opacity: .14; background-image: linear-gradient(var(--line-dim) 1px, transparent 1px), linear-gradient(90deg, var(--line-dim) 1px, transparent 1px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, transparent 22%, #000 70%); mask-image: radial-gradient(ellipse at 50% 45%, transparent 22%, #000 70%); }
.bd-scan { position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 3px); }
.bd-scan::after { content: ''; position: absolute; left: 0; right: 0; top: -20%; height: 18%; background: linear-gradient(to bottom, transparent, rgba(255,255,255,.035), transparent); animation: bdScan 7s linear infinite; }
@keyframes bdScan { to { transform: translateY(650%); } }
.bd-cur { font-style: normal; color: var(--sel); animation: bdBlink 1.1s steps(1) infinite; }
@keyframes bdBlink { 50% { opacity: 0; } }

/* 上段：月相行 + 牌行，在空白里上下均分 */
/* 宽屏时装饰收在中间 640px 一带，不铺满整屏；手机上仍是左右各留 12px */
.bd-top { position: absolute; left: max(12px, calc(50% - 320px)); right: max(12px, calc(50% - 320px)); display: flex; flex-direction: column; justify-content: space-evenly; overflow: hidden; }
.bd-mrow { display: flex; align-items: center; gap: 8px; flex: none; }
.bd-side { flex: none; white-space: nowrap; }
.bd-side.r { text-align: right; }
.bd-moon { flex: 1; min-width: 0; }
.bd-strip { position: relative; height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 7px; }
.bd-strip::before, .bd-strip::after { content: ''; position: absolute; top: 0; bottom: 0; width: 5px; border: 1px solid var(--line); }
.bd-strip::before { left: 0; border-right: 0; } .bd-strip::after { right: 0; border-left: 0; }
.bd-strip i { flex: 1; height: 1px; min-width: 2px; margin: 0 1px; background: var(--line-dim); }
.bd-strip svg { width: 18px; height: 18px; flex: none; }
.bd-strip svg.hot { width: 28px; height: 28px; filter: drop-shadow(0 0 6px var(--sel)); }
.bd-strip .dk { fill: rgba(255,255,255,.06); stroke: var(--line-dim); stroke-width: 1; }
.bd-strip .lit { fill: var(--amber); opacity: .75; }
.bd-strip .hot .lit { fill: var(--white); opacity: 1; }
.bd-ml { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; white-space: nowrap; }
.bd-ml b { display: block; color: var(--sel); }
.bd-mr { text-align: right; } .bd-mr b { color: var(--white); } .bd-mr em { font-style: normal; color: var(--amber); }
.bd-arow { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 120px; flex: none; }
.bd-card { position: relative; flex: none; height: 100%; aspect-ratio: 7 / 12; border: 1px solid var(--line); background: var(--sel); isolation: isolate; mix-blend-mode: screen; opacity: .4; overflow: hidden; }
.bd-card img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) invert(1) contrast(2.2) brightness(.8); mix-blend-mode: multiply; }
.bd-list { margin: 0; padding: 0; list-style: none; line-height: 11px; white-space: nowrap; align-self: flex-start; }
.bd-list i { display: inline-block; width: 1.8em; font-style: normal; color: var(--amber-dd, var(--amber-d)); }
.bd-maj { white-space: nowrap; line-height: 1.4; }
.bd-maj b { color: var(--sel); }
.bd-fan { position: relative; flex: none; height: 100%; aspect-ratio: 7 / 12; margin-left: 44px; }
/* 牌扇以左下角为轴向左倾，倾斜后右上角会比牌顶高出一截：牌整体下移 16%，让探出的部分仍在本行里 */
.bd-fan s, .bd-fan .bd-card { position: absolute; left: 0; top: 16%; width: 100%; height: 84%; transform-origin: 0 100%; }
.bd-fan s { border: 1px solid var(--line-dim); transform: rotate(calc(-30deg + var(--i) * 6deg)); }
.bd-fan .bd-card { transform: rotate(3deg); }

/* 下段：左右两列，在空白里纵向居中 */
.bd-bot { position: absolute; left: max(12px, calc(50% - 320px)); right: max(12px, calc(50% - 320px)); display: flex; align-items: center; justify-content: space-between; gap: 8px; overflow: hidden; }
.bd-col { display: flex; flex-direction: column; gap: 8px; flex: none; }
.bd-col.r { align-items: flex-end; }
.bd-coord p { margin: 0; white-space: nowrap; }
.bd-coord ul { margin: 4px 0 0; padding: 0 0 0 6px; list-style: none; border-left: 2px solid var(--sel); }
.bd-coord li { white-space: nowrap; } .bd-coord li b { display: inline-block; width: 4.2em; color: var(--sel); }
.bd-grow { display: flex; align-items: center; gap: 8px; }
.bd-globe { width: 52px; height: 52px; flex: none; }
.bd-globe svg { width: 100%; height: 100%; fill: none; stroke: var(--sel); stroke-width: .7; opacity: .55; }
.bd-real { white-space: nowrap; }
.bd-boot { color: var(--sel); opacity: .85; white-space: nowrap; }
.bd-cross { width: 40px; height: 40px; flex: none; }
.bd-cross svg { width: 100%; height: 100%; fill: none; stroke: var(--sel); stroke-width: 1; opacity: .7; }
.bd-cross .f { fill: var(--sel); stroke: none; } .bd-cross .arc { opacity: .5; }
.bd-words { text-align: right; color: var(--amber); white-space: nowrap; }
.bd-panel { width: 156px; border: 1px solid var(--line); padding: 6px 8px; background: rgba(0,0,0,.35); }
.bd-ph { color: var(--white); letter-spacing: .1em; } .bd-ph i { font-style: normal; color: var(--amber-d); }
.bd-wave { display: block; width: 100%; height: 16px; margin: 4px 0; border: 1px solid var(--line-dim); }
.bd-wave path { fill: none; stroke: var(--sel); stroke-width: 1; stroke-dasharray: 6 3; animation: bdWave 3s linear infinite; }
@keyframes bdWave { to { stroke-dashoffset: -36; } }
.bd-kv { display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; margin: 0; white-space: nowrap; }
.bd-kv dt { color: var(--amber); } .bd-kv dd { margin: 0; color: var(--sel); text-align: right; }
.bd-unk { color: var(--nerv, var(--red)); white-space: nowrap; }
/* 紧凑式数据面板：下段空白太矮时用。去掉波形，四项排成两行两组 */
.bd-bot.bd-solo { justify-content: center; }
.bd-bot.bd-solo .bd-col.l { display: none; }
.bd-panel.bd-compact { width: auto; padding: 4px 8px; }
.bd-compact .bd-wave { display: none; }
.bd-compact .bd-kv { grid-template-columns: auto auto auto auto; column-gap: 8px; }
@media (prefers-reduced-motion: reduce) { .bd-scan::after, .bd-cur, .bd-wave path { animation: none; } }

/* ---------- 宽屏：折叠屏展开、平板、横屏 ---------- */
/* 宽度 ≥ 600px：版面放宽到 900px；一般页面的内容仍收在中间 560px 一栏，详解页改成「牌面 | 解读」左右双栏 */
@media (min-width: 600px) {
  #app { max-width: 900px; }
  .page:not(#p-boot):not(#p-detail) > * { width: 100%; max-width: 560px; align-self: center; box-sizing: border-box; }
  .sheet-p { max-width: 600px; margin: 0 auto; }
  #detailBody { display: grid; grid-template-columns: minmax(220px, 36%) 1fr; column-gap: 28px; align-items: start; padding-left: 8px; padding-right: 8px; }
  #detailBody > .d-hero { grid-column: 1; grid-row: 1 / span 20; position: sticky; top: 0; grid-template-columns: 1fr; align-items: start; gap: 10px; }
  #detailBody > :not(.d-hero) { grid-column: 2; }
  #detailBody > .d-hero .d-meta { text-align: center; }
  .d-imgbox { max-width: 320px; }
}
/* 横向或接近方形（宽高比 ≥ 3:4）的宽屏：牌高以屏高为限，整张牌不用滚动就能看全 */
@media (min-aspect-ratio: 3/4) and (min-width: 600px) {
  .d-imgbox { max-width: min(320px, calc((100vh - 230px) * 420 / 723)); max-width: min(320px, calc((100dvh - 230px) * 420 / 723)); }
  #detailBody > .d-hero .d-meta h2 { font-size: 24px; }
}
