/* Shared natal/comparison/composite chart controls; keep the existing paper palette. */
.western-wheel-frame{position:relative;min-width:0;}
.wheel-aspect-control{display:flex;justify-content:flex-end;position:relative;z-index:1;margin-top:-24px;}
.wheel-aspect-control>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:56px;height:44px;padding:3px 6px;border:0;background:transparent;color:var(--archive-muted,#746d62);font:11px/1.3 var(--archive-serif);cursor:pointer;}
.wheel-aspect-control>button:hover{color:var(--archive-route-accent,#0d4cd0);}
.wheel-aspect-control svg{width:18px;height:18px;flex:none;}
.comparison-wheel-legend{display:flex;justify-content:center;gap:24px;font:11px/1.6 var(--archive-serif);color:var(--archive-muted,#746d62);margin:8px 0;}
.comparison-wheel-legend span:first-child::before{content:'○';margin-right:5px;}
.comparison-wheel-legend span:last-child::before{content:'◎';margin-right:5px;}
.comparison-wheel-legend span:last-child{color:var(--archive-route-accent,#0d4cd0);}
.comparison-wheel .comparison-outer-house{stroke:var(--archive-muted,#746d62);stroke-width:.6;stroke-dasharray:3 3;opacity:.55;}
.comparison-wheel .comparison-outer .planet-symbol{fill:var(--archive-route-accent,#0d4cd0);}
.comparison-wheel .planet-symbol{font-size:22px;}
.comparison-wheel .planet-degree{font-size:11px;}
.comparison-wheel .house-number{font-size:10px;}
.comparison-wheel .wheel-body-hit{fill:transparent;}
.comparison-wheel .aspect-minor{stroke:#998979;stroke-width:.65;opacity:.65;}
.comparison-wheel .aspect-muted{opacity:.12;}
.selected-comparison-planet{font:12px/1.6 var(--archive-serif);}
.western-aspect-dialog{width:min(600px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--archive-line,#d8d2c5);border-radius:0;padding:18px;background:var(--archive-sheet,#f8f7f0);color:var(--archive-ink,#25231f);}
.western-aspect-dialog::backdrop{background:#25231f88;}
.western-aspect-dialog[open]{display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;}
.western-aspect-dialog>header{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px;}
.western-aspect-dialog h3{flex:none;white-space:nowrap;font:500 20px/1.5 var(--archive-serif);margin:0;}
.western-aspect-dialog>header button{display:inline-flex;flex:none;align-items:center;justify-content:center;width:auto;min-width:44px;min-height:44px;margin:0;padding:0 8px;font:13px/1.5 var(--archive-serif);border:0;background:none;color:var(--archive-muted,#746d62);cursor:pointer;}
.western-aspect-dialog .aspect-matrix{width:100%;min-width:calc(var(--aspect-columns,11)*44px);table-layout:fixed;border-collapse:separate;border-spacing:0;font:15px/1.4 Georgia,'Apple Symbols',serif;}
.western-aspect-dialog .aspect-matrix td,.western-aspect-dialog .aspect-matrix th{box-sizing:border-box;padding:4px 0;text-align:center;border-right:1px solid var(--archive-line,#d8d2c5);border-bottom:1px solid var(--archive-line,#d8d2c5);border-left:0;border-top:0;font-weight:400;height:44px;min-width:44px;}
.western-aspect-dialog .aspect-matrix th{background:rgba(116,109,98,.04);}
.western-aspect-dialog [data-aspect-angle]{cursor:pointer;}
.western-aspect-dialog .selected-aspect{flex:none;font:13px/1.7 var(--archive-serif);margin:12px 0 0;min-height:22px;max-height:30dvh;overflow:auto;overflow-wrap:anywhere;}
.western-aspect-dialog>header,.western-aspect-views{flex:none;}
.western-aspect-views{display:flex;gap:8px;margin-bottom:8px;}
.western-aspect-dialog [data-aspect-view]{display:inline-flex;align-items:center;justify-content:center;flex:none;width:auto;min-width:64px;min-height:44px;margin:0;padding:6px 12px;border:0;background:none;color:inherit;font:13px/1.5 var(--archive-serif);cursor:pointer;}
.western-aspect-dialog [data-aspect-view][aria-pressed=true],.western-aspect-dialog [aria-pressed=true][data-aspect-choice],.western-aspect-dialog [aria-pressed=true][data-aspect-angle]{background:var(--archive-selected,#e8e0cc);}
.western-aspect-body{flex:1;min-height:0;overflow:auto;}
.western-aspect-list[hidden],.western-aspect-matrix[hidden]{display:none;}
.western-aspect-dialog [data-aspect-choice]{display:block;width:100%;min-height:44px;margin:0;padding:10px 8px;border:0;background:none;color:inherit;text-align:left;white-space:normal;overflow-wrap:anywhere;font:13px/1.7 var(--archive-serif);cursor:pointer;}
.western-aspect-matrix .table-scroll{max-height:55dvh;overflow:auto;margin:0;}
.western-aspect-dialog .aspect-matrix thead th{position:sticky;top:0;z-index:2;background:var(--archive-sheet,#f8f7f0);border-top:1px solid var(--archive-line,#d8d2c5);}
.western-aspect-dialog .aspect-matrix tr>:first-child{position:sticky;left:0;z-index:1;background:var(--archive-sheet,#f8f7f0);border-left:1px solid var(--archive-line,#d8d2c5);}
.western-aspect-dialog .aspect-matrix thead th:first-child{z-index:3;}
.aspect-table-owners{display:flex;justify-content:space-between;gap:12px;font:12px/1.6 var(--archive-serif);margin-bottom:10px;}
.aspect-table-owners>span{min-width:0;overflow-wrap:anywhere;}
.aspect-table-owners span:first-child::before{content:'↓ ';}
.aspect-table-owners span:last-child::before{content:'→ ';}
.business-chart-overview .western-wheel-frame{max-width:min(100%,calc(100svh - 245px),490px);margin:0 auto;}
.business-chart-overview .western-wheel-frame>.western-wheel{width:100%;max-width:none;}
.chart-shell .western-main-wheel .western-wheel-frame{flex:1;min-height:0;}
.chart-shell .western-plate:has(.comparison-wheel)>.western-wheel-frame{width:min(100%,550px);margin:0 auto;}
@media(max-width:800px){.chart-shell .western-plate:has(.comparison-wheel)>.western-wheel-frame{max-width:min(100%,calc(100svh - 240px));}.western-aspect-dialog{padding:14px;}.western-aspect-dialog .aspect-matrix{font-size:13px;}}
@media(max-height:420px){.western-aspect-dialog[open]{padding:8px;max-height:calc(100dvh - 16px)}.western-aspect-dialog>header{margin-bottom:4px}.western-aspect-views{margin-bottom:4px}.western-aspect-dialog .selected-aspect{max-height:40px;min-height:18px;margin-top:8px;font-size:12px;line-height:1.5}}

/* Professional instant transit controls share the quiet chart surface. */
.western-transit-controls{margin:8px 0 14px;font-size:12px}
.transit-query{display:flex;gap:6px;align-items:end;flex-wrap:wrap}
.transit-query label{display:grid;gap:5px;flex:1;min-width:170px}
.western-transit-controls input,.western-transit-controls select,.western-transit-controls button,.western-linked-detail button,.selected-planet-aspects button{font:inherit;color:inherit;border:1px solid #d8d3c8;background:transparent;border-radius:0;padding:7px 8px;min-height:34px}
.transit-steps{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.western-transit-controls p{font-size:11px;color:#777064;margin:8px 0 0}
.western-linked-detail{font-size:12px;line-height:1.7}.western-linked-detail p{margin:8px 0}
.western-linked-detail button,.selected-planet-aspects button{padding:2px 5px;min-height:28px;border:0;border-bottom:1px solid #bcb6aa;cursor:pointer}

/* Western chart owns a square drawing area; details never resize that area. */
body .chart-shell[data-method=western] .chart-options{border-bottom:0}
body .chart-shell[data-method=western].is-result .result-panel>.panel-heading{display:flex;flex-direction:column;align-items:stretch;flex-shrink:0}
body .chart-shell[data-method=western].is-result .panel-heading>div:first-child{display:none}
body .chart-shell[data-method=western].is-result .result-actions{order:-1;margin:0;align-self:flex-start}
body .chart-shell[data-method=western].is-result #back-to-form{display:block!important;min-height:44px;box-shadow:none}
body .chart-shell[data-method=western] .western-reading-layout,body .chart-shell[data-method=western] .western-main-wheel{display:block;flex:none;min-height:0;width:100%}
body .chart-shell[data-method=western] .western-wheel-frame{display:block;position:relative;flex:none;min-height:0;width:100%;max-width:600px;aspect-ratio:1;margin:0 auto;overflow:hidden}
body .chart-shell[data-method=western] .western-wheel-frame>.western-wheel{display:block;flex:none;width:100%;height:auto;min-height:0;max-width:100%;margin:0;aspect-ratio:1;transform:none}
body .chart-shell[data-method=western] .wheel-body-picker{--picker-scroll-thumb:#927968;flex:none;overflow-x:auto;min-height:38px}
body .chart-shell[data-method=western] .wheel-body-picker::-webkit-scrollbar{height:6px;background:transparent}
body .chart-shell[data-method=western] .wheel-body-picker::-webkit-scrollbar-track{background:transparent}
body .chart-shell[data-method=western] .wheel-body-picker::-webkit-scrollbar-thumb{border:1px solid transparent;border-radius:999px;background:var(--picker-scroll-thumb);background-clip:padding-box}
body .chart-shell[data-method=western] .wheel-body-picker::-webkit-scrollbar-thumb:hover{background-color:var(--accent)}
@supports not selector(::-webkit-scrollbar){
 body .chart-shell[data-method=western] .wheel-body-picker{scrollbar-width:thin;scrollbar-color:var(--picker-scroll-thumb) transparent}
}
body .chart-shell[data-method=western] .wheel-body-picker button{white-space:nowrap;flex-shrink:0}
body .chart-shell[data-method=western] .selected-planet,body .chart-shell[data-method=western] .selected-comparison-planet{position:static;flex:none;min-height:0;overflow-wrap:anywhere}
body .chart-shell[data-method=western] .wheel-toolbar{display:flex;flex-wrap:wrap;gap:6px;min-height:32px}
@media(min-width:801px){body .chart-shell[data-method=western] .western-reading-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.85fr);gap:24px}}
body .chart-shell[data-method=western].is-result .result-panel #result-content{display:block;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}
body .chart-shell[data-method=western].is-result #result-content .western-plate.active-pane{display:block;flex:none;min-height:0;overflow:visible}
html[data-native-chart=true] body .chart-shell[data-method=western].is-result .result-panel .result-actions{display:flex}
body .chart-shell[data-method=western] .wheel-body-picker{display:flex;flex-wrap:nowrap}
body .chart-shell[data-method=western] .wheel-body-picker button:first-child{min-width:44px;flex-basis:44px}
.enlarged-dialog:has(.western-wheel) .dialog-content{overflow-y:auto}
.enlarged-dialog:has(.western-wheel) .enlarged-scroll{overflow:visible;max-height:none}
.enlarged-dialog:has(.western-wheel) .western-wheel-frame{display:block;width:100%;max-width:800px;aspect-ratio:1;position:relative;margin:auto;overflow:hidden}
.enlarged-dialog:has(.western-wheel) .enlarged-scroll .western-wheel{display:block;width:100%;height:auto;max-width:100%;margin:0;aspect-ratio:1}
.enlarged-dialog:has(.western-wheel)>.dialog-content>.selected-planet,.enlarged-dialog:has(.western-wheel)>.dialog-content>.selected-comparison-planet{position:static;min-height:0;overflow-wrap:anywhere}
body .chart-shell[data-method=western] .wheel-body-picker{justify-content:flex-start}
body .chart-shell[data-method=western].is-result .result-panel>.panel-heading{border-bottom:0;padding-bottom:0;margin-bottom:0;gap:0}
/* One settings surface shares the existing dialog, fields and fact components. */
#western-setting-source[hidden]{display:none!important}
.western-start-settings{display:flex;align-items:center;justify-content:space-between;gap:12px;grid-column:1/-1;margin:6px 0 14px;font-size:12px;color:var(--muted)}
body .chart-shell[data-method=western].is-result .result-panel .result-actions{display:flex;width:100%;align-items:center;gap:12px}
body .chart-shell[data-method=western] .western-context{flex:1;min-width:0;font-size:12px;overflow-wrap:anywhere;text-align:center;color:var(--muted)}
body .chart-shell[data-method=western] .result-actions>[data-western-settings-entry]{border:0;background:none;box-shadow:none;font:13px/1.5 var(--serif);color:var(--accent);padding:6px 0;min-height:44px}
.western-settings-dialog{width:min(540px,calc(100vw - 24px))}
.western-settings-dialog .dialog-content{padding:14px 20px;overflow-y:auto;max-height:calc(100dvh - 110px)}
.western-settings-form{gap:0}
.western-settings-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:8px 14px;margin:0 0 20px}
.western-settings-group h3{grid-column:1/-1;font:500 15px/1.6 var(--serif);margin:0 0 4px}
.western-settings-group>.field:nth-child(2):last-child{grid-column:1/-1}
.western-settings-group .field{margin:0;min-width:0}.western-settings-group select{width:100%;min-width:0}
.western-settings-facts{margin:4px 0 18px;font-size:12px}.western-settings-facts summary{cursor:pointer;padding:8px 0}.western-settings-facts h4{margin:14px 0 8px;font-weight:500}
.western-default-choice{display:flex;align-items:center;gap:8px;font-size:12px;margin:4px 0 16px}.western-default-choice input{width:16px;height:16px;margin:0}
/* Settings actions belong to the dialog, never to the scrolling form. */
.western-settings-footer{flex:none;padding:8px 16px 12px;background:var(--paper)}
.western-settings-footer .western-settings-actions{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;width:100%}
.western-settings-dialog .western-settings-actions>button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-width:44px;min-height:44px;margin:0;padding:8px;font:13px/1.5 var(--serif);letter-spacing:0;white-space:nowrap;border:0;background:none;color:var(--accent);cursor:pointer}
.western-settings-dialog .western-settings-actions>[data-cancel-settings]{margin-left:auto;color:var(--muted)}
.western-settings-dialog .western-settings-actions>button[type=submit]{min-width:88px;padding-inline:12px;background:#424638;color:#faf9f3}
.western-settings-dialog .western-settings-actions>button:disabled{opacity:.55;cursor:wait}
.western-settings-footer [data-setting-error]{font:12px/1.6 var(--serif);margin:0 0 8px;color:var(--muted)}
.western-settings-footer [data-setting-error].is-error{color:var(--red,#a34f4a)}
.western-settings-dialog>.dialog-heading{align-items:center}
.western-settings-dialog>.dialog-heading>button{width:44px;height:44px;min-height:44px;margin:0;padding:0;border:0}
body .chart-shell[data-method=western] .wheel-body-picker>button{flex:0 0 44px;min-width:44px;min-height:44px;max-width:none}

body .chart-shell[data-method=western] .western-data-group .western-detail-section{display:block;margin-bottom:24px;min-width:0}
.western-detail-section>h3{font-size:15px;margin:8px 0 14px}
@media(max-width:380px){.western-settings-group{grid-template-columns:minmax(0,1fr)}.western-settings-dialog .dialog-content{padding:12px}}
.western-settings-dialog[open]{display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;max-height:calc(100dvh - 24px)}
.western-settings-dialog>.dialog-heading{flex:none}
.western-settings-dialog>.dialog-content{flex:1;min-height:0;max-height:none;overflow-y:auto}
.western-settings-dialog .western-settings-form{display:block}
.western-settings-facts .chart-facts>div{border:0;padding:5px 0}
body .chart-shell[data-method=western] .wheel-toolbar{justify-content:flex-end}

.western-settings-dialog .western-default-choice{min-height:44px;cursor:pointer}
.western-settings-dialog .field select{min-height:44px}
.western-setting-caption{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:44px}
.western-setting-caption>.field-label{margin:0}
.western-settings-dialog .western-setting-help{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;min-height:44px;margin:0;padding:0;border:0;background:none;color:var(--accent);font:12px/1.5 var(--serif);cursor:pointer}
.western-setting-field .field-help{font:12px/1.7 var(--serif);color:var(--muted);margin:0 0 8px}
.western-table-hint{margin:0 0 6px;color:var(--muted);font:12px/1.5 var(--serif)}
.western-fact-scroll .fact-table{border-collapse:separate;border-spacing:0}
.western-fact-scroll .fact-table tr>:first-child{position:sticky;left:0;z-index:1;background:var(--paper,#eeebe2)}
