/* Jinu & Co. 허브 — 다크 전용(토글 없음, 진우 단독 열람 내부 도구 방침).
   색은 회사 디자인 시스템 GB 인디고(D-088)를 다크 배경 기준으로 쓴다:
   accent 는 brand.bright #6366F1, 서명 톤은 brand.strong #4338CA. */

:root {
  --ground: #08080c;
  --surface: #12121a;
  --surface-2: #191924;
  --line: #262633;
  --line-soft: #1e1e29;
  --text: #ececf4;
  --sub: #9c9cb2;
  --muted: #6a6a80;
  --brand: #6366f1;
  --brand-strong: #4338ca;
  --brand-soft: rgba(99, 102, 241, 0.16);
  --live: #34d399;
  --off: #565667;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* iOS 홈화면 앱에서 노치·홈바에 안 물리게 */
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* 모바일 웹앱 전역 가드 — 가로 스크롤·입력칸 삐짐 방지 */
img, svg, canvas, table { max-width: 100%; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 18px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wrap.wide { max-width: 960px; }

/* ── 헤더 ─────────────────────────────── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wordmark { display: flex; align-items: center; gap: 9px; }

.wordmark img { width: 28px; height: 28px; border-radius: 8px; display: block; }

.wordmark b { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }

.stamp {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.stamp .up { color: var(--live); }

.sec {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.sec::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

/* ── 앱 독 ────────────────────────────── */
.dock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  min-width: 0;
}

.tile-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 17px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: clamp(15px, 5vw, 20px);
  font-weight: 600;
  color: var(--muted);
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tile-name { font-size: 11px; color: var(--muted); line-height: 1.35; }

.tile-name small { display: block; font-size: 10px; color: var(--off); }

.tile.live .tile-icon {
  color: var(--text);
  border-color: rgba(52, 211, 153, 0.42);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.16), transparent);
}

.tile.live .tile-name { color: var(--sub); }

a.tile:hover .tile-icon,
a.tile:focus-visible .tile-icon { box-shadow: 0 0 0 3px var(--brand-soft); }

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--off);
}

.tile.live .badge { background: var(--live); }

.tile.checking .badge {
  background: var(--brand);
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.25; } }

@media (prefers-reduced-motion: reduce) {
  .tile.checking .badge { animation: none; }
}

/* ── 진척도 ───────────────────────────── */
.rows { display: flex; flex-direction: column; gap: 10px; }

.line {
  display: grid;
  grid-template-columns: 1fr 88px auto;
  align-items: center;
  gap: 10px;
}

.line .name {
  font-size: 12.5px;
  color: var(--sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }

.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }

.bar.none > i { background: var(--line); }

.line .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 52px;
}

/* ── 안내 박스 ────────────────────────── */
.note {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
}

.note b { color: var(--sub); font-weight: 500; }

.note code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--sub);
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ── 공개층 ───────────────────────────── */
.hero { display: flex; flex-direction: column; gap: 14px; padding: 28px 0 8px; }

.hero h1 {
  margin: 0;
  font-size: clamp(26px, 6vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.22;
  text-wrap: balance;
}

.hero p { margin: 0; color: var(--sub); font-size: 15px; max-width: 60ch; }

.hero .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.card h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }

.card p { margin: 0; font-size: 12.5px; color: var(--sub); line-height: 1.5; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }

.chip {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--sub);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
}

.foot {
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
}

.foot a { color: var(--sub); border-bottom: 1px solid var(--line); }

.foot a:hover { color: var(--text); border-color: var(--brand); }
