:root {
  --bg: #ebebef;
  --card: #ffffff;
  --ink: #1f2024;
  --muted: #9a9aa2;
  --line: #ececed;
  --accent: #ff6b9a;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 가운데 한 칼럼 카드 */
.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f6f6f8;
  box-shadow: var(--shadow);
}

/* 프로필 */
.profile { text-align: center; padding: 40px 22px 22px; }
.avatar {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.handle { font-size: 21px; font-weight: 800; margin: 14px 0 6px; }
.bio { color: #6b6b73; margin: 0 auto 16px; font-size: 14px; max-width: 300px; }

/* 소셜 아이콘 줄 */
.social { display: flex; gap: 10px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.social a {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #3a3a40; box-shadow: var(--shadow);
  transition: transform .1s ease, color .1s ease;
}
.social a:hover { transform: translateY(-2px); color: var(--accent); }

/* 언어 토글 */
.lang { display: inline-flex; gap: 6px; justify-content: center; margin-bottom: 16px;
  background: #fff; border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.lang button {
  border: none; background: transparent; color: var(--muted);
  border-radius: 999px; padding: 5px 13px; font-size: 12px; cursor: pointer;
}
.lang button.active { color: #fff; background: var(--accent); font-weight: 700; }

.disclosure {
  font-size: 11px; color: #a8a8b0; line-height: 1.5;
  max-width: 360px; margin: 6px auto 0; border-top: 1px dashed #d9d9e0; padding-top: 14px;
}

/* 카테고리 섹션 */
.content { padding: 4px 18px 30px; }
.loading, .empty { text-align: center; color: var(--muted); padding: 40px 0; }
.cat { margin-top: 22px; }
.cat-title {
  font-size: 12px; font-weight: 700; color: #8a8a93;
  letter-spacing: .03em; margin: 0 6px 10px; display: flex; align-items: center; gap: 8px;
}
.cat-title::after { content: ""; flex: 1; height: 1px; background: #e2e2e8; }

/* 링크 카드 — 썸네일 좌측, 제목 가운데 (인포크 스타일) */
.card {
  position: relative;
  display: block;
  min-height: 76px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  padding: 16px 52px;
  text-decoration: none;
  color: inherit;
  transition: transform .08s ease, box-shadow .08s ease;
}
.card:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 12px 28px rgba(0,0,0,.08); }
.thumb {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: #f0f0f3;
}
.thumb-ph { background: #f0f0f3; }
.card-body { display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 44px; text-align: center; }
.card-title { font-weight: 700; font-size: 15px; word-break: keep-all; }
.card-desc {
  color: #7c7c84; font-size: 13px; text-align: center;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .2s ease, opacity .2s ease, margin-top .2s ease;
}
.card.open .card-desc { max-height: 200px; opacity: 1; margin-top: 6px; }

/* 상세 토글 버튼 (오른쪽 ⌄) */
.toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: none; background: transparent; cursor: pointer;
  color: #b6b6be;
}
.toggle::before {
  content: ""; display: block; width: 8px; height: 8px; margin: 0 auto;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px,-2px); transition: transform .2s ease;
}
.card.open .toggle::before { transform: rotate(-135deg) translate(-1px,-1px); }

.foot { text-align: center; padding: 8px 0 36px; }
.foot a { color: var(--muted); font-size: 12px; text-decoration: none; }

/* ── 블록 타입 ── */
/* 텍스트 */
.block-text { margin-bottom: 12px; padding: 4px 6px; text-align: center; }
.text-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.text-body { color: #5c5c64; font-size: 14px; margin: 0; white-space: pre-wrap; }
/* 이미지 */
.block-image { display: block; margin-bottom: 12px; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); background: #fff; text-decoration: none; color: inherit; }
.block-image img { display: block; width: 100%; height: auto; }
.image-cap { text-align: center; font-size: 14px; font-weight: 600; padding: 10px 12px; }
/* 동영상 */
.block-video { margin-bottom: 12px; }
.video-cap { font-size: 14px; font-weight: 600; margin: 0 6px 6px; }
.block-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0;
  border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
/* 구분선 */
.block-divider { display: flex; align-items: center; gap: 10px; margin: 16px 6px; color: #b6b6be; }
.block-divider::before, .block-divider::after { content: ""; flex: 1; height: 1px; background: #d9d9e0; }
.block-divider span { font-size: 12px; }
.block-divider:not(:has(span))::after { display: none; }
.block-divider:not(:has(span))::before { flex: 1; }

/* ── QR (데스크톱 우측) ── */
.qr { display: none; }
@media (min-width: 1024px) {
  .qr {
    display: block; position: fixed; right: 24px; bottom: 24px;
    background: #fff; border-radius: 16px; padding: 14px; box-shadow: var(--shadow);
    text-align: center; width: 148px;
  }
  .qr-img { width: 120px; height: 120px; margin: 0 auto 6px; }
  .qr-img svg { width: 100%; height: 100%; display: block; }
  .qr-cap { font-size: 12px; color: var(--muted); }
}
