/* ==========================================================
   Yulian Labs — 사이트 공용 스타일 (단일 파일)
   토큰은 :root에 모아 둔다. 강조색(--accent)은 주 버튼·링크·주석 번호에만 쓴다.
   ========================================================== */

:root {
  --ink: #16191d;          /* 제목·본문 */
  --ink-2: #4a525c;        /* 리드·보조 본문 */
  --ink-3: #6b747f;        /* 캡션·메타 (흰 바탕 대비 AA 확보) */
  --line: #e3e7ec;         /* 1px 보더 */
  --surface: #f5f7f9;      /* 회색 면 */
  --bg: #ffffff;
  --azure-soft: #93c5fa;   /* 로고색 — 작은 장식에만 */
  --azure-tint: #eaf3fe;   /* 강조 행·코드 배경 */
  --accent: #1f5fa8;       /* 주 CTA·링크 */
  --accent-hover: #174c88;
  --side-p: #c8372d;       /* 원고측 표시(앱의 빨강) */
  --side-d: #2563eb;       /* 피고측 표시(앱의 파랑) */

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  /* 한글은 Consolas에 글리프가 없으므로 Pretendard로 이어지게 둔다 */
  --mono: ui-monospace, "D2Coding", Consolas, "Pretendard Variable", Pretendard, "Malgun Gothic", monospace;

  --wrap: 1120px;
  --gutter: 24px;

  /* 타입 스케일 (모바일 → 데스크톱) */
  --fs-display: clamp(30px, 1.6vw + 23px, 44px);
  --fs-h2: clamp(24px, 0.75vw + 21px, 30px);
  --fs-h3: clamp(18px, 0.25vw + 17px, 20px);
  --fs-lead: clamp(17px, 0.25vw + 16px, 19px);
  --fs-body: clamp(16px, 0.12vw + 15.5px, 17px);
  --fs-small: clamp(13px, 0.12vw + 12.5px, 14px);

  /* 섹션 상하 여백 — 일부러 섹션마다 다르게 쓴다 */
  --sp-anchor: clamp(76px, 6vw + 40px, 128px);
  --sp-section: clamp(58px, 4vw + 34px, 96px);
  --sp-short: clamp(40px, 2vw + 30px, 64px);
}

@media (max-width: 719px) {
  :root { --gutter: 20px; }
}

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.72;
  letter-spacing: -0.005em;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
h1 { font-size: var(--fs-display); font-weight: 700; line-height: 1.28; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.32; letter-spacing: -0.025em; }
h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.4; letter-spacing: -0.015em; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent-hover); }

code, .mono {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--azure-tint);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  letter-spacing: 0;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 34em; }
.keep { word-break: keep-all; overflow-wrap: anywhere; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-small); line-height: 1.55; letter-spacing: 0; }

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; z-index: 100;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 32px;
  min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
  min-height: 44px;
}
.brand:hover { color: var(--ink); }
.brand img { width: 28px; height: 28px; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink-2); text-decoration: none; font-size: 16px; font-weight: 500;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.header-cta {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--accent); border-radius: 6px;
  color: var(--accent); text-decoration: none; font-weight: 600; font-size: 15px;
  white-space: nowrap;
  transition: background-color 120ms ease-out;
}
.header-cta:hover { background: var(--azure-tint); color: var(--accent-hover); }

@media (max-width: 719px) {
  .header-inner { flex-wrap: wrap; gap: 0 12px; padding-top: 6px; }
  .header-cta { margin-left: auto; min-height: 36px; font-size: 14px; }
  .site-nav { order: 3; flex-basis: 100%; margin: 0 calc(var(--gutter) * -1); overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { padding: 0 calc(var(--gutter) - 12px); }
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px;
  background: var(--accent); color: #fff;
  border-radius: 6px; text-decoration: none;
  font-size: 16px; font-weight: 600; line-height: 1; letter-spacing: -0.01em;
  word-break: keep-all;
  transition: background-color 120ms ease-out;
}
.btn:hover { background: var(--accent-hover); color: #fff; }
@media (max-width: 719px) { .btn { min-height: 52px; } }

.text-link {
  color: var(--ink); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  display: inline-flex; align-items: center; min-height: 44px;
}
.text-link:hover { color: var(--accent); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.cta-meta { margin-top: 12px; font-size: var(--fs-small); color: var(--ink-3); line-height: 1.55; }
.cta-meta span { white-space: nowrap; }

/* ---------- 섹션 공통 ---------- */
.section { padding: var(--sp-section) 0; }
.section-short { padding: var(--sp-short) 0; }
.section-anchor { padding: var(--sp-anchor) 0; }
.section + .section { border-top: 1px solid var(--line); }
.surface { background: var(--surface); }
.section-head { margin-bottom: 32px; }
.section-head p { margin-top: 12px; color: var(--ink-2); max-width: 34em; }
.label { font-size: var(--fs-small); color: var(--ink-3); margin: 0 0 12px; letter-spacing: 0; }

/* ---------- 히어로 ---------- */
.hero { padding: clamp(48px, 5vw + 20px, 96px) 0 clamp(48px, 4vw + 24px, 88px); overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { max-width: 15em; }
.hero .lead {
  margin-top: 20px; font-size: var(--fs-lead); line-height: 1.65; letter-spacing: -0.01em;
  color: var(--ink-2); max-width: 30em; word-break: keep-all; overflow-wrap: anywhere;
}
.hero .cta-row { margin-top: 32px; }
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 5fr 7fr; gap: 48px; }
  .hero .hero-shot { margin-right: -14%; }   /* 오른쪽으로 넘치게 — 대칭을 깬다 */
}

/* ---------- 스크린샷 프레임 ---------- */
.shot { margin: 0; }
.shot img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
}
.shot figcaption { margin-top: 10px; font-size: var(--fs-small); color: var(--ink-3); line-height: 1.55; }

/* ---------- 제품 목록 (행) ---------- */
.product-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.product-row { padding: 32px 0; border-bottom: 1px solid var(--line); }
.product-main { display: grid; gap: 16px 24px; align-items: start; }
.product-name { display: flex; align-items: center; gap: 14px; }
.product-name img { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.product-name h3 { font-size: 22px; }
.product-name .sub { display: block; font-size: var(--fs-small); color: var(--ink-3); font-weight: 400; letter-spacing: 0; }
.product-desc p { color: var(--ink-2); max-width: 32em; }
.product-meta { margin-top: 8px; font-size: var(--fs-small); color: var(--ink-3); }
.product-thumb { margin-top: 24px; max-width: 640px; }
.product-row.pending { padding: 20px 0; color: var(--ink-3); }
@media (min-width: 880px) {
  .product-main { grid-template-columns: 220px 1fr auto; }
  .product-link { padding-top: 6px; }
  .product-thumb { margin-left: 244px; max-width: 480px; }
}

/* ---------- 정의 목록 (원칙·데이터 등) ---------- */
.deflist { margin: 0; border-top: 1px solid var(--line); }
.deflist > div { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px 24px; }
.deflist dt { font-weight: 600; word-break: keep-all; overflow-wrap: anywhere; letter-spacing: -0.01em; }
.deflist dd { margin: 0; color: var(--ink-2); max-width: 36em; }
@media (min-width: 720px) {
  .deflist > div { grid-template-columns: 4fr 8fr; }
}

/* ---------- 소개 ---------- */
.about-text { margin-bottom: 48px; }
.about-text p { font-size: var(--fs-lead); line-height: 1.7; color: var(--ink); }
.about-text p + p { color: var(--ink-2); }

/* ---------- 문의 ---------- */
.contact-grid { display: grid; gap: 32px 48px; }
@media (min-width: 880px) { .contact-grid { grid-template-columns: 5fr 7fr; } }
.contact-mail { font-size: clamp(20px, 1vw + 16px, 26px); font-weight: 700; letter-spacing: -0.02em; word-break: break-all; }
.plain-list { margin: 0 0 1em; padding-left: 1.2em; }
.plain-list li { margin: 4px 0; }
.note {
  border-left: 3px solid var(--azure-soft);
  padding: 4px 0 4px 16px; color: var(--ink-2); margin: 16px 0;
}

/* ---------- 재록 페이지 ---------- */
.page-hero { padding: clamp(40px, 4vw + 20px, 80px) 0 0; }
.page-hero .title-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.page-hero .title-row img { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 8px; }
.page-hero .title-row span { font-size: var(--fs-small); color: var(--ink-3); }
.page-hero .lead {
  margin-top: 18px; font-size: var(--fs-lead); line-height: 1.65; color: var(--ink-2);
  max-width: 34em; word-break: keep-all; overflow-wrap: anywhere;
}
.page-hero .cta-row { margin-top: 28px; }
.page-hero .shot { margin-top: clamp(40px, 3vw + 24px, 64px); }
.store-note { font-size: var(--fs-small); color: var(--ink-3); }

/* 번호 주석이 달린 스크린샷 */
.annotated .shot { position: relative; }
.annotated .frame { position: relative; }
.mark {
  position: absolute; transform: translate(-50%, -50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 700; line-height: 28px; text-align: center;
  box-shadow: 0 0 0 3px #fff;
  font-variant-numeric: tabular-nums;
}
/* 위치는 jaerok-main(1600x1000) 실측 좌표를 %로 옮긴 것. 화면을 다시 찍으면 함께 고칠 것. */
.mark-1 { left: 20.6%; top: 31%; }    /* 기록 목록 행 오른쪽 빈칸 (x330, y310) */
.mark-2 { left: 68.4%; top: 8.3%; }   /* 문서 탭 줄 끝 (x1095, y83) */
.mark-3 { left: 96.6%; top: 40%; }    /* 서증 목록 행 오른쪽 빈칸 (x1545, y400) */
.mark-4 { left: 77.6%; top: 8.3%; }   /* 오른쪽 메모 탭 줄 시작 (x1241, y83) */
.mark-5 { left: 60.9%; top: 3.3%; }   /* 위쪽 통합 검색 칸 왼쪽 끝 (x975, y33) */
@media (max-width: 719px) {
  .mark { width: 22px; height: 22px; line-height: 22px; font-size: 12px; box-shadow: 0 0 0 2px #fff; }
}
.notes { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: note; border-top: 1px solid var(--line); }
.notes li {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px;
  padding: 14px 8px; border-bottom: 1px solid var(--line);
  transition: background-color 150ms ease-out;
}
.notes .num {
  width: 24px; height: 24px; border-radius: 50%; margin-top: 3px;
  border: 1px solid var(--accent); color: var(--accent);
  font-size: 13px; font-weight: 700; line-height: 22px; text-align: center;
}
.notes strong { display: block; }
.notes span.desc { color: var(--ink-2); }
@media (min-width: 880px) {
  .notes { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
}
/* 주석 번호에 마우스를 올리면 해당 설명 행을 강조 */
.annotated:has(.mark-1:hover) .note-1,
.annotated:has(.mark-2:hover) .note-2,
.annotated:has(.mark-3:hover) .note-3,
.annotated:has(.mark-4:hover) .note-4,
.annotated:has(.mark-5:hover) .note-5,
.notes li:hover { background: var(--azure-tint); }

/* 표 */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--ink); }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.6; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--ink); word-break: keep-all; }
thead th { font-size: var(--fs-small); color: var(--ink-3); font-weight: 600; }
td { color: var(--ink-2); }
td code { word-break: break-all; overflow-wrap: anywhere; background: none; padding: 0; font-size: 13px; color: var(--ink); }
.cmp th[scope="row"] { width: 22%; }
.cmp td { width: 39%; }
.req th[scope="row"] { width: 28%; }
@media (min-width: 720px) {
  .cls td:nth-child(1) { width: 46%; }
  .cls td:nth-child(2), .cls td:nth-child(3), .cls thead th { white-space: nowrap; }
}
.side-p { color: var(--side-p); font-weight: 600; }
.side-d { color: var(--side-d); font-weight: 600; }
.side-o { color: var(--ink); font-weight: 600; }

@media (max-width: 719px) {
  /* 좁은 화면: 행마다 세로로 쌓는다 */
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack, .stack tbody, .stack tr, .stack th, .stack td { display: block; width: auto !important; }
  .stack tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .stack th, .stack td { border: 0; padding: 2px 0; }
  .stack td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: 12px; color: var(--ink-3); font-weight: 600;
  }
  .stack td + td { margin-top: 6px; }
}

/* 기능 목록 */
.feature { display: grid; gap: 12px 48px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.feature:first-child { border-top: 1px solid var(--line); }
.feature p { color: var(--ink-2); max-width: 34em; }
.feature ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); max-width: 34em; }
.feature li { margin: 4px 0; }
.feature .limit { font-size: var(--fs-small); color: var(--ink-3); margin-top: 10px; }
.feature .shot { margin-top: 12px; }
@media (min-width: 880px) {
  .feature { grid-template-columns: 4fr 8fr; }
  .feature.with-shot .shot { margin-top: 24px; }
}

/* 단계 (실제 순서이므로 번호 사용) */
.steps { margin: 0 0 1em; padding-left: 1.4em; }
.steps li { margin: 8px 0; padding-left: 4px; }

/* 업데이트 기록 */
.changelog { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.changelog li { display: grid; gap: 2px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.changelog .ver { font-weight: 600; font-variant-numeric: tabular-nums; }
.changelog time { color: var(--ink-3); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.changelog p { color: var(--ink-2); }
@media (min-width: 720px) {
  .changelog li { grid-template-columns: 90px 110px 1fr; align-items: baseline; }
}

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 32px 18px 0; position: relative;
  font-weight: 600; word-break: keep-all; overflow-wrap: anywhere;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 16px;
  color: var(--ink-3); font-weight: 400; font-size: 20px;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--accent); }
.faq .answer { padding: 0 0 20px; color: var(--ink-2); max-width: 36em; }

/* 법적 고지 블록 */
.legal-box { background: var(--surface); padding: 20px 24px; border-radius: 0; margin-top: 24px; }
.legal-box h3 { font-size: 17px; margin-bottom: 8px; }
.legal-box p { color: var(--ink-2); font-size: 15px; }

/* 마무리 CTA */
.closing { padding: var(--sp-section) 0; background: var(--surface); }
.closing h2 { max-width: 18em; }
.closing .cta-row { margin-top: 24px; }

/* ---------- 문서형 페이지 (약관·개인정보) ---------- */
.doc { padding: clamp(40px, 4vw + 20px, 72px) 0 var(--sp-section); }
.doc-body { max-width: 46em; }
.doc-body h1 { font-size: clamp(26px, 1vw + 22px, 34px); margin-bottom: 12px; }
.doc-body h2 { font-size: 20px; letter-spacing: -0.015em; margin: 40px 0 12px; }
.doc-body h3 { font-size: 17px; margin: 24px 0 8px; }
.doc-body p, .doc-body li { color: var(--ink-2); }
.doc-body ol, .doc-body ul { padding-left: 1.3em; margin: 0 0 1em; }
.doc-body li { margin: 6px 0; }
.doc-body table { font-size: 14.5px; margin: 8px 0 16px; }
.doc-meta { color: var(--ink-3); font-size: var(--fs-small); }
.eula p { margin: 0 0 6px; }
.eula h2 { font-size: 18px; margin: 32px 0 10px; }
.eula .eula-sign { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- 404 ---------- */
.notfound { padding: clamp(64px, 8vw, 128px) 0; }
.notfound p { color: var(--ink-2); margin-top: 16px; }

/* ---------- 푸터 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  font-size: 13px; line-height: 1.75; color: var(--ink-3); letter-spacing: 0;
}
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--accent); }
.footer-links { margin: 0 0 16px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 32px; }
.biz { margin: 0; }
.biz span { display: inline-block; margin-right: 14px; }
.copy { margin-top: 12px; }

/* 짧은 문단·목록·표 칸은 어절 단위로 줄바꿈 (긴 문서 본문에는 쓰지 않음) */
.feature p, .feature li, .deflist dd, .notes li, .faq .answer, .changelog p,
.product-desc p, .contact-grid p, .contact-grid li, td, .legal-box p, .section-head p, .cta-meta {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 구매·환불 안내로 가는 한 줄 (구매·체험판 버튼 옆) */
.buy-note {
  margin-top: 8px; font-size: var(--fs-small); line-height: 1.55; color: var(--ink-3);
  max-width: 36em; word-break: keep-all; overflow-wrap: anywhere;
}
.buy-note a { color: var(--ink-2); }
.refund-list { margin: 0; }
.refund-list li { color: var(--ink-2); font-size: 15px; margin: 8px 0; word-break: keep-all; overflow-wrap: anywhere; }

/* 보조 간격 (CSP상 인라인 style 금지 — 클래스로만) */
.table-note { margin-top: 16px; }
.steps-title { margin-top: 24px; }

/* ---------- 움직임 줄이기 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- 인쇄 ---------- */
@media print {
  .site-header, .skip-link, .header-cta { display: none; }
  .site-header { position: static; }
}
