/* AI concept implementation: real forms and results remain the source of truth. */
body:has(:is(.qimen-main,.life-main,.network-main,.history-main,.relations-main)){background:#f8f7f1;color:#263d2c}
body.fatemate-shell-ready :is(.qimen-main,.life-main,.network-main,.history-main,.relations-main){max-width:1320px;padding:0 24px 90px}
body.fatemate-shell-ready :is(.qimen-header,.life-header,.network-header,.history-heading,.relations-heading){position:relative;overflow:hidden;min-height:160px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;margin:0 -24px;padding:28px 34px;border:0;border-bottom:1px solid #dedfd2;background:#f7f6ee url('/_design/sage-account-leaves-v1.jpg') right center/cover no-repeat}
body.fatemate-shell-ready :is(.qimen-header,.life-header,.network-header,.history-heading,.relations-heading)>*{position:relative;z-index:1}
body.fatemate-shell-ready :is(.qimen-header,.life-header,.network-header,.history-heading,.relations-heading) h1{font-family:Georgia,'Songti SC',serif;color:#193f29;font-weight:500;font-size:38px;line-height:1.18;margin:8px 0 10px;letter-spacing:-.02em}
body.fatemate-shell-ready :is(.qimen-header,.life-header,.network-header,.history-heading,.relations-heading)>p:last-child{max-width:590px;margin:0;color:#68796a;line-height:1.7}
body.fatemate-shell-ready :is(.qimen-header,.life-header,.network-header,.history-heading)>p:first-child{margin:0;color:#a47d45;font-size:11px;font-weight:600;letter-spacing:.09em}
body.fatemate-shell-ready :is(.qimen-form,.qimen-result,.life-form,.life-result,.network-panel,.history-list-panel,.history-detail,.relations-form,.relations-result){border:1px solid #dddccf;border-radius:12px;background:#faf9f3;box-shadow:0 2px 8px rgba(39,57,34,.035)}
body.fatemate-shell-ready :is(.qimen-form-head h2,.qimen-result-head h2,.qimen-ai h3,.life-form-head h2,.life-result-head h2,.network-panel h2,.history-list-heading h2,.history-detail h2,.relations-form-title h2,.relations-result-heading h2){font-family:Georgia,'Songti SC',serif;color:#20452e;font-weight:500;font-size:21px}
body.fatemate-shell-ready :is(.qimen-fields input,.qimen-fields select,.qimen-ai textarea,.life-fields input,.life-fields select,.network-panel input,.network-panel select,.relations-fields input,.relations-fields select){border-color:#d7dccf;background:#fbfaf6;border-radius:7px;color:#283e2c}
body.fatemate-shell-ready :is(.qimen-form button,.qimen-ai button,.life-form button,.network-panel button[type=submit],.relations-submit,.relations-ai button){background:#1e4a2d;color:#fff;border-radius:999px}
body.fatemate-shell-ready :is(.qimen-form button,.qimen-ai button,.life-form button,.network-panel button[type=submit],.relations-submit,.relations-ai button):hover{background:#30633e}
/* Qimen: persistent input rail and nine-palace result. */
.qimen-workspace{display:grid;grid-template-columns:minmax(240px,280px) minmax(0,1fr);gap:16px;align-items:start;margin-top:26px}.qimen-sidebar{min-width:0}.qimen-workspace .qimen-form{margin:0;padding:20px}.qimen-fields{grid-template-columns:1fr;gap:13px}.qimen-form-head{padding-bottom:14px}.qimen-form-head p{margin:8px 0 0;font-size:12px}.qimen-form button{margin-top:10px}.qimen-quick{margin-top:14px;padding:18px 20px;border:1px solid #e1e2d9;border-radius:12px;background:#f5f5ec}.qimen-quick h2{font-family:Georgia,'Songti SC',serif;font-weight:500;font-size:18px;color:#24452e;margin:0 0 12px}.qimen-quick a{display:flex;justify-content:space-between;gap:8px;padding:11px 0;border-top:1px solid #e4e6dc;color:#405c42;text-decoration:none;font-size:13px}.qimen-display{min-width:0}.qimen-display .qimen-result{margin:0;padding:22px}.qimen-result[hidden]{display:none}.qimen-display:has(.qimen-result:not([hidden])) .qimen-placeholder{display:none}.qimen-placeholder{padding:26px;border:1px solid #dddccf;border-radius:12px;background:#faf9f3;color:#24452e}.qimen-placeholder>span{color:#a47d45;font-size:11px;letter-spacing:.08em}.qimen-placeholder h2{font-family:Georgia,'Songti SC',serif;font-size:22px;font-weight:500;margin:12px 0}.qimen-placeholder p{color:#7e8b7c;font-size:13px}.qimen-placeholder-grid{display:grid;grid-template-columns:repeat(3,1fr);max-width:670px;margin:24px auto 4px;border:1px solid #e2e4d8;border-radius:10px;overflow:hidden}.qimen-placeholder-grid i{display:grid;place-items:center;min-height:100px;border:1px solid #edeee6;background:#f9f9f3;font-style:normal;color:#b8c6aa}.qimen-placeholder-grid i:nth-child(5){background:#edf1e4}
.qimen-result-head{padding-bottom:12px;border-bottom:1px solid #e4e6d9}.qimen-board{margin-top:18px;border:1px solid #d5d7c7;border-radius:10px;overflow:hidden}.qimen-cell{min-height:160px;background:#faf9f3;border-color:#e0e2d5}.qimen-cell:nth-child(5){background:#edf1e2}.qimen-cell h3{font-family:Georgia,'Songti SC',serif;font-size:16px;color:#284a31}.qimen-cell dl{line-height:1.6}.qimen-ai{padding:20px;margin-top:18px;border:1px solid #e0e3d7;border-radius:10px;background:#f6f7ef}.qimen-attribution{margin:24px 0}
/* Life chart, members and saved records. */
.life-form,.life-result{margin-top:24px;padding:24px}.life-form-head,.life-result-head{border-color:#e4e6dc}.life-disclosure{background:#f0f1e5;color:#6c765a}.life-chart-scroll{background:#fbfaf5;border-color:#dfe3d7}.life-table-wrap{border:1px solid #dfe3d7;border-radius:10px}.life-table-wrap thead{background:#e7eddb}.life-table-wrap th,.life-table-wrap td{padding:13px 15px;border-color:#e5e8df}
.network-grid{margin-top:26px;grid-template-columns:minmax(240px,310px) minmax(0,1fr);gap:16px}.network-panel{padding:22px}.network-graph-panel{min-height:470px}.network-graph-panel svg{background:#f4f6ed;border:1px solid #e9ebdf}.network-empty{background:#f4f6ed;border:1px solid #e9ebdf;border-radius:10px;padding:70px 18px}.network-relations{margin-top:16px}.network-person{background:#f8f9f2;border-color:#e0e5d8}
.history-layout{grid-template-columns:170px 280px minmax(0,1fr);gap:14px;margin-top:26px;align-items:stretch}.history-side{border:1px solid #e4e4d9;border-radius:10px;background:#f8f7f0;padding:12px 8px}.history-side a{display:flex;align-items:center;gap:10px;padding:12px 10px;border-radius:7px;color:#425c44;text-decoration:none;font-size:13px}.history-side a[aria-current=page],.history-side a:hover{background:#e8eddd}.history-list-panel,.history-detail{min-height:450px}.history-item[aria-pressed=true]{border:1px solid #a9bea4;background:#edf2e6}.history-item{border:1px solid #e6e9de;margin-top:9px}.history-facts{background:#eef1e6}
/* Relationship compatibility forms share one actual two-person implementation. */
.relations-heading>a,.relations-heading>span{display:inline;color:#a07e4f}.relations-categories{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:24px 0 0}.relations-categories a{display:flex;justify-content:space-between;align-items:center;min-height:62px;padding:14px;border:1px solid #e0e3d7;border-radius:10px;background:#fbfaf5;color:#2d4b34;text-decoration:none;font-size:13px}.relations-categories a:hover{border-color:#98af96;background:#edf1e5}.relations-form,.relations-result{margin-top:18px;padding:26px}.relations-people{gap:14px}.relations-people fieldset{padding:18px;border:1px solid #e2e6d9;border-radius:10px;background:#f8f9f2}.relations-people legend{font-family:Georgia,'Songti SC',serif;font-size:17px;color:#244832}.relations-submit{display:block;width:min(100%,460px);margin:22px auto 0}.relations-result .relations-chart{background:#f5f7ee;border-color:#e0e5d7}.relations-result .relations-pillars strong{color:#264b31}.relations-ai{background:#edf1e5}
/* Existing hexagram and almanac tools are mounted into the captured page. */
html.fm-workspace:has(.aiboys-divination-panel) body{background:#f8f7f1!important}
html.fm-workspace .fm-tool-page:has(> .fm-page-heading > .aiboys-divination-panel){max-width:1320px!important;padding:0 24px 70px!important}
html.fm-workspace .fm-tool-page:has(> .fm-page-heading > .aiboys-divination-panel)>.fm-page-heading{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important;padding:32px 34px 0!important;margin:0 -24px 24px!important;border:0!important;background:linear-gradient(180deg,transparent 0 160px,#f8f7f1 160px),url('/_design/sage-account-leaves-v1.jpg') right top/auto 160px no-repeat!important}
html.fm-workspace .fm-page-heading:has(>.aiboys-divination-panel)>h1{grid-column:1;grid-row:1;color:#173f29!important;font-family:Georgia,'Songti SC',serif!important;font-size:38px!important;font-weight:500!important;margin:0 0 12px!important}
html.fm-workspace .fm-page-heading:has(>.aiboys-divination-panel)>p{grid-column:1;grid-row:2;max-width:610px!important;color:#68796a!important;margin:0 0 40px!important}
html.fm-workspace .fm-tool-page:has(> .fm-page-heading > .aiboys-divination-panel)>.fm-page-heading>.aiboys-divination-panel{grid-column:1!important;grid-row:3!important;display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr);grid-template-rows:auto auto 1fr;column-gap:16px;align-items:start;max-width:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
html.fm-workspace .aiboys-divination-form{grid-column:1;grid-row:1;gap:16px;padding:22px 20px 0;border:1px solid #dddccf;border-bottom:0;border-radius:12px 12px 0 0;background:#faf9f3}
html.fm-workspace .aiboys-divination-form:before{content:'起卦资料';font-family:Georgia,'Songti SC',serif;font-size:21px;color:#20452e}
html.fm-workspace .aiboys-divination-form label{font-size:13px!important;color:#425945!important}
html.fm-workspace .aiboys-divination-form :is(input,textarea,select){border:1px solid #d8ded1!important;border-radius:7px!important;background:#fcfbf7!important;color:#29402d!important}
html.fm-workspace .aiboys-divination-submit{grid-column:1;grid-row:2;width:calc(100% - 40px)!important;margin:0 20px!important;border-radius:999px!important;background:#204c2f!important;position:relative;z-index:1}
html.fm-workspace .aiboys-divination-report{grid-column:2;grid-row:1/4;min-height:340px;margin:0!important;padding:24px!important;border:1px solid #dddccf;border-radius:12px;background:#faf9f3;color:#2d4935!important;white-space:normal!important}
html.fm-workspace .aiboys-divination-report:empty:before{content:'结果将在这里呈现';display:block;font-family:Georgia,'Songti SC',serif;font-size:22px;color:#34533b}
html.fm-workspace .aiboys-divination-report:empty:after{content:'填写问题并选择起卦方式，生成后可查看实际结果与解读。';display:block;margin-top:12px;color:#7a8878;font-size:13px;line-height:1.8}
html.fm-workspace .aiboys-divination-panel:after{content:'';grid-column:1;grid-row:2/4;align-self:stretch;min-height:70px;border:1px solid #dddccf;border-top:0;border-radius:0 0 12px 12px;background:#faf9f3}
html.fm-workspace .aiboys-divination-report .aiboys-visual{background:#f3f5eb!important;border-color:#dfe4d7!important}
html.fm-workspace .aiboys-divination-report .aiboys-yao-line{background:#315b3d!important}
html.fm-workspace .aiboys-divination-report .aiboys-yao-line.yin{background:linear-gradient(to right,#315b3d 0 43%,transparent 43% 57%,#315b3d 57%)!important}
@media(max-width:800px){body.fatemate-shell-ready :is(.qimen-main,.life-main,.network-main,.history-main,.relations-main){padding:0 16px 65px}body.fatemate-shell-ready :is(.qimen-header,.life-header,.network-header,.history-heading,.relations-heading){min-height:140px;margin:0 -16px;padding:25px 20px;background-size:auto 180px}body.fatemate-shell-ready :is(.qimen-header,.life-header,.network-header,.history-heading,.relations-heading) h1{font-size:29px}.qimen-workspace,.network-grid{grid-template-columns:1fr}.qimen-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.qimen-placeholder-grid i{min-height:65px}.qimen-quick{display:none}.history-layout{grid-template-columns:1fr}.history-side{display:flex;overflow-x:auto}.history-side a{white-space:nowrap}.history-list-panel,.history-detail{min-height:0}.relations-categories{display:flex;overflow-x:auto}.relations-categories a{min-width:130px;min-height:50px}.relations-people{grid-template-columns:1fr}.life-fields{grid-template-columns:repeat(2,minmax(0,1fr))}html.fm-workspace .fm-tool-page:has(> .fm-page-heading > .aiboys-divination-panel){padding:0 16px 55px!important}html.fm-workspace .fm-tool-page:has(> .fm-page-heading > .aiboys-divination-panel)>.fm-page-heading{margin:0 -16px 16px!important;padding:25px 20px 0!important;background-size:auto 145px!important}html.fm-workspace .fm-page-heading:has(>.aiboys-divination-panel)>h1{font-size:29px!important}html.fm-workspace .fm-page-heading:has(>.aiboys-divination-panel)>p{margin-bottom:28px!important}html.fm-workspace .fm-tool-page:has(> .fm-page-heading > .aiboys-divination-panel)>.fm-page-heading>.aiboys-divination-panel{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto auto auto auto!important;row-gap:0!important}html.fm-workspace .aiboys-divination-form{grid-column:1;grid-row:1}html.fm-workspace .aiboys-divination-submit{grid-column:1;grid-row:2}html.fm-workspace .aiboys-divination-panel:after{grid-column:1;grid-row:2/4}html.fm-workspace .aiboys-divination-report{grid-column:1;grid-row:4;min-height:180px;margin-top:16px!important}}
html.fm-workspace .fm-page-heading:has(>.aiboys-divination-panel):before,html.fm-workspace .fm-page-heading:has(>.aiboys-divination-panel):after{display:none!important;content:none!important}
html.fm-workspace .fm-tool-page:has(>.fm-page-heading>.aiboys-divination-panel){background:#f8f7f1!important}
.network-graph-panel svg[hidden]{display:none!important}
html.fm-workspace .aiboys-divination-panel[data-divination-kind=huangli] .aiboys-divination-form:before{content:'选择日期'}
html.fm-workspace .aiboys-divination-panel[data-divination-kind=huangli] .aiboys-divination-submit{background:#204c2f!important}
html.fm-workspace .aiboys-divination-panel[data-divination-kind=huangli] .aiboys-almanac-card{padding:0;border:0;background:transparent!important}
html.fm-workspace .aiboys-divination-panel[data-divination-kind=huangli] .aiboys-almanac-date{font-family:Georgia,'Songti SC',serif;font-size:32px;font-weight:500;color:#1d452d}
html.fm-workspace .aiboys-divination-panel[data-divination-kind=huangli] .aiboys-almanac-label{font-size:15px;color:#71816c;margin:8px 0 22px}
html.fm-workspace .aiboys-divination-panel[data-divination-kind=huangli] .aiboys-almanac-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
html.fm-workspace .aiboys-divination-panel[data-divination-kind=huangli] .aiboys-almanac-grid span{padding:18px;border:1px solid #dfe5d8;border-radius:10px;background:#eef2e6;color:#275238;font-size:18px;font-family:Georgia,'Songti SC',serif}
html.fm-workspace .aiboys-divination-panel[data-divination-kind=huangli] .aiboys-almanac-grid span:nth-child(2){background:#f7efea;color:#8e4e42;border-color:#eaded8}
html.fm-workspace .aiboys-divination-panel[data-divination-kind=huangli] .aiboys-almanac-grid b{display:block;margin-top:8px;font-family:-apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif;color:#415447;font-size:13px;line-height:1.8}
html.fm-workspace .aiboys-divination-panel::before{display:none!important;content:none!important}
html.fm-workspace body.fatemate-shell-ready .aiboys-divination-panel .aiboys-divination-submit{background:#204c2f!important;color:white!important}
/* Daily BaZi and Ziwei compatibility: real birth-data panels and chart summaries. */
html.fm-local-birth-tool body{background:#f8f7f1!important}
html.fm-local-birth-tool .fm-tool-page{max-width:1320px!important;padding:0 24px 70px!important}
html.fm-local-birth-tool .fm-tool-page>.fm-page-heading{display:flex!important;flex-direction:column;align-items:flex-start;justify-content:center;max-width:none!important;min-height:160px!important;margin:0 -24px 24px!important;padding:28px 34px!important;border:0!important;border-bottom:1px solid #dedfd2!important;background:#f7f6ee url('/_design/sage-account-leaves-v1.jpg') right center/cover no-repeat!important}
html.fm-local-birth-tool .fm-tool-page>.fm-page-heading:before,html.fm-local-birth-tool .fm-tool-page>.fm-page-heading:after{display:none!important;content:none!important}
html.fm-local-birth-tool .fm-tool-page>.fm-page-heading h1{margin:0 0 10px!important;font-family:Georgia,'Songti SC',serif!important;font-size:38px!important;font-weight:500!important;color:#193f29!important}
html.fm-local-birth-tool .fm-tool-page>.fm-page-heading p{margin:0!important;max-width:600px!important;color:#68796a!important;line-height:1.7!important}
html.fm-local-birth-tool .aiboys-panel{max-width:none!important;margin:0 0 24px!important;padding:24px!important;border:1px solid #dddccf!important;border-radius:12px!important;background:#faf9f3!important;box-shadow:none!important}
html.fm-local-birth-tool .aiboys-panel:before{display:none!important;content:none!important}
html.fm-local-birth-tool .aiboys-panel-title{font-family:Georgia,'Songti SC',serif!important;font-weight:500!important;color:#21472d!important;font-size:22px!important}
html.fm-local-birth-tool .aiboys-panel-hint{color:#74826e!important;margin:9px 0 20px!important;line-height:1.7}
html.fm-local-birth-tool .aiboys-panel-grid{gap:14px!important}
html.fm-local-birth-tool .aiboys-panel-person{min-width:0;padding:18px!important;border:1px solid #dfe5d8!important;border-radius:10px;background:#f6f8ef}
html.fm-local-birth-tool .aiboys-panel-person h4{font-family:Georgia,'Songti SC',serif;font-size:17px!important;font-weight:500!important;color:#254a31!important}
html.fm-local-birth-tool .aiboys-field :is(input,select){min-height:42px;border:1px solid #d8ded1!important;border-radius:7px!important;background:#fbfaf6!important;color:#29402d!important}
html.fm-local-birth-tool body.fatemate-shell-ready .aiboys-panel-submit{display:block;width:min(100%,460px)!important;margin:22px auto 0!important;border-radius:999px!important;background:#204c2f!important;color:white!important}
html.fm-daily-tool .aiboys-panel-person{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 14px}
html.fm-daily-tool .aiboys-panel-person h4{grid-column:1/-1;margin-bottom:15px!important}
html.fm-local-birth-tool .fate-match-summary,html.fm-local-birth-tool .fate-daily-facts{background:#f1f4e9!important;border:1px solid #e0e6d8!important;border-radius:10px!important;padding:18px!important}
.fate-match-palaces{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:14px;border-top:1px solid #e1e5d8;border-left:1px solid #e1e5d8}
.fate-match-palaces>div{min-width:0;padding:9px 6px;border-right:1px solid #e1e5d8;border-bottom:1px solid #e1e5d8;text-align:center;background:#fbfaf4}
.fate-match-palaces span,.fate-match-palaces strong{display:block;overflow-wrap:anywhere}.fate-match-palaces span{color:#7e8a77;font-size:11px}.fate-match-palaces strong{margin-top:4px;color:#31533b;font-size:12px;font-weight:500}
@media(max-width:800px){html.fm-local-birth-tool .fm-tool-page{padding:0 16px 55px!important}html.fm-local-birth-tool .fm-tool-page>.fm-page-heading{min-height:140px!important;margin:0 -16px 18px!important;padding:25px 20px!important;background-size:auto 180px!important}html.fm-local-birth-tool .fm-tool-page>.fm-page-heading h1{font-size:29px!important}html.fm-daily-tool .aiboys-panel-person{grid-template-columns:repeat(2,minmax(0,1fr))}html.fm-local-birth-tool .aiboys-panel{padding:18px!important}.fate-match-palaces{grid-template-columns:repeat(3,minmax(0,1fr))}}
html.fm-workspace body:has(.aiboys-divination-panel) .container:has(>.fm-tool-page),html.fm-local-birth-tool .container:has(>.fm-tool-page){max-width:1320px!important;width:100%!important;padding:0!important}
@media(max-width:800px){html.fm-workspace body:has(.aiboys-divination-panel) .pt-14:has(.fm-tool-page),html.fm-local-birth-tool .pt-14:has(.fm-tool-page){padding-top:0!important}}
.life-form[hidden],.life-collapsed-info[hidden],#life-return-result[hidden]{display:none!important}
.life-collapsed-info{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-top:24px;padding:18px 22px;border:1px solid #dddccf;border-radius:10px;background:#faf9f3;scroll-margin-top:90px}.life-collapsed-info span,.life-collapsed-info strong{display:block}.life-collapsed-info span{color:#9a7a4b;font-size:11px;margin-bottom:7px}.life-collapsed-info strong{font-weight:500;font-size:14px;line-height:1.6;color:#2c4932}.life-collapsed-info button,#life-return-result{border:1px solid #a9bba2;border-radius:999px;background:transparent;color:#31543b;padding:8px 14px;white-space:nowrap;cursor:pointer}#life-return-result{width:auto;display:inline-block;margin:0 0 15px;padding:8px 14px;background:transparent!important;color:#31543b!important;border:1px solid #a9bba2!important}
/* The captured BaZi marriage form keeps its React fields and calculation handlers. */
html.fm-bazi-match-tool body{background:#f8f7f1!important}
html.fm-bazi-match-tool .container:has(>.fm-tool-page){max-width:1320px!important;width:100%!important;padding:0!important}
html.fm-bazi-match-tool .fm-tool-page{max-width:1320px!important;padding:0 24px 70px!important}
html.fm-bazi-match-tool .fm-tool-page>.fm-page-heading{display:flex!important;flex-direction:column;align-items:flex-start;justify-content:center;max-width:none!important;min-height:160px!important;margin:0 -24px 24px!important;padding:28px 34px!important;border:0!important;border-bottom:1px solid #dedfd2!important;background:#f7f6ee url('/_design/sage-account-leaves-v1.jpg') right center/cover no-repeat!important}
html.fm-bazi-match-tool .fm-tool-page>.fm-page-heading:before,html.fm-bazi-match-tool .fm-tool-page>.fm-page-heading:after{display:none!important;content:none!important}
html.fm-bazi-match-tool .fm-tool-page>.fm-page-heading h1{margin:0 0 10px!important;font-family:Georgia,'Songti SC',serif!important;font-size:38px!important;font-weight:500!important;color:#193f29!important}
html.fm-bazi-match-tool .fm-tool-page>.fm-page-heading p{margin:0!important;max-width:600px!important;color:#68796a!important}
html.fm-bazi-match-tool .fm-birth-form{padding:24px!important;border:1px solid #dddccf!important;border-radius:12px!important;background:#faf9f3!important;box-shadow:none!important}
html.fm-bazi-match-tool .fm-birth-form>.grid>div{padding:20px!important;border:1px solid #dfe5d8!important;border-radius:10px!important;background:#f6f8ef!important}
html.fm-bazi-match-tool .fm-birth-form h2{font-family:Georgia,'Songti SC',serif!important;color:#254a31!important;font-size:18px!important;font-weight:500!important}
html.fm-bazi-match-tool .fm-birth-form :is(input,select,button[role=combobox]){border-color:#d8ded1!important;background:#fbfaf6!important;color:#29402d!important}
html.fm-bazi-match-tool .fm-birth-form button[type=submit]{display:block!important;width:min(100%,460px)!important;margin:24px auto 0!important;border-radius:999px!important;background:#204c2f!important;color:white!important}
@media(max-width:800px){html.fm-bazi-match-tool .pt-14:has(.fm-tool-page){padding-top:0!important}html.fm-bazi-match-tool .fm-tool-page{padding:0 16px 55px!important}html.fm-bazi-match-tool .fm-tool-page>.fm-page-heading{min-height:140px!important;margin:0 -16px 18px!important;padding:25px 20px!important;background-size:auto 180px!important}html.fm-bazi-match-tool .fm-tool-page>.fm-page-heading h1{font-size:29px!important}html.fm-bazi-match-tool .fm-birth-form,html.fm-bazi-match-tool .fm-birth-form>.grid>div{padding:18px!important}}
/* AI assistant follows the conversation mockup while keeping actual saved records. */
body.agent-page .agent-main{width:min(1320px,calc(100% - 64px));grid-template-columns:220px minmax(0,1fr);gap:0;padding:0 0 40px;min-height:calc(100dvh - 72px)}
body.agent-page .agent-sidebar{padding:30px 18px 0 0;border-right:1px solid #e0e3d7;background:#f6f7ef}
body.agent-page .agent-content{max-width:none;padding:0 0 0 28px}
body.agent-page .agent-intro{padding:28px 24px 24px 0;background:url('/_design/sage-account-leaves-v1.jpg') right center/auto 180px no-repeat;border-color:#e0e2d7}
body.agent-page .agent-intro h1{font-size:32px;color:#1c422b}
body.agent-page .agent-feed{min-height:280px;max-height:52dvh;padding:26px 2px 26px 46px;gap:25px}
body.agent-page .agent-message{position:relative}
body.agent-page .agent-message:before{position:absolute;display:grid;place-items:center;left:-42px;top:0;width:30px;height:30px;border-radius:50%;font-size:14px}
body.agent-page .agent-message.user{align-self:flex-start;max-width:90%;background:#e7ecdf;color:#24452d;border-radius:12px;padding:12px 16px}
body.agent-page .agent-message.user:before{content:'我';background:#dce5d3;color:#2f5238}
body.agent-page .agent-message.assistant{padding:16px;border:1px solid #e0e2d7;border-radius:11px;background:#faf9f4}
body.agent-page .agent-message.assistant:before{content:'✦';background:#365f3e;color:#fff}
.agent-prompts{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:12px 0;border-top:1px solid #e1e3d8}.agent-prompts>span{flex-basis:100%;color:#405f43;font-family:Georgia,'Songti SC',serif;font-size:14px}.agent-prompts button{border:1px solid #d4decd;border-radius:999px;background:#faf9f4;color:#3b5940;padding:8px 12px;font:inherit;font-size:12px;cursor:pointer}.agent-prompts button:hover{background:#edf2e7}
body.agent-page .agent-form{display:flex;align-items:flex-end;gap:12px;padding:8px 10px 8px 16px;border-color:#d2d8ca;border-radius:18px;background:#faf9f4}
body.agent-page .agent-form textarea{min-height:36px;max-height:120px;resize:vertical;padding:7px 0}
body.agent-page .agent-form>div{flex:none}body.agent-page .agent-form button{border-radius:999px;min-width:60px}
@media(max-width:700px){body.agent-page .agent-main{width:calc(100% - 32px);padding:20px 0 45px;gap:12px}body.agent-page .agent-sidebar{padding:0;background:transparent;border:0}body.agent-page .agent-content{padding:0}body.agent-page .agent-intro{padding:20px 0;background-size:auto 120px}body.agent-page .agent-intro h1{font-size:27px}body.agent-page .agent-feed{min-height:260px;max-height:45dvh;padding-left:42px}.agent-prompts>span{font-size:13px}}
/* Tarot: approved editorial hero, setup and card-selection surfaces. */
body.tarot-page .tarot-main{max-width:1320px;padding:0 24px 90px}
body.tarot-page .tarot-header{min-height:200px;margin:0 -24px;padding:25px 34px 28px;background:linear-gradient(90deg,#f8f7f1 0%,#f8f7f1 47%,rgba(248,247,241,.78) 65%,rgba(248,247,241,.05)),url('/_design/sage-tarot-v1.jpg') right 45%/auto 280px no-repeat;border-bottom:1px solid #e1e4d9}
body.tarot-page .tarot-header .tarot-eyebrow{margin:22px 0 8px}body.tarot-page .tarot-header h1{font-family:Georgia,'Songti SC',serif;font-size:38px;font-weight:500;color:#193f29}
body.tarot-page .tarot-header>p:last-child{max-width:560px;color:#68796a}
body.tarot-page .tarot-setup{margin:24px 0 0;padding:24px;border:1px solid #e0e2d8;border-bottom:0;border-radius:12px 12px 0 0;background:#faf9f4}
body.tarot-page .tarot-stage{padding:20px 24px 26px;border:1px solid #e0e2d8;border-top:0;border-radius:0 0 12px 12px;background:#faf9f4}
body.tarot-page .tarot-stage-heading h2{font-family:Georgia,'Songti SC',serif;font-weight:500;color:#20452e}
body.tarot-page .tarot-setup fieldset input:checked+span{border-color:#54775a;background:#e9efdf;color:#294b32}
body.tarot-page .tarot-actions button:first-child{background:#204c2f;border-color:#204c2f;border-radius:999px}
body.tarot-page .tarot-actions button:not(:first-child){border-color:#bacbb3;color:#365a3d;border-radius:999px}
@media(max-width:700px){body.tarot-page .tarot-main{padding:0 16px 65px}body.tarot-page .tarot-header{min-height:160px;margin:0 -16px;padding:20px;background-size:auto 190px}body.tarot-page .tarot-header h1{font-size:30px}body.tarot-page .tarot-header>p:last-child{max-width:75%;font-size:13px}body.tarot-page .tarot-setup{padding:18px}body.tarot-page .tarot-stage{padding:18px}}
