/* Independent reference edition; scoped to avoid changing approved earlier pages. */
body:has(.reference-bottom-nav){background:#f7f5f1;color:#201b16;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}
body:has(.reference-bottom-nav) .shell{width:min(100%,430px);padding:0 12px 85px;max-width:430px}
body:has(.reference-bottom-nav) .topbar{padding:14px 0;text-align:center}.reference-report p{font-size:14px;line-height:1.95;color:#94704f;margin:0 0 16px}
body:has(.reference-bottom-nav) .brand{font-size:19px;font-weight:750}body:has(.reference-bottom-nav) .topbar small{display:none}
body:has(.reference-bottom-nav) .bottom-nav{width:min(100%,430px);background:#111;color:#fff;border:0;height:65px;padding-bottom:4px;box-shadow:none}
body:has(.reference-bottom-nav) .bottom-nav a{color:#fff;font-size:12px}body:has(.reference-bottom-nav) .bottom-nav a.active{color:#f5d0a1}
.ref-profile{background:#fff;padding:17px 16px;border-radius:15px 15px 0 0;display:flex;flex-direction:column;gap:5px}.ref-profile strong{font-size:22px;letter-spacing:.03em}.ref-profile>span{font-weight:700;font-size:16px}.ref-profile>small{color:#987759;font-size:12px}
.ref-chart{padding:0 0 12px;background:white;border-radius:0 0 15px 15px;margin-bottom:12px;overflow:hidden}.ref-digits{display:grid;grid-template-columns:repeat(11,minmax(0,1fr));background:#fffaf2;border:1px solid #ede5d9;border-radius:8px 8px 0 0;overflow:hidden}.ref-digits span{text-align:center;font-size:23px;font-weight:750;line-height:47px;border-right:1px solid #ede5d9}.ref-digits span:last-child{border:0}.ref-digits .middle{background:#f0f0ef}
.chart-row{position:relative;width:100%;border-bottom:1px solid #f1ece4;height:43px}.chart-slot{position:absolute;top:0;width:9%;height:100%;display:flex;align-items:center;justify-content:center;white-space:nowrap;text-align:center;font-size:11px;color:#101010}.star-row .tail{color:#f04036;font-weight:750}.element-row .chart-slot i{display:flex;align-items:center;justify-content:center;width:26px;height:26px;color:white;font-style:normal;font-size:14px;border-radius:50%}.score-row{height:34px}.score-row .chart-slot{font-size:11px;color:#98724a}.ref-card{background:#fff;border-radius:15px;padding:20px 17px;margin-bottom:12px;border:0}.ref-card>header{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #f0e9df;margin-bottom:17px;padding-bottom:12px}.ref-card h2{font-size:20px;line-height:1.4;color:#18110b;font-weight:800}.ref-badge{flex:none;font-size:10px;color:#ab5a24;border:1px solid #f2dfcd;border-radius:16px;padding:2px 7px;background:#fff9f1}.ref-subsection{padding:17px 0 2px;border-top:1px solid #eee5d9}.ref-subsection:first-of-type{padding-top:8px;border:0}.ref-subsection h3,.ref-pattern h3{font-size:14px;font-weight:750;color:#2a2117;margin-bottom:12px}.ref-subsection p:last-child{margin-bottom:15px}.ref-pattern+.ref-pattern{border-top:1px solid #eee5d9;padding-top:17px;margin-top:17px}.ref-condition{background:#fcf8f1;border-left:2px solid #c59a63;padding:11px;margin-top:8px}.ref-condition p{font-size:12px;margin-bottom:6px}.reference-report .ref-boundary{padding:10px 12px;background:#f7f1e7;border-radius:10px;color:#8f7357;font-size:11px;line-height:1.65;margin-top:12px;margin-bottom:0}.ref-palaces{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid #eee6dc;border-radius:15px;overflow:hidden}.ref-palace{background:#fff;height:112px;position:relative;text-align:center;border-right:1px solid #eee6dc;border-bottom:1px solid #eee6dc;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px}.ref-palace:nth-child(3n){border-right:0}.ref-palace:nth-last-child(-n+3){border-bottom:0}.ref-palace small{position:absolute;top:8px;left:9px;font-size:10px}.ref-palace strong{font-size:31px;line-height:1.4}.ref-palace span{font-size:11px;color:#473522}.ref-palace.gray{background:#a0aab4}.ref-palace.gray span{color:#273442}.ref-palaces+p{margin-top:16px}.ref-years{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.ref-year{background:#fff;border:1px solid #eedfcc;border-radius:10px;padding:7px 3px;min-width:0;text-align:center;color:#ae783a;display:flex;flex-direction:column;gap:3px}.ref-year small{font-size:9px}.ref-year b{font-size:14px}.ref-year span{background:#a67237;color:white;border-radius:4px;font-size:10px;padding:2px 0;white-space:nowrap}.ref-year.selected{border-color:#d3a347;box-shadow:0 2px 5px #b58a3523;background:#fffbf2}.ref-year-panel{border-left:3px solid #c38637;padding:12px 0 3px 13px;margin-top:17px}.ref-year-panel[hidden]{display:none}.ref-year-panel>small{font-size:11px;color:#aa793c}.ref-year-panel>p{margin-top:12px}.reference-report .ref-years-label{font-size:11px;margin-bottom:10px}
.ref-evidence{font-size:12px;line-height:1.8;color:#8e704f;border:1px solid #e8decf;border-radius:12px;padding:12px 14px;margin-bottom:12px;background:#fff}.ref-evidence summary{cursor:pointer;color:#634926}.ref-evidence li{margin-bottom:11px;overflow-wrap:anywhere}.ref-evidence p{font-size:12px}.ref-ending{text-align:center;padding:17px 0}.ref-ending p{font-size:13px}.ref-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ref-actions>a,.ref-actions>button,.ref-consult{border:1px solid #d2ad80;background:#fff6e9;color:#8c5b24;border-radius:10px;padding:12px 5px;font-size:13px}.ref-actions>button{background:#b28040;color:white}.ref-consult{margin-top:14px;padding:7px 18px;background:transparent}.ref-ending [data-share-status]{display:block;line-height:1.6;margin-top:8px;color:#94734f}.reference-assistant{display:none}.reference-report [id]{scroll-margin-top:12px}
@media(max-width:350px){.ref-card{padding:17px 13px}.ref-card h2{font-size:18px}.ref-digits span{font-size:20px}.chart-slot{font-size:10px}.element-row .chart-slot i{width:23px;height:23px}.ref-palace{background:#fff;height:98px}.ref-palace span{font-size:10px}.ref-year span{font-size:9px}}
.reference-input .ref-input-card{background:#fff;border-radius:18px;padding:20px 17px;margin-bottom:12px}.reference-input h1{font-size:20px;margin-bottom:19px}.ref-line{display:flex;align-items:center;gap:12px;width:100%;border:0;border-bottom:1px solid #eee7dc;background:#fff;min-height:65px;padding:12px 0;text-align:left}.ref-line>b,.ref-choice-row>b{flex:none;font-size:14px;min-width:70px;font-weight:700}.ref-line input{border:0;background:transparent;width:100%;min-width:0;padding:9px 0;outline-offset:2px;font-size:14px}.ref-line input::placeholder{color:#b5a697}.ref-choice-row{display:flex;align-items:center;gap:10px;padding:18px 0;border-bottom:1px solid #eee7dc}.ref-choice-row>div{display:flex;gap:8px;flex:1;justify-content:flex-end}.ref-option{position:relative;cursor:pointer;flex:1}.ref-option input{position:absolute;opacity:0;pointer-events:none}.ref-option span{display:block;text-align:center;border:1px solid #e9d9c5;border-radius:8px;padding:8px 5px;font-size:13px;color:#94704f;white-space:nowrap}.ref-option input:checked+span{color:#8b5d2c;background:#f9edda;border-color:#c7944b;font-weight:700}.ref-option input:focus-visible+span{outline:3px solid #d9aa4a}.ref-use .ref-option span{font-size:11px;padding:8px 3px}.ref-select span{flex:1;text-align:right;color:#a58e78;font-size:14px}.ref-select i{font-size:25px;color:#bd9b75;font-style:normal}.ref-submit{width:100%;border:0;border-radius:12px;background:#b38043;color:white;font-size:17px;font-weight:700;padding:14px;margin-top:22px}.ref-submit:disabled{opacity:.6}.ref-region{display:flex;align-items:center;gap:10px;border-bottom:1px solid #eee7dc;padding:0 0 14px}.ref-region b{font-size:13px}.ref-region .selected{font-size:12px;border-radius:6px;background:#f7ebd8;color:#99703b;padding:3px 7px}.ref-region small{color:#a48d74;font-size:10px;margin-left:auto}.ref-other-services{display:grid;gap:8px}.ref-other-services a{background:white;border-radius:12px;padding:15px 17px;font-size:14px;display:flex;justify-content:space-between}.ref-other-services span{color:#b69671}.ref-form-error{color:#b4492b;margin-top:12px;font-size:13px;line-height:1.6}.ref-picker{position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,430px);border:0;border-radius:20px 20px 0 0;padding:0;background:white;max-height:80dvh;overflow:auto}.ref-picker::backdrop{background:#30231685}.ref-picker>header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:white;border-bottom:1px solid #ece2d4;z-index:1}.ref-picker>header button{border:0;border-radius:50%;width:30px;height:30px;font-size:23px;color:#997348;background:#f5eee5}.ref-career-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:20px}.ref-career-options button,.ref-age-options button{border:1px solid #ebdcc5;border-radius:9px;padding:12px;background:#fffaf2;color:#79572e;font-size:14px}.ref-age-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:18px;max-height:55dvh;overflow:auto}.ref-age-options button{font-size:12px;padding:10px 3px}
@media(max-width:350px){.ref-choice-row>b,.ref-line>b{min-width:60px;font-size:13px}.ref-choice-row{gap:7px}.ref-choice-row>div{gap:5px}.ref-region small{display:none}}
/* The approved older #core styles must never color the reference reading surface. */
.reference-report #core{background:#fff;color:#201b16;border:0;border-radius:15px}
.reference-report #core h2,.reference-report #core h3{color:#21170e}
.reference-report #core p{color:#94704f}
.reference-report .score-row .chart-slot{flex-direction:column;gap:0;line-height:1.15}
.reference-report .score-row .chart-slot b{font-weight:400;font-size:11px}
.reference-report .score-row .chart-slot small{font-size:8px;color:#ab8966}
.reference-bottom-nav svg{width:22px;height:22px;margin-bottom:2px}.reference-bottom-nav a{gap:3px!important}
.reference-records .ref-record-head{display:flex;align-items:center;justify-content:space-between;padding:12px 0 15px}.ref-record-head h1{margin:0;font-size:22px}.ref-record-head small{font-size:12px;color:#9a7751}.ref-record-search{width:100%;border:1px solid #e8dbca;background:#fff;border-radius:12px;padding:12px 15px;margin-bottom:14px;outline-color:#c29861}.ref-record{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:17px;background:white;border:1px solid #efe4d5;border-radius:14px;margin-bottom:10px}.ref-record[hidden],#record-no-match[hidden]{display:none}.ref-record h2{font-size:16px;margin:0 0 5px}.ref-record p{font-size:15px;color:#835e36;margin:0 0 6px}.ref-record small{font-size:11px;color:#a2876b}.ref-record-actions{display:flex;flex-direction:column;gap:12px;align-items:center;font-size:12px}.ref-record-actions button{border:0;color:#ad5e3c;background:none;padding:0}.ref-record-actions a{color:#9e763e}.ref-record-note,.ref-record-empty{font-size:12px;line-height:1.8;color:#9a7b58;text-align:center;padding:18px}.ref-record-empty a{display:block;color:#805a2c;margin-top:12px}.ref-delete-body{padding:20px;color:#80613f}.ref-delete-body p{font-size:13px;line-height:1.7;margin-bottom:20px}.ref-delete-body form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ref-delete-body button{border:1px solid #dfc6a7;border-radius:9px;padding:10px;background:#fff7eb;color:#795531}.ref-delete-body button.danger{background:#a95e41;border-color:#a95e41;color:white}

.ref-professional-start{margin-top:18px}.ref-professional-start .ref-profile{padding-top:14px}.ref-reading{background:#fff9e6;border:1px solid #efd9a5;border-radius:17px;padding:22px 17px;margin:18px 0;color:#927136}.ref-reading small{font-size:12px;font-weight:700}.ref-reading h2{font-size:20px;line-height:1.5;margin:8px 0;color:#84521f}.ref-reading p{font-size:13px;line-height:1.8;margin:8px 0 15px}.ref-reading a{display:inline-flex;background:#f1ce28;color:#46340b;border-radius:12px;padding:11px 17px;font-size:14px;font-weight:750;text-decoration:none}

.ref-picker>header{padding:12px 16px}.ref-picker>header button{width:auto;height:auto;border-radius:0;background:none;font-size:14px;padding:5px 0;color:#8c765d}.ref-picker>header [data-ref-confirm]{color:#ac7a3b;font-weight:700}.ref-picker>header button:disabled{opacity:.4}.ref-career-options,.ref-age-options{display:flex;flex-direction:column;gap:0;padding:12px 18px;max-height:270px;overflow:auto}.ref-career-options button,.ref-age-options button{flex:none;width:100%;background:white;border:0;border-radius:0;padding:12px 10px;font-size:17px;color:#8f8375;min-height:46px}.ref-career-options button.selected,.ref-age-options button.selected{background:#fff8ee;color:#95672d;border-top:1px solid #e6d2b4;border-bottom:1px solid #e6d2b4;font-weight:700}

/* Legacy #core forced a white title; reference headings remain readable on white. */
.reference-report #core h2{color:#21170e!important}.reference-report .ref-card h2::before{display:none!important}

.ref-year.wood span{background:#279644}.ref-year.fire span{background:#cc4936}.ref-year.earth span{background:#a37729}.ref-year.metal span{background:#b58b20}.ref-year.water span{background:#397db7}

.reference-secondary{color:#775331}.reference-secondary .page-head{margin-bottom:18px}.reference-secondary .page-head h1,.reference-secondary .article-head h1{color:#21170e}.reference-secondary .card,.reference-secondary .record-card,.reference-secondary .device-note{background:#fff;border:1px solid #eadfce;border-radius:15px;color:#805e39}.reference-secondary p{color:#8d6b49}.reference-secondary .btn.primary{background:#af7c3a;border-color:#af7c3a}.reference-secondary .btn.secondary,.reference-secondary .type-tag,.reference-secondary .category-tabs a.active{color:#8e642f;border-color:#dfc5a0;background:#fff6e8}.reference-secondary .record-list{max-width:100%}.reference-secondary a.text-link,.reference-secondary a.crumb{color:#a47132}

.reference-secondary .knowledge-filters a[aria-current=page]{border-color:#ad7b3e;color:#8c602b;background:#fff7e9}.reference-secondary .knowledge-meta,.reference-secondary .knowledge-meta time,.reference-secondary .knowledge-tags span,.reference-secondary .tag{color:#946f41}.reference-secondary .knowledge-tags span{background:#f8f0e3}
.reference-secondary .my-record-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:16px 0 8px}
.reference-secondary .my-record-controls label{margin:0;min-width:0}
.reference-secondary .my-record-controls select,.reference-secondary .my-record-controls input{width:100%;min-height:40px;box-sizing:border-box;font-size:14px}
.reference-secondary .my-record-search{flex:1;min-width:110px!important}
.reference-secondary .my-record-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:16px;font-size:13px}
.reference-secondary .my-record-manage{margin:14px 0 0;text-align:right;font-size:13px}
.reference-secondary .sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
