.astro-wheel-stage {
  position: relative;
  isolation: isolate;
  width: min(100%, 690px);
  margin: auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--amber) 38%, var(--line));
  border-radius: 18px;
  background: #050505;
  box-shadow: inset 0 0 74px rgba(188, 146, 72, .08);
}

.astro-wheel-stage canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.astro-wheel-stage svg {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
}

.astro-wheel-stage .house-number,
.astro-wheel-stage .planet-degree {
  fill: #c9d5ed;
}

.astro-wheel-stage .house-line {
  stroke: rgba(222, 189, 112, .38);
}

.astro-wheel-stage .planet-node {
  cursor: help;
  outline: none;
}

.astro-wheel-stage .planet-hit {
  fill: transparent;
  stroke: transparent;
}

.astro-wheel-stage .planet-node:hover .planet-hit,
.astro-wheel-stage .planet-node:focus .planet-hit {
  fill: rgba(216, 178, 92, .14);
  stroke: rgba(216, 178, 92, .7);
  stroke-width: 1.5;
}

.astro-wheel-stage .planet-node:hover .planet-symbol,
.astro-wheel-stage .planet-node:focus .planet-symbol {
  filter: drop-shadow(0 0 8px rgba(242, 215, 140, .9));
}

.astro-tooltip {
  position: absolute;
  z-index: 3;
  max-width: min(280px, calc(100% - 24px));
  padding: 9px 11px;
  border: 1px solid rgba(216, 178, 92, .45);
  border-radius: 9px;
  background: rgba(7, 13, 32, .94);
  color: #eef3ff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .34);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  transform: translate(12px, calc(-100% - 10px));
}

.astro-tooltip[hidden] {
  display: none;
}

.dominant-element {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--amber) 40%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--amber) 8%, var(--surface-2));
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.coordinate-help {
  margin-bottom: 5px;
}

.coordinate-help a {
  color: var(--brand);
  font-weight: 750;
}

@media print {
  .astro-wheel-stage {
    border-color: #777;
    background: #fff;
    box-shadow: none;
  }

  .astro-wheel-stage canvas,
  .astro-tooltip {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .astro-wheel-stage canvas {
    opacity: .72;
  }
}

.coordinate-history {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}

.coordinate-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.coordinate-history-head h3 {
  margin: 0;
  font-size: 14px;
}

.coordinate-history-head .text-button {
  padding: 5px 8px;
}

.coordinate-history-head .text-button:disabled {
  cursor: default;
  opacity: .45;
}

.coordinate-history .field-note {
  margin: 6px 0 10px;
}

.coordinate-history-list {
  display: grid;
  gap: 7px;
}

.coordinate-history-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.coordinate-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.coordinate-history-use {
  min-width: 0;
  padding: 8px 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: 12px/1.4 ui-monospace, Consolas, monospace;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coordinate-history-use:hover,
.coordinate-history-use:focus-visible {
  border-color: var(--brand);
  outline: none;
}

.coordinate-history-remove {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.coordinate-history-remove:hover,
.coordinate-history-remove:focus-visible {
  border-color: #c95348;
  color: #c95348;
  outline: none;
}

@media print {
  .coordinate-history {
    display: none !important;
  }
}
