:root{color-scheme:light;font-family:SimSun,"Songti SC",serif;font-size:14px;color:#222;background:#fff}*{box-sizing:border-box}body{margin:0;background:#fff}button,input,select{font:13px "Microsoft YaHei",sans-serif;color:#222}button{cursor:pointer;border:1px solid #bbb;border-radius:2px;background:#fff;padding:5px 10px;white-space:nowrap}button:hover{background:#f0f0f0}button:disabled{opacity:.4;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #458c48;outline-offset:2px}[hidden]{display:none!important}
header{min-height:42px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;padding:6px 12px;border-bottom:1px solid #d4d4d4;background:#fff;position:relative;z-index:2;font-family:"Microsoft YaHei",sans-serif}.segmented{display:flex}.segmented button:first-child{border-radius:2px 0 0 2px}.segmented button:last-child{border-radius:0 2px 2px 0;border-left:0}.segmented button[aria-pressed=true]{background:#e7efe6;color:#2e702f}.checkbox{display:flex;align-items:center;gap:4px;font:12px "Microsoft YaHei",sans-serif;white-space:nowrap}.checkbox input{accent-color:#3b813e;width:13px;height:13px;margin:0}.export-actions{display:flex;gap:7px}
main{width:100%;margin:0 auto}.workspace{padding:0 10px 16px;max-width:1120px;margin:0 auto}.chart-stage{background:#fff;margin:0 auto;padding:0;border:0}#wheel{width:min(100%,calc(100svh - 48px));max-width:1040px;aspect-ratio:1;margin:0 auto}#wheel.large{width:100%}#wheel svg{display:block;width:100%;height:100%}#chart-stage[aria-busy=true]{opacity:.55}.empty-state{text-align:center;padding-top:42%;color:#555}.facts{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 24px;border-top:1px solid #ddd;padding:10px 0;font-size:12px}.fact small{color:#666;margin-right:8px}.fact strong{font-weight:400}.positions{margin:0 auto;max-width:1040px;border-top:1px solid #ddd;padding:9px 0;font-family:"Microsoft YaHei",sans-serif}.positions>summary{cursor:pointer;color:#444;font-size:12px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.section-heading h3{font-size:15px;font-weight:400}.section-heading span{font-size:11px;color:#666}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;white-space:nowrap;font-size:12px;text-align:left}th{font-size:11px;background:#f5f5f5;color:#666;font-weight:400}th,td{padding:10px 8px;border-bottom:1px solid #ddd}.star-badge{font-size:17px;margin-right:9px}.retro{color:#be3030}footer{display:flex;justify-content:center;gap:20px;flex-wrap:wrap;color:#777;font:11px "Microsoft YaHei",sans-serif;line-height:1.8;padding-top:7px}
aside{background:white;padding:20px;font-family:"Microsoft YaHei",sans-serif}.desktop-page{background:#fff}.desktop-page header{margin-left:0;position:sticky;top:0;min-height:54px;padding:10px 16px 10px 68px;gap:14px;background:#fffffff2;border-bottom:1px solid #e5e9e0;backdrop-filter:blur(12px)}.desktop-page main{padding-left:0}.desktop-page aside{position:fixed;top:68px;bottom:auto;left:16px;width:310px;max-height:calc(100svh - 84px);overflow-y:auto;border:1px solid #e0e6da;border-radius:16px;box-shadow:0 10px 35px #21351b16,0 2px 6px #21351b08;z-index:5;padding:21px;background:#fff}.desktop-page .workspace{background:#fff;border-radius:14px;margin-top:14px}.desktop-page .settings-heading{padding-bottom:14px;border-bottom:1px solid #edf0e9}.desktop-page .settings-heading h1{font-size:16px;font-weight:500}.desktop-page .settings-heading button{border:0;padding:5px 0 5px 10px;color:#788372;font-size:11px;background:transparent}.desktop-page input,.desktop-page select{border-color:#d6ddcf;border-radius:6px}.desktop-page button{border-radius:6px}.desktop-page .primary{border-radius:8px}.settings-launcher{position:fixed;left:16px;top:9px;z-index:6;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid #dae2d3!important;border-radius:10px!important;color:#4f7347;background:#fff;box-shadow:0 2px 8px #21351b10}.hour-actions{display:flex;gap:0;border:1px solid #d6ddcf;border-radius:8px;overflow:hidden}.hour-actions button{border:0;border-radius:0!important;padding:6px 12px;font-size:12px;min-height:31px}.hour-actions button+button{border-left:1px solid #e1e6db}.settings-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.settings-heading h1{font-size:17px;font-weight:400;margin:0}form label{display:flex;flex-direction:column;gap:6px;font-size:12px;margin:0 0 13px}input,select{height:34px;width:100%;border:1px solid #bbb;border-radius:2px;background:#fff;padding:0 8px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:10px}.cities{display:flex;gap:5px;margin-top:-5px}.cities button{border:0;color:#35763a;padding:3px 8px}.form-divider{border-top:1px solid #ddd;margin:15px 0}form .checkbox{flex-direction:row;margin:0 0 14px;gap:6px}form details{margin:16px 0}form details summary{cursor:pointer;font-size:12px;color:#555;margin-bottom:14px}.primary{width:100%;display:flex;justify-content:space-between;border-color:#438746;background:#438746;color:white;padding:9px 14px}.primary:hover{background:#367239}.aside-foot{color:#666;font-size:10px;line-height:1.8;margin:18px 0 0}#error{font-size:12px;color:#b21f28;line-height:1.7;padding-left:9px;border-left:2px solid #b21f28}
@media(max-width:740px){header{gap:7px;justify-content:flex-start;padding:6px 8px}header button{padding:4px 7px;font-size:11px}.export-actions{gap:5px}.checkbox{font-size:10px}#wheel{width:100%}.workspace{padding:0 2px 12px}.facts{gap:8px 15px;font-size:11px;padding:9px 5px}.fact small{margin-right:5px}.section-heading{flex-wrap:wrap;gap:0}footer{gap:4px;padding:7px 8px}.positions{padding:9px 8px}.desktop-page header,.desktop-page.settings-open header{margin-left:0;padding-left:62px;position:sticky}.desktop-page main,.desktop-page.settings-open main{padding-left:0}.desktop-page aside{top:76px;left:10px;width:min(310px,calc(100vw - 20px));max-height:calc(100svh - 90px)}.desktop-page .workspace{margin-top:8px}.hour-actions button{padding:6px 9px}}@media print{.desktop-page main,.desktop-page.settings-open main{padding-left:0}.settings-launcher{display:none!important}header,aside,.facts,.positions,footer{display:none!important}.workspace{padding:0;max-width:none}#wheel,#wheel.large{width:100%;max-width:none}}

/* 年月日分栏输入、地点候选与按需出现的回拨时间选择。 */
.birth-fields{border:0;padding:0;margin:0}.birth-fields legend{font-size:12px;margin-bottom:6px}.date-fields{display:grid;grid-template-columns:1.5fr repeat(4,1fr);gap:6px}.date-fields label{gap:4px;color:#666}.date-fields input{min-width:0;text-align:center;padding:0 3px;color:#222}.place-search{display:grid;grid-template-columns:minmax(0,1fr) 60px;gap:7px}.form-note{font-size:11px;color:#687363;line-height:1.7;margin:7px 0 12px}.place-results{max-height:240px;overflow-y:auto;border:1px solid #cfd7c8;margin-bottom:14px}.place-result{width:100%;display:block;text-align:left;white-space:normal;border:0;border-bottom:1px solid #edf0e9;border-radius:0;padding:10px}.place-result strong{display:block;font-size:12px;font-weight:400;line-height:1.6}.place-result small{display:block;font-size:10px;color:#666;line-height:1.7}#mansion-reference-note{display:block;font-size:11px;color:#687363;line-height:1.7;margin:-5px 0 16px}.time-overlap{border:1px solid #c6a765;background:#fffaf0;margin:12px 0;padding:10px}.time-overlap legend,.time-overlap p{font-size:12px;line-height:1.7}.time-overlap .checkbox{white-space:normal}.time-overlap input{flex-shrink:0}.aside-foot a{color:#53734c}

/* 电脑版保留滚轮、触屏和键盘滚动，隐藏展开设置时的滚动条。 */
.desktop-page aside,html:has(.desktop-page){scrollbar-width:none}
.desktop-page aside::-webkit-scrollbar,html:has(.desktop-page)::-webkit-scrollbar{display:none}

/* 浮窗覆盖在盘面上，不占据盘面宽度；盘面始终相对整个视口水平居中。 */
.desktop-page header{padding-left:16px;padding-right:16px}
.desktop-page .workspace{margin-left:auto;margin-right:auto}
.desktop-page #settings-drag-handle{cursor:move;touch-action:none;user-select:none}
.desktop-page aside.is-dragging{box-shadow:0 14px 42px #21351b26}

/* 播放只更新已有SVG，不对整个盘面做请求期间的淡出。 */
.desktop-page .playback-panel{position:fixed;right:16px;top:68px;z-index:5;width:min(300px,calc(100vw - 32px));max-height:calc(100svh - 84px);overflow:auto;padding:20px;background:#fff;border:1px solid #e0e6da;border-radius:14px;box-shadow:0 10px 35px #21351b16;font-family:"Microsoft YaHei",sans-serif}
.playback-panel h2{font-size:16px;font-weight:500;margin:0}.playback-panel .settings-heading button{border:0;color:#666;font-size:11px}.playback-status{font-size:11px;color:#666;line-height:1.6;max-width:270px;text-wrap:balance}.playback-status:empty{display:none}#playback-error{font-size:12px;color:#b21f28;line-height:1.7}
@media print{.playback-panel,.playback-status{display:none!important}}

/* 计算参数与显示偏好分开；切换分类不提交表单或重排星盘。 */
.desktop-page .settings-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:4px;margin:0 0 18px;border-radius:9px;background:#f1f4ee}
.desktop-page .settings-tabs button{border:0;background:transparent;color:#697362;padding:8px;font-size:12px}
.desktop-page .settings-tabs button[aria-selected=true]{background:#fff;color:#32643b;box-shadow:0 1px 4px #21351b12}
.desktop-page #ui-form .form-note{margin-top:-4px;margin-bottom:18px}.desktop-page #ui-form .checkbox{margin-bottom:9px}

/* 设置以分组单选展示全部选项，起局页只保留时间与地点。 */
.desktop-page .settings-section-title{font-size:12px;font-weight:500;color:#53644d;margin:0 0 15px}
.desktop-page #ui-form{margin:0;padding:0}
.desktop-page .choice-group{border:0;padding:0;margin:0 0 17px;min-width:0}
.desktop-page .choice-group legend{font-size:12px;color:#515b4b;padding:0;margin:0 0 8px}
.desktop-page .choice-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.desktop-page #mansion-version .choice-options,.desktop-page #dongwei-year-change .choice-options{grid-template-columns:repeat(3,minmax(0,1fr))}
.desktop-page .choice-options.choice-stacked{grid-template-columns:1fr}
.desktop-page label.choice-option{display:flex;flex-direction:row;align-items:center;gap:5px;margin:0;padding:9px 7px;min-height:35px;border:1px solid #e0e5da;border-radius:7px;font-size:11px;line-height:1.5;cursor:pointer;background:#fff}
.desktop-page .choice-option input{flex:0 0 13px;width:13px;height:13px;margin:0;padding:0;accent-color:#438746}
.desktop-page .choice-option:has(input:checked){border-color:#75a378;background:#f1f7ee;color:#2e6736}
.desktop-page .choice-option:has(input:focus-visible){outline:2px solid #458c48;outline-offset:2px}
.desktop-page #rule-form .form-note{margin-top:-7px;margin-bottom:17px}

/* 案例入口与保存弹窗，不改变原盘面宽度。 */
.account-actions{display:flex;gap:12px;align-items:center;font:12px "Microsoft YaHei",sans-serif}.account-actions a{color:#4b7143;text-decoration:none}.account-actions a:hover{text-decoration:underline}
.save-case-dialog{width:min(840px,calc(100vw - 32px));max-height:90svh;overflow:auto;border:1px solid #d8e2cf;border-radius:14px;padding:24px;box-shadow:0 15px 70px #1d371d33;font-family:"Microsoft YaHei",sans-serif}.save-case-dialog::backdrop{background:#19351b44}.save-case-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.save-case-heading h2{font-size:18px;font-weight:500;margin:0}.save-case-heading button{border:0;color:#778371}#save-tag-suggestions{display:flex;flex-wrap:wrap;gap:5px;margin:-5px 0 16px}#save-tag-suggestions button{font-size:11px;padding:3px 8px;border:0;background:#edf4e8;color:#48733c}#save-case-error{color:#a43432;font-size:12px;white-space:pre-wrap}.save-case-dialog .checkbox{white-space:normal}

.save-case-dialog{box-sizing:border-box}.save-case-dialog input:not([type=checkbox]),.save-case-dialog select{box-sizing:border-box;width:100%}.case-saved-notice{position:fixed;right:20px;top:66px;padding:12px 16px;border:1px solid #dce8d4;border-radius:8px;background:white;box-shadow:0 6px 25px #26351e18;z-index:20;font:13px "Microsoft YaHei",sans-serif;color:#49643c}.case-saved-notice a{color:#426e35}.case-saved-notice button{border:0;margin-left:12px}

.desktop-page .account-actions{margin-left:clamp(20px,4vw,64px)}.case-basics-row{display:grid;grid-template-columns:minmax(0,1.15fr) 85px minmax(0,1fr);gap:12px}.save-case-dialog .md-surface{min-height:350px;max-height:52svh;overflow-y:auto}.save-case-dialog .md-editor{margin-bottom:15px}@media(max-width:620px){.case-basics-row{grid-template-columns:minmax(0,1fr) 75px}.case-basics-row label:last-child{grid-column:1/-1}}

.desktop-page .public-cases-link{display:inline-flex;align-items:center;padding:6px 10px;border:1px solid #d6ddcf;border-radius:6px;background:#fff;font-size:12px;text-decoration:none}.desktop-page .public-cases-link:hover{background:#f4f7f1}

.desktop-page .home-link{font:13px "Microsoft YaHei",sans-serif;color:#333;text-decoration:none;border:1px solid #bbb;border-radius:2px;padding:5px 10px;white-space:nowrap}.desktop-page .home-link:hover{background:#f0f0f0}.desktop-page .shensha-enable{display:inline-flex;flex-direction:row;align-items:center;gap:7px;margin:0;cursor:pointer}.desktop-page .shensha-enable input{width:14px;height:14px;margin:0;accent-color:#3b813e}.desktop-page #shensha-form fieldset:disabled .choice-options{opacity:.45}
