/* ============================================================
   周易六爻 · 设计系统（宋刻本 / 线装书）
   宣纸底色、墨色正文、朱砂点色、靛青次色。
   标题华文中宋、正文 Noto Sans SC、卦辞华文楷体、印章华文隶书（全部本机字体，不引 CDN）。
   规则：一个选择器一行，声明横向写完；单位一律 rem。
   ============================================================ */
:root{--paper:#f0e9dc;--paper2:#f7f2e7;--card:#faf5ea;--ink:#16120d;--ink2:#332d23;--mut:#5e5546;--mut2:#8a8070;--rule:#c9bfa8;--rule2:#ddd5c2;--zhu:#a5351f;--zhu2:#7d2413;--lan:#223c4b;--qing:#8a7a51;--mu:#4a6a3c;--shui:#2c5f79;--tu:#9a6b2c;--disp:"STZhongsong","Songti SC","STSong",Georgia,serif;--body:"Noto Sans SC",-apple-system,"PingFang SC","Microsoft YaHei","Hiragino Sans GB",sans-serif;--cl:"STKaiti","Kaiti SC","KaiTi",serif;--seal:"STLiti","STXingkai","FangSong","STSong",serif}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:4.6rem;font-size:13px}
@media (min-width:768px){html{font-size:14px}}
@media (min-width:1300px){html{font-size:16px}}
@media (min-width:1930px){html{font-size:18px}}
/* 深色案面：纸面收成中间一条 76rem 的竖长卷，两侧露出案色，才像摊在桌上的书，而不是一张铺满屏幕的网页 */
body{margin:0;color:var(--ink);background:radial-gradient(126% 86% at 50% 6%,#3a3226,#2a241b 58%,#1d1812);font:1.15rem/1.95 var(--body);overflow-x:hidden;text-wrap:pretty}
a{color:var(--zhu);text-decoration:none}
a:hover{text-decoration:underline;text-underline-offset:.26rem}
img{max-width:100%}
.hide{display:none!important}
:focus-visible{outline:2px solid var(--zhu);outline-offset:.2rem}
/* ===== 纸面：窄屏铺满；宽到能露出两侧案面时，才把纸收成中间一竖条，并压两道极淡的卷边阴影 ===== */
.paper{position:fixed;inset:0;z-index:-2;overflow:hidden;background:linear-gradient(178deg,#f3ecdf,#ece4d4 46%,#f1eadd 78%,#e7dfcd)}
@media (min-width:1440px){.paper{top:0;bottom:0;left:50%;width:76rem;transform:translateX(-50%);box-shadow:inset 1rem 0 1.9rem -1.2rem #2b211521,inset -1rem 0 1.9rem -1.2rem #2b211521,0 0 5rem #00000066}}
@media (min-width:1680px){.paper{width:84rem}}
.paper:before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(92deg,#00000004 0 1px,transparent 1px 9px),repeating-linear-gradient(2deg,#00000003 0 1px,transparent 1px 14px)}
.paper:after{content:"";position:absolute;left:-12rem;bottom:-14rem;width:44rem;height:34rem;background:radial-gradient(closest-side,#c4b5933d,transparent 72%)}
/* ===== 顶栏：一条双细线收口；窄屏分成「书名 + 导航」两行 ===== */
.topbar{position:sticky;top:0;z-index:50;background:transparent}
.tbwrap{max-width:76rem;margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.6rem 1.4rem;padding:.9rem 1.5rem .65rem;background:#f0e9dc}
.brand{display:flex;align-items:baseline;gap:.75rem;flex:0 0 auto;white-space:nowrap}
.brand b{font-family:var(--disp);font-size:1.38rem;line-height:1.35;letter-spacing:.18rem;color:var(--ink)}
.brand span{font-family:var(--cl);font-size:1.02rem;line-height:1.35;letter-spacing:.16rem;color:var(--zhu)}
.tnav{display:flex;align-items:center;gap:.15rem;flex:0 0 auto}
.tnav a{position:relative;font-family:var(--disp);font-size:1.04rem;line-height:1.5;letter-spacing:.08rem;color:var(--ink2);padding:.28rem .55rem;white-space:nowrap;transition:color .2s}
.tnav a:after{content:"";position:absolute;left:.55rem;right:.55rem;bottom:.1rem;height:.06rem;background:var(--zhu);transform:scaleX(0);transform-origin:center;transition:transform .25s}
.tnav a:hover{color:var(--zhu);text-decoration:none}
.tnav a:hover:after{transform:scaleX(1)}
.tbline{max-width:76rem;margin:0 auto;height:.06rem;background:var(--rule)}
.tbline:after{content:"";display:block;height:.06rem;margin-top:.12rem;background:var(--rule2)}
/* ===== 首屏：一册书的扉页，居中、只留呼吸，不加框线 ===== */
.hero{position:relative;overflow:hidden;padding:4.4rem 1.5rem 2.9rem;text-align:center}
.heroin{position:relative;max-width:42rem;margin:0 auto}
/* 首屏顶上一枚卦象标：上三爻断、下三爻连，正是「地天泰」——六条一样的横杠看着像条纹码，不如真排一卦 */
.hmark{width:10.4rem;height:3.4rem;margin:0 auto 2.2rem;background:no-repeat center/100% 100% url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 104 34'><g fill='%23a5351f'><rect y='0' width='45' height='2.4'/><rect x='59' y='0' width='45' height='2.4'/><rect y='6' width='45' height='2.4'/><rect x='59' y='6' width='45' height='2.4'/><rect y='12' width='45' height='2.4'/><rect x='59' y='12' width='45' height='2.4'/><rect y='18' width='104' height='2.4'/><rect y='24' width='104' height='2.4'/><rect y='30' width='104' height='2.4'/></g></svg>")}
/* 标题只排一行：两行大字看着像口号，一行才是书名 */
.htitle{margin:0 0 1.6rem;font-family:var(--disp);font-size:4.5rem;font-weight:400;line-height:1.24;letter-spacing:.14rem;color:var(--ink);white-space:nowrap}
.htitle span{color:var(--zhu)}
.htitle span:before{content:"·";margin:0 .26rem;color:var(--rule)}
.hsub{margin:0 auto 1.9rem;max-width:28rem;font-size:1.16rem;line-height:2.02;color:var(--ink2)}
/* 小朱印夹在两道细线中间，像扉页上的一方藏书印，不是孤零零一个红点 */
.hrule{display:flex;align-items:center;justify-content:center;gap:1.15rem;margin:0 0 1.7rem}
.hrule:before,.hrule:after{content:"";flex:0 1 4.6rem;height:.07rem;background:var(--rule)}
.hrule:after{background:var(--rule2)}
.hrule em{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-family:var(--disp);font-style:normal;font-size:1.24rem;line-height:1;color:#fdf7ea;background:var(--zhu);box-shadow:inset 0 0 0 .08rem #fdf7ea2e}
.hmeta{display:flex;flex-wrap:wrap;justify-content:center;gap:.3rem .9rem;margin:0 0 2.3rem;font-family:var(--cl);font-size:1.08rem;letter-spacing:.14rem;color:var(--mut)}
.hmeta span{white-space:nowrap}
/* 词与词之间垫一枚小点，读起来才是一串，不是几个散字 */
.hmeta span+span:before{content:"";display:inline-block;width:.18rem;height:.18rem;margin:0 .75rem .18rem 0;border-radius:50%;background:var(--rule);vertical-align:middle}
.hcta{display:inline-flex;align-items:center;gap:.9rem;font-family:var(--disp);font-size:1.22rem;letter-spacing:.28rem;color:#fdf7ea;padding:.95rem 2.3rem .95rem 2.6rem;background:var(--zhu);box-shadow:inset 0 0 0 1px #ffffff26,0 0 0 .28rem #f0e9dc,0 0 0 .34rem #c9bfa899,0 .55rem 1.5rem #a5351f26;transition:background-color .22s,transform .22s,box-shadow .22s}
.hcta:after{content:"→";font-family:var(--body);letter-spacing:0;font-size:1.1rem;transition:transform .22s}
.hcta:hover{background:var(--zhu2);text-decoration:none;transform:translateY(-.1rem);box-shadow:inset 0 0 0 1px #ffffff26,0 0 0 .28rem #f0e9dc,0 0 0 .34rem #c9bfa8cc,0 .8rem 1.8rem #a5351f33}
.hcta:hover:after{transform:translateX(.25rem)}
.hnote{position:relative;max-width:32rem;margin:2rem auto 0;font-size:1.02rem;line-height:1.9;color:var(--mut2)}
/* 段落共通：正文各段统一用同一个版心宽度，左边的页边才不会一段一跳；
   只有六十四卦图鉴是整版密铺，单独放宽 */
.sec{position:relative;margin:0 auto;padding:4.2rem 1.5rem;max-width:48rem}
/* 段与段之间点一枚空心小方当分界，比拉一条通栏横线斯文 */
.sec+.sec:before{content:"";position:absolute;top:0;left:50%;width:.38rem;height:.38rem;border:.06rem solid var(--rule);background:var(--paper);transform:translate(-50%,-50%) rotate(45deg)}
.s-atlas{max-width:76rem}
/* 段首书眉：左边一枚卷次，一条细线一路拉到右端，像书页上方的眉线 */
.shead{margin-bottom:2.4rem}
.sline{display:flex;align-items:center;gap:.9rem;margin:0 0 1.05rem}
.sline em{order:-1;font-family:var(--cl);font-style:normal;font-size:1.06rem;line-height:1;letter-spacing:.24rem;color:var(--zhu);white-space:nowrap}
.sline i{flex:1;height:.06rem;background:var(--rule)}
.shd{margin:0 0 .7rem;font-family:var(--disp);font-size:2rem;font-weight:400;line-height:1.32;letter-spacing:.12rem;color:var(--ink)}
.snote{margin:0;max-width:38rem;font-family:var(--cl);font-size:1.16rem;line-height:1.95;color:var(--ink2)}
/* ===== 爻线组件：阴爻是一段线中间断开，纯 CSS 画，不碰任何卦符字体 =====
   爻与爻之间的空当要比线本身宽，爻才立得起来；挤在一起就成了一张条纹码 */
.yaodeco{display:flex;flex-direction:column;gap:.3rem;width:2.6rem;color:var(--ink)}
.yaodeco i{height:.18rem;border-radius:.03rem;background:currentColor}
.yaodeco i.t{background:linear-gradient(90deg,currentColor 0 40%,transparent 40% 60%,currentColor 60% 100%)}
.yaodeco.mini{gap:.28rem;width:2.7rem}
.yaodeco.mini i{height:.17rem;border-radius:.03rem}
/* 整幅卦象：爻要细、要长，六道细条叠起来才像一卦；粗条只会像一摞砖 */
.yaodeco.big{gap:.52rem;width:8.8rem}
.yaodeco.big i{height:.34rem;border-radius:.04rem}
/* ===== 一 · 起卦台：一竖条卦台，台面在上、表单在下 ===== */
.castwrap{display:flex;flex-direction:column;align-items:center;gap:2.8rem}
.cast-stage,.cast-form{width:100%;min-width:0;max-width:26rem}
.cast-stage{position:relative;padding:1.45rem 1.2rem;border:.06rem solid var(--rule2);background:linear-gradient(#ffffff3d,#ffffff10)}
/* 版框里再套一道更细的线，这块地方才像个刻出来的边栏，不是网页上的白卡片 */
.cast-stage:before{content:"";position:absolute;inset:.28rem;border:.06rem solid #c9bfa83d;pointer-events:none}
.stagehd{display:flex;flex-direction:column;align-items:flex-start;gap:.28rem;margin-bottom:1.35rem}
.stagehd span{font-family:var(--disp);font-size:1.18rem;letter-spacing:.16rem;color:var(--ink)}
.stagehd i{font-family:var(--cl);font-style:normal;font-size:1rem;line-height:1.7;color:var(--mut2)}
.linestage{display:flex;flex-direction:column;justify-content:center;gap:.86rem;min-height:13.4rem}
.yrow{display:flex;align-items:center;gap:.8rem;padding:.2rem 0}
.yrow .yp{flex:0 0 1.6rem;font-family:var(--cl);font-size:1.02rem;color:var(--mut2);text-align:right}
/* 爻线要细长：粗到 15px 就成了一根黑条，读不出「爻」的意思。
   阴爻中间那道口子按比例留，线越宽口子越大，才不会被看成一根带缺口的实线 */
.yrow .yb{flex:1;display:flex;gap:14%;height:.76rem}
.yrow .yb i{flex:1;background:currentColor;border-radius:.03rem;color:var(--ink2);transition:color .3s}
.yrow .yv{flex:0 0 5.2rem;font-size:1rem;color:var(--mut2);text-align:left}
.yrow.dong .yb i{color:var(--zhu)}
.yrow.dong .yp,.yrow.dong .yv{color:var(--zhu)}
/* 还没摇的那一爻：一条极细的点线当预留格，比虚线块干净，也不会被错看成阳爻 */
.yrow.empty .yb{height:.76rem;background:repeating-linear-gradient(90deg,#d5cbb4 0 .42rem,transparent .42rem .82rem) center/100% .09rem no-repeat;border-radius:.03rem}
.yrow.empty .yb i{display:none}
.yrow.empty .yp{opacity:.8}
.yrow.empty .yv{color:var(--mut2);opacity:.85}
.yrow.pop{animation:ypop .45s ease}
@keyframes ypop{from{opacity:0;transform:translateY(-.45rem)}to{opacity:1;transform:none}}
/* 摇了几爻：一行字，下面一条细进度线，不跟文字抢位置 */
.castprog{display:flex;flex-direction:column;gap:.5rem;margin:1.5rem 0 .1rem;font-size:1.02rem;color:var(--mut)}
.pg{height:.14rem;background:var(--rule2);overflow:hidden}
.pg i{display:block;height:100%;width:0;background:var(--zhu);transition:width .35s}
.lhint2{margin:1.1rem 0 0;text-align:center;font-family:var(--cl);font-size:1.06rem;color:var(--mut2);line-height:1.85}
.field{margin-bottom:2rem}
.flab{display:flex;align-items:center;gap:.62rem;margin:0 0 .85rem;font-family:var(--disp);font-size:1.22rem;letter-spacing:.08rem;color:var(--ink)}
.flab i{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-family:var(--cl);font-style:normal;font-size:.94rem;color:var(--zhu);border:.06rem solid var(--zhu);border-radius:50%}
.fnote{margin:.75rem 0 0;font-size:1.04rem;color:var(--mut);line-height:1.9}
/* 六个方向排成三列小格，选中的那格整块填朱砂，比一条下划线醒目 */
.tchips{display:grid;grid-template-columns:repeat(3,1fr);border-top:.06rem solid var(--rule2);border-left:.06rem solid var(--rule2)}
.tchip{font-family:var(--disp);font-size:1.14rem;letter-spacing:.1rem;color:var(--ink2);padding:.62rem .2rem;border:0;border-right:.06rem solid var(--rule2);border-bottom:.06rem solid var(--rule2);background:transparent;cursor:pointer;transition:color .2s,background-color .2s}
.tchip:hover{color:var(--zhu)}
.tchip.on{color:#fdf7ea;background:var(--zhu)}
.tchip.on:hover{color:#fdf7ea}
/* 预设问题竖着列，每条前面一道短横，像书里的示例小目 */
.qchips{display:flex;flex-direction:column;margin-top:.7rem}
.qchip{position:relative;text-align:left;font-family:var(--body);font-size:1.04rem;line-height:1.7;color:var(--lan);padding:.5rem .1rem .5rem 1.15rem;border:0;border-bottom:.06rem dashed var(--rule2);background:transparent;cursor:pointer;transition:color .2s}
.qchip:before{content:"";position:absolute;left:0;top:1.15rem;width:.55rem;height:.06rem;background:var(--rule)}
.qchip:hover{color:var(--zhu)}
/* 输入框：一道下边线太容易跟正文混在一起，给一层淡淡的纸色底，一眼看得出能往里写字 */
#qtext{width:100%;margin-bottom:.8rem;padding:.62rem .8rem;font-family:var(--body);font-size:1.18rem;line-height:1.7;color:var(--ink);border:.06rem solid var(--rule2);border-bottom-color:var(--rule);background:#fffdf72e;outline:none;transition:border-color .2s,background-color .2s}
#qtext::placeholder{color:#a49a8a}
#qtext:focus{border-color:#d6c9ae;border-bottom-color:var(--zhu);background:#fffdf766}
/* ===== 铜钱：字/背的刻面写在钱的正下方，深墨楷体，隔着屏幕也看得清 ===== */
.coins{display:flex;justify-content:center;gap:1.5rem;margin-bottom:.6rem;padding-bottom:2.2rem}
.coin{position:relative;width:5rem;height:5rem;border-radius:50%;background:radial-gradient(circle at 32% 22%,#f0e0b4,#d4b878 38%,#b1944f 72%,#7f6a2c);box-shadow:inset 0 .16rem .14rem #fffdf2a6,inset 0 -.18rem .38rem #3d311352,inset 0 0 0 .1rem #8d7433,0 .38rem .95rem #2a201033}
/* 钱肉上再刻一道细圈，才有铸造物的厚度感，不然就是个金色圆片 */
.coin:before{content:"";position:absolute;inset:.42rem;border-radius:50%;border:.05rem solid #6f5a2a47;box-shadow:inset 0 0 .28rem #fff8dc2e}
.coin i{position:absolute;inset:30%;border-radius:.1rem;background:var(--paper);box-shadow:inset 0 .16rem .22rem #1d160673,inset 0 -.1rem .14rem #fffef08c,0 0 0 .09rem #6d5826}
.coin b{position:absolute;top:calc(100% + .52rem);left:-.5rem;right:-.5rem;text-align:center;font-family:var(--cl);font-size:1.14rem;font-weight:400;line-height:1;color:var(--ink);opacity:0;transition:opacity .3s}
/* 钱文四字围着方孔排一圈，只有「字」面才有——背面本来就是光的，这正是字与背的分别。
   没摇之前先把三枚币当字面摆着，钱才像钱；摇出背面时钱文隐掉。 */
.coin s{position:absolute;font-family:var(--disp);font-size:.84rem;line-height:1;color:#54401a;text-decoration:none;opacity:.82;transition:opacity .3s}
.coin.bei s{opacity:0}
.coin.zi s{opacity:1}
.coin s:nth-of-type(1){top:.3rem;left:50%;transform:translateX(-50%)}
.coin s:nth-of-type(2){right:.28rem;top:50%;transform:translateY(-50%)}
.coin s:nth-of-type(3){bottom:.3rem;left:50%;transform:translateX(-50%)}
.coin s:nth-of-type(4){left:.28rem;top:50%;transform:translateY(-50%)}
.coin.zi{background:radial-gradient(circle at 32% 22%,#f8efd0,#e0ca95 38%,#bb9e57 72%,#8a7433)}
.coin.show b{opacity:1}
.coin.shake:nth-child(1){animation:coinflip .72s cubic-bezier(.4,.1,.3,1)}
.coin.shake:nth-child(2){animation:coinflip .72s cubic-bezier(.4,.1,.3,1) .09s}
.coin.shake:nth-child(3){animation:coinflip .72s cubic-bezier(.4,.1,.3,1) .18s}
@keyframes coinflip{0%{transform:translateY(0) rotateY(0)}25%{transform:translateY(-1.6rem) rotateY(180deg)}50%{transform:translateY(-.6rem) rotateY(360deg)}75%{transform:translateY(-1.2rem) rotateY(540deg)}100%{transform:translateY(0) rotateY(720deg)}}
/* 短段落让它自己把每行排匀，末行不会只剩一两个字；段首说明这类句子不参与，免得从词中间断开 */
.coinhint,.fnote,.hsub,.hnote,.lhint2,.aline,.ghint{text-wrap:balance}
.coinhint{margin:0 0 1.1rem;font-size:1.02rem;color:var(--mut);line-height:1.9}
.coinres{min-height:1.8rem;margin:0 0 1.2rem;font-size:1.14rem;color:var(--ink2);line-height:1.85}
.coinres b{font-family:var(--disp);font-size:1.3rem;color:var(--zhu)}
.castrow{display:flex;flex-wrap:wrap;gap:.8rem;justify-content:center}
.btn{font-family:var(--disp);font-size:1.16rem;letter-spacing:.16rem;color:var(--ink);padding:.66rem 1.6rem;border:.06rem solid var(--rule);background:transparent;cursor:pointer;transition:border-color .2s,color .2s,background-color .2s}
.btn:hover{border-color:var(--zhu);color:var(--zhu)}
.btn.main{color:#fdf7ea;background:var(--zhu);border-color:var(--zhu);box-shadow:inset 0 0 0 1px #ffffff26}
.btn.main:hover{background:var(--zhu2);color:#fdf7ea}
.btn.main:disabled{background:transparent;color:var(--mut2);box-shadow:inset 0 0 0 .06rem var(--rule);cursor:not-allowed}
.btn.ghost{color:var(--mut);border-color:var(--rule2)}
.btn.ghost:hover{color:var(--zhu);border-color:var(--zhu)}
.btn.wide{width:100%;margin-top:1rem}
/* ===== 二 · 卦象台：大字留白 ===== */
.guabox{min-height:5rem}
/* 还没解卦时这里是一扇空的版框：上下两道细线兜住，比一段字浮在半空里有依托 */
.ghint{margin:0;padding:3.4rem 1rem;text-align:center;font-family:var(--cl);font-size:1.14rem;color:var(--mut);line-height:2;border-top:.06rem solid var(--rule2);border-bottom:.06rem solid var(--rule2)}
.iqbox{margin:0 0 2.2rem;padding:0 0 1rem;border-bottom:.06rem solid var(--rule2);font-size:1.04rem;color:var(--mut);line-height:1.9;text-align:center}
.iqbox b{font-family:var(--cl);font-weight:400;color:var(--zhu)}
.guahead{display:flex;flex-direction:column;align-items:center;gap:1.3rem;margin-bottom:2rem;text-align:center}
.gname{display:flex;align-items:baseline;justify-content:center;gap:.9rem;font-family:var(--disp);font-size:3rem;line-height:1.2;letter-spacing:.16rem;color:var(--ink)}
.gname .jd{font-size:1.16rem;letter-spacing:.1rem;padding:.1rem .5rem;border:.06rem solid currentColor;border-radius:.04rem}
.gmeta{margin-top:.7rem;font-size:1.02rem;color:var(--mut);line-height:1.95}
.gmeta b{font-family:var(--cl);font-weight:400;font-size:1.1rem;color:var(--lan)}
.gduanw{margin:0 auto 2.4rem;max-width:30rem;text-align:center}
.gduanw .lb{display:flex;align-items:center;gap:.9rem;font-family:var(--cl);font-size:1rem;letter-spacing:.3rem;color:var(--zhu)}
.gduanw .lb:before,.gduanw .lb:after{content:"";flex:1;height:.06rem;background:var(--rule2)}
.gduanw .lb:before{background:linear-gradient(90deg,transparent,var(--rule2))}
.gduanw .lb:after{background:linear-gradient(90deg,var(--rule2),transparent)}
.gduanw p{margin:.85rem 0 0;font-family:var(--cl);font-size:1.62rem;line-height:1.72;color:var(--ink)}
/* 本卦、变卦做成一张双栏对照表：上下各一道发丝线，中间一道竖线分开，像书里的对照页 */
.twocol{display:flex;align-items:stretch;justify-content:center;flex-wrap:wrap;gap:0;max-width:36rem;margin:0 auto 2.2rem;border-top:.06rem solid var(--rule2);border-bottom:.06rem solid var(--rule2)}
.gcol{flex:1 1 14rem;max-width:20rem;min-width:0;padding:1.4rem .6rem 1.2rem;text-align:center}
@media (min-width:768px){.gcol+.gcol{border-left:.06rem solid var(--rule2)}}
.gcol h4{margin:0 0 1.2rem;font-family:var(--disp);font-size:1.24rem;font-weight:400;line-height:1.4;letter-spacing:.14rem;color:var(--ink)}
.gcol h4 em{display:block;margin-top:.4rem;font-family:var(--cl);font-style:normal;font-size:1rem;letter-spacing:.04rem;color:var(--mut2)}
.gcol.b h4{color:var(--lan)}
/* 六爻之间留的空当要比线本身宽，爻才一道是一道；空当和线一样宽，看上去就是一摞条纹 */
.bigyao{display:flex;flex-direction:column;gap:1rem;max-width:13.4rem;margin:0 auto;padding:.2rem 0}
/* 详解页里的爻线别拉满整版，收成七寸宽的一段，看着才像卦象而不是黑条 */
.iblock .bigyao{max-width:20rem}
.bigyao .yrow{padding:0}
.bigyao .yb{height:.72rem}
.bigyao .yp{flex:0 0 1.7rem;font-size:1.06rem}
.bhint{margin:1.1rem 0 0;font-family:var(--cl);font-size:1.08rem;color:var(--mut);line-height:1.85}
/* 六爻全静时没有变卦：右栏照样摆出六爻，只是颜色压淡，并注明「本卦即定」。
   空着一整栏会让人以为没算出来，压淡一点才看得出「没有翻动」这层意思。 */
.bigyao.still .yb i{color:var(--mut2)}
.irule{margin:0 0 2rem;padding:1.1rem 0 1.1rem 1.3rem;border-left:.18rem solid var(--lan);font-size:1.08rem;color:var(--ink2);line-height:2}
.irule b{font-family:var(--cl);font-weight:400;font-size:1.14rem;color:var(--lan)}
.irule.iqbox{border-left:0;padding-left:0}
.iblock{margin-bottom:2rem}
.iblock h5{display:flex;align-items:center;gap:.75rem;margin:0 0 .9rem;font-family:var(--disp);font-size:1.3rem;font-weight:400;line-height:1.4;letter-spacing:.1rem;color:var(--ink)}
.iblock h5:before{content:"";width:.46rem;height:.46rem;background:var(--zhu);transform:rotate(45deg)}
.ilead{margin:0 0 1.1rem;font-family:var(--cl);font-size:1.1rem;line-height:1.95;color:var(--ink2)}
.ilines{display:flex;flex-direction:column}
.iline{display:flex;align-items:flex-start;gap:1.1rem;padding:.88rem .2rem;border-bottom:.06rem solid var(--rule2);font-size:1.08rem;line-height:2;color:var(--ink2)}
.iline:first-child{border-top:.06rem solid var(--rule2)}
.iline .ip{flex:0 0 5.6rem;white-space:nowrap;font-family:var(--cl);font-size:1.08rem;line-height:2;color:var(--mut2)}
.iline.dong{background:linear-gradient(90deg,#a5351f09,transparent 64%)}
.iline.dong .ip{color:var(--zhu)}
.ibody{display:flex;flex-wrap:wrap;align-items:center;gap:.8rem 1.8rem;padding:1.15rem 0;margin-bottom:2rem;border-top:.06rem solid var(--rule2);border-bottom:.06rem solid var(--rule2);font-size:1.08rem;line-height:2;color:var(--ink2)}
.iyong{display:flex;align-items:center;gap:.5rem}
.iyong b{font-family:var(--disp);font-size:1.18rem;font-weight:400;color:var(--ink)}
.wx{font-family:var(--cl);font-size:1.06rem}
.wx.jin{color:var(--qing)}
.wx.mu{color:var(--mu)}
.wx.shui{color:var(--shui)}
.wx.huo{color:var(--zhu)}
.wx.tu{color:var(--tu)}
.iadvice{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.8rem}
.iadvice li{display:flex;gap:.85rem;font-size:1.08rem;line-height:2;color:var(--ink2)}
.iadvice li:before{content:"—";flex:0 0 auto;font-family:var(--cl);color:var(--zhu)}
.jd{font-family:var(--cl);font-size:1rem;letter-spacing:.06rem}
.jd5{color:#8f2a18}
.jd4{color:#45643a}
.jd3{color:#2c5f79}
.jd2{color:#6a6152}
.jd1{color:#241f1a;font-weight:500}
/* ===== 三 · 六十四卦图鉴：整版密铺成一张表，格线细到像纸上的印痕 ===== */
.aleg{margin:0 0 1.8rem;font-size:1.04rem;color:var(--mut);line-height:1.9}
.aleg .mark{color:var(--zhu)}
.aleg a{text-decoration:underline;text-decoration-color:var(--rule);text-underline-offset:.24rem}
/* 列数取 2 / 4 / 8，都是 64 的约数——八八六十四，最后一行正好填满，表不能缺口 */
.agrid{display:grid;grid-template-columns:repeat(2,1fr);border-top:.06rem solid var(--rule2);border-left:.06rem solid var(--rule2)}
@media (min-width:640px){.agrid{grid-template-columns:repeat(4,1fr)}}
@media (min-width:1280px){.agrid{grid-template-columns:repeat(8,1fr)}}
.acell{position:relative;display:flex;flex-direction:column;align-items:center;gap:.4rem;padding:1.05rem .35rem .95rem;border:0;border-right:.06rem solid var(--rule2);border-bottom:.06rem solid var(--rule2);background:transparent;color:var(--ink);font-family:var(--body);text-align:center;cursor:pointer;transition:background-color .2s}
button.acell{width:100%;appearance:none}
.acell:not(.soon):hover{background:#a5351f0a;text-decoration:none}
.acell .ano{position:absolute;top:.42rem;left:.5rem;font-family:var(--cl);font-size:.86rem;line-height:1;color:var(--mut2);opacity:.8}
.acell b{order:-2;font-family:var(--disp);font-size:1.2rem;font-weight:400;line-height:1.35;letter-spacing:.04rem}
.acell .yaodeco{order:-1;margin:.1rem 0 .05rem}
.acell:not(.soon):hover b,.acell:not(.soon):hover .yaodeco{color:var(--zhu)}
.acell em{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:1.45em;font-style:normal;font-size:.88rem;line-height:1.45;color:var(--mut)}
.acell .jd{font-size:.92rem;line-height:1.55;padding:0 .38rem;border:.06rem solid var(--rule);border-radius:.04rem}
.acell .mark{position:absolute;top:.4rem;right:.5rem;font-size:.8rem;color:var(--zhu)}
/* 小屏的铜钱也一样要刻字：只缩字号，别把字藏掉，光头金币看着像按钮。
   四个字要落在「外边到方孔」这一圈里，所以往里收一点，贴着币边就会被圆弧切掉半个字 */
@media (max-width:479px){.coin s{font-size:.74rem}.coin s:nth-of-type(1){top:.34rem}.coin s:nth-of-type(2){right:.32rem}.coin s:nth-of-type(3){bottom:.34rem}.coin s:nth-of-type(4){left:.32rem}}
@media (max-width:599px){.acell em{display:none}.acell{gap:.36rem;padding:.95rem .45rem .85rem}.acell b{font-size:1.16rem}}
/* ===== 四 · 术语：左词右解，像古籍的注 ===== */
.terms{display:flex;flex-direction:column;border-top:.06rem solid var(--rule2)}
.term{display:flex;gap:1.6rem;padding:1.15rem .2rem;border-bottom:.06rem solid var(--rule2)}
.term b{flex:0 0 8.2rem;font-family:var(--disp);font-size:1.2rem;font-weight:400;line-height:1.7;letter-spacing:.06rem;color:var(--ink)}
.term p{flex:1;min-width:0;margin:0;font-size:1.06rem;line-height:2;color:var(--ink2)}
/* ===== 五 · 摇卦记录：清单式 ===== */
.hist{display:flex;flex-direction:column;min-height:2.4rem;margin-bottom:1.5rem}
.hrow{display:flex;align-items:baseline;gap:.8rem;width:100%;padding:.95rem .2rem;border:0;border-bottom:.06rem solid var(--rule2);background:transparent;font-family:var(--body);font-size:1.04rem;color:var(--ink2);text-align:left;cursor:pointer;transition:background-color .2s}
.hrow:first-child{border-top:.06rem solid var(--rule2)}
.hrow:hover{background:#a5351f0a}
.hrow .hn{flex:0 0 auto;font-family:var(--disp);font-size:1.16rem;letter-spacing:.04rem;color:var(--ink)}
.hrow .hq{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--mut)}
.hrow .ht{flex:0 0 auto;font-size:.98rem;color:var(--mut2)}
.hempty{padding:2.2rem 0;text-align:center;font-family:var(--cl);font-size:1.1rem;color:var(--mut)}
.hempty:before,.hempty:after{content:"";display:inline-block;vertical-align:middle;width:2.4rem;height:.06rem;background:var(--rule);margin:0 1.1rem}
.histbtns{display:flex;flex-wrap:wrap;gap:.8rem}
/* ===== 六 · 问答：一问一答 ===== */
.faq{display:flex;flex-direction:column}
.fq{padding:1.35rem 0;border-bottom:.06rem solid var(--rule2)}
.fq:first-child{border-top:.06rem solid var(--rule2)}
.fq h3{display:flex;gap:.72rem;margin:0 0 .7rem;font-family:var(--disp);font-size:1.32rem;font-weight:400;line-height:1.7;letter-spacing:.04rem;color:var(--ink)}
.fq h3:before{content:"问";flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:1.55rem;height:1.55rem;margin-top:.2rem;border:.06rem solid var(--zhu);border-radius:50%;font-family:var(--cl);font-size:1rem;line-height:1;color:var(--zhu)}
.fq p{position:relative;margin:0;padding-left:2.3rem;font-size:1.06rem;line-height:2.05;color:var(--ink2)}
.fq p:before{content:"答";position:absolute;left:0;top:.18rem;display:flex;align-items:center;justify-content:center;width:1.55rem;height:1.55rem;border:.06rem solid var(--lan);border-radius:50%;font-family:var(--cl);font-size:1rem;line-height:1;color:var(--lan);opacity:.8}
/* ===== 页脚 ===== */
.foot{max-width:76rem;margin:3.6rem auto 0;border-top:.06rem solid var(--rule)}
.footwrap{position:relative;max-width:76rem;margin:0 auto;padding:2.8rem 1.5rem 3rem}
.fsig{display:flex;align-items:baseline;gap:.8rem;margin-bottom:1.4rem}
.fsig b{font-family:var(--disp);font-size:1.42rem;letter-spacing:.18rem;color:var(--ink)}
.fsig span{font-family:var(--cl);font-size:1.04rem;letter-spacing:.14rem;color:var(--zhu)}
.fnav{display:flex;flex-wrap:wrap;gap:.5rem 1.6rem;margin-bottom:1rem;font-size:1.04rem}
.fnav a{color:var(--ink2)}
.fnav2 span{color:var(--mut2)}
.fdis{max-width:50rem;margin:.9rem 0 1.1rem;padding-left:1.1rem;border-left:.14rem solid var(--rule);font-size:1rem;line-height:2;color:var(--mut)}
.fcopy{margin:0;font-size:.98rem;color:var(--mut2)}
.fseal{position:absolute;right:1.5rem;top:2.7rem;display:flex;align-items:center;justify-content:center;width:3.4rem;height:3.4rem;font-family:var(--seal);font-size:1.7rem;color:var(--zhu);border:.14rem solid var(--zhu);transform:rotate(-3deg);opacity:.9}
@media (max-width:639px){.fseal{display:none}}
/* ===== 图鉴弹窗 ===== */
.modal{position:fixed;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;padding:1.2rem;background:#16120d5c;backdrop-filter:blur(.3rem)}
.mbox{position:relative;width:min(34rem,100%);max-height:88vh;overflow:auto;padding:2.2rem 1.9rem 1.9rem;background:var(--card);border-top:.12rem solid var(--zhu);box-shadow:0 1.6rem 4rem #16120d3d;animation:mup .26s ease}
/* 弹窗里也套一道细边，跟起卦台那块版框是一套做法 */
.mbox:before{content:"";position:absolute;inset:.36rem;border:.06rem solid #c9bfa840;pointer-events:none}
@keyframes mup{from{opacity:0;transform:translateY(.8rem)}to{opacity:1;transform:none}}
.mclose{position:absolute;top:.85rem;right:.9rem;width:2rem;height:2rem;border:.06rem solid var(--rule);background:transparent;color:var(--mut);font-size:1.06rem;line-height:1;cursor:pointer}
.mclose:hover{border-color:var(--zhu);color:var(--zhu)}
.mmhead{display:flex;align-items:center;gap:1.2rem;flex-wrap:wrap;margin:0 0 1.4rem;padding-bottom:1rem;border-bottom:.06rem solid var(--rule2)}
.mmhead .yaodeco{gap:.42rem;width:4.4rem}
.mmhead .yaodeco i{height:.36rem;border-radius:.06rem}
.mmhead .gname{font-size:1.76rem;letter-spacing:.1rem}
.mmhead .gmeta{margin:.35rem 0 0;font-size:1rem}
.mmduan{margin:0 0 1.3rem;padding:.2rem 0 .2rem 1.15rem;border-left:.18rem solid var(--zhu);font-family:var(--cl);font-size:1.34rem;line-height:1.8;color:var(--ink)}
.mmrow{display:flex;flex-wrap:wrap;gap:.5rem 1.4rem;margin-bottom:1.1rem;font-size:1.04rem;color:var(--ink2)}
.mmcot{margin:0 0 .95rem;font-size:1.06rem;line-height:2;color:var(--ink2)}
.mmcot b{font-weight:400;font-family:var(--cl);font-size:1.1rem;color:var(--lan)}
.chip{font-size:1rem;color:var(--lan);border-bottom:.06rem solid var(--rule2)}
.mmlink{display:inline-block;margin-top:.8rem;font-family:var(--disp);font-size:1.08rem;letter-spacing:.08rem;color:var(--zhu)}
/* ===== 卦详解页（gua-*.html） ===== */
.panel{max-width:56rem;margin:0 auto;padding:2.6rem 1.5rem}
.ptitle{display:flex;align-items:baseline;flex-wrap:wrap;gap:.9rem;padding-bottom:.85rem;margin-bottom:1.8rem;border-bottom:.06rem solid var(--rule2)}
.ptitle h2{margin:0;font-family:var(--disp);font-size:1.9rem;font-weight:400;line-height:1.42;letter-spacing:.12rem;color:var(--ink)}
.ptitle p{margin:0;font-size:1.04rem;color:var(--mut);line-height:1.9}
.crumb{margin:0 0 1.6rem;font-size:1.04rem;color:var(--mut)}
.crumb a{color:var(--zhu)}
.crumb i{margin:0 .5rem;font-style:normal;color:var(--rule)}
.vstage{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2.6rem;padding:1rem 0 2.2rem;margin-bottom:2rem;border-bottom:.06rem solid var(--rule2)}
.vname{writing-mode:vertical-rl;white-space:nowrap;font-family:var(--disp);font-size:3.1rem;line-height:1.1;letter-spacing:.46rem;color:var(--ink);padding:.4rem 0;margin:0;font-weight:400}
.vstage .yaodeco{gap:.44rem;width:4.6rem}
.vstage .yaodeco i{height:.38rem;border-radius:.06rem}
.sealv{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.2rem;width:3.1rem;height:7rem;background:linear-gradient(180deg,var(--zhu),var(--zhu2));box-shadow:inset 0 0 0 .09rem #fdf6ec4a}
.sealv span{writing-mode:vertical-rl;white-space:nowrap;font-family:var(--seal);font-size:1.24rem;letter-spacing:.14rem;color:#fdf6ec}
.sealv em{font-family:var(--seal);font-style:normal;font-size:.96rem;color:#f2d4c6}
/* ===== 轻提示 ===== */
.toast{position:fixed;left:50%;bottom:2.2rem;z-index:90;padding:.72rem 1.35rem;background:#16120df0;color:#fdf8ec;font-size:1.04rem;transform:translate(-50%,1rem);opacity:0;pointer-events:none;transition:opacity .28s,transform .28s}
.toast.on{opacity:1;transform:translate(-50%,0)}
/* ===== 宽屏：台面和表单撑满版心，左边缘跟段首对齐 ===== */
@media (min-width:900px){
  .cast-stage,.cast-form{max-width:none}
  .cast-stage{padding:1.7rem 1.5rem}
}
/* 六爻分值这样一串数字，绝不能在中间断行 */
.yseq{white-space:nowrap;font-family:var(--body);letter-spacing:.06rem}
/* ===== 窄屏：顶栏拆两行，字号与留白收一收 ===== */
@media (max-width:639px){.tbwrap{flex-direction:column;align-items:stretch;gap:.5rem;padding:.7rem .9rem .55rem}.brand{justify-content:flex-start}.tnav{justify-content:space-between;width:100%;gap:0}.tnav a{font-size:.98rem;padding:.2rem .1rem}.hero{padding:2.9rem 1.1rem 2.1rem}.hmark{width:8.4rem;height:2.75rem;margin-bottom:1.9rem}.htitle{font-size:3.4rem}.hsub{font-size:1.12rem;line-height:1.95}.hmeta{margin-bottom:2rem;font-size:1rem}.hcta{padding:.82rem 1.9rem .82rem 2.1rem;font-size:1.12rem}.hnote{font-size:.98rem}.sec{padding:3.1rem 1.1rem}.shd{font-size:1.76rem}.snote{font-size:1.08rem}.gname{font-size:2.4rem}.term{flex-direction:column;gap:.4rem}.term b{flex:none}.coin{width:4.4rem;height:4.4rem}.coin b{font-size:1.08rem}.coins{gap:1rem}.iline{gap:.9rem;padding:.8rem .2rem}.fq h3{font-size:1.18rem}}
@media (max-width:400px){.tbwrap{padding:.55rem .8rem .45rem;gap:.42rem}.brand b{font-size:1.16rem}.brand span{font-size:.94rem}.tnav a{font-size:.9rem;letter-spacing:0}.hero{padding:2.3rem .9rem 1.7rem}.htitle{font-size:2.6rem}.hmark{width:7.4rem;height:2.42rem;margin-bottom:1.6rem}.sec{padding:2.6rem .9rem}.shd{font-size:1.62rem}.gname{font-size:2.15rem}.coin{width:4rem;height:4rem}}
/* ===== 继续看：详情页底部的横向内链，保证任何一页都还能继续走下去 ===== */
.xref{max-width:56rem;margin:3rem auto 0;padding:1.8rem 1.5rem 0;border-top:.06rem solid var(--rule2)}
.xref .xt{margin:0 0 .9rem;font-family:var(--disp);font-size:.92rem;letter-spacing:.3rem;color:var(--zhu)}
.xref ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:0;padding:0;list-style:none;background:var(--paper2);border:.06rem solid var(--rule2)}
.xref li{display:flex;min-width:0;align-items:baseline;justify-content:space-between;gap:.8rem;padding:.78rem .95rem;background:var(--paper2);border-bottom:1px solid var(--rule2);}
.xref li a{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-family:var(--disp);font-size:1.06rem;color:var(--ink);border-bottom:1px solid transparent;transition:color .2s,border-color .2s}
.xref li a:hover{color:var(--zhu);border-bottom-color:var(--zhu)}
.xref li span{flex:none;max-width:46%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:.92rem;color:var(--mut2)}
.xref .xb{display:flex;gap:1.4rem;margin:1rem 0 0;font-size:.98rem}
.xref .xb a{color:var(--zhu)}
@media (max-width:639px){.xref ul{grid-template-columns:1fr}}
/* 还没解锁的卦：底色仍与整张表一致，只把字和卦符调淡，不然整格发暗像坏掉 */
.acell.soon{cursor:default}
.acell.soon b,.acell.soon em,.acell.soon .yaodeco,.acell.soon .jd{opacity:.3}
