@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap');

/* ── 색상 변수 ── */
:root {
  --navy: #1E3A5F;
  --navy-dark: #152C4A;
  --mint: #0F6E56;
  --mint-light: #E1F5EE;
  --mint-hover: #085041;
  --gray-100: #F8F9FA;
  --gray-200: #E9ECEF;
  --gray-400: #ADB5BD;
  --gray-600: #6C757D;
  --gray-800: #343A40;
  --white: #FFFFFF;
  --text-main: #1A1A2E;
  --text-sub: #555E6C;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* ── 기본 초기화 ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text-main);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* ── 헤더 ── */
.ck-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: 64px;
  display: flex;
  align-items: center;
}
.ck-header-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.ck-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex-shrink: 0;
}
.ck-logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
}
.ck-logo-sub {
  font-size: 10px;
  color: var(--gray-600);
  font-weight: 400;
}
.ck-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.ck-nav a {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  font-weight: 500;
  white-space: nowrap;
}
.ck-nav a:hover, .ck-nav a.active {
  color: var(--navy);
  background: var(--gray-100);
}
.ck-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  font-family: 'Noto Sans KR', sans-serif;
  white-space: nowrap;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--gray-200);
  color: var(--text-sub);
}
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-primary {
  background: var(--mint);
  color: var(--white);
}
.btn-primary:hover { background: var(--mint-hover); }
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-dark); }
.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

/* ── 카드 ── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--mint-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 22px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.4;
}
.card-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 16px;
}
.card-link {
  font-size: 13px;
  color: var(--mint);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-link:hover { color: var(--mint-hover); }

/* ── 배지 ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.badge-mint { background: var(--mint-light); color: var(--mint); }
.badge-navy { background: #E8EEF5; color: var(--navy); }

/* ── 섹션 공통 ── */
.section { padding: 80px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--mint);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 16px;
  color: var(--text-sub);
  line-height: 1.7;
  max-width: 560px;
}
.section-center { text-align: center; }
.section-center .section-desc { margin: 0 auto; }

/* ── 그리드 ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── 푸터 ── */
.ck-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 48px 24px 32px;
}
.ck-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.ck-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.ck-footer-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.ck-footer-tagline { font-size: 13px; }
.ck-footer-links {
  display: flex;
  gap: 48px;
}
.ck-footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}
.ck-footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
  transition: color 0.15s;
}
.ck-footer-col a:hover { color: var(--white); }
.ck-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ── 반응형 ── */
@media (max-width: 768px) {
  .ck-nav { display: none; }
  .ck-header-inner { gap: 0; justify-content: space-between; }
  .section { padding: 48px 20px; }
  .section-title { font-size: 24px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .ck-footer-top { flex-direction: column; gap: 32px; }
  .ck-footer-links { flex-wrap: wrap; gap: 32px; }
  .ck-footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .btn-lg { padding: 12px 22px; font-size: 15px; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
/* ── 앱/라이브 화면 레이아웃 ── */

.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--gray-100);
}

.app-sidebar {
  width: 230px;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  padding: 22px 18px;
  flex-shrink: 0;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}

.logo-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.15s;
}

.app-nav a:hover {
  background: var(--gray-100);
  color: var(--navy);
}

.app-nav a.active {
  background: var(--mint);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.app-side-card {
  margin-top: 36px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
}

.app-side-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
}

.app-side-card p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 14px;
}

.app-side-card a {
  display: block;
  text-align: center;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  background: var(--mint);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.app-main {
  flex: 1;
  min-width: 0;
}

.app-topbar {
  height: 72px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
}

.app-topbar h1 {
  font-size: 24px;
  color: var(--navy);
}

.status-badge {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--mint-light);
  color: var(--mint);
  font-size: 13px;
  font-weight: 700;
}

.content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px;
}

.page-hero {
  background: linear-gradient(135deg, #eefbf8, #f8fbff);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

.page-hero h1 {
  font-size: 32px;
  color: var(--navy);
  margin-bottom: 10px;
}

.page-hero p {
  color: var(--text-sub);
  font-weight: 500;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.stat-card span {
  display: block;
  color: var(--text-sub);
  font-size: 14px;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 30px;
  color: var(--navy);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0 18px;
}

.section-head h2 {
  font-size: 22px;
  color: var(--navy);
}

.section-head button,
.answer-card button {
  border: none;
  background: var(--mint);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

#participantList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.answer-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.answer-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.answer-card-head strong {
  font-size: 18px;
  color: var(--navy);
}

.answer-card-head span {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--mint-light);
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
}

.answer-card p {
  color: var(--text-sub);
  margin-bottom: 14px;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.keyword-list em {
  font-style: normal;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.empty-card {
  grid-column: 1 / -1;
  background: var(--white);
  border: 1px dashed var(--gray-400);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  color: var(--text-sub);
}

/* ── 반응형 앱 화면 ── */
@media (max-width: 900px) {
  .app-layout {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
  }

  .app-topbar {
    padding: 0 20px;
  }

  .content {
    padding: 24px 20px;
  }

  .stats,
  #participantList {
    grid-template-columns: 1fr;
  }
}
/* 공개/비공개 버튼 색상 강제 구분 */

.answer-card button.btn-show {
  background: #0F6E56 !important;
  color: #ffffff !important;
}

.answer-card button.btn-hide {
  background: #6C757D !important;
  color: #ffffff !important;
}

.answer-card.is-public {
  border: 2px solid #0F6E56 !important;
}

.answer-card.is-private {
  border: 1px solid #E9ECEF !important;
}
.answer-card button.btn-show {
  background: #0F6E56 !important;
  color: #ffffff !important;
}

.answer-card button.btn-hide {
  background: #6C757D !important;
  color: #ffffff !important;
}
