.sun-study-dialog{width:min(720px,calc(100vw - 32px));padding:24px;color:var(--ink,#30382f);border:0;border-radius:16px}
.sun-study-dialog .dialog-heading{margin-bottom:14px}.sun-study-dialog h2{margin:0}.sun-study-dialog h3{font-size:16px;margin:0 0 12px}
.sun-enable{display:flex;align-items:center;gap:10px;padding:14px 16px;background:#edf1e9;border-radius:10px;font-weight:650;min-height:48px}.sun-enable input{width:20px;height:20px;accent-color:#4d6544}
.sun-setup-grid{display:grid;grid-template-columns:1fr 1fr;gap:26px;margin:22px 0}.sun-conditions{display:flex;flex-direction:column;gap:16px}.sun-conditions label,.sun-north-label{display:flex;flex-direction:column;gap:7px;font-size:14px}.sun-conditions input,.sun-conditions select{width:100%;min-height:44px;font:inherit;border:1px solid #cdd2c9;border-radius:8px;background:#fff;padding:8px;box-sizing:border-box}
.sun-compass{width:240px;max-width:100%;aspect-ratio:1;position:relative;margin:auto;touch-action:none;cursor:grab;color:#506246}.sun-compass:active{cursor:grabbing}.sun-compass>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;font-weight:700;font-size:17px}.sun-compass #sun-plan-preview{position:absolute;inset:21%;display:grid;place-items:center;pointer-events:none}.sun-compass #sun-plan-preview svg{max-width:100%;height:auto}.sun-compass #sun-map-ray{color:#cb8522}
.sun-north-label{position:relative;font-weight:600}.sun-north-label output{position:absolute;right:0;font-variant-numeric:tabular-nums}.sun-north-label input{width:100%;min-height:32px;accent-color:#506246}
.sun-cardinals,.sun-seasons{display:flex;gap:6px}.sun-cardinals button,.sun-seasons button{min-height:44px;flex:1;padding:7px 4px;font-size:14px}.sun-cardinals button[aria-pressed=true]{background:#506246;color:white;border-color:#506246}.sun-orientation p,.sun-explanation{font-size:13px;line-height:1.7;color:#687063}.sun-facts{display:flex;flex-direction:column;gap:10px;font-size:13px;padding:14px;background:#f5f5ef;border-radius:8px}.sun-facts strong{font-size:14px}
.sun-dialog-actions{position:sticky;bottom:-24px;margin:16px -24px -24px;padding:12px 24px 20px;background:#fff;border-top:1px solid #e3e5df;z-index:3}.sun-dialog-actions button{width:100%;min-height:48px}.sun-study-dialog #sun-form-error{color:#963b24;font-size:14px}
.sun-timebar{display:flex;align-items:center;gap:12px;padding:5px 12px;background:#fcf8ec;border-block:1px solid #e9dfc6;flex-shrink:0;min-width:0}.sun-timebar[hidden]{display:none}.sun-timebar button{border:0;background:transparent;min-height:44px;padding:4px 6px;font-size:13px}.sun-timebar #sun-bar-settings{text-align:left;white-space:nowrap;color:#795619}.sun-time-slider{display:flex;align-items:center;gap:10px;flex:1;min-width:50px}.sun-time-slider input{width:100%;min-width:40px;height:38px;accent-color:#b88328}.sun-time-slider output{font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}.sun-timebar #sun-bar-status{font-size:12px;color:#7b6944;white-space:nowrap}.sun-timebar #sun-stop{font-size:22px;min-width:36px}.sun-timebar .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:850px),(max-width:1100px) and (max-height:600px) and (pointer:coarse){
 .sun-study-dialog{padding:16px}.sun-setup-grid{gap:14px;margin:16px 0}.sun-compass{width:190px}.sun-conditions{gap:12px}.sun-orientation h3{font-size:14px}.sun-cardinals{display:grid;grid-template-columns:1fr 1fr;gap:4px}.sun-cardinals button{font-size:13px}.sun-seasons{gap:3px}.sun-seasons button{font-size:13px}.sun-conditions .field-grid{grid-template-columns:1fr}.sun-dialog-actions{bottom:-16px;margin:14px -16px -16px;padding:12px 16px max(12px,env(safe-area-inset-bottom))}.sun-timebar{gap:5px;padding:0 8px;min-height:44px}.sun-timebar #sun-bar-status{display:none}.sun-timebar #sun-bar-place{font-size:12px}.sun-timebar #sun-stop{min-width:44px}.sun-timebar .sun-time-slider{gap:6px}
}
@media(max-width:360px){.sun-setup-grid{grid-template-columns:1fr}.sun-compass{width:210px}.sun-cardinals{display:flex}}
@media(prefers-reduced-motion:reduce){.sun-study-dialog *{scroll-behavior:auto!important}}
.mode-tools{position:static;top:auto;bottom:auto;left:auto;right:auto;inset:auto;width:auto;max-width:100%;margin:0;display:flex;flex-wrap:wrap;justify-content:flex-end;flex-shrink:0;gap:6px;padding:5px 12px;background:#fafbf8;border-bottom:1px solid #e3e6de;z-index:auto}
