/* What Can I See Tonight? — beginner sky map v1 */
.tonight-sky-map-section {
    margin-top: 1.4rem;
    padding: clamp(1rem, 2.2vw, 1.5rem);
    border: 1px solid #dfe7f2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(36, 57, 93, .06);
    overflow: hidden;
}

.tonight-sky-map-section .tonight-section-title h2 i {
    color: #5576e9;
    margin-right: .35rem;
}

.tonight-sky-map-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(125px, .22fr) minmax(150px, .25fr);
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: .95rem 1rem;
    border: 1px solid #e3eaf4;
    border-radius: 15px;
    background: #f8faff;
}

.tonight-sky-time-control,
.tonight-sky-map-option {
    min-width: 0;
}

.tonight-sky-control-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .35rem;
}

.tonight-sky-control-heading label,
.tonight-sky-map-option label {
    color: #23324f;
    font-size: .8rem;
    font-weight: 800;
}

.tonight-sky-control-heading label i { color: #5b78dd; margin-right: .25rem; }
.tonight-sky-control-heading strong { color: #2349b2; font-size: 1rem; }
.tonight-sky-time-control .form-range { margin: 0; }
.tonight-sky-time-ends { display: flex; justify-content: space-between; color: #7a879c; font-size: .69rem; }
.tonight-sky-map-option .form-select { margin-top: .35rem; }

.tonight-sky-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(250px, .65fr);
    gap: 1rem;
    align-items: start;
}

.tonight-sky-map-frame {
    min-width: 0;
    padding: .75rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #0b1b36, #08162c);
    box-shadow: inset 0 0 0 1px rgba(140, 169, 226, .15), 0 12px 24px rgba(20, 39, 74, .12);
}

.tonight-sky-map {
    display: block;
    width: 100%;
    max-width: 720px;
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
    overflow: visible;
    touch-action: manipulation;
}

.tonight-sky-disc {
    fill: url(#tonight-sky-bg);
    stroke: rgba(181, 204, 245, .55);
    stroke-width: 2;
}

.tonight-sky-alt-ring,
.tonight-sky-axis {
    fill: none;
    stroke: rgba(173, 198, 238, .18);
    stroke-width: 1;
}

.tonight-sky-min-ring {
    fill: none;
    stroke: rgba(255, 197, 91, .72);
    stroke-width: 1.4;
    stroke-dasharray: 7 6;
}

.tonight-sky-alt-label,
.tonight-sky-min-label,
.tonight-sky-zenith-label {
    fill: rgba(220, 232, 252, .65);
    font-size: 11px;
    font-weight: 700;
    pointer-events: none;
}

.tonight-sky-min-label { fill: #ffd37a; }
.tonight-sky-zenith { fill: rgba(223, 234, 252, .85); }

.tonight-sky-compass {
    fill: #fff;
    font-size: 20px;
    font-weight: 900;
    paint-order: stroke;
    stroke: rgba(5, 19, 40, .72);
    stroke-width: 4px;
    stroke-linejoin: round;
}

.tonight-sky-compass.north { fill: #ffd069; }

.tonight-sky-marker {
    cursor: pointer;
    outline: none;
}

.tonight-sky-marker-hit {
    fill: transparent;
    pointer-events: all;
}

.tonight-sky-marker-core {
    stroke: rgba(255, 255, 255, .9);
    stroke-width: 1.5;
    transition: r .16s ease, stroke-width .16s ease, filter .16s ease;
}

.tonight-sky-marker-core.deep { fill: #6f8ff7; }
.tonight-sky-marker-core.deep.type-galaxy { fill: #a88af4; }
.tonight-sky-marker-core.deep.type-nebula { fill: #61c7c8; }
.tonight-sky-marker-core.deep.type-cluster { fill: #75a8ff; }
.tonight-sky-marker-core.deep.type-double { fill: #e8a765; }
.tonight-sky-marker-core.solar { fill: #ffd065; stroke: #fff3c9; }

.tonight-sky-marker:hover .tonight-sky-marker-core,
.tonight-sky-marker:focus .tonight-sky-marker-core,
.tonight-sky-marker.selected .tonight-sky-marker-core {
    stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(255,255,255,.75));
}

.tonight-sky-marker.selected .tonight-sky-marker-core.deep { fill: #fff; stroke: #6e91ff; }
.tonight-sky-marker.selected .tonight-sky-marker-core.solar { fill: #fff; stroke: #ffd065; }

.tonight-sky-marker-label {
    fill: #dce8ff;
    font-size: 11px;
    font-weight: 800;
    paint-order: stroke;
    stroke: rgba(5, 18, 39, .92);
    stroke-width: 3px;
    stroke-linejoin: round;
    pointer-events: none;
}

.tonight-sky-marker-label.solar { fill: #ffe7a6; }

.tonight-sky-map-orientation {
    margin: .55rem .25rem 0;
    color: rgba(225, 235, 252, .78);
    font-size: .74rem;
    line-height: 1.45;
    text-align: center;
}
.tonight-sky-map-orientation i { color: #ffd069; margin-right: .2rem; }

.tonight-sky-map-info {
    min-width: 0;
    padding: 1rem;
    border: 1px solid #dfe7f2;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfcff, #f4f7fd);
}

.tonight-sky-map-info h3 {
    margin: .3rem 0 .4rem;
    color: #182642;
    font-size: 1.1rem;
    overflow-wrap: anywhere;
}

.tonight-sky-map-info > p {
    margin: 0;
    color: #66748a;
    font-size: .8rem;
    line-height: 1.55;
}

.tonight-sky-map-info-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin: .85rem 0;
}

.tonight-sky-map-info-stats[hidden] { display: none; }
.tonight-sky-map-info-stats article { padding: .65rem; border-radius: 11px; background: #fff; border: 1px solid #e4eaf4; }
.tonight-sky-map-info-stats span { display: block; color: #8290a5; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.tonight-sky-map-info-stats strong { display: block; margin-top: .12rem; color: #20355f; font-size: .88rem; }
.tonight-sky-map-info .btn { width: 100%; }

.tonight-sky-map-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .8rem;
    padding-top: .8rem;
    border-top: 1px solid #e9eef5;
}

.tonight-sky-map-footer > p { margin: 0; color: #64738b; font-size: .76rem; }
.tonight-sky-map-footer > p i { color: #5e7be1; margin-right: .2rem; }
.tonight-sky-map-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem .9rem; color: #68768c; font-size: .7rem; }
.tonight-sky-map-legend span { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.tonight-sky-legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1px solid #fff; box-shadow: 0 0 0 1px rgba(50,68,102,.2); }
.tonight-sky-legend-dot.deep { background: #6f8ff7; }
.tonight-sky-legend-dot.solar { background: #ffd065; }
.tonight-sky-legend-ring { display: inline-block; width: 16px; border-top: 2px dashed #d7a13e; }

.tonight-map-jump {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: .65rem;
    padding: .35rem .55rem;
    border: 1px solid #d8e1f0;
    border-radius: 9px;
    color: #4763bf;
    background: #fff;
    font-size: .7rem;
    font-weight: 800;
    cursor: pointer;
}
.tonight-map-jump:hover { border-color: #6f87df; color: #294ab7; background: #f6f8ff; }
.tonight-map-jump-icon { flex: 0 0 auto; margin: 0 0 0 .15rem; padding: .28rem .4rem; }

.tonight-card-highlight {
    animation: tonight-map-card-flash 2.5s ease;
}

@keyframes tonight-map-card-flash {
    0%, 100% { box-shadow: inherit; }
    18%, 60% { box-shadow: 0 0 0 4px rgba(82, 113, 226, .25), 0 18px 34px rgba(36,57,93,.14); }
}

@media (max-width: 900px) {
    .tonight-sky-map-toolbar { grid-template-columns: 1fr 1fr; }
    .tonight-sky-time-control { grid-column: 1 / -1; }
    .tonight-sky-map-layout { grid-template-columns: 1fr; }
    .tonight-sky-map-info { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: .8rem; align-items: start; }
    .tonight-sky-map-info .tool-kicker,
    .tonight-sky-map-info h3,
    .tonight-sky-map-info > p { grid-column: 1 / -1; }
    .tonight-sky-map-info-stats { margin-bottom: 0; }
    .tonight-sky-map-info .btn { align-self: end; width: auto; margin-top: .85rem; }
}

@media (max-width: 576px) {
    .tonight-sky-map-section { padding: .85rem; border-radius: 16px; }
    .tonight-sky-map-toolbar { grid-template-columns: 1fr; gap: .7rem; padding: .8rem; }
    .tonight-sky-time-control { grid-column: auto; }
    .tonight-sky-map-frame { padding: .35rem; border-radius: 14px; }
    .tonight-sky-map-marker-label { font-size: 10px; }
    .tonight-sky-compass { font-size: 18px; }
    .tonight-sky-map-info { display: block; padding: .85rem; }
    .tonight-sky-map-info .btn { width: 100%; }
    .tonight-sky-map-footer { align-items: flex-start; flex-direction: column; }
    .tonight-sky-map-legend { justify-content: flex-start; }
}

@media print {
    .tonight-sky-map-toolbar,
    .tonight-sky-map-info .btn,
    .tonight-map-jump { display: none !important; }
    .tonight-sky-map-layout { grid-template-columns: 1fr; }
    .tonight-sky-map-frame { break-inside: avoid; }
}

