/* Starlight P0: presentation only; no field geometry or recognition changes. */
.starlight-community .starlight-camera-preparation {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px;
  padding: 18px 22px; margin-bottom: 18px;
  border: 1px solid #4ea5b7; border-radius: 20px; background: #092b3e;
}
.starlight-camera-preparation > div:first-child { flex: 1 1 440px; }
.starlight-camera-preparation h2 { margin: 0 0 8px; color: #edfaff; font-size: 24px; }
.starlight-camera-preparation p { margin: 6px 0; font-size: 18px; line-height: 1.6; }
.starlight-camera-controls { display: flex; flex-wrap: wrap; gap: 10px; flex: 0 1 340px; }
.starlight-camera-controls button {
  min-height: 48px; padding: 10px 18px; border: 1px solid #9debf0;
  border-radius: 14px; background: #12465b; color: #fff; font: inherit; cursor: pointer;
}
.starlight-camera-controls #startCamera { background: #9debf0; color: #052535; font-weight: 700; }
.starlight-camera-controls button:disabled { opacity: .5; cursor: default; }
.starlight-camera-controls button:focus-visible { outline: 3px solid #ffe085; outline-offset: 3px; }
.starlight-camera-controls #cameraReadiness { flex-basis: 100%; color: #e7f7fa; }
.starlight-aim-legend { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.starlight-aim-legend span::before, #cameraReadiness::before {
  content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px;
  border: 2px solid #1ee7f0; border-radius: 50%; vertical-align: baseline;
}
.starlight-aim-legend span:nth-child(2)::before, #cameraReadiness[data-aim-state="position"]::before { border-color: #ffd166; border-style: dashed; }
.starlight-aim-legend span:nth-child(3)::before, #cameraReadiness[data-aim-state="ready"]::before { border-color: #65f59a; background: #65f59a; }
.is-projecting .starlight-camera-preparation, .starlight-result-view .starlight-camera-preparation { display: none; }

/* Scope to the actual field; selectors outrank the older dynamically loaded polish. */
#field[data-aim-state] { --aim-color: #1ee7f0; }
#field[data-aim-state="position"] { --aim-color: #ffd166; }
#field[data-aim-state="ready"] { --aim-color: #65f59a; }
#field[data-aim-state] #ghost-focus > .fusion-ghost-underlay,
#field[data-aim-state] #ghost-focus > .fusion-ghost-rim {
  r: 28px; visibility: visible; fill: none; opacity: 1; pointer-events: none;
}
#field[data-aim-state] #ghost-focus.dot-identity-known > .fusion-ghost-underlay,
#field[data-aim-state] #ghost-focus.dot-identity-known > .fusion-ghost-rim { r: 90px; }
#field[data-aim-state] #ghost-focus > .fusion-ghost-underlay,
#field[data-aim-state] .p0-search-underlay { stroke: #062a38; stroke-width: 9px; opacity: 1; }
#field[data-aim-state] #ghost-focus > .fusion-ghost-rim,
#field[data-aim-state] .p0-search-rim {
  stroke: var(--aim-color); stroke-width: 4px; opacity: 1;
  filter: drop-shadow(0 0 3px #062a38); transition: stroke 120ms linear;
}
#field[data-aim-state="position"] #ghost-focus > .fusion-ghost-rim { stroke-dasharray: 12 6; }
svg#field[data-aim-state] #ghost-star[style*="opacity: 0.28"],
svg#field[data-aim-state] #ghost-star[style*="opacity: 0.48"] { opacity: 1 !important; }
#field[data-aim-state] #p0-search-guide { pointer-events: none; }
#field[data-aim-state] #p0-search-guide[hidden] { display: none; }
main[inert] #field[data-aim-state] #p0-search-guide { display: none; }
svg#field[data-fusion-state="SCENE_EXIT"][data-aim-state] #ghost-star,
svg#field[data-fusion-state="SCENE_EXIT"][data-aim-state] #p0-search-guide { opacity: 0 !important; }
@media (prefers-reduced-motion: reduce) {
  #field[data-aim-state] .fusion-ghost-rim { transition: none; }
}
