:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --line: #dfe3e8;
  --text: #111318;
  --muted: #646b75;
  --soft: #89919d;
  --accent: #0b57d0;
  --accent-ink: #ffffff;
  --green: #0b7a43;
  /* 앱(폰·태블릿) 카드 전용 — 웹(파랑)과 최대한 멀어지는 난색(주황).
     보라는 파랑과 같은 한색이라 작은 화면에서 구분이 안 됐다(2026-07-28 교체).
     초록은 Live 배지·브랜드색과 겹쳐 못 쓴다. */
  --app: #c2410c;
  --app-strong: #ea580c;
  --app-soft: #fff5ef;
  --app-line: #f6cdb4;
  --shadow: 0 16px 40px rgba(17, 19, 24, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 20px;
}

/* 헤더(로고 + 필터 탭)는 상단 고정 — 목록이 길어 스크롤해도 탭이 늘 손에 닿게.
   .shell 좌우 padding(20px) 밖으로 배경을 넓혀 스크롤되는 카드가 틈으로 비치지 않게 한다.
   ⚠️ 조상에 overflow(hidden/auto)를 주면 sticky 가 죽는다. */
.header-stick {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -20px -20px 0;
  padding: 20px 20px 0;
  background: var(--bg);
}

/* 아래 카드와 경계 — 고정된 헤더가 떠 있음을 알려준다 */
.header-stick::after {
  content: "";
  display: block;
  height: 1px;
  margin: 0 -20px;
  background: var(--line);
}

.topbar {
  display: flex;
  align-items: center;
  padding: 8px 0 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: none;
}

.kind {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 4px 0 0;
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #18873a;
  border-radius: 50%;
  background: #1f9d45;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

.summary-pill strong {
  font-size: 22px;
  line-height: 1;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 14px;
}

.segments {
  display: flex;
  gap: 4px;
  min-height: 44px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segment {
  min-width: 58px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}

.segment.is-active {
  background: var(--text);
  color: #fff;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
  /* 고정 헤더 구분선 아래로 첫 카드가 붙지 않게 */
  padding-top: 16px;
  padding-bottom: 28px;
}

.project-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.card-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.16;
  letter-spacing: 0;
}

.status {
  flex: none;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e7f5ee;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.description {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.info-lines {
  display: grid;
  gap: 8px;
}

.info-lines div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.info-lines span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.info-lines a,
.info-lines code {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.info-lines code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.url {
  color: var(--accent);
  text-decoration: none;
}

.url:focus,
.url:hover {
  text-decoration: underline;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.open-link,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.open-link {
  background: var(--accent);
  color: var(--accent-ink);
}

.copy-button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.empty {
  grid-column: 1 / -1;
  padding: 36px 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .shell {
    padding: 14px;
  }

  h1 {
    font-size: 34px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .topbar {
    align-items: flex-end;
  }

  .controls {
    gap: 10px;
  }

  .segments {
    min-width: 0;
    overflow-x: auto;
  }

  .project-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .topbar {
    gap: 10px;
  }

  .summary-pill {
    width: 44px;
    height: 44px;
  }

  .card-head {
    display: grid;
  }

  .status {
    width: max-content;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}


/* ── 앱 카드 (kind=app) — 웹 카드와 색으로 구분 ───────────────── */
.project-card[data-kind="app"] {
  border-color: var(--app-line);
  /* 색만으로 구분하지 않도록 좌측 액센트 바를 함께 둔다 */
  border-left: 4px solid var(--app-strong);
  background: linear-gradient(180deg, var(--app-soft) 0%, var(--surface) 76px);
  box-shadow: 0 16px 40px rgba(194, 65, 12, 0.12);
}

.project-card[data-kind="app"] .kind {
  color: var(--app);
}

.project-card[data-kind="app"] .status {
  background: #ffe8d9;
  color: var(--app);
}

.project-card[data-kind="app"] .url {
  color: var(--app);
}

.project-card[data-kind="app"] .open-link {
  background: var(--app-strong);
}

/* 다운로드 링크가 없는 앱(스토어 미출시·내부 빌드 전용) */
.project-card[data-kind="app"] .open-link.is-disabled {
  background: var(--surface-2);
  color: var(--soft);
  pointer-events: none;
}
