/* 미유 허브(meyou-hub/public/style.css)와 같은 색과 모양을 쓴다. 허브마다 다른 색은 카드의 --hub 로 받는다. */
:root {
  color-scheme: light;
  --bg: #f9f5ff;
  --glow-1: #ece0ff;
  --glow-2: #ffe1ef;
  --glow-3: #ffecd9;
  --surface: #ffffff;
  --surface-2: #f5effd;
  --surface-3: #ede4fa;
  --line: #ebe2f6;
  --ink: #2b2140;
  --ink-2: #594c6e;
  --muted: #76688d;
  --accent: #8a63d2;
  --accent-text: #6c45ba;
  --accent-soft: #efe7fd;
  --pink: #e0609a;
  --pink-soft: #fde7f1;
  --live: #ec3466;
  --live-soft: #ffe4eb;
  --shadow: 0 1px 2px rgb(60 30 90 / 0.04), 0 10px 30px -14px rgb(90 50 140 / 0.22);
  --radius: 22px;
  --radius-sm: 14px;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-cute: 'Jua', var(--font);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141019;
    --glow-1: #2a1c3f;
    --glow-2: #35192b;
    --glow-3: #2c2016;
    --surface: #211a2b;
    --surface-2: #2a2236;
    --surface-3: #342a43;
    --line: #362c45;
    --ink: #f4eefc;
    --ink-2: #d0c4e0;
    --muted: #a99cbd;
    --accent: #9b78f0;
    --accent-text: #c5adff;
    --accent-soft: #2f2546;
    --pink: #db5590;
    --pink-soft: #3a2031;
    --live: #ff4d7a;
    --live-soft: #45202c;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -16px rgb(0 0 0 / 0.6);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 8% -8%, var(--glow-1), transparent 70%),
    radial-gradient(700px 420px at 92% 2%, var(--glow-2), transparent 70%),
    radial-gradient(800px 500px at 50% 110%, var(--glow-3), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.5;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

.page { max-width: 1160px; margin: 0 auto; padding: 0 16px 40px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-cute); font-size: 26px; line-height: 1; color: var(--ink); }
.live-now {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  padding: 8px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--live) 35%, var(--line));
  background: var(--surface); box-shadow: var(--shadow);
  font-size: 14px; font-weight: 700; color: var(--ink-2);
}
.live-now span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-now:hover { border-color: var(--live); }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- common ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px; background: var(--surface-2);
  font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.chip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.chip.live { background: var(--live-soft); color: var(--live); }
.chip.live b { color: var(--live); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 15px; transition: transform .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--pink)); color: #fff; box-shadow: 0 8px 20px -10px var(--pink); }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-text { display: inline-block; width: 120px; height: 1em; border-radius: 6px; background: var(--surface-3); }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; gap: 24px; align-items: center;
  padding: 28px 22px; margin-bottom: 36px;
}
.hero::before {
  content: ''; position: absolute; inset: auto -80px -120px auto; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--pink) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-text { position: relative; display: grid; gap: 14px; justify-items: start; }
.eyebrow { font-size: 13.5px; font-weight: 800; letter-spacing: .02em; color: var(--accent-text); }
.hero h1 { font-family: var(--font-cute); font-weight: 400; font-size: 34px; line-height: 1.2; letter-spacing: 0; }
.lead { max-width: 520px; color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* 가운데 chub 로고 둘레를 허브 아바타가 천천히 도는 장식 */
.orbit { position: relative; justify-self: center; width: min(260px, 100%); aspect-ratio: 1; container-type: inline-size; --r: 40cqw; } /* --r: 궤도 반지름 = 폭의 40% */
.orbit-ring { position: absolute; inset: 0; margin: auto; border-radius: 50%; border: 1.5px dashed var(--line); }
.ring-1 { width: 100%; height: 100%; }
.ring-2 { width: 62%; height: 62%; border-style: solid; border-color: color-mix(in srgb, var(--accent) 18%, transparent); }
.orbit-core {
  position: absolute; inset: 0; margin: auto; width: 84px; height: 84px;
  filter: drop-shadow(0 12px 20px rgb(138 99 210 / 0.35));
  animation: bob 3.4s ease-in-out infinite;
}
.orbit-spin { position: absolute; inset: 0; animation: spin 60s linear infinite; }
.orbit-item {
  position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px;
  transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1));
}
.orbit-item > * { animation: spin 60s linear infinite reverse; } /* 바퀴가 돌아도 아바타는 똑바로 */
.orbit-item img {
  width: 58px; height: 58px; border-radius: 50%; object-fit: cover;
  background: var(--surface-2); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--hub, var(--line)), var(--shadow);
}
.orbit-item.is-live img { box-shadow: 0 0 0 3px var(--live), 0 0 0 8px color-mix(in srgb, var(--live) 18%, transparent); }
.orbit-item .slot {
  display: grid; place-items: center; width: 46px; height: 46px; margin: 6px;
  border-radius: 50%; border: 2px dashed var(--line); background: var(--surface);
  font-family: var(--font-cute); font-size: 20px; color: var(--muted);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-3deg); } }

@media (min-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr) auto; padding: 40px 44px; gap: 32px; }
  .hero h1 { font-size: 46px; }
  .orbit { width: 300px; }
}

/* ---------- sections ---------- */
.section { margin-bottom: 40px; scroll-margin-top: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.h-ico { font-size: 19px; }

/* ---------- hub cards (깔끔한 정보 카드. 허브 색은 이름 옆 점에만 쓴다) ---------- */
.hub-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }

.hub-card {
  --hub: var(--accent);
  display: flex; flex-direction: column; gap: 18px; padding: 22px;
  box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.hub-card:hover { border-color: color-mix(in srgb, var(--ink) 18%, var(--line)); box-shadow: var(--shadow); }

.hub-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.hub-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.is-live .hub-avatar { border-color: transparent; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--live); }
.hub-title { min-width: 0; }
.hub-name { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.hub-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.hub-sub::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--hub); vertical-align: 1px; }

.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .6; }
.status.live { border-color: color-mix(in srgb, var(--live) 35%, transparent); background: var(--live-soft); color: var(--live); }
.status.live i { opacity: 1; animation: blink 1.2s infinite; }

.hub-preview { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.hub-preview img.thumb { width: 100%; height: 100%; object-fit: cover; }
.hub-preview .watch {
  position: absolute; right: 10px; bottom: 10px; padding: 5px 10px; border-radius: 999px;
  background: rgb(20 10 30 / 0.72); backdrop-filter: blur(4px); color: #fff; font-size: 12.5px; font-weight: 700;
}
.no-preview { display: grid; place-items: center; align-content: center; gap: 8px; height: 100%; color: var(--muted); font-size: 13px; }
.no-preview img { width: 44px; height: 44px; opacity: .8; }

.hub-text { display: grid; gap: 2px; }
.hub-tagline { font-size: 15px; color: var(--ink-2); }
.hub-live-title { font-size: 16px; font-weight: 750; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-cat { font-size: 13px; color: var(--muted); }

.hub-metrics {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  margin: 0; padding: 14px 0; border-block: 1px solid var(--line);
}
.hub-metrics div { min-width: 0; padding: 0 14px; border-left: 1px solid var(--line); }
.hub-metrics div:first-child { padding-left: 0; border-left: 0; }
.hub-metrics dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.hub-metrics dd {
  margin: 2px 0 0; font-size: 17px; font-weight: 750; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 480px) { /* 휴대폰에서 "12시간 전"이 잘리지 않게 */
  .hub-card { padding: 20px 18px; }
  .hub-metrics div { padding: 0 10px; }
  .hub-metrics dd { font-size: 15.5px; }
}
.hub-features { font-size: 13px; line-height: 1.6; color: var(--muted); }

.hub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; }
.hub-go {
  flex: 1 1 180px; justify-content: space-between; padding: 12px 18px; border-radius: 12px;
  background: var(--ink); color: var(--surface); transition: background .15s;
}
.hub-go:hover { transform: none; filter: none; background: color-mix(in srgb, var(--ink) 82%, var(--hub)); }
.icon-links { display: flex; gap: 6px; }
.icon-link {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); color: var(--ink-2); transition: color .15s, border-color .15s;
}
.icon-link:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.icon-link svg { width: 18px; height: 18px; }
.icon-link.chzzk:hover { color: #00b47e; }
.icon-link.cafe:hover { color: #03c75a; }
.icon-link.youtube:hover { color: #ff2d2d; }
.icon-link.x:hover { color: var(--ink); }

/* 아직 없는 허브 자리 */
.hub-soon {
  align-self: stretch; display: grid; place-items: center; align-content: center; gap: 8px;
  min-height: 220px; padding: 28px; border: 1.5px dashed var(--line); border-radius: var(--radius);
  text-align: center; color: var(--muted);
}
.soon-plus {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 4px;
  border-radius: 12px; border: 1px solid var(--line); font-size: 22px; line-height: 1;
}
.hub-soon strong { font-size: 15.5px; color: var(--ink); }
.hub-soon p { max-width: 260px; font-size: 13.5px; }

/* ---------- features ---------- */
.features { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); } /* 6칸이 데스크톱에서 3+3으로 */
.feature { display: grid; gap: 6px; align-content: start; padding: 20px; }
.f-ico { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 6px; border-radius: 12px; background: var(--surface-2); font-size: 21px; }
.feature h3 { font-size: 16.5px; font-weight: 800; letter-spacing: -0.02em; }
.feature p { font-size: 14px; color: var(--ink-2); line-height: 1.6; }

/* ---------- footer ---------- */
.footer { margin-top: 8px; text-align: center; font-size: 13px; color: var(--ink-2); display: grid; gap: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
