
#observatory-centre{grid-area:camera;min-width:0;width:100%}
#dso-recommendations{
 margin-top:16px;background:#0c131c;border:1px solid #293746;
 border-radius:9px;padding:16px;color:#e4ebf3;
 font:13px system-ui,-apple-system,sans-serif
}
#dso-recommendations h2{font-size:16px;margin:0 0 7px;color:#8bcadd}
#dso-summary,#dso-note{color:#9cabbc;font-size:11px;line-height:1.6}
#dso-cards{
 display:grid;grid-template-columns:repeat(5,minmax(180px,1fr));
 gap:12px;overflow-x:auto;margin:14px 0
}
.dso-card{background:#131e2b;border:1px solid #2b3b4c;
border-radius:7px;padding:12px;min-width:0}
.dso-card h3{font-size:14px;margin:0 0 5px;color:#eef5fc}
.dso-subtitle{font-size:11px;color:#9cabbc;min-height:32px}
.dso-line{padding-top:9px;font-size:12px}
.dso-line span{display:block;color:#93a7bc;font-size:10px;
text-transform:uppercase;letter-spacing:.03em;margin-bottom:2px}
#dso-note a{color:#8bcadd}


#dso-details-dialog{
 width:min(1000px,94vw);max-height:90dvh;overflow:auto;
 background:#101b26;color:#e4ebf3;border:1px solid #456078;
 border-radius:9px;padding:20px;font:14px system-ui,sans-serif;
}
#dso-details-dialog::backdrop{background:#000c}
#dso-details-dialog button{
 float:right;background:#213447;color:white;
 border:1px solid #456078;border-radius:5px;padding:7px 12px;
 cursor:pointer;
}
#dso-details-dialog h2{color:#8bcadd;margin:0 90px 18px 0}
#dso-details-dialog dl{display:grid;grid-template-columns:145px 1fr;gap:10px}
#dso-details-dialog dt{color:#8bcadd}
#dso-details-dialog dd{
 margin:0;white-space:pre-wrap;overflow-wrap:anywhere;
}
#dso-details-dialog .catalog-credit{
 border-top:1px solid #35475a;padding-top:12px;
 font-size:12px;color:#a9bdcd;
}
#dso-details-dialog a{color:#8bcadd}


#dso-filters{
 display:flex;flex-wrap:wrap;align-items:end;gap:12px;
 padding:14px;margin:14px 0;background:#101b26;
 border:1px solid #293e50;border-radius:8px;
}
#dso-filters label{
 display:flex;flex-direction:column;gap:5px;
 color:#a9bdcd;font:12px system-ui,sans-serif;
}
#dso-filters input,#dso-filters select,#dso-filters button{
 background:#172330;color:#e6f3fa;border:1px solid #456078;
 border-radius:5px;padding:8px;min-height:36px;
}
#dso-filters input[type=number]{width:125px}
#dso-filters button{cursor:pointer}
#dso-filters .dso-filter-count{color:#8bcadd;padding:8px 0}
#dso-recommendations .dso-card[hidden],
#dso-recommendations .dso-category[hidden]{display:none!important}


/* COMPACT DSO FIT SWITCH */
#dso-filters input[type="checkbox"]{
 appearance:none;-webkit-appearance:none;
 position:relative;display:block;flex:none;
 width:38px;height:22px;min-height:22px;
 padding:0;margin:7px 0;
 border:1px solid #456078;border-radius:20px;
 background:#263544;cursor:pointer;
 transition:background .15s;
}
#dso-filters input[type="checkbox"]::before{
 content:"";position:absolute;top:3px;left:3px;
 width:14px;height:14px;border-radius:50%;
 background:#dceaf4;transition:transform .15s;
}
#dso-filters input[type="checkbox"]:checked{
 background:#246b83;border-color:#62b9d0;
}
#dso-filters input[type="checkbox"]:checked::before{
 transform:translateX(16px);background:white;
}
#dso-filters input[type="checkbox"]:focus-visible{
 outline:2px solid #8bcadd;outline-offset:3px;
}


/* COMPACT DSO FILTER GRID */
#dso-filters{
 display:grid;
 grid-template-columns:repeat(12,minmax(0,1fr));
 align-items:end;gap:12px;
 padding:14px 16px;
}
#dso-filters label{
 grid-column:span 2;min-width:0;gap:5px;
 font-size:12px;line-height:1.3;
}
#dso-filters label[data-filter="search"]{order:0;grid-column:span 4}
#dso-filters label[data-filter="type"]{order:1}
#dso-filters label[data-filter="catalog"]{order:2}
#dso-filters label[data-filter="constellation"]{order:3}
#dso-filters label[data-filter="sort"]{order:4}
#dso-filters label[data-filter="size"]{order:5}
#dso-filters label[data-filter="mag"]{order:6}
#dso-filters label[data-filter="alt"]{order:7}
#dso-filters label[data-filter="minutes"]{order:8}
#dso-filters label[data-filter="moon"]{order:9}
#dso-filters label[data-filter="fit"]{
 order:10;min-height:58px;justify-content:space-between;
}
#dso-filters label input:not([type="checkbox"]),
#dso-filters label select{
 width:100%;min-width:0;max-width:100%;
 height:36px;box-sizing:border-box;
}
#dso-filters label input[type="checkbox"]{margin:7px 0}
#dso-filters > button{
 order:11;grid-column:span 2;min-height:36px;
}
#dso-filters > button:first-of-type{
 background:#205d73;border-color:#428da6;
}
#dso-filters .dso-filter-count{
 order:12;grid-column:span 8;align-self:center;
 padding:0;text-align:right;
}
#dso-filters #dso-catalogue-matches{
 order:13;grid-column:1/-1;
 display:flex;flex-wrap:wrap;gap:8px;
 min-width:0;padding-top:4px;
}
#dso-filters #dso-catalogue-matches:empty{display:none}
#dso-catalogue-matches button{
 max-width:100%;text-align:left;white-space:normal;
}
@media(max-width:1100px){
 #dso-filters{grid-template-columns:repeat(6,minmax(0,1fr))}
 #dso-filters label[data-filter="search"]{grid-column:span 4}
 #dso-filters .dso-filter-count{grid-column:span 2}
}
@media(max-width:600px){
 #dso-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #dso-filters label{grid-column:span 1}
 #dso-filters label[data-filter="search"]{grid-column:1/-1}
 #dso-filters > button{grid-column:span 1}
 #dso-filters .dso-filter-count{grid-column:1/-1;text-align:left}
}


#dso-filters label[data-filter="fit"]{
 position:relative;
}
#dso-fit-equipment{
 display:block;color:#a9bdcd;font:11px system-ui,sans-serif;
 line-height:1.4;
}


#dso-filters label[data-filter="survey"]{
 order:10;grid-column:span 2;
}


/* ALIGNED DSO FRAMING ROW */
#dso-recommendations .dso-framing-details,
#dso-recommendations .dso-framing-spacer{
 box-sizing:border-box!important;
 margin:12px 0!important;
 padding:10px 0!important;
 min-height:44px!important;
}
#dso-recommendations .dso-framing-details:not([open]),
#dso-recommendations .dso-framing-spacer{
 height:44px!important;
}
#dso-recommendations .dso-framing-details[open]{
 height:auto!important;
}


/* KEEP FAILED DSO IMAGES FROM COLLAPSING CARDS */
#dso-recommendations .dso-detail-photo img{
 width:100%;height:auto;aspect-ratio:10/7;
 object-fit:contain;background:#080f16;
}
#dso-recommendations .dso-image-unavailable{
 width:100%;aspect-ratio:10/7;display:grid;place-items:center;
 background:#080f16;color:#a9bdcd;border:1px solid #293e50;
 border-radius:7px;font:13px system-ui,sans-serif;
}


.dso-survey-control{
 display:flex;align-items:center;gap:8px;
 margin:10px 0;color:#a9bdcd;font:12px system-ui,sans-serif;
}
.dso-survey-control select{
 min-width:0;max-width:100%;background:#172330;color:#e6f3fa;
 border:1px solid #456078;border-radius:5px;padding:6px 8px;
}


/* STATIC DSO IMAGES ONLY */
#dso-recommendations .dso-photo-caption{display:none!important}
#dso-recommendations .dso-detail-photo a,
#dso-recommendations .dso-frame-photo a,
#dso-recommendations .dso-detail-photo img,
#dso-recommendations .dso-frame-photo img,
#dso-details-dialog img{
 pointer-events:none!important;
 cursor:default!important;
}


/* READABLE DSO DETAILS */
#dso-details-dialog{
 padding:24px;line-height:1.5;
}
#dso-details-dialog h2{
 font-size:22px;margin-bottom:20px;
}
#dso-details-dialog h3{
 margin:24px 0 0;padding:10px 14px;
 background:#192b3a;color:#8bcadd;border-radius:6px 6px 0 0;
 font-size:14px;letter-spacing:.03em;
}
#dso-details-dialog dl{
 display:block;margin:0;border:1px solid #293e50;
 border-radius:0 0 6px 6px;overflow:hidden;
}
#dso-details-dialog dt{
 float:left;clear:left;width:38%;padding:10px 14px;
 box-sizing:border-box;color:#a9bdcd;
}
#dso-details-dialog dd{
 margin:0;padding:10px 14px 10px 40%;
 border-bottom:1px solid #253746;min-height:42px;
 color:#eef5fb;box-sizing:border-box;
}
#dso-details-dialog dd:last-child{border-bottom:0}
@media(max-width:600px){
 #dso-details-dialog{padding:14px}
 #dso-details-dialog dt{float:none;width:auto;padding-bottom:2px}
 #dso-details-dialog dd{padding:2px 14px 10px;min-height:0}
}


/* FULL WIDTH DSO FOOTER */
#observatory-layout{
 grid-template-areas:
  "left camera right"
  "footer footer footer";
}
#dso-recommendations{
 grid-area:footer;
 width:100%;
 min-width:0;
 margin-top:4px;
 padding:20px;
 box-sizing:border-box;
}
#dso-cards{
 grid-template-columns:repeat(5,minmax(200px,1fr));
 gap:16px;
}
.dso-card{padding:16px}
.dso-subtitle{min-height:0;margin-bottom:8px}
@media(max-width:1250px){
 #observatory-layout{
  grid-template-areas:
   "camera camera"
   "left right"
   "footer footer";
 }
}
@media(max-width:650px){
 #observatory-layout{
  grid-template-areas:"camera" "left" "right" "footer";
 }
 #dso-recommendations{padding:14px}
 #dso-cards{grid-template-columns:repeat(5,230px)}
}


.dso-thumbnail{display:block;margin:10px 0 5px;overflow:hidden;
border-radius:6px;background:#000;border:1px solid #304154}
.dso-thumbnail img{display:block;width:100%;height:auto;aspect-ratio:10/7;
object-fit:contain;transition:transform .2s}
.dso-thumbnail:hover img{transform:scale(1.03)}
.dso-image-caption{font-size:10px;color:#93a7bc;margin-bottom:8px}


/* GROUPED DSO FOOTER */
#dso-cards{display:block;overflow:visible}
.dso-category{margin:20px 0 26px;min-width:0}
.dso-category:last-child{margin-bottom:0}
.dso-category-title{
 color:#c4deec;font-size:15px;font-weight:600;
 margin:0 0 12px;padding-bottom:9px;border-bottom:1px solid #2c3d4e
}
.dso-category-grid{
 display:grid;grid-template-columns:repeat(5,minmax(220px,1fr));
 gap:16px;overflow-x:auto;padding-bottom:8px
}
.dso-category-empty{font-size:12px;color:#93a7bc}
@media(max-width:1250px){
 .dso-category-grid{grid-template-columns:repeat(5,260px)}
}
@media(max-width:650px){
 .dso-category-grid{grid-template-columns:repeat(5,230px)}
}


.dso-thumbnail img{aspect-ratio:1/1!important;object-fit:contain}


.dso-detail-photo,.dso-frame-photo{margin:12px 0}
.dso-detail-photo a,.dso-frame-photo a{
 display:block;background:#000;border:1px solid #35495c;
 border-radius:7px;overflow:hidden
}
.dso-detail-photo img{
 display:block;width:100%;height:auto;aspect-ratio:10/7;object-fit:contain
}
.dso-frame-photo img{
 display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:contain
}
.dso-photo-caption{
 font-size:11px;color:#a5b8ca;line-height:1.5;margin-top:6px
}
.dso-framing-details{
 margin:12px 0;border-top:1px solid #304154;
 border-bottom:1px solid #304154;padding:10px 0
}
.dso-framing-details summary{
 color:#8bd7ec;font-size:12px;line-height:1.6;cursor:pointer
}
.dso-orientation{
 font-size:11px;color:#b9ccdc;margin-top:10px;line-height:1.5
}


.dso-altitude-box{
 position:relative;margin:14px 0 12px;
 background:linear-gradient(180deg,#13151d,#1b1b27);
 border:1px solid #343441;border-radius:10px;
 overflow:hidden;min-width:0
}
.dso-altitude-box svg{
 display:block;width:100%;height:155px;
 cursor:crosshair;touch-action:pan-y
}
.dso-altitude-curve{
 filter:drop-shadow(0 0 3px #ff6685aa)
        drop-shadow(0 0 1px #ff668599)
}
.dso-altitude-readout{
 position:absolute;bottom:29px;left:50%;transform:translateX(-50%);
 max-width:95%;padding:5px 9px;border-radius:6px;
 background:#11121de8;border:1px solid #4a4053;
 color:#f2e5ed;font-size:11px;white-space:nowrap;
 pointer-events:none;font-variant-numeric:tabular-nums
}


/* BLINK WHILE CALCULATING DSO TARGETS */
@keyframes dso-calculating-pulse{
 0%,100%{opacity:1}
 50%{opacity:.25}
}
#dso-recommendations .dso-calculating{
 animation:dso-calculating-pulse 1.2s ease-in-out infinite;
 color:#69d8f0;font-weight:600;
}
@media(prefers-reduced-motion:reduce){
 #dso-recommendations .dso-calculating{animation:none}
}


#dso-recommendations[aria-busy="true"] :disabled{
 cursor:wait!important;opacity:.55;
}

/* Standalone website layout */
#dso-recommendations{margin-top:20px;scroll-margin-top:90px}
#dso-cards{display:block;overflow:visible}
#dso-recommendations h2{line-height:1.4}
#dso-filters input,#dso-filters select,#dso-filters button{
 font:inherit;
}
#dso-recommendations .dso-line span:last-child{
 color:#dceaf4;font-size:11px;
}
#dso-details-dialog{z-index:1000}
#dso-recommendations .dso-detail-photo a{
 pointer-events:none;cursor:default;
}

/* Observer location inputs */
#dso-filters label[data-filter="lat"],
#dso-filters label[data-filter="lon"]{
 order:-1;grid-column:span 6;
}
@media(max-width:1100px){
 #dso-filters label[data-filter="lat"],
 #dso-filters label[data-filter="lon"]{grid-column:span 3}
}
@media(max-width:600px){
 #dso-filters label[data-filter="lat"],
 #dso-filters label[data-filter="lon"]{grid-column:span 1}
}

/* Adjustable imaging equipment */
#dso-filters label[data-filter="camera"],
#dso-filters label[data-filter="focal"]{
 order:-2;grid-column:span 6;
}
@media(max-width:1100px){
 #dso-filters label[data-filter="camera"],
 #dso-filters label[data-filter="focal"]{grid-column:span 3}
}
@media(max-width:600px){
 #dso-filters label[data-filter="camera"],
 #dso-filters label[data-filter="focal"]{grid-column:span 1}
}

/* Suggested camera framing */
.dso-framing-label{
 color:#8bcadd;font:12px system-ui,sans-serif;margin:14px 0 7px;
}
#dso-recommendations .dso-frame-photo img{
 width:100%;height:auto;aspect-ratio:1;object-fit:contain;
}
#dso-recommendations .dso-frame-photo .dso-image-unavailable{
 aspect-ratio:1;
}

/* DSO FLOATING HOVER ZOOM */
#dso-recommendations .dso-detail-photo img,
#dso-recommendations .dso-frame-photo img{
 pointer-events:auto!important;cursor:zoom-in!important;
}
#dso-hover-zoom{
 position:fixed;z-index:20000;pointer-events:none;
 padding:8px;background:#0c131b;border:1px solid #62839c;
 border-radius:10px;box-shadow:0 12px 60px #000c;
}
#dso-hover-zoom[hidden]{display:none!important}
#dso-hover-zoom img{
 display:block;max-width:none;max-height:none;
 object-fit:contain;border-radius:5px;background:#000;
}
#dso-hover-zoom>div{
 max-width:600px;padding:7px 4px 2px;
 color:#bce7f5;font:12px system-ui,sans-serif;
}

/* Expand framing below the main image */
.dso-framing-expand{margin:12px 0}
.dso-framing-expand>summary{
 cursor:pointer;color:#8bcadd;font-size:13px;
 padding:8px 0;
}
.dso-framing-expand>summary:hover{color:#bce7f5}
.dso-framing-expand>summary:focus-visible{
 outline:2px solid #8bcadd;outline-offset:3px;
}
.dso-framing-expand[open]>summary{margin-bottom:8px}
