/* One continuous, explorable galaxy for every constellation. */
.cg-universe {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 22px;
  border-radius: 24px;
  background: radial-gradient(ellipse at 50% 48%, #29233b55, #10121d00 73%);
  transition: height .76s cubic-bezier(.22,.62,.24,1);
  scroll-margin-top: 24px;
}
.cg-universe::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 100px 30px #10121d68;
}
#constellation-galaxy-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  transition: opacity .6s, filter .6s;
}
.cg-galaxy-scene { position: relative; height: var(--scene-height,580px); z-index: 1; }
.constellation-garden .cg-universe .cg-overview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  display: block;
  transform-origin: var(--focus-x,50%) var(--focus-y,50%);
  transition: transform .76s cubic-bezier(.22,.62,.24,1), opacity .35s;
}
.constellation-garden .cg-universe .cg-topic {
  position: absolute;
  left: var(--galaxy-x,50%);
  top: var(--galaxy-y,50%);
  width: 225px;
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  transform: translate(-50%,-50%);
  background: none;
  border: 0;
  border-radius: 20px;
  text-align: center;
  transition: opacity .35s, filter .35s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.constellation-garden .cg-universe .cg-topic::before { display: none; }
.constellation-garden .cg-universe .cg-topic.is-active,
.constellation-garden .cg-universe .cg-topic:hover,
.constellation-garden .cg-universe .cg-topic:focus-visible { background: none; border-color: transparent; }
.cg-topic-figure {
  display: block;
  position: relative;
  width: 225px;
  height: 142px;
  flex-shrink: 0;
  transform: translate3d(var(--hover-x,0px),var(--hover-y,0px),0);
  transition: transform .45s cubic-bezier(.2,.7,.2,1), filter .45s;
}
.cg-topic-figure::before {
  content: '';
  position: absolute;
  inset: -40px -25px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #f1d6ac26, #cbb1ec0e 43%, transparent 70%);
  opacity: .12;
  transform: scale(.8);
  transition: opacity .4s, transform .5s;
  pointer-events: none;
}
.cg-topic-figure::after {
  content: '';
  position: absolute;
  inset: -11px 2px;
  border: 1px solid #e8c7b745;
  border-radius: 50%;
  opacity: 0;
  transform: rotate(-18deg) scale(.75);
  transition: transform .6s, opacity .4s;
  pointer-events: none;
}
.constellation-garden .cg-universe .cg-mini {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: cg-galaxy-float 7s ease-in-out infinite alternate;
  animation-delay: var(--float-delay,0s);
  transition: filter .4s;
}
.cg-universe .cg-mini .cg-line { stroke: #e8ccbc9e; stroke-width: 1.2; transition: stroke .35s; }
.cg-universe .cg-mini .cg-node { fill: #cdbfd9; transition: fill .35s; }
.cg-universe .cg-mini .cg-node-bright { fill: #fff1dc; filter: drop-shadow(0 0 6px #ffd4a4b3); }
.cg-universe .cg-topic:is(:hover,:focus-visible,.is-active,.is-touched) .cg-topic-figure {
  transform: translate3d(var(--hover-x,0px),calc(var(--hover-y,0px) - 5px),0) scale(1.08);
  filter: drop-shadow(0 0 13px #ebc3b332);
}
.cg-universe .cg-topic:is(:hover,:focus-visible,.is-active,.is-touched) .cg-topic-figure::before { opacity: 1; transform: scale(1.14); }
.cg-universe .cg-topic:is(:hover,:focus-visible,.is-active) .cg-topic-figure::after { opacity: .85; transform: rotate(-18deg) scale(1.08); }
.cg-universe .cg-topic:is(:hover,:focus-visible,.is-active,.is-touched) .cg-line { stroke: #ffe2bc; }
.cg-universe .cg-topic:is(:hover,:focus-visible,.is-active,.is-touched) .cg-node { fill: #fff1d9; }
.cg-universe .cg-topic.is-touched .cg-topic-figure::after { animation: cg-contact-wave .72s ease-out both; }
.constellation-garden .cg-universe .cg-topic-copy { display: block; text-align: center; position: relative; z-index: 2; }
.constellation-garden .cg-universe .cg-topic-title {
  margin: 7px 0 6px;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 1.5px;
  line-height: 1.5;
  color: #f1ddce;
  text-shadow: 0 2px 14px #0c0e1f, 0 0 24px #10121d;
}
.constellation-garden .cg-universe .cg-topic-subtitle { display: none; }
.constellation-garden .cg-universe .cg-topic-meta { display: flex; flex-direction: row; justify-content: center; gap: 10px; margin: 0; font-size: 12px; line-height: 1.6; color: #b9a7b8; text-shadow: 0 1px 9px #10121d; }
.constellation-garden .cg-universe .cg-read { display: inline; color: #c9aa97; }
.constellation-garden .cg-universe .cg-open-cue { display: block; margin-top: 10px; font-size: 12px; color: #e6c6b0; letter-spacing: .8px; opacity: 0; transform: translateY(5px); transition: opacity .3s, transform .3s; }
.cg-universe .cg-topic:is(:hover,:focus-visible,.is-active,.is-touched) .cg-open-cue { opacity: 1; transform: translateY(0); }
.cg-galaxy-caption, .cg-galaxy-hint { position: absolute; z-index: 2; pointer-events: none; line-height: 1.8; transition: opacity .3s; }
.cg-galaxy-caption { left: 28px; top: 23px; color: #a79bb5; font-size: 11px; letter-spacing: 2.4px; }
.cg-galaxy-hint { bottom: 20px; left: 20px; right: 20px; text-align: center; color: #c4b2be; font-size: 13px; letter-spacing: 1px; text-shadow: 0 2px 12px #10121d; }
.cg-universe[data-view='entering'] .cg-overview {
  transform: translate(var(--focus-shift-x,0px),var(--focus-shift-y,0px)) scale(1.55);
  opacity: 0;
  transition: transform .76s cubic-bezier(.22,.62,.24,1), opacity .3s .46s;
}
.cg-universe[data-view='entering'] .cg-topic:not(.is-active) { opacity: 0; filter: blur(3px); }
.cg-universe[data-view='entering'] .cg-galaxy-caption,
.cg-universe[data-view='entering'] .cg-galaxy-hint,
.cg-universe[data-view='leaving'] .cg-galaxy-caption,
.cg-universe[data-view='leaving'] .cg-galaxy-hint { opacity: 0; }
.cg-universe[data-view='leaving'] .cg-overview { animation: cg-galaxy-return .7s cubic-bezier(.22,.62,.24,1) both; }
.cg-universe .cg-detail { position: relative; z-index: 1; margin: 0; min-height: 580px; background: none; border: 0; border-radius: 24px; padding: 30px; }
.cg-universe[data-view='entering'] .cg-detail,
.cg-universe[data-view='leaving'] .cg-detail { position: absolute; top: 0; left: 0; width: 100%; }
.cg-universe[data-view='entering'] .cg-detail { visibility: hidden; opacity: 0; pointer-events: none; }
.cg-universe[data-view='leaving'] .cg-detail { animation: cg-detail-depart .28s ease both; pointer-events: none; }
.cg-universe[data-view='detail'] #constellation-galaxy-canvas { opacity: .3; filter: blur(1.2px); }
.cg-universe .cg-detail-heading { padding-bottom: 18px; border-bottom: 1px solid #e1d1d119; }
.cg-universe .cg-detail-title { color: #f2decf; }
.cg-universe .cg-map-lines .cg-line { stroke-width: 1.25; stroke: #e8c7aaa3; filter: drop-shadow(0 0 5px #e9c2a245); }
.cg-universe .cg-note { background: linear-gradient(90deg, #10121d20, #10121d99); }
.cg-universe[data-view='detail'] .cg-detail.is-opening { animation: cg-detail-arrive .65s ease both; }
.cg-universe:not([data-view='detail']) .cg-star-enter { animation: none; }
.cg-universe[data-view='detail'] .cg-star-enter { animation: cg-star-unfold .95s cubic-bezier(.2,.65,.25,1) both; animation-delay: calc(120ms + var(--delay,0ms)); }
.cg-universe[data-view='detail'] .cg-detail.is-opening .cg-map-lines .cg-line { animation: cg-line-unfold 1.35s ease-out .18s both; }
.cg-universe[data-view='detail'] .cg-detail.is-opening .cg-note { animation: cg-note-arrive .65s ease .3s both; }
.cg-universe .cg-star::after { content: ''; position: absolute; inset: 7px; border: 1px solid #f5ceacb3; border-radius: 50%; opacity: 0; pointer-events: none; }
.cg-universe .cg-star.is-touched::after { animation: cg-star-touch .7s ease-out both; }
.cg-universe .cg-star:active .cg-star-glyph { transform: scale(1.2); }
@keyframes cg-galaxy-float { from { transform: translateY(-3px) rotate(-1deg); } to { transform: translateY(4px) rotate(.8deg); } }
@keyframes cg-contact-wave { from { opacity: .9; transform: rotate(-18deg) scale(.7); } to { opacity: 0; transform: rotate(-18deg) scale(1.55); } }
@keyframes cg-galaxy-return { from { opacity: 0; transform: translate(var(--focus-shift-x,0px),var(--focus-shift-y,0px)) scale(1.55); } to { opacity: 1; transform: translate(0,0) scale(1); } }
@keyframes cg-detail-arrive { from { opacity: 0; transform: scale(.94) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes cg-detail-depart { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.97); } }
@keyframes cg-note-arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cg-star-touch { from { opacity: .9; transform: scale(.8); } to { opacity: 0; transform: scale(2); } }
@media (max-width: 1000px) {
  .constellation-garden .cg-universe .cg-topic { width: 200px; }
  .cg-topic-figure { width: 200px; height: 133px; }
  .cg-universe .cg-detail { padding: 24px; }
}
@media (max-width: 760px) {
  .cg-universe { margin-top: 14px; border-radius: 18px; }
  .cg-universe::after { box-shadow: inset 0 0 55px 8px #10121d5c; }
  .cg-galaxy-scene { height: var(--scene-height-mobile,700px); }
  .constellation-garden .cg-universe .cg-topic { width: 170px; height: auto; left: var(--mobile-x,50%); top: var(--mobile-y,50%); padding: 0; display: flex; }
  .cg-topic-figure { width: 170px; height: 112px; }
  .cg-topic-figure::before { inset: -22px -7px; }
  .cg-topic-figure::after { inset: -7px 4px; }
  .constellation-garden .cg-universe .cg-mini { display: block; width: 100%; height: 100%; }
  .constellation-garden .cg-universe .cg-topic-title { font-size: 18px; line-height: 1.5; margin: 5px 0 5px; letter-spacing: 1px; }
  .constellation-garden .cg-universe .cg-topic-meta { font-size: 11px; gap: 7px; justify-content: center; }
  .constellation-garden .cg-universe .cg-read { display: none; }
  .constellation-garden .cg-universe .cg-open-cue { opacity: .65; transform: none; font-size: 11px; margin-top: 7px; }
  .cg-galaxy-caption { top: 16px; left: 17px; font-size: 10px; letter-spacing: 1.8px; }
  .cg-galaxy-hint { bottom: 17px; font-size: 12px; letter-spacing: .5px; }
  .cg-universe .cg-detail { min-height: 740px; padding: 22px 16px 26px; }
  .cg-universe .cg-detail-heading { padding-bottom: 15px; }
  .cg-universe .cg-note { background: linear-gradient(180deg, #10121d00, #10121d88); }
  .cg-universe .cg-note-text { font-size: 16px; }
}
@media (hover: none) {
  .cg-universe .cg-topic .cg-open-cue { opacity: .65; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cg-universe, #constellation-galaxy-canvas,
  .constellation-garden .cg-universe .cg-overview,
  .constellation-garden .cg-universe .cg-topic,
  .cg-topic-figure, .cg-topic-figure::before, .cg-topic-figure::after,
  .cg-universe .cg-topic .cg-open-cue { transition: none; }
  .constellation-garden .cg-universe .cg-mini,
  .cg-universe .cg-topic.is-touched .cg-topic-figure::after,
  .cg-universe .cg-star.is-touched::after,
  .cg-universe[data-view='detail'] .cg-detail.is-opening,
  .cg-universe[data-view='detail'] .cg-star-enter,
  .cg-universe[data-view='detail'] .cg-detail.is-opening .cg-map-lines .cg-line,
  .cg-universe[data-view='detail'] .cg-detail.is-opening .cg-note,
  .cg-universe[data-view='leaving'] .cg-detail,
  .cg-universe[data-view='leaving'] .cg-overview { animation: none; }
}
