body {
  background-color: #222;
  font-family: system-ui, sans-serif;
  text-align: center;
  color: #bbb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  margin: 0 auto;
  max-width: 1200px;
}

header {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

nav {
  display: flex;
  justify-content: space-around;
  width: 100%;
  padding: 1rem 0;
  background-color: #333;
}

img {
  display: block;
  object-fit: contain;
}

a {
  display: inline-block;
  margin: 0 auto;
  padding: 0.5rem 1.0rem;
  border-radius: 0.5rem;
}

a:link,
a:visited,
a:hover,
a:active {
  color: #bbbbbb;
}

a:hover {
  background-color: whitesmoke;
  color: #555;
}

.sky-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
}

.sky-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.all-sky-cam {
  max-height: 600px;
  flex-shrink: 0;
}

.weather-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
}

.weather-graph,
.satellite-animation {
  max-height: 600px;
}

.seeing-conditions,
.sqm-measurements {
  max-height: 300px;
}

.twlight-wrapper {
  width: 750px;
  height: 400px;
  margin: 0 auto;
  overflow: hidden;
}

.twlight-iframe {
  display: block;
  width: 750px;
  height: 400px;
  border-style: none;
}

.clc-graph {
  max-height: 200px;
}

.clc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  body {
    gap: 1rem;
  }

  nav {
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
  }

  .sky-row,
  .weather-row {
    flex-direction: column;
    align-items: center;
  }

  .all-sky-cam,
  .weather-graph,
  .satellite-animation {
    max-width: 100%;
    max-height: none;
  }

  .seeing-conditions,
  .sqm-measurements {
    max-width: 100%;
    max-height: none;
  }

  img {
    margin: 0 auto;
    max-width: 100%;
  }

  .twlight-wrapper {
    width: 100%;
    height: 260px;
  }

  .twlight-iframe {
    transform-origin: top left;
    transform: scale(0.65);
  }
}

@media (max-width: 480px) {
  .twlight-wrapper {
    height: 200px;
  }

  .twlight-iframe {
    transform: scale(0.5);
  }
}


/* ── Tonight's Sky widget ── */
.skytimes {
    --st-bg: #0b0d14;
    --st-panel: #12141f;
    --st-line: #262a3c;
    --st-text: #e9e8f0;
    --st-muted: #9a9bb0;
    --st-accent: #ffb361;
    --st-accent-cool: #7fa7d6;
    --st-font-display: 'Spectral', Georgia, 'Times New Roman', serif;
    --st-font-body: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
    --st-font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

    max-width: 880px;
    margin: 2.5rem auto;
    padding: 2rem 2rem 1.75rem;
    background: var(--st-bg);
    border: 1px solid var(--st-line);
    border-radius: 18px;
    color: var(--st-text);
    font-family: var(--st-font-body);
    box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  }

  .skytimes__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
  }
  .skytimes__title {
    font-family: var(--st-font-display);
    font-weight: 600;
    font-size: 1.7rem;
    letter-spacing: 0.01em;
    margin: 0;
    color: var(--st-text);
  }
  .skytimes__date {
    margin: 0;
    font-family: var(--st-font-mono);
    font-size: 0.85rem;
    color: var(--st-muted);
    letter-spacing: 0.02em;
  }

  .skytimes__arc-wrap { position: relative; margin-bottom: 0.85rem; }
  .skytimes__arc { width: 100%; height: auto; display: block; overflow: visible; }

  .skytimes__legend {
    display: flex;
    gap: 1.25rem;
    margin: 0 0 0.25rem;
    font-family: var(--st-font-mono);
    font-size: 0.7rem;
    color: var(--st-muted);
    letter-spacing: 0.04em;
    justify-content: center;
  }
  .st-legend-item { display: inline-flex; align-items: center; gap: 0.4rem; }
  .st-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

  .skytimes__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.75rem;
  }
  @media (max-width: 560px) {
    .skytimes__grid { grid-template-columns: 1fr; gap: 1.25rem; }
  }
  .skytimes__col-title {
    font-family: var(--st-font-display);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--st-muted);
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--st-line);
  }
  .skytimes__list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: none;
  }
  .skytimes__list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--st-line);
    font-size: 0.92rem;
  }
  .skytimes__list li:last-child { border-bottom: none; }
  .st-row__swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.6rem;
    flex-shrink: 0;
  }
  .st-row__name { display: flex; align-items: center; color: var(--st-text); }
  .st-row__time {
    font-family: var(--st-font-mono);
    color: var(--st-muted);
    font-size: 0.88rem;
  }
  .st-row--headline .st-row__name { font-weight: 700; color: var(--st-accent); }
  .st-row--headline .st-row__time { color: var(--st-accent); font-weight: 700; }

  .skytimes__moon {
    display: flex;
    gap: 2rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--st-line);
    flex-wrap: wrap;
  }
  .skytimes__moon-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
  }
  .skytimes__moon-icon { font-size: 1.1rem; }
  .skytimes__moon-label { color: var(--st-muted); }
  .skytimes__moon-time { font-family: var(--st-font-mono); color: var(--st-text); font-weight: 600; }

  .skytimes__imaging {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--st-line);
    flex-wrap: wrap;
  }
  .skytimes__imaging-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
  }
  .skytimes__imaging-icon { font-size: 1.1rem; }
  .skytimes__imaging-label { color: var(--st-muted); }
  .skytimes__imaging-sub { font-size: 0.75rem; opacity: 0.7; }
  .skytimes__imaging-time {
    font-family: var(--st-font-mono);
    color: var(--st-text);
    font-weight: 600;
  }
  .st-moonlit  { color: #c8a4e8; }   /* soft lavender — moon-bright sky */
  .st-moonless { color: #6ec6a0; }   /* soft green  — dark-sky hours     */

  .skytimes__foot {
    margin: 1.5rem 0 0;
    font-size: 0.75rem;
    color: var(--st-muted);
    text-align: center;
  }

  @media (prefers-reduced-motion: no-preference) {
    .st-glyph { transition: opacity 0.4s ease; }
  }

/* ── Image gallery ── */
.gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  padding: 0 1rem;
}

.gallery-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.gallery-img-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.gallery-item img {
  max-width: 350px;
  max-height: 350px;
  width: auto;
  height: auto;
  border-radius: 0.5rem;
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery-item img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.gallery-img-wrap::after {
  content: "\1F50D";
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  width: 1.9rem;
  height: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  font-size: 1rem;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}

.gallery-img-wrap:hover::after {
  opacity: 1;
  transform: scale(1);
}

.feature-list {
  text-align: left;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem 0 2.5rem;
  line-height: 1.6;
}

.feature-list li {
  margin-bottom: 0.6rem;
}

@media (max-width: 768px) {
  .feature-list {
    padding-left: 1.5rem;
  }
}

.gallery-item figcaption {
  font-size: 0.9rem;
  color: #bbb;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  border-radius: 0.25rem;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
  .gallery {
    gap: 1rem;
  }

  .gallery-item img {
    max-width: 90vw;
    max-height: 300px;
  }
}