/* hub-stars.css — 메인 화면 '혼돈의 별자리' 보기. 기본 격자 화면은 그대로 두고 html.stars-mode일 때만 덮는다.
   하늘은 테마와 상관없이 늘 밤하늘이라, 위 탑바도 이때만 어두운 색으로 맞춘다. */
html.stars-mode, html.stars-mode body { background: #04050a; overflow: hidden; }
html.stars-mode .shell > section:not(#authSection),
html.stars-mode .shell > footer,
html.stars-mode .pjh-copyright { display: none !important; }
html.stars-mode .shell { position: relative; z-index: 2; }
html.stars-mode .topbar {
  --text: #e8e8ea; --sub: #8c8c91; --border: rgba(255, 255, 255, .14); --surface: rgba(10, 12, 20, .7);
  --mark-bg: #e8e8ea; --mark-fg: #04050a;
  color: #e8e8ea; border-bottom-color: transparent;
}
html.stars-mode #authSection { position: relative; z-index: 3; }

.view-toggle.on { color: #ffd76a; border-color: rgba(255, 215, 106, .55); }

.star-view { position: fixed; inset: 0; z-index: 1; overflow: hidden; color: #e8e8f0; user-select: none;
  background: radial-gradient(ellipse 60% 55% at 50% 50%, #141832 0%, #0a0c1c 45%, #04050a 100%); }
.star-view canvas.sky-dust { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform 1.1s cubic-bezier(.6, 0, .4, 1), opacity .9s; }
.sky.enter { opacity: 0; }
.sky-layer { position: absolute; inset: 0; transition: transform .25s ease-out; }
svg.sky-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sky-lines line { stroke: rgba(170, 185, 255, .22); stroke-width: 1; }
.sky-lines line.hot { stroke: var(--c, #fff); stroke-opacity: .75; stroke-width: 1.4; }
.sky-lines circle.orbit { fill: none; stroke: rgba(170, 185, 255, .07); stroke-dasharray: 2 6; }

/* 가운데 거대 행성(hub-planet.js가 WebGL로 그림) — 누르기는 뒤의 별로 통과 */
.planet { position: absolute; pointer-events: none; }
.planet canvas { display: block; width: 100% !important; height: 100% !important; }
.planet.flat::before { content: ""; position: absolute; left: 34%; top: 34%; width: 32%; height: 32%; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #f4a6d8 0%, #7b45c9 32%, #2a1660 64%, #0b0820 100%);
  box-shadow: 0 0 60px 10px rgba(120, 110, 255, .35), inset -18px -14px 40px rgba(0, 0, 0, .6); }
.planet.flat::after { content: ""; position: absolute; left: 20%; top: 46%; width: 60%; height: 8%; border-radius: 50%;
  border: 3px solid rgba(220, 190, 255, .45); transform: rotate(-14deg); }

/* 별자리 이름 */
.const-name { position: absolute; transform: translate(-50%, -50%); font-size: 10.5px; letter-spacing: .38em; color: rgba(190, 200, 255, .38); white-space: nowrap; pointer-events: none; transition: color .3s; }
.const-name.hot { color: rgba(230, 235, 255, .85); }

/* 앱 별 */
.star { position: absolute; width: 0; height: 0; text-decoration: none; color: inherit; outline: none; }
.star::before { content: ""; position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; } /* 손가락으로 누르기 좋은 크기 */
.star .core { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 22%, var(--c) 46%, transparent 72%); box-shadow: 0 0 14px 2px var(--c);
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.4); animation: twinkle var(--tw, 3.2s) ease-in-out infinite; }
.star .core::before, .star .core::after { content: ""; position: absolute; left: 50%; top: 50%; background: linear-gradient(90deg, transparent, var(--c), transparent); opacity: .7; }
.star .core::before { width: 34px; height: 1px; margin: -.5px 0 0 -17px; }
.star .core::after { width: 1px; height: 34px; margin: -17px 0 0 -.5px; background: linear-gradient(transparent, var(--c), transparent); }
.star.big .core { transform: scale(1.25); }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }
.star .label { position: absolute; left: 0; top: 14px; transform: translateX(-50%); font-size: 12px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; color: rgba(232, 234, 245, .82); text-shadow: 0 0 6px #000, 0 0 2px #000; transition: color .2s; }
.star:hover .core, .star:focus-visible .core, .star.sel .core { transform: scale(2); animation: none; }
.star:hover .label, .star:focus-visible .label, .star.sel .label { color: var(--c); }
.star:focus-visible .core { outline: 1px dashed var(--c); outline-offset: 6px; }

/* 별 설명 카드 */
.star-card { position: absolute; z-index: 5; width: 250px; padding: 12px 14px 12px; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s;
  background: rgba(10, 12, 26, .88); border: 1px solid color-mix(in srgb, var(--c, #aab) 60%, transparent); box-shadow: 0 0 24px color-mix(in srgb, var(--c, #aab) 25%, transparent); backdrop-filter: blur(6px); }
.star-card.show { opacity: 1; transform: none; }
.star-card.tap { pointer-events: auto; }
.star-card .sc-const { font-size: 9.5px; letter-spacing: .3em; color: var(--c); }
.star-card .sc-name { display: flex; align-items: center; gap: 8px; margin: 5px 0 6px; font-size: 15px; font-weight: 800; }
.star-card .sc-name svg { flex: none; }
.star-card .sc-desc { font-family: var(--font-sans); font-size: 12px; line-height: 1.6; color: #b9bdd0; }
.star-card .sc-go { display: none; margin-top: 10px; width: 100%; padding: 7px; border: 1px solid var(--c); background: transparent; color: var(--c); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.star-card.tap .sc-go { display: block; }
.star-card .sc-tag { display: inline-block; margin-left: auto; font-size: 9px; letter-spacing: .1em; padding: 1px 6px; border: 1px solid currentColor; color: #8b90a8; font-weight: 400; }

/* 왼쪽 아래 관측 기록(시계·날씨·공지) */
.sky-hud { position: absolute; left: 24px; bottom: 20px; z-index: 4; font-size: 11px; letter-spacing: .06em; color: rgba(205, 212, 240, .7); line-height: 1.8; font-variant-numeric: tabular-nums; pointer-events: none; }
.sky-hud b { color: #e8eaf6; font-weight: 700; }
.sky-hud .hud-head { font-size: 9.5px; letter-spacing: .32em; color: rgba(190, 200, 255, .45); }
.sky-hint { position: absolute; right: 24px; bottom: 20px; z-index: 4; font-size: 10.5px; color: rgba(190, 200, 255, .4); letter-spacing: .06em; pointer-events: none; }

/* 별로 빨려 들어가기 */
.warp { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0; background: radial-gradient(circle at var(--wx) var(--wy), var(--c) 0%, transparent 40%); transition: opacity .9s ease-in; }
.warp.go { opacity: 1; }

@media (max-width: 640px) {
  .star .label { font-size: 10.5px; top: 12px; }
  .const-name { font-size: 9px; letter-spacing: .26em; }
  .sky-hud { left: 14px; bottom: 12px; font-size: 10px; }
  .sky-hint { display: none; }
  .star-card { width: min(260px, calc(100vw - 28px)); }
}
@media (prefers-reduced-motion: reduce) {
  .star .core { animation: none; }
  .sky, .sky-layer, .warp { transition: none; }
}
