/* 0.5: compact coin records and a single, opening three-hexagram stage. */
.method-body:has(#coin-mode:not([hidden])){height:auto;overflow:visible;padding:0;scrollbar-gutter:auto}
.coin-source{margin:0 0 7px!important}.coin-source button{min-height:44px}
.coin-progress-caption{margin:0 0 6px!important;font-size:10px;line-height:1.5}
.coin-rounds{gap:4px}.coin-round{display:grid;grid-template-columns:45px minmax(0,1fr) 52px 38px;align-items:center;gap:5px;padding:3px 5px;min-height:34px;border-radius:5px;margin:0;background:#faf8ef;line-height:1.25}
.round-position b,.round-position small{display:block;font-size:10px;font-weight:400}.round-position small{font-size:9px;color:var(--muted)}.round-faces{font-size:9px;white-space:nowrap;color:var(--muted)}.round-value{font-size:11px;text-align:center}.round-value b{font-weight:500}.round-value small{display:block;font-size:8px;color:var(--muted)}.coin-round .round-symbol{font-size:14px;letter-spacing:-1px;text-align:center}.coin-round.pending{opacity:.65}.coin-round.current{background:#f7efdd;border-color:#ba9b70}.coin-round .round-symbol.moving{outline-offset:1px}
.coin-round:has(select){grid-template-columns:45px minmax(0,1fr) 40px;padding:0 5px;min-height:46px}.coin-round select{font-size:12px;padding:5px 3px;min-height:44px;height:44px;margin:0;border:0;background:transparent;border-radius:3px}
.coin-controls{position:static;margin:8px 0 0;padding:0;display:flex;gap:6px;border:0}.coin-controls .primary{font-size:12px;min-height:44px;flex:1}.coin-controls .quiet{width:auto;flex:0 0 55px;min-height:44px;padding:4px;font-size:11px}.coin-rule{margin:5px 0 0;padding:0;border:0}.coin-rule summary{font-size:10px;min-height:32px;padding:4px 0}.coin-rule .hint{font-size:10px;margin:2px 0 6px}
.number-calculation{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 16px}
.calc-card{padding:10px 11px;min-height:110px;background:#faf7ec;border:1px solid #ded7c6;border-radius:7px;min-width:0;transition:background .18s,box-shadow .18s}.calc-card.stage-active{background:#f2e8c9;box-shadow:0 0 0 2px #b8a16c66}.calc-label{font-size:10px;color:#88775a;display:block;margin-bottom:5px}.calc-equation{font-size:13px;white-space:nowrap;line-height:1.7}.calc-equation>b{font-weight:500;color:var(--ink)}.calc-equation>small{display:block;font-size:9px;color:#9e6547;line-height:1.4}.calc-remainder{font-size:11px;display:flex;align-items:center;gap:4px;margin-top:7px;flex-wrap:wrap}.calc-remainder strong{font:21px 'Songti SC',serif}.calc-remainder>span{font-size:10px;color:var(--muted)}.calc-trigram{width:40px;flex-shrink:0;margin-left:auto;display:flex;flex-direction:column;gap:4px}.calc-mini-row{display:flex;gap:5px}.calc-mini-row .bar{height:4px;flex:1}.calc-mini-row .yang{background:var(--yang)}.calc-mini-row .yin{background:var(--yin)}
.hexagrams{display:grid;grid-template-columns:minmax(0,1fr) 50px minmax(0,1fr);gap:14px;align-items:start;position:relative;margin:0 0 20px;isolation:isolate;min-height:440px}
.hexagrams.mutual-open{grid-template-columns:minmax(0,1fr) min(24%,180px) minmax(0,1fr)}
.hexagrams .hex-card{grid-row:1;display:block;position:relative;height:440px;min-height:440px;margin:0;padding:14px;min-width:0;overflow:visible}
.hexagrams .base-card{grid-column:1}.hexagrams .mutual-card{grid-column:2}.hexagrams .changed-card{grid-column:3}
.hexagrams .hex-kind{font-size:10px;letter-spacing:.6px;display:block;line-height:14px;white-space:nowrap}.hexagrams .hex-title{height:40px;margin:3px 0 6px;align-items:center}.hexagrams .hex-title h2{font-size:29px;white-space:nowrap}.hexagrams .hex-title>small{font-size:10px;white-space:nowrap}.hexagrams .trig-label{line-height:17px;font-size:10px;margin:0}.hexagrams .lines{margin:0 auto;max-width:150px}.hexagrams .line{height:44px;min-height:44px;padding:7px 23px 7px 7px;margin:0!important}.hexagrams .line[data-line]{margin:0!important}.hexagrams .trigram-group+.trigram-group{margin-top:12px}.hexagrams .hex-foot{position:absolute;bottom:12px;left:10px;right:10px;font-size:9px;color:var(--muted);text-align:center;white-space:nowrap}
.hexagrams .mutual-card{padding:14px 8px;background:transparent;border:1px solid transparent;border-radius:8px;box-shadow:none;overflow:hidden}.hexagrams.mutual-open .mutual-card{border-color:#ddd8c8;background:#f7f4e78a}.hexagrams .mutual-card .lines{max-width:130px}.hexagrams .mutual-card .hex-title h2{font-size:24px}.hexagrams .mutual-card .hex-title>small{font-size:9px}.hexagrams .mutual-content{display:block!important;padding:0;width:auto;max-width:none;visibility:hidden;opacity:0;transition:opacity .25s,visibility .25s}.hexagrams.mutual-open .mutual-content{opacity:1;visibility:visible}.hexagrams:not(.mutual-open) .mutual-card>.hex-kind,.hexagrams:not(.mutual-open) .mutual-card>.hex-title{visibility:hidden;opacity:0}.hexagrams .mutual-actions{display:flex;position:absolute;left:5px;right:5px;bottom:8px;top:auto;margin:0;padding:0;border:0;gap:3px;align-items:stretch;justify-content:center}.hexagrams .mutual-actions button{display:block;flex:1;min-width:0;font-size:10px;min-height:44px;padding:4px 2px;border-radius:5px;white-space:nowrap}.hexagrams:not(.mutual-open) .mutual-actions{top:142px;bottom:auto;left:0;right:0;flex-direction:column;gap:8px}.hexagrams:not(.mutual-open) .mutual-actions button{white-space:normal;min-height:44px;font-size:10px}.hexagrams .mutual-card .hex-kind{font-size:9px;letter-spacing:0}
.hexagrams .extract-target{background:#efe2b9;box-shadow:0 0 0 1px #b9a77955}.group-copy,.hexagrams .base-copy{position:absolute;z-index:8;pointer-events:none;padding:0;border:1px solid #b49b6288;border-radius:5px;background:#fbf3d8e6;transform-origin:top left;box-shadow:0 4px 12px #6b624211}.copy-row{height:44px;display:flex;gap:7px;align-items:center;position:relative;padding:7px 23px 7px 7px}.copy-row .bar{height:6px;flex:1;border-radius:1px}.copy-row .bar.yang{background:var(--yang)}.copy-row .bar.yin{background:var(--yin)}.copy-row small{position:absolute;right:3px;font-size:9px;color:#8b7755}.hexagrams .base-copy{padding:17px 0 0;overflow:hidden}.hexagrams .base-copy .copy-row:nth-child(4){margin-top:29px}.hexagrams .stage-pending{opacity:0;pointer-events:none}
.mutual-source-panel{padding:15px;margin:0 0 20px;background:#fbf8ed}.source-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.source-head strong{font-family:'Songti SC',serif;font-weight:400;font-size:20px}.source-head button{min-height:44px;font-size:11px;padding:5px}.source-groups{display:flex;gap:8px;margin-top:7px}.source-groups button{flex:1;font-size:12px;padding:8px;min-height:44px}.mutual-source-panel #source-note{font-size:12px;line-height:1.7;color:#7a6746;margin:9px 0 3px}.mutual-source-panel .hint{font-size:10px;margin:5px 0}
@media(max-width:1100px){.hexagrams{gap:10px}.hexagrams.mutual-open{grid-template-columns:minmax(0,1fr) min(24%,150px) minmax(0,1fr)}.hexagrams .hex-card{padding:12px 8px}.hexagrams .mutual-card{padding:12px 5px}.hexagrams .hex-title{gap:3px}.hexagrams .hex-title>small{font-size:9px}.hexagrams .mutual-card .hex-title{display:block;height:40px}.hexagrams .mutual-card .hex-title h2{font-size:21px;line-height:1.1}.hexagrams .mutual-card .hex-title>small{font-size:8px}.calc-card{padding:9px 8px}.calc-equation{font-size:12px}.calc-remainder{font-size:10px}.calc-remainder strong{font-size:19px}}
@media(max-width:850px){.coin-round{grid-template-columns:45px minmax(0,1fr) 53px 40px}.coin-round .round-symbol{font-size:15px}.coin-progress-caption{font-size:10px}.coin-source button{font-size:11px}.coin-round select{font-size:12px}.coin-controls .primary{font-size:12px}.coin-controls .quiet{font-size:11px}.number-calculation{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:12px}.calc-card{min-height:96px;padding:8px}.calc-card[data-calc="moving"]{grid-column:1/-1;min-height:44px;display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:7px 8px}.calc-card[data-calc="moving"] .calc-label{margin:0;font-size:9px}.calc-card[data-calc="moving"] .calc-remainder{margin:0}.calc-card[data-calc="moving"] .calc-equation>small{display:inline;margin-left:4px}.calc-label{font-size:9px;margin-bottom:4px}.calc-equation{font-size:12px}.calc-remainder{margin-top:5px;gap:3px;font-size:10px}.calc-remainder strong{font-size:19px}.calc-trigram{width:35px}.calc-remainder>span{font-size:9px}.hexagrams{grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);gap:8px;min-height:432px}.hexagrams.mutual-open{grid-template-columns:minmax(0,1fr) 92px minmax(0,1fr)}.hexagrams .hex-card{height:432px;min-height:432px;padding:11px 8px}.hexagrams .mutual-card{padding:11px 4px}.hexagrams .hex-kind{font-size:9px;letter-spacing:0;overflow:hidden}.hexagrams .hex-title h2{font-size:25px}.hexagrams .hex-title>small{font-size:8px}.hexagrams .mutual-card .hex-title h2{font-size:20px}.hexagrams .mutual-card .trig-label{font-size:9px}.hexagrams .mutual-actions button{font-size:9px}.hexagrams .line{padding-left:4px;padding-right:17px}.hexagrams .mutual-card .line{padding-right:16px}.hexagrams .line .index{right:2px;font-size:9px}.hexagrams .hex-foot{font-size:8px;left:2px;right:2px}.hexagrams:not(.mutual-open) .mutual-actions{top:140px}.source-head strong{font-size:18px}.source-head button{font-size:10px}.source-groups{flex-direction:column;gap:5px}.source-groups button{font-size:11px}.mutual-source-panel #source-note{font-size:11px}.casting-controls{grid-template-columns:minmax(0,1fr) auto auto;min-height:48px}.casting-controls #casting-stage{line-height:1.6}.copy-row{padding-left:4px;padding-right:18px}.copy-row small{font-size:8px}.calc-card[data-calc="moving"] .calc-equation{font-size:11px}}
@media(max-width:360px){.hexagrams.mutual-open{grid-template-columns:minmax(0,1fr) 84px minmax(0,1fr)}.hexagrams .hex-card{padding-left:5px;padding-right:5px}.hexagrams .hex-title h2{font-size:23px}.hexagrams .hex-title>small{font-size:7px}.hexagrams .mutual-card{padding-left:3px;padding-right:3px}.coin-round{grid-template-columns:40px minmax(0,1fr) 47px 32px;gap:3px}.round-faces{font-size:8px}.calc-equation{font-size:11px}.calc-remainder{font-size:9px}.calc-remainder>span{display:none}}
@media(prefers-reduced-motion:reduce){.mutual-content,.calc-card{transition:none}}body.reduced .mutual-content,body.reduced .calc-card{transition:none}
.hexagrams .mutual-content{width:100%;justify-self:stretch}
@media(max-width:850px){.hexagrams.mutual-open{grid-template-columns:minmax(0,1fr) 104px minmax(0,1fr)}.hexagrams .hex-title{display:block;height:36px}.hexagrams .hex-title h2{line-height:1.1}.hexagrams .hex-title>small{display:block;line-height:1.25}.hexagrams .trig-label{line-height:15px}.hexagrams .trigram-group+.trigram-group{margin-top:8px}.hexagrams .mutual-actions{left:4px;right:4px;gap:3px}.hexagrams .base-copy{padding-top:15px}.hexagrams .base-copy .copy-row:nth-child(4){margin-top:23px}}
@media(max-width:360px){.hexagrams.mutual-open{grid-template-columns:minmax(0,1fr) 102px minmax(0,1fr)}}
.calc-equation{white-space:normal;overflow-wrap:anywhere}
@media(max-width:850px){.hexagrams .mutual-actions{bottom:4px}}
@media(max-width:850px){.calc-remainder{font-size:9px;gap:2px}.calc-remainder>span{font-size:8px}.calc-trigram{width:30px}.calc-equation>small{display:inline;font-size:9px;margin-left:3px}}
.source-groups button.active{background:#efe5c4;border-color:#b9a475}
/* Keep controls at the same height while the middle space opens. */
.hexagrams .hex-card{padding-top:11px;padding-bottom:11px}.hexagrams .hex-title{height:32px;margin:2px 0 4px}.hexagrams .hex-title h2{line-height:1.1}.hexagrams .trigram-group+.trigram-group{margin-top:44px}
.hexagrams .mutual-card{overflow:visible}.hexagrams .mutual-card .hex-title{display:block;height:32px;padding-right:48px}.hexagrams .mutual-card .hex-title h2{font-size:22px;line-height:1.1}.hexagrams .mutual-card .hex-title>small{display:block;font-size:8px;line-height:1.2}.hexagrams .mutual-card>.hex-kind{padding-right:44px;overflow:hidden}
.hexagrams:not(.mutual-open) .mutual-card>.hex-title{visibility:visible;opacity:1}.hexagrams:not(.mutual-open) .mutual-card>.hex-title>h2,.hexagrams:not(.mutual-open) .mutual-card>.hex-title>small{visibility:hidden;opacity:0}
.hexagrams .mutual-card .mutual-actions{display:block;top:0;bottom:0;left:0;right:0;pointer-events:none}.hexagrams .mutual-card .mutual-actions button{position:absolute;width:44px;min-width:44px;height:44px;min-height:44px;padding:3px 1px;font-size:9px;pointer-events:auto;white-space:normal}
#mutual-expand{top:213px;left:50%;transform:translateX(-50%)}#mutual-source-entry{top:15px;right:4px;left:auto;transform:none}.hexagrams:not(.mutual-open) #mutual-source-entry{left:50%;right:auto;transform:translateX(-50%)}
.hexagrams .base-copy .copy-row:nth-child(4){margin-top:61px}
@media(max-width:850px){.hexagrams .hex-title{display:flex;height:28px;margin:2px 0 4px;align-items:center}.hexagrams .hex-title>small{display:inline;line-height:1.3}.hexagrams .mutual-card .hex-title{display:block;height:28px}.hexagrams .mutual-card .hex-title h2{font-size:20px}.hexagrams .mutual-card .hex-title>small{display:block;font-size:8px;line-height:1.2}.hexagrams .trigram-group+.trigram-group{margin-top:44px}#mutual-expand{top:207px}.hexagrams .base-copy .copy-row:nth-child(4){margin-top:59px}}
@media(max-width:360px){.hexagrams.mutual-open .base-card .hex-title>small,.hexagrams.mutual-open .changed-card .hex-title>small{display:none}}
