.life-grid .reminder-card{position:relative;overflow:hidden;border-color:rgba(154,127,92,.18)}
.chart-board,.profile-archive,.month-almanac,.luck-market{margin-top:16px;padding:18px;border:1px solid #ddd8cb;border-radius:17px;background:linear-gradient(145deg,#fffefa,#f4f6f0)}.chart-board header,.profile-archive header,.month-almanac header,.luck-market header{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.chart-board h3,.month-almanac h3,.luck-market h3{margin:2px 0 4px;font-size:19px}.chart-board header p,.luck-market header p{margin:0;color:var(--muted);font-size:12px}.chart-board header>span{padding:5px 8px;border:1px solid #dcc181;border-radius:999px;color:#805717;font-size:10px}.chart-board-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:14px;border:1px solid #e8e1d2;border-radius:12px;overflow:hidden}.chart-board-grid article{min-height:118px;padding:12px;border-right:1px solid #eee7dc;border-bottom:1px solid #eee7dc;background:#fff}.chart-board-grid article:nth-child(4n){border-right:0}.chart-board-grid span,.chart-board-grid b,.chart-board-grid small,.chart-board-grid em{display:block}.chart-board-grid span{color:#888075;font-size:11px}.chart-board-grid b{margin:5px 0;color:#a33f27;font:700 24px Georgia,'Noto Serif SC',serif}.chart-board-grid small,.chart-board-grid em{margin-top:5px;color:#657268;font-size:10px;line-height:1.45}.chart-board-grid em{color:#806829;font-style:normal}.chart-board-grid .pending b{color:#999;font-size:17px}.chart-board-note,.luck-market>small{display:block;margin:10px 0 0;color:var(--muted);font-size:11px;line-height:1.55}.profile-archive header{margin-bottom:10px}.profile-archive>div{display:grid;gap:7px}.archive-item{display:flex;justify-content:space-between;gap:12px;padding:11px;border:1px solid #d9e4d9;border-radius:10px;background:#fff;text-align:left;cursor:pointer;font:inherit}.archive-item span{color:var(--muted);font-size:11px}.month-almanac header small{color:var(--muted);font-size:10px}.month-almanac-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-top:13px}.month-almanac-grid span{min-height:49px;padding:6px;border:1px solid #e3e7df;border-radius:9px;background:#fff}.month-almanac-grid span.selected{border-color:#b58a43;background:#fff8e7}.month-almanac-grid b,.month-almanac-grid em,.month-almanac-grid small{display:block}.month-almanac-grid b{font-size:12px}.month-almanac-grid em{margin-top:2px;color:#28594b;font-size:11px;font-style:normal}.month-almanac-grid small{margin-top:2px;color:#876b39;font-size:9px}.luck-market svg{width:100%;height:180px;margin-top:10px;border-radius:12px;background:linear-gradient(180deg,#fafcf8,#eff5ef)}.market-line{fill:none;stroke:#b68738;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.market-fill{fill:rgba(79,127,99,.12)}.luck-market ol{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:7px;margin:10px 0;padding:0;list-style:none}.luck-market li{padding:8px;border-radius:9px;background:#fff}.luck-market li b,.luck-market li span{display:block}.luck-market li b{font-size:11px}.luck-market li span{margin-top:3px;color:#68736b;font-size:10px}.luck-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.luck-tags span{padding:5px 8px;border-radius:999px;background:#eaf0e9;color:#315e50;font-size:10px}.social-tools{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:13px}@container app-viewport (max-width: 650px){.chart-board-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.chart-board-grid article:nth-child(4n){border-right:1px solid #eee7dc}.chart-board-grid article:nth-child(2n){border-right:0}.month-almanac-grid{gap:4px}.month-almanac-grid span{padding:4px}.month-almanac-grid em{font-size:10px}}
.clause-trace{margin-top:9px;padding-top:8px;border-top:1px dashed #e0d5c4}.clause-trace summary{color:#315e50;font-size:11px;font-weight:700;cursor:pointer}.clause-trace ul{display:grid;gap:4px;margin:8px 0 6px;padding-left:16px;color:#66675f;font-size:10px;line-height:1.45}.clause-trace p{margin:0;color:#805717;font-size:10px;line-height:1.45}
.clause-timeline{margin:18px 0;padding:19px;border:1px solid #e1d6bc;border-radius:17px;background:linear-gradient(145deg,#fffdf8,#f6f2e9)}.clause-heading{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.clause-heading h3{margin:1px 0 5px;font-size:19px}.clause-heading p{max-width:660px;margin:0;color:#706c61;font-size:12px;line-height:1.6}.clause-heading>span{padding:6px 8px;border:1px solid #d8bb79;border-radius:999px;background:#fff8e7;color:#805717;font-size:10px;white-space:nowrap}.clause-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:15px}.clause-layer{padding:13px;border:1px solid #e3ddd0;border-radius:13px;background:rgba(255,255,255,.84)}.clause-layer header{display:flex;align-items:center;justify-content:space-between;gap:8px}.clause-layer header span{color:#7a786e;font-size:11px}.clause-layer header b{color:#805717;font-size:11px}.clause-empty{margin:12px 0;color:#77766f;font-size:11px;line-height:1.55}.clause-sources{display:grid;gap:8px;margin-top:11px}.clause-source{padding:10px;border-left:3px solid #b89147;border-radius:8px;background:#fffaf0}.clause-source.restricted{border-left-color:#a66155;background:#fff7f5}.clause-source span,.clause-source b,.clause-source p,.clause-source small,.clause-source em{display:block}.clause-source span{color:#86672e;font-size:10px;font-weight:700}.clause-source b{margin-top:5px;font-family:Georgia,'Noto Serif SC',serif;font-size:14px}.clause-source p{margin:6px 0;color:#555d55;font-size:12px;line-height:1.55}.clause-source small,.clause-semantic small{color:#777970;font-size:10px;line-height:1.5}.clause-source em{margin-top:7px;color:#9b564e;font-size:10px;font-style:normal;line-height:1.45}.clause-semantic{margin-top:11px;padding-top:9px;border-top:1px dashed #ddd4c3}.clause-semantic summary{color:#315e50;font-size:11px;font-weight:700;cursor:pointer}.clause-semantic p{margin:8px 0 4px;color:#5b675e;font-size:11px}.clause-semantic small{display:block}@container app-viewport (max-width: 650px){.clause-timeline{padding:16px}.clause-heading{display:block}.clause-heading>span{display:inline-block;margin-top:9px}.clause-grid{grid-template-columns:1fr}}
.life-grid .reminder-card::after{content:'';position:absolute;inset:0 auto 0 0;width:3px;background:var(--ink-gold,#bd8a38);opacity:.75}
.life-grid .reminder-caution::after{background:#b66a56}
.life-grid .reminder-neutral::after{background:#6a8f88}
.reminder-meta{color:var(--ink-gold,#bd8a38)!important;font-style:normal;letter-spacing:.04em}
.claim-contract{display:flex;gap:8px;align-items:flex-start;margin-top:12px;padding:10px 12px;border:1px solid #ded5c1;border-radius:11px;background:#fffaf0;color:#665b48;font-size:11px;line-height:1.5}.claim-contract b{color:#805717;white-space:nowrap}.claim-conflicted{border-color:#e0c4be;background:#fff8f6}.clause-transition{margin-top:10px;padding-top:8px;border-top:1px dashed #ddd4c3}.clause-transition summary{color:#596f64;font-size:10px;font-weight:700;cursor:pointer}.clause-transition p,.clause-transition small{display:block;margin:6px 0 0;color:#71766e;font-size:10px;line-height:1.5}
.social-empty,.social-me,.social-editor,.friend-code-card,.social-find,.social-friend,.social-match{border:1px solid #d8e4d9;border-radius:16px;background:linear-gradient(145deg,#fffefa,#f1f6f0);padding:16px}.social-empty p{margin-bottom:0;color:var(--muted)}.social-me{display:flex;justify-content:space-between;gap:14px;align-items:center}.social-me>span{max-width:220px;color:var(--muted);font-size:12px;line-height:1.55}.social-person{display:flex;gap:11px;align-items:center}.social-avatar{display:grid;place-items:center;width:48px;height:48px;border-radius:16px;background:#e7efe5;font-size:27px;flex:none}.social-person b,.social-person small,.social-person p{display:block}.social-person small,.social-person p{color:var(--muted);font-size:12px}.social-person p{margin:3px 0 0;line-height:1.45}.social-editor,.social-find,.social-friends,.friend-code-card,.social-match{margin-top:13px}.social-editor-title,.social-friend-footer,.social-match-head{display:flex;justify-content:space-between;gap:10px;align-items:center}.social-editor-title span,.friend-code-card small,.social-friend-footer small{color:var(--muted);font-size:12px}.social-editor-grid{display:grid;grid-template-columns:120px 1fr;gap:10px}.social-editor label,.social-find label{margin:13px 0 0}.social-toggle{display:flex;align-items:center;gap:8px;color:var(--muted)}.social-toggle input{width:auto;min-height:auto}.friend-code-card{display:grid;gap:5px}.friend-code-card b{font:700 22px Georgia,serif;letter-spacing:.08em;color:#28594b}.social-find .primary{margin-top:0}.social-friend-list{display:grid;gap:9px;margin-top:9px}.social-friend{background:#fff}.social-friend-footer{margin-top:12px;padding-top:10px;border-top:1px solid #e3e9e1}.social-actions{display:flex;gap:7px}.outline-button{border:1px solid #b9c9b8;border-radius:10px;padding:9px 12px;background:#fff;color:var(--ink);font:inherit;cursor:pointer}.social-pending{font-size:12px;color:#805717}.social-match-head h3{margin:2px 0 0}.social-match-head>b{display:grid;place-items:center;width:76px;height:76px;border-radius:50%;background:#214b40;color:#f8e6b5;font-size:25px}.social-match-head>b small{display:block;color:#d5e4d8;font-size:9px;font-weight:400;text-align:center}.social-match ol{display:grid;gap:8px;padding:0;margin:16px 0;list-style:none}.social-match li{padding:10px;border-left:3px solid #bd8a38;background:#fff}.social-match li b,.social-match li span{display:block}.social-match li span,.social-match>p{margin-top:4px;color:var(--muted);font-size:12px;line-height:1.55}@container app-viewport (max-width: 560px){.social-me{display:block}.social-me>span{display:block;margin-top:11px}.social-editor-grid{grid-template-columns:1fr}.social-friend-footer,.social-match-head{align-items:flex-start;flex-direction:column}.social-match-head>b{align-self:flex-end;margin-top:-80px}}

/* 五个主页的纯展示样式；不改变排盘、时间层或题库逻辑。 */
.chart-table-scroll{margin-top:14px;overflow-x:auto;border:1px solid #e8e1d2;border-radius:13px;background:#fff}.chart-table{width:100%;min-width:920px;border-collapse:collapse;text-align:center}.chart-table th,.chart-table td{min-width:88px;padding:9px 7px;border-right:1px solid #eee7dc;border-bottom:1px solid #eee7dc;font-size:11px;line-height:1.45}.chart-table thead th{background:#f7f1e5;color:#6b5a36;font-weight:700}.chart-table tbody th{position:sticky;left:0;background:#fafcf8;color:#657268;z-index:1}.chart-table .chart-stem{color:#ba452d;font:700 24px Georgia,'Noto Serif SC',serif}.chart-table .chart-branch{color:#1d7658;font:700 24px Georgia,'Noto Serif SC',serif}.chart-table .chart-tenGod{color:#805717}.chart-table .chart-hidden,.chart-table .chart-star,.chart-table .chart-seat{font-size:10px;color:#637069}.chart-table .chart-pending{color:#999;background:#fbfaf7}.almanac-current{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:13px}.almanac-current span{padding:9px 10px;border-radius:10px;background:#fff8e7;border:1px solid #eadcc1}.almanac-current small,.almanac-current b{display:block}.almanac-current small{color:#806829;font-size:10px}.almanac-current b{margin-top:3px;color:#284d41;font-size:13px}.market-layer-readout{margin-top:12px;padding:11px;border-radius:11px;background:#fffaf0;border:1px solid #eadfc9}.market-layer-readout p{margin:0 0 8px;color:#805717;font-size:11px;font-weight:700}.market-layer-readout>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.market-layer-readout span{padding-left:9px;border-left:2px solid #b89147}.market-layer-readout small,.market-layer-readout b{display:block}.market-layer-readout small{color:#857d70;font-size:10px}.market-layer-readout b{margin-top:3px;color:#435b50;font-size:10px;line-height:1.45}.academy-overview{margin:16px 0}.academy-overview>.subhead{margin-bottom:9px}.academy-overview>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:8px}.academy-overview-card{min-height:104px;padding:13px;border:1px solid #dce6da;border-radius:13px;background:linear-gradient(145deg,#fffefa,#f0f6ef);text-align:left;color:var(--ink);font:inherit;cursor:pointer}.academy-overview-card.active{border-color:#b58a43;background:#fff8e7;box-shadow:0 4px 14px rgba(126,94,39,.1)}.academy-overview-card b,.academy-overview-card small,.academy-overview-card span{display:block}.academy-overview-card b{font-size:14px}.academy-overview-card small{margin-top:6px;color:#6b776c;font-size:11px}.academy-overview-card span{margin-top:10px;color:#805717;font-size:10px}@container app-viewport (max-width: 650px){.almanac-current,.market-layer-readout>div{grid-template-columns:1fr}.chart-table th,.chart-table td{min-width:76px}.academy-overview>div{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 保存后进入全屏四柱验收页。 */
.chart-focus-actions{display:flex;gap:8px;align-items:center}.chart-focus-actions .primary{width:auto;margin:0;padding:9px 13px;box-shadow:none}.chart-focus-mode{background:linear-gradient(145deg,#eef2eb,#f8f3e7)}.chart-focus-mode .hero,.chart-focus-mode .notice,.chart-focus-mode .tabs{display:none}.chart-focus-mode .shell{max-width:1440px;padding-top:20px}.panel#profile.chart-focus{display:block!important;padding:0;border:0;background:transparent;box-shadow:none}.panel#profile.chart-focus>.section-title,.panel#profile.chart-focus>.setup-steps,.panel#profile.chart-focus>form,.panel#profile.chart-focus>#profile-result,.panel#profile.chart-focus>#profile-archive{display:none!important}.panel#profile.chart-focus>#chart-board{min-height:calc(100vh - 40px);margin:0;padding:30px;border:1px solid #ddd5c5;border-radius:24px;background:linear-gradient(145deg,#fffefa,#f4f6ef);box-shadow:0 18px 45px rgba(54,57,44,.11)}.panel#profile.chart-focus>#chart-board header{padding-bottom:18px;border-bottom:1px solid #e8dfcf}.panel#profile.chart-focus>#chart-board header>div:first-child{margin-right:auto}.panel#profile.chart-focus>.chart-board .chart-table-scroll{margin-top:22px}.panel#profile.chart-focus>.chart-board .chart-table{min-width:1060px}.panel#profile.chart-focus>.chart-board .chart-table th,.panel#profile.chart-focus>.chart-board .chart-table td{padding:13px 10px;font-size:13px}.panel#profile.chart-focus>.chart-board .chart-stem,.panel#profile.chart-focus>.chart-board .chart-branch{font-size:32px}@container app-viewport (max-width: 650px){.chart-focus-mode .shell{padding:10px}.panel#profile.chart-focus>#chart-board{min-height:100vh;padding:17px;border-radius:17px}.panel#profile.chart-focus>#chart-board header{display:grid;grid-template-columns:1fr;gap:12px}.chart-focus-actions{width:100%}.chart-focus-actions>*{flex:1}.chart-focus-actions .primary{width:auto}.panel#profile.chart-focus>.chart-board .chart-table th,.panel#profile.chart-focus>.chart-board .chart-table td{padding:9px 7px;font-size:11px}.panel#profile.chart-focus>.chart-board .chart-stem,.panel#profile.chart-focus>.chart-board .chart-branch{font-size:24px}}

.panel#profile.profile-has-chart>#profile-result{display:none}.clause-catalog-status{display:flex;gap:8px;align-items:flex-start;margin-top:12px;padding:10px 12px;border:1px solid #d6e2d6;border-radius:11px;background:#f5faf4;color:#58685c;font-size:11px;line-height:1.55}.clause-catalog-status b{color:#315e50;white-space:nowrap}
.chart-table-hint{display:none}.chart-table-scroll{scrollbar-color:#b89147 #f4f1e8}.chart-table-scroll:focus-visible{outline:3px solid rgba(184,145,71,.35);outline-offset:3px}.chart-table thead th:first-child{position:sticky;left:0;z-index:2;box-shadow:2px 0 5px rgba(100,84,50,.08)}.chart-table tbody th{box-shadow:2px 0 5px rgba(100,84,50,.06)}@container app-viewport (max-width: 650px){.chart-table-hint{display:block;margin:13px 0 -5px;color:#806829;font-size:11px;line-height:1.45}}

/* Screen-size rules use the application container, including desktop phone simulation. */
.app-viewport{container-type:inline-size;container-name:app-viewport;width:100%;max-width:1440px;margin:0 auto;min-height:100dvh}
body[data-display-mode="phone"] .app-viewport{max-width:414px;background:var(--paper);box-shadow:0 0 0 1px var(--line),0 18px 70px #183f3720}
body[data-display-mode="wide"] .shell{max-width:1440px}
#display-mode-switch{display:block;margin:0 0 12px auto}
#display-mode-dialog{width:min(600px,calc(100% - 32px));border:1px solid var(--line);border-radius:24px;padding:28px;color:var(--ink);background:#fffdf8;box-shadow:0 24px 100px #183f3730}
#display-mode-dialog::backdrop{background:#183f3766;backdrop-filter:blur(8px)}
#display-mode-dialog h2{margin:0 0 12px;font-size:26px}
#display-mode-dialog p{line-height:1.65}
.display-mode-options{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
.display-mode-options button{flex:1 1 210px;text-align:left;border:1px solid #a8bbad;border-radius:16px;padding:22px;background:#f0f5ed;color:var(--ink);font:inherit;cursor:pointer}
.display-mode-options button:hover{background:#e3eddc;border-color:var(--ink)}
.display-mode-options button:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.display-mode-options b,.display-mode-options span{display:block}
.display-mode-options span{font-size:13px;color:var(--muted);margin-top:9px}
body[data-display-mode="phone"] dialog:not(#display-mode-dialog){max-width:min(390px,calc(100% - 24px))}

body[data-display-mode="phone"] .tabs{width:min(398px,calc(100% - 16px))}
