/* Shared shell for public, workspace and account pages. */
.fatemate-shell{position:sticky;top:0;z-index:320;height:72px;background:rgba(255,255,255,.97);border-bottom:1px solid #eaeae7;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#242621}
.fatemate-shell-inner{max-width:1360px;height:100%;margin:auto;padding:0 32px;display:flex;align-items:center;gap:32px}.fatemate-shell a{text-decoration:none;color:inherit}.fatemate-shell-brand{font-size:21px;font-weight:700;letter-spacing:-.03em;white-space:nowrap}.fatemate-shell-links{display:flex;align-items:center;gap:26px;margin-left:auto;font-size:13px;color:#73766f}.fatemate-shell-links a:hover,.fatemate-shell-links a[aria-current=page]{color:#1d251c}.fatemate-shell-tools{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border:1px solid #d9ddd5;border-radius:8px;background:#fff;color:#2d352b;font:600 13px inherit;cursor:pointer}.fatemate-shell-tools:hover{background:#f3f6f1}.fatemate-shell-tools:focus-visible{outline:2px solid #76856f;outline-offset:3px}.fatemate-shell-icon{font-size:17px;line-height:1}
body.fatemate-shell-ready>nav.container,.fatemate-shell-ready .fm-workspace-brand,.fatemate-shell-ready .workspace-sidebar-trigger,.fatemate-shell-ready [class*="sidebar-wrapper"]>div.fixed{display:none!important}
.fatemate-shell-ready .fate-tools-launcher{display:none!important}.fatemate-shell-ready .fatemate-shell-tools{display:inline-flex}.fatemate-shell-ready .fm-tool-page{padding-top:48px}.fatemate-shell-ready .commerce-main{padding-top:56px}.fatemate-shell-ready .ref-layout{margin-top:48px}
@media(max-width:767px){.fatemate-shell{height:64px}.fatemate-shell-inner{padding:0 16px;gap:14px}.fatemate-shell-brand{font-size:19px}.fatemate-shell-links{gap:14px;font-size:12px}.fatemate-shell-links a:nth-child(2){display:none}.fatemate-shell-tools{height:38px;padding:0 10px}.fatemate-shell-ready .fm-tool-page{padding-top:28px}.fatemate-shell-ready .commerce-main{padding-top:36px}.fatemate-shell-ready .ref-layout{margin-top:32px}}
/* Shared reading rhythm and working surfaces. */
.fatemate-shell-ready{--fate-page-width:1120px;--fate-ink:#242621;--fate-muted:#73766f;--fate-rule:#e8e9e5;--fate-surface:#fafbf9;--fate-action:#283128}
.fatemate-shell-ready :is(.fm-page-heading h1,.commerce-main h1,.ref-intro h1,.agent-intro h1){font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--fate-ink);font-size:36px;line-height:1.2;letter-spacing:0;font-weight:700}
.fatemate-shell-ready :is(.fm-page-heading>p,.commerce-lead,.ref-intro-copy,.agent-intro p){color:var(--fate-muted);font-size:14px;line-height:1.8}
.fatemate-shell-ready :is(.fm-birth-form,.aiboys-panel,.aiboys-divination-panel,.ref-birth-form,.account-panel,.pricing-card){border:1px solid var(--fate-rule);border-radius:12px;background:#fff;box-shadow:none}
.fatemate-shell-ready :is(.fm-birth-form input:not([type=checkbox]):not([type=radio]),.fm-birth-form select,.fm-birth-form button[role=combobox],.ref-field input:not([type=radio]),.ref-field select,.aiboys-panel input,.aiboys-panel select,.aiboys-divination-form input,.aiboys-divination-form textarea,.aiboys-divination-form select){min-height:46px;border:1px solid #dedfda;border-radius:8px;background:var(--fate-surface);color:var(--fate-ink);box-shadow:none}
.fatemate-shell-ready :is(.ref-submit,.aiboys-panel-submit,.aiboys-divination-submit,.fm-birth-form button.bg-primary,.pricing-button.primary){background:var(--fate-action);color:white;border-radius:8px;min-height:48px}
.fatemate-shell-ready :is(.ref-submit,.aiboys-panel-submit,.aiboys-divination-submit,.fm-birth-form button.bg-primary,.pricing-button.primary):hover:not(:disabled){background:#465445}
.fatemate-shell-ready .commerce-main{width:min(var(--fate-page-width),calc(100% - 64px));margin-inline:auto}.fatemate-shell-ready .commerce-main h1 br{display:none}.fatemate-shell-ready .account-grid{gap:16px}.fatemate-shell-ready .account-panel{border-radius:12px}
.fatemate-shell-ready .ref-layout{width:min(1040px,calc(100% - 64px));margin-left:auto;margin-right:auto}.fatemate-shell-ready .ref-birth-form{box-shadow:none}
@media(min-width:1100px){.fatemate-shell-ready.fm-bazi-page .fm-tool-page:has(>.fm-form-region form){padding-top:48px}.fatemate-shell-ready.fm-bazi-page .fm-tool-page:has(>.fm-form-region form)>.fm-page-heading{padding-top:150px}.fatemate-shell-ready.fm-bazi-page .fm-page-heading h1{font-size:36px}}
@media(max-width:767px){.fatemate-shell-ready :is(.fm-page-heading h1,.commerce-main h1,.ref-intro h1,.agent-intro h1){font-size:28px}.fatemate-shell-ready .commerce-main,.fatemate-shell-ready .ref-layout{width:calc(100% - 32px)}}


/* Navigation and account menus, shared by every page. */
.fatemate-shell-inner{gap:24px}.fatemate-shell-links{gap:8px;margin-left:auto;color:#555b53;font-size:14px}.fatemate-shell-links>a,.fate-menu-trigger{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 13px;border:0;border-radius:7px;background:transparent;color:inherit;font:500 14px/1.2 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;text-decoration:none;cursor:pointer}.fatemate-shell-links>a:hover,.fate-menu-trigger:hover,.fate-menu-trigger[aria-expanded=true]{background:#f4f5f2;color:#20251f}.fate-menu{position:relative}.fate-chevron{width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);opacity:.7}.fate-menu-trigger[aria-expanded=true] .fate-chevron{transform:rotate(225deg) translate(-1px,-1px)}.fate-popover[hidden]{display:none!important}.fate-popover{position:absolute;top:calc(100% + 12px);right:0;z-index:400;background:#fff;border:1px solid #e7e9e4;border-radius:12px;box-shadow:0 14px 38px rgba(26,32,24,.13);color:#252b24}.fate-tools-popover{right:auto;left:0;width:580px;padding:20px}.fate-tools-heading{display:flex;align-items:baseline;gap:12px;padding:0 4px 15px;border-bottom:1px solid #eeefec}.fate-tools-heading strong{font-size:14px}.fate-tools-heading span{font-size:12px;color:#92988f}.fate-nav-groups{display:grid;grid-template-columns:1fr 1fr;gap:16px 24px;padding-top:13px}.fate-nav-group h2{margin:0 0 6px;padding:4px 8px;color:#92988f;font-size:11px;font-weight:600}.fate-nav-group a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px;border-radius:7px;font-size:13px;font-weight:600}.fate-nav-group a:hover,.fate-account-options a:hover{background:#f5f6f3}.fate-nav-group a>span:last-child{font-size:13px;color:#9ca397}.fate-nav-group small{display:block;margin-top:4px;color:#92988f;font-size:11px;font-weight:400}.fate-account-slot{min-width:48px;display:flex;justify-content:flex-end}.fate-login-link{padding:9px 16px;border-radius:7px;background:#283128;color:#fff!important;font-size:13px;font-weight:600}.fate-login-link:hover{background:#435342}.fate-avatar-trigger{padding:3px 4px;gap:8px}.fate-avatar{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:50%;background:#e9eee6;color:#344534;font-size:14px;font-weight:700}.fate-account-popover{width:260px;padding:8px}.fate-account-identity{display:flex;gap:10px;align-items:center;padding:10px 8px 14px}.fate-account-identity>span:last-child{min-width:0}.fate-account-identity strong,.fate-account-identity small{display:block}.fate-account-identity strong{font-size:13px}.fate-account-identity small{overflow:hidden;margin-top:4px;color:#858c82;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.fate-account-credits{display:flex;justify-content:space-between;align-items:center;margin:0 4px 8px;padding:12px;border-radius:7px;background:#f5f7f2;font-size:13px}.fate-account-credits strong{color:#667d58;font-size:15px}.fate-account-options{padding:5px 0;border-top:1px solid #eeefec}.fate-account-options a{display:flex;justify-content:space-between;padding:10px 9px;border-radius:7px;font-size:13px}.fate-account-options a span{color:#9ca397}.fate-signout{width:100%;padding:11px 9px;border:0;border-top:1px solid #eeefec;background:#fff;text-align:left;color:#777d75;font:inherit;font-size:13px;cursor:pointer}.fate-signout:hover{color:#222}.fatemate-shell :focus-visible{outline:2px solid #76856f;outline-offset:2px}.account-history,.admin-panel,#credits{scroll-margin-top:90px}
@media(max-width:767px){.fatemate-shell-inner{gap:5px;padding:0 12px}.fatemate-shell-brand{font-size:18px}.fatemate-shell-links{gap:0}.fatemate-shell-links>a,.fate-menu-trigger{padding:0 8px;font-size:13px}.fatemate-shell-links>a:first-child{display:none}.fatemate-shell-links>a[data-shell-route="/pricing"]{display:inline-flex}.fate-account-slot{min-width:38px}.fate-avatar-trigger{padding:3px}.fate-avatar-trigger .fate-chevron{display:none}.fate-tools-popover{position:fixed;top:64px;left:8px;right:8px;width:auto;max-height:calc(100dvh - 76px);overflow:auto;padding:15px}.fate-nav-groups{gap:12px}.fate-account-popover{position:fixed;top:64px;right:8px;width:min(280px,calc(100vw - 16px))}}
@media(min-width:768px){.fate-tools-popover{left:auto;right:0;width:min(680px,calc(100vw - 32px))}.fate-nav-groups{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:767px){.fatemate-shell-links .fate-nav-group a:nth-child(2){display:flex}}
/* Distinguish everyday account links from privileged operations. */
.fate-account-popover{width:270px;padding:8px}.fate-account-identity{padding:10px 9px 13px}.fate-account-credits{margin:0 2px 7px;padding:11px 12px}.fate-account-credits strong{font-variant-numeric:tabular-nums}.fate-account-credits strong small{font-size:11px;font-weight:500;color:#879282}.fate-account-options,.fate-account-admin{padding:5px 0;border-top:1px solid #eeefec}.fate-account-options a,.fate-account-admin a{display:flex;align-items:center;gap:10px;min-height:39px;padding:8px 9px;border-radius:7px;font-size:13px}.fate-account-options a:hover,.fate-account-admin a:hover{background:#f5f6f3}.fate-account-icon{width:16px;height:16px;flex:none;color:#808a7e}.fate-account-arrow{margin-left:auto;color:#a4aba1}.fate-account-section-label{display:block;padding:8px 9px 3px;color:#9aa297;font-size:11px}.fate-signout{display:flex;align-items:center;gap:10px;margin:0;padding:11px 9px;border-radius:0 0 6px 6px}.fate-signout:hover{background:#f7f8f6}
.fate-account-options a>span:not(.fate-account-arrow),.fate-account-admin a>span:not(.fate-account-arrow){color:#30362f}.fate-account-options a:hover>span:not(.fate-account-arrow),.fate-account-admin a:hover>span:not(.fate-account-arrow){color:#182218}
/* A compact shared footer; original mirrored contact and social links stay hidden. */
body footer:not(.fate-site-footer){display:none!important}
html body .fate-site-footer{display:block;margin:0;border-top:1px solid #e9ebe7;background:#fafbf9;color:#697267;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
html body .fate-site-footer .fate-footer-inner{max-width:1280px;margin:0 auto;padding:56px 40px 24px}
.fate-footer-top{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,3fr);gap:60px}.fate-footer-brand>a{font-size:21px;font-weight:700;letter-spacing:-.03em;color:#202720;text-decoration:none}.fate-footer-brand p{max-width:210px;margin:14px 0 0;color:#929a90;font-size:12px;line-height:1.8}.fate-footer-columns{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px}.fate-footer-column{display:flex;flex-direction:column;align-items:flex-start;gap:11px}.fate-footer-column h2,.fate-footer-archive-heading h2{margin:0 0 8px;color:#343c33;font-size:13px;font-weight:600}.fate-footer-column a,.fate-footer-extra-links a{color:#858e82;text-decoration:none;font-size:12px;line-height:1.5;white-space:normal}.fate-footer-column a:hover,.fate-footer-extra-links a:hover{color:#3e533c}.fate-footer-archive{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,3fr);gap:60px;margin-top:44px;padding-top:28px;border-top:1px solid #e8ebe6}.fate-footer-archive-heading p{margin:0;color:#a1a99e;font-size:12px;line-height:1.7}.fate-footer-archive-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px}.fate-footer-archive details{border-bottom:1px solid #ecefea}.fate-footer-archive summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;list-style:none;color:#626c5f;font-size:12px;cursor:pointer}.fate-footer-archive summary::-webkit-details-marker{display:none}.fate-footer-archive details[open] summary span{transform:rotate(45deg)}.fate-footer-extra-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;padding:3px 0 18px}.fate-footer-bottom{display:flex;justify-content:space-between;gap:16px;margin-top:42px;padding-top:20px;border-top:1px solid #e8ebe6;color:#a2aaa0;font-size:11px}.fate-legal-page{min-height:50vh}.fate-legal-notice{margin-top:28px;color:#81897e;font-size:13px}.fate-legal-back{display:inline-block;margin-top:24px;color:#52694d;font-size:13px}
@media(max-width:767px){html body .fate-site-footer .fate-footer-inner{padding:36px 20px 24px}.fate-footer-top,.fate-footer-archive{grid-template-columns:1fr;gap:26px}.fate-footer-columns{grid-template-columns:repeat(2,minmax(0,1fr));gap:30px 20px}.fate-footer-archive{margin-top:32px}.fate-footer-bottom{margin-top:30px}.fate-footer-extra-links{grid-template-columns:1fr}}
.fate-tools-popover{max-height:calc(100dvh - 90px);overflow:auto}.fate-nav-archive{margin-top:16px;border-top:1px solid #e9ece7}.fate-nav-archive summary{display:flex;justify-content:space-between;gap:12px;padding:14px 8px 4px;color:#596455;font-size:12px;font-weight:600;list-style:none;cursor:pointer}.fate-nav-archive summary::-webkit-details-marker{display:none}.fate-nav-archive summary span{color:#a19b8e;font-size:11px;font-weight:400}.fate-nav-archive p{margin:8px;color:#9a9f97;font-size:11px;line-height:1.5}.fate-nav-archive>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px 8px}.fate-nav-archive a{padding:8px;border-radius:6px;color:#657061;font-size:12px}.fate-nav-archive a:hover{background:#f5f6f3}@media(max-width:767px){.fate-tools-popover{max-height:calc(100dvh - 76px)}.fate-nav-archive>div{grid-template-columns:repeat(2,minmax(0,1fr))}}
.fatemate-shell-links .fate-guide-link{color:#737d70;font-size:13px}@media(max-width:767px){.fatemate-shell-links .fate-guide-link{padding-inline:6px;font-size:12px}}

/* The mark is cropped visually to its transparent canvas, with no wordmark. */
.fate-brand-mark{display:inline-flex;position:relative;align-items:center;justify-content:center;overflow:hidden;width:52px;height:56px;flex:none;vertical-align:middle}.fate-brand-mark img{display:block;flex:none;width:90px;max-width:none;height:60px;object-fit:contain}.fate-footer-brand>a.fate-brand-mark{width:52px;height:56px}.fate-footer-brand p{margin-top:8px}

/* The same editorial footer is shared by the homepage and interior pages. */
html body .fate-site-footer{border:0;background:transparent!important;color:#191817;font-family:Georgia,"Songti SC","Noto Serif CJK SC",serif}
html body .fate-site-footer .fate-footer-inner{width:min(1400px,calc(100% - 90px));max-width:none;margin:0 auto;padding:50px 0 28px;border-top:1px solid #c8c3bc}
html body .fate-site-footer .fate-footer-top{grid-template-columns:minmax(200px,1fr) minmax(0,2fr);gap:60px}
html body .fate-site-footer .fate-footer-brand>a{color:#191817;font-size:25px;font-weight:600;letter-spacing:0}
html body .fate-site-footer .fate-footer-brand p{max-width:245px;margin:14px 0 0;color:#625d56;font-size:14px;line-height:1.6}
html body .fate-site-footer .fate-footer-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
html body .fate-site-footer .fate-footer-column{gap:11px}
html body .fate-site-footer .fate-footer-column h2{margin:0 0 7px;color:#191817;font:600 15px/1.3 Georgia,"Songti SC","Noto Serif CJK SC",serif}
html body .fate-site-footer .fate-footer-column a{color:#625d56;font-size:14px;line-height:1.4;text-decoration:none}
html body .fate-site-footer .fate-footer-column a:hover{color:#111;text-decoration:underline}
html body .fate-site-footer a:focus-visible{outline:2px solid #55514c;outline-offset:3px}
html body .fate-site-footer .fate-footer-bottom{display:flex;justify-content:space-between;gap:16px;margin-top:45px;padding-top:20px;border-top:1px solid #d8d4ce;color:#77716b;font-size:12px}
@media(max-width:760px){html body .fate-site-footer .fate-footer-inner{width:calc(100% - 36px);padding:40px 0 28px}html body .fate-site-footer .fate-footer-top{grid-template-columns:1fr;gap:32px}html body .fate-site-footer .fate-footer-columns{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 20px}html body .fate-site-footer .fate-footer-bottom{margin-top:32px;flex-wrap:wrap}}

/* Keep the icon and the selectable wordmark together in navigation and footer. */
.fate-brand-lockup{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;flex:none}.fate-brand-name{line-height:1}.fate-footer-brand>a.fate-brand-lockup{width:auto;height:auto}@media(max-width:767px){.fatemate-shell-brand.fate-brand-lockup{gap:2px;font-size:18px}.fatemate-shell-brand .fate-brand-mark{width:46px}}

/* Compact, readable navigation on small screens. */
@media(max-width:560px){
  .fatemate-shell-inner{gap:3px}
  .fatemate-shell-brand.fate-brand-lockup{font-size:17px}
  .fatemate-shell-links .fate-guide-link{display:none}
  .fatemate-shell-links>a,.fate-tools-menu>.fate-menu-trigger,.fate-login-link{white-space:nowrap}
  .fate-login-link{padding:9px 12px}
}
@media(max-width:360px){.fatemate-shell-links>a[data-shell-route="/pricing"]{display:none}.fatemate-shell-brand.fate-brand-lockup{font-size:16px}.fatemate-shell-brand .fate-brand-mark{width:42px}}
.fate-tools-popover .fate-nav-pricing{display:none}
@media(max-width:360px){.fate-tools-popover .fate-nav-pricing{display:block;margin:12px 4px 0;padding:12px 8px 2px;border-top:1px solid #eeefec;color:#4c6248;font-size:13px;font-weight:600}}
.fate-save-wrap{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0;color:#71806b;font-size:12px}.fate-save-chart{min-height:36px;padding:0 14px;border:1px solid #ccd8c6;border-radius:8px;background:#fff;color:#395136;font-size:13px;cursor:pointer}.fate-save-chart:disabled{opacity:.6}.fate-save-status a{color:#496b43}.ziwei-result-toolbar .fate-save-wrap{margin:0 0 0 auto}.ziwei-result-toolbar .fate-save-chart{white-space:nowrap}

/* Destmaster 2026: shared warm-paper, ink and bronze finish across workspaces. */
body.fatemate-shell-ready{background:#f9f7f4;color:#282725}
body.fatemate-shell-ready .fatemate-shell{background:rgba(249,247,244,.97);border-bottom:1px solid #e8e2dc;color:#292824}
body.fatemate-shell-ready .fate-login-link,body.fatemate-shell-ready .fate-global-google{background:#282b28}
body.fatemate-shell-ready .fate-site-footer{background:#f2efeb;border-color:#e4ddd4}
body.fatemate-shell-ready :is(.ref-intro,.relations-heading,.qimen-header,.life-header,.network-header,.history-heading,.agent-intro){color:#292824}
body.fatemate-shell-ready :is(.ref-kicker,.commerce-kicker,.qimen-header>p:first-child,.life-header>p:first-child,.network-header>p:first-child,.history-heading>p:first-child){color:#a2825e}
body.fatemate-shell-ready :is(.ref-birth-form,.relations-form,.relations-result,.qimen-form,.qimen-result,.life-form,.life-result,.network-panel,.history-list-panel,.history-detail,.account-panel,.account-history,.admin-panel){background:#fff;border-color:#e4ded7;box-shadow:0 8px 28px rgba(58,45,31,.035)}
body.fatemate-shell-ready :is(.ref-field input:not([type=radio]),.ref-field select,.relations-fields input,.relations-fields select,.qimen-fields input,.qimen-fields select,.life-fields input,.life-fields select,.network-panel input,.network-panel select){border-color:#dfd9d1;background:#fbfaf8;color:#292824}
body.fatemate-shell-ready :is(.ref-submit,.relations-submit,.relations-ai button,.qimen-form button[type=submit],.life-form button[type=submit],.network-panel button[type=submit]){background:#2b2e2b;color:#fff}
body.fatemate-shell-ready :is(.ref-submit,.relations-submit,.relations-ai button,.qimen-form button[type=submit],.life-form button[type=submit],.network-panel button[type=submit]):hover:not(:disabled){background:#655744}
body.fatemate-shell-ready :is(.relations-chart,.history-facts){background:#f8f5f0}
body.fatemate-shell-ready :is(.fate-help,.fate-help-heading h2,.fate-help-content h3){color:#39352f}
body.fatemate-shell-ready .fate-help{border-color:#e3ddd5}
body.fatemate-shell-ready .fate-help-related a{color:#8b6946}
body.fatemate-shell-ready .fate-save-chart{border-color:#d4c5b3;color:#765a3d}
body.fatemate-shell-ready :is(button,input,select,textarea,a):focus-visible{outline:2px solid #b39269;outline-offset:3px}
@media(min-width:1000px){body.fatemate-shell-ready .ref-intro:after{content:'';display:block;width:min(100%,380px);height:230px;margin-top:28px;border-radius:12px;background:linear-gradient(0deg,rgba(34,39,36,.14),transparent),url('/_design/tool-ziwei-v3.jpg') center 35%/cover}}

/* Make the shared header feel like a product workspace rather than a landing-only nav. */
.fatemate-shell{box-shadow:0 1px 0 rgba(36,48,36,.02)}
@media(min-width:768px){.fatemate-shell-inner{max-width:1320px}.fatemate-shell-links{gap:4px}.fatemate-shell-links>a,.fate-menu-trigger{min-height:38px}}

/* Shared heading and form rhythm for independently served tool pages. */
body:has(.ref-layout) .ref-layout,body:has(.relations-main) .relations-main,body:has(.qimen-main) .qimen-main,body:has(.life-main) .life-main,body:has(.network-main) .network-main,body:has(.history-main) .history-main{width:min(1040px,calc(100% - 48px));max-width:1040px;margin-left:auto;margin-right:auto}
body:has(.ref-layout) .ref-layout{width:min(1080px,calc(100% - 48px));max-width:1080px}
:is(.relations-heading,.qimen-header,.life-header,.network-header,.history-heading){padding-bottom:24px;border-bottom:1px solid #e8ece6}
:is(.relations-heading,.qimen-header,.life-header,.network-header,.history-heading) h1{font-size:36px;line-height:1.2;letter-spacing:-.025em;color:#273026}
:is(.relations-heading,.qimen-header,.life-header,.network-header,.history-heading)>p:last-child{max-width:640px;line-height:1.8;color:#737e70}
:is(.relations-form,.relations-result,.qimen-form,.qimen-result,.life-form,.life-result,.network-panel,.history-list-panel,.history-detail,.ref-birth-form){border-color:#e3e9e0;border-radius:12px;box-shadow:0 4px 20px rgba(37,52,33,.025)}
:is(.relations-fields,.qimen-fields,.life-fields,.network-panel) :is(input,select,textarea):focus-visible{outline:2px solid #819479;outline-offset:2px}
:is(.relations-submit,.qimen-form button[type=submit],.life-form button[type=submit],.network-panel button[type=submit],.ref-submit):focus-visible{outline:2px solid #819479;outline-offset:3px}
:is(.qimen-result,.life-result,.relations-result){scroll-margin-top:90px}
@media(max-width:700px){body:has(.ref-layout) .ref-layout,body:has(.relations-main) .relations-main,body:has(.qimen-main) .qimen-main,body:has(.life-main) .life-main,body:has(.network-main) .network-main,body:has(.history-main) .history-main{width:100%;padding-left:16px;padding-right:16px}:is(.relations-heading,.qimen-header,.life-header,.network-header,.history-heading) h1{font-size:28px}}
/* Shared sign-in dialog */
.fatemate-login-global{width:min(400px,calc(100% - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:0;overflow:auto;border:1px solid #e9e2d9;border-radius:16px;background:#fbfaf7;box-shadow:0 24px 70px rgba(32,29,24,.2);color:#292b27;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
.fatemate-login-global::backdrop{background:rgba(27,31,27,.48)}
.fate-global-login-card{position:relative;padding:0}
.fate-global-login-close{display:grid;place-items:center;position:absolute;right:18px;top:18px;width:34px;height:34px;border:0;border-radius:50%;background:transparent;color:#837e76;font-size:23px;line-height:1;cursor:pointer}
.fate-global-login-close:hover{background:#eeebe6;color:#34352f}
.fate-auth-brand{display:flex;align-items:center;gap:5px;padding:24px 30px 20px;border-bottom:1px solid #ede7de;color:#292b27;font-size:16px;font-weight:700;letter-spacing:-.02em}
.fate-auth-brand-mark{position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;width:38px;height:36px;flex:none}
.fate-auth-brand-mark img{display:block;width:65px;max-width:none;height:43px;object-fit:contain}

/* Destmaster's vector mark uses a tight square viewBox. */
.fate-brand-mark img{width:42px;height:42px;max-width:100%;object-fit:contain}
.fate-auth-brand-mark img{width:34px;height:34px;max-width:100%;object-fit:contain}
.fate-brand-name,.fate-auth-brand>span:last-child{font-family:Georgia,'Times New Roman',serif;font-weight:700;letter-spacing:-.025em}
.fate-auth-content{padding:29px 32px 26px}
.fate-global-login-card .fate-auth-content h2{margin:0;color:#282b27;font-size:23px;line-height:1.3;letter-spacing:0}
.fate-global-login-card .fate-auth-content>p:not(.fate-auth-hint){margin:10px 0 0;color:#79756d;font-size:13px;line-height:1.7}
body.fatemate-shell-ready .fate-global-google,.fate-global-google{display:flex;align-items:center;justify-content:center;gap:12px;min-height:48px;margin-top:25px;padding:0 16px;border:1px solid #ddd7cf;border-radius:8px;background:#fff;color:#302f2c;font-size:14px;font-weight:600;text-decoration:none;transition:background .18s,border-color .18s,box-shadow .18s}
body.fatemate-shell-ready .fate-global-google:hover,.fate-global-google:hover{border-color:#bba88e;background:#fcfaf6;box-shadow:0 3px 10px rgba(75,58,40,.06)}
.fate-google-icon{display:block;width:19px;height:19px;flex:none}
.fate-global-google[aria-disabled=true]{opacity:.5;pointer-events:none}
.fate-global-login-status{display:block;margin:10px 0 0;color:#a84a40;font-size:12px;line-height:1.5}
.fate-global-login-status:empty{display:none}
.fate-global-login-card .fate-auth-hint{margin:12px 0 0;color:#99928a;text-align:center;font-size:11px;line-height:1.5}
.fate-auth-bottom{padding:15px 32px 18px;border-top:1px solid #ede7de;text-align:center}
.fate-global-account-link{display:inline-block;margin:0;color:#81705e;font-size:12px;text-decoration:none}.fate-global-account-link:hover{color:#514331;text-decoration:underline}.fate-global-account-link span{margin-left:3px}
.fatemate-login-global :focus-visible{outline:2px solid #a88456;outline-offset:3px}
@media(max-width:560px){.fate-auth-brand{padding:21px 24px 17px}.fate-auth-content{padding:26px 24px 23px}.fate-auth-bottom{padding:14px 24px 17px}.fate-global-login-card .fate-auth-content h2{font-size:21px}}
@media(prefers-reduced-motion:reduce){.fate-global-google{transition:none}}

/* A quiet celestial motif keeps the shared sign-in dialog in the site's visual language. */
.fatemate-login-global{width:min(540px,calc(100% - 32px));border:1px solid #e5e0d8;border-radius:18px;background:#faf8f3;box-shadow:0 25px 80px rgba(27,25,23,.23);font-family:Georgia,"Songti SC","Noto Serif CJK SC",serif}
.fatemate-login-global::backdrop{background:rgba(30,29,27,.43);backdrop-filter:blur(3px)}
.fate-global-login-card{overflow:hidden;isolation:isolate;background:linear-gradient(135deg,#fbf9f5 0%,#f8f5ef 100%)}
.fate-auth-ornament{position:absolute;z-index:-1;top:-16px;right:-126px;width:330px;height:330px;color:#b6a48a;opacity:.23;pointer-events:none;stroke-width:.7}
.fate-auth-landscape{position:absolute;z-index:-1;bottom:-2px;left:0;width:100%;height:74px;color:#a49e93;opacity:.14;filter:blur(3px);pointer-events:none}
.fate-auth-brand{position:relative;min-height:104px;gap:10px;padding:25px 44px;border-color:#e8e1d6;color:#282724;font-size:21px}
.fate-auth-brand-mark{width:39px;height:39px}
.fate-auth-brand-mark img{width:38px;height:38px}
.fate-global-login-close{z-index:2;top:24px;right:25px;color:#81796e}
.fate-auth-content{position:relative;min-height:212px;padding:39px 44px 58px}
.fate-global-login-card .fate-auth-content h2{font-family:Georgia,"Songti SC","Noto Serif CJK SC",serif;font-size:29px;line-height:1.35;color:#242321}
body.fatemate-shell-ready .fate-global-google,.fate-global-google{position:relative;min-height:58px;margin-top:35px;border-color:#ddd5c9;border-radius:9px;background:rgba(252,250,246,.94);color:#292824;font-family:Georgia,"Songti SC","Noto Serif CJK SC",serif;font-size:16px;font-weight:600}
body.fatemate-shell-ready .fate-global-google:hover,.fate-global-google:hover{border-color:#b4a797;background:#fff;box-shadow:0 5px 16px rgba(56,48,38,.07)}
.fatemate-login-global :focus-visible{outline:2px solid #71695f;outline-offset:3px}
@media(max-width:560px){.fate-auth-brand{min-height:82px;padding:20px 25px;font-size:19px}.fate-global-login-close{top:18px;right:17px}.fate-auth-content{min-height:200px;padding:34px 25px 52px}.fate-global-login-card .fate-auth-content h2{font-size:24px}.fate-auth-ornament{width:265px;height:265px;right:-125px;top:6px}.fate-global-google{margin-top:30px}}
.fate-test-login[hidden]{display:none}
.fate-test-login{position:relative;margin-top:23px;padding-top:20px;border-top:1px solid #e6e0d7;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}
.fate-test-login-heading{margin-bottom:13px;color:#777067;font-size:12px;font-weight:600}
.fate-test-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fate-test-fields label{display:grid;gap:6px;color:#5c5750;font-size:12px}
.fate-test-fields input{width:100%;height:42px;min-width:0;padding:0 11px;border:1px solid #ded7ce;border-radius:6px;background:#fffdfa;color:#282724;font:14px -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}
.fate-test-error{margin:10px 0 0;color:#a84a40;font-size:12px;line-height:1.5}
.fate-test-submit{width:100%;height:44px;margin-top:15px;border:0;border-radius:6px;background:#1d1c1a;color:white;font:600 14px -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;cursor:pointer}
.fate-test-submit:hover{background:#3c3935}.fate-test-submit:disabled{opacity:.6;cursor:wait}

/* Align the shared sign-in dialog on one center line. */
.fatemate-login-global .fate-auth-brand{justify-content:center;padding-right:64px;padding-left:64px;text-align:center}
.fatemate-login-global .fate-auth-content,.fatemate-login-global .fate-test-login,.fatemate-login-global .fate-test-fields label,.fatemate-login-global .fate-test-fields input,.fatemate-login-global .fate-test-error,.fatemate-login-global .fate-global-login-status{text-align:center}
.fatemate-login-global .fate-test-fields input{box-sizing:border-box}
