:root {
  color-scheme: dark;
  --panel: rgba(8, 12, 20, 0.72);
  --panel-strong: rgba(8, 12, 20, 0.9);
  --line: rgba(210, 226, 255, 0.2);
  --text: #f6f8ff;
  --muted: #b9c4d7;
  --accent: #7de0c3;
  --accent-2: #f0c16b;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #02050b;
  color: var(--text);
}

.app-shell,
.sky-stage,
#aladin {
  width: 100vw;
  height: 100vh;
}

.sky-stage {
  position: relative;
}

#aladin {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #02050b;
}

.thumb-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.footprint-svg {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.footprint-outline {
  fill: rgba(125, 224, 195, 0.08);
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.footprint-outline.is-active {
  fill: rgba(125, 224, 195, 0.16);
  stroke: rgba(125, 224, 195, 0.95);
  stroke-width: 2.2;
}

.astro-thumb {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 4px;
  transform-origin: 0 0;
  background-color: rgba(16, 24, 38, 0.08);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 12px 24px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  cursor: crosshair;
  opacity: 0.92;
  transition: border-color 140ms ease, box-shadow 140ms ease, opacity 80ms ease, filter 140ms ease;
}

.astro-thumb.is-outline-only {
  opacity: 0;
}

.astro-thumb.is-image-waiting {
  opacity: 0.18;
  background-image: none !important;
}

.astro-thumb:hover,
.astro-thumb:focus-visible {
  border-color: var(--accent);
  outline: none;
  opacity: 1;
  filter: saturate(1.18) contrast(1.06);
  z-index: 10;
  box-shadow: 0 0 0 1px #001812, 0 0 28px rgba(125, 224, 195, 0.65), 0 20px 38px rgba(0, 0, 0, 0.55);
}

.astro-thumb.is-image-fill {
  background-color: #101826;
  opacity: 0.72;
}

.astro-thumb.is-image-fill:hover,
.astro-thumb.is-image-fill:focus-visible {
  opacity: 1;
}

.astro-thumb.is-minified {
  border-radius: 999px;
}

.topbar {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.branding {
  position: absolute;
  top: 54px;
  left: 74px;
  pointer-events: auto;
}

.site-return {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  padding: 7px 10px;
  border: 1px solid rgba(137, 224, 209, 0.38);
  border-radius: 999px;
  color: var(--text);
  background: rgba(3, 8, 16, 0.72);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.site-return:hover,
.site-return:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow a,
.api-notice a {
  color: inherit;
  text-underline-offset: 3px;
}

.eyebrow a:hover,
.eyebrow a:focus-visible,
.api-notice a:hover,
.api-notice a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.75);
}

.status-pills {
  position: absolute;
  top: 4px;
  left: 50%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: min(860px, calc(100vw - 650px));
  transform: translateX(-50%);
}

.status-pills > span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--panel);
  color: var(--muted);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.page-controls {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: blur(12px);
}

.page-controls span,
.page-controls button,
.page-size-control {
  min-height: 32px;
  border: 0;
  border-radius: 0;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-right: 1px solid var(--line);
}

.page-size-control span {
  min-height: auto;
  padding: 0;
}

.page-size-control select {
  border: 0;
  border-radius: 5px;
  padding: 2px 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.page-size-control select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.page-controls button {
  cursor: pointer;
}

.page-controls button:hover:not(:disabled) {
  background: rgba(125, 224, 195, 0.18);
  color: var(--text);
}

.page-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.api-notice {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  max-width: min(560px, calc(100vw - 36px));
  margin: 0;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  box-shadow: var(--shadow);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.preview {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: min(390px, calc(100vw - 36px));
  max-height: min(74vh, 690px);
  overflow: hidden auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.preview-empty {
  display: grid;
  gap: 6px;
  padding: 18px;
  color: var(--muted);
}

.preview-empty strong {
  color: var(--text);
}

.preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #111927;
}

.preview-content {
  padding: 16px;
}

.preview h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.18;
}

.meta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 13px;
}

.meta-grid dt {
  color: var(--accent-2);
  font-weight: 700;
}

.meta-grid dd {
  margin: 0;
}

.preview-description {
  margin: 12px 0 0;
  color: #d7deeb;
  font-size: 14px;
  line-height: 1.45;
}

.image-calibration {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.image-calibration button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
}

.image-calibration button:hover {
  border-color: var(--accent);
  background: rgba(125, 224, 195, 0.16);
}

.calibration-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.preview a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.home-button {
  position: absolute;
  left: 18px;
  bottom: 70px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.home-button:hover {
  border-color: var(--accent);
}

.calibration-panel {
  position: absolute;
  left: 74px;
  bottom: 70px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100vw - 520px);
}

.segmented {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.segmented button {
  min-width: 48px;
  height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button:hover,
.segmented button.is-active {
  background: rgba(125, 224, 195, 0.18);
  color: var(--text);
}

.aladin-logo-container,
.aladin-location,
.aladin-fov,
.aladin-cooFrame,
.aladin-projection {
  opacity: 0.75;
}

@media (max-width: 720px) {
  .branding {
    top: 48px;
    left: 12px;
  }

  h1 {
    font-size: 26px;
  }

  .status-pills {
    top: 110px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    justify-content: flex-start;
    transform: none;
  }

  .preview {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 48vh;
  }

  .home-button {
    bottom: calc(48vh + 24px);
    left: 12px;
  }

  .calibration-panel {
    display: none;
  }

  .api-notice {
    bottom: calc(48vh + 24px);
    max-width: calc(100vw - 110px);
  }
}
:root {
  color-scheme: dark;
  --panel: rgba(8, 12, 20, 0.72);
  --panel-strong: rgba(8, 12, 20, 0.9);
  --line: rgba(210, 226, 255, 0.2);
  --text: #f6f8ff;
  --muted: #b9c4d7;
  --accent: #7de0c3;
  --accent-2: #f0c16b;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #02050b;
  color: var(--text);
}

.app-shell,
.sky-stage,
#aladin {
  width: 100vw;
  height: 100vh;
}

.sky-stage {
  position: relative;
}

#aladin {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #02050b;
}

.thumb-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.footprint-svg {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.footprint-outline {
  fill: rgba(125, 224, 195, 0.08);
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.footprint-outline.is-active {
  fill: rgba(125, 224, 195, 0.16);
  stroke: rgba(125, 224, 195, 0.95);
  stroke-width: 2.2;
}

.astro-thumb {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 4px;
  transform-origin: 0 0;
  background-color: rgba(16, 24, 38, 0.08);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 12px 24px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  cursor: crosshair;
  opacity: 0.92;
  transition: border-color 140ms ease, box-shadow 140ms ease, opacity 80ms ease, filter 140ms ease;
}

.astro-thumb.is-outline-only {
  opacity: 0;
}

.astro-thumb.is-image-waiting {
  opacity: 0.18;
  background-image: none !important;
}

.astro-thumb:hover,
.astro-thumb:focus-visible {
  border-color: var(--accent);
  outline: none;
  opacity: 1;
  filter: saturate(1.18) contrast(1.06);
  z-index: 10;
  box-shadow: 0 0 0 1px #001812, 0 0 28px rgba(125, 224, 195, 0.65), 0 20px 38px rgba(0, 0, 0, 0.55);
}

.astro-thumb.is-image-fill {
  background-color: #101826;
  opacity: 0.72;
}

.astro-thumb.is-image-fill:hover,
.astro-thumb.is-image-fill:focus-visible {
  opacity: 1;
}

.astro-thumb.is-minified {
  border-radius: 999px;
}

.topbar {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.branding {
  position: absolute;
  top: 54px;
  left: 74px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow a,
.api-notice a {
  color: inherit;
  text-underline-offset: 3px;
}

.eyebrow a:hover,
.eyebrow a:focus-visible,
.api-notice a:hover,
.api-notice a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.75);
}

.status-pills {
  position: absolute;
  top: 4px;
  left: 50%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: min(860px, calc(100vw - 650px));
  transform: translateX(-50%);
}

.status-pills > span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--panel);
  color: var(--muted);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.page-controls {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: blur(12px);
}

.page-controls span,
.page-controls button,
.page-size-control {
  min-height: 32px;
  border: 0;
  border-radius: 0;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-right: 1px solid var(--line);
}

.page-size-control span {
  min-height: auto;
  padding: 0;
}

.page-size-control select {
  border: 0;
  border-radius: 5px;
  padding: 2px 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.page-size-control select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.page-controls button {
  cursor: pointer;
}

.page-controls button:hover:not(:disabled) {
  background: rgba(125, 224, 195, 0.18);
  color: var(--text);
}

.page-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.api-notice {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  max-width: min(560px, calc(100vw - 36px));
  margin: 0;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  box-shadow: var(--shadow);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.preview {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: min(390px, calc(100vw - 36px));
  max-height: min(74vh, 690px);
  overflow: hidden auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.preview-empty {
  display: grid;
  gap: 6px;
  padding: 18px;
  color: var(--muted);
}

.preview-empty strong {
  color: var(--text);
}

.preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #111927;
}

.preview-content {
  padding: 16px;
}

.preview h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.18;
}

.meta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 13px;
}

.meta-grid dt {
  color: var(--accent-2);
  font-weight: 700;
}

.meta-grid dd {
  margin: 0;
}

.preview-description {
  margin: 12px 0 0;
  color: #d7deeb;
  font-size: 14px;
  line-height: 1.45;
}

.image-calibration {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.image-calibration button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
}

.image-calibration button:hover {
  border-color: var(--accent);
  background: rgba(125, 224, 195, 0.16);
}

.calibration-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.preview a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.home-button {
  position: absolute;
  left: 18px;
  bottom: 70px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.home-button:hover {
  border-color: var(--accent);
}

.calibration-panel {
  position: absolute;
  left: 74px;
  bottom: 70px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100vw - 520px);
}

.segmented {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.segmented button {
  min-width: 48px;
  height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button:hover,
.segmented button.is-active {
  background: rgba(125, 224, 195, 0.18);
  color: var(--text);
}

.aladin-logo-container,
.aladin-location,
.aladin-fov,
.aladin-cooFrame,
.aladin-projection {
  opacity: 0.75;
}

@media (max-width: 720px) {
  .branding {
    top: 48px;
    left: 12px;
  }

  h1 {
    font-size: 26px;
  }

  .status-pills {
    top: 110px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    justify-content: flex-start;
    transform: none;
  }

  .preview {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 48vh;
  }

  .home-button {
    bottom: calc(48vh + 24px);
    left: 12px;
  }

  .calibration-panel {
    display: none;
  }

  .api-notice {
    bottom: calc(48vh + 24px);
    max-width: calc(100vw - 110px);
  }
}
