/* Time Keeper 웹사이트 공통 스타일
   레이아웃: 가운데 한 줄(최대 1080px). 첫 화면은 글(왼쪽)과 실제 크기 바탕화면 그림(오른쪽), 아래로 섹션이 이어진다.
   앱 말풍선과 같은 크림색·코코아색을 쓰고, 강조색은 당근 주황 하나만 쓴다. */
:root {
  --paper: #fff8ec;   /* 바탕: 앱 말풍선 크림 */
  --panel: #ffffff;
  --ink: #3b2a22;     /* 글자: 코코아 */
  --muted: #7a6455;
  --line: #ead9c6;    /* 말풍선 테두리 라떼 */
  --carrot: #e8792a;  /* 강조: 당근 */
  --carrot-ink: #ffffff;
  --leaf: #4e9a3f;
  --shadow: rgba(59, 42, 34, 0.12);
  --display: "Jua", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --body: "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1e1713; --panel: #29201b; --ink: #f6ebdd; --muted: #bba693; --line: #3a2c24;
    --carrot: #f2954a; --carrot-ink: #1e1713; --leaf: #7fc86a; --shadow: rgba(0, 0, 0, 0.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1e1713; --panel: #29201b; --ink: #f6ebdd; --muted: #bba693; --line: #3a2c24;
  --carrot: #f2954a; --carrot-ink: #1e1713; --leaf: #7fc86a; --shadow: rgba(0, 0, 0, 0.4); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.7; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--carrot); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--carrot); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* 머리글: 스크롤해도 화면 위에 붙어 있어서 다운로드 버튼이 늘 보인다 */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 11; background: var(--paper); }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.btn-sm { font-size: 16px; padding: 8px 16px; gap: 6px; box-shadow: none; }
.btn-sm svg { width: 18px; height: 18px; }
.top { padding-block: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 24px; }
.brand img { width: 40px; height: 40px; }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top .right { display: flex; align-items: center; gap: 22px; }
/* 언어 메뉴: 지구본 + 지금 언어, 누르면 8개 언어 목록 */
.langs { position: relative; font-size: 14px; }
.langs summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted); white-space: nowrap; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover, .langs[open] summary { color: var(--ink); }
.langs summary svg { width: 16px; height: 16px; flex: none; }
.langs ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; margin: 0; padding: 6px; list-style: none; min-width: 150px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px var(--shadow); }
.langs li a { display: block; padding: 6px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.langs li a:hover { background: var(--paper); }
.langs a[aria-current="true"] { font-weight: 700; color: var(--carrot); }

/* 중국어·일본어: 한글 글꼴 대신 그 언어의 둥근 글꼴 */
:lang(ja) { --display: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif; }
:lang(zh-Hans) { --display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }

/* 첫 화면 */
.hero { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: center; padding-block: 36px 56px; }
.hero > * { min-width: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.25; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 64px); }
h1 small { display: block; font-size: 0.42em; color: var(--carrot); margin-top: 10px; }
.lead { font-size: 19px; color: var(--muted); margin: 18px 0 26px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--carrot); color: var(--carrot-ink); font-family: var(--display); font-size: 21px;
  text-decoration: none; padding: 14px 26px; border-radius: 999px; box-shadow: 0 6px 18px var(--shadow); }
.btn:hover { filter: brightness(1.05); }
.btn.soon { background: var(--line); color: var(--ink); box-shadow: none; cursor: default; }   /* 공증본이 나오기 전: 누를 수 없음 */
.btn.soon:hover { filter: none; }
.btn svg { width: 22px; height: 22px; }
.req { font-size: 14px; color: var(--muted); line-height: 1.5; }
.shot { border-radius: 14px; box-shadow: 0 18px 40px var(--shadow); border: 1px solid var(--line); }
.caption { font-size: 14px; color: var(--muted); margin-top: 10px; text-align: center; }

/* 섹션 공통 */
section { padding-block: 44px; border-top: 1px solid var(--line); }
section > h2 { font-size: clamp(28px, 4vw, 38px); }
.sub { color: var(--muted); margin: 8px 0 28px; max-width: 40em; }

/* 영상 */
.video video { width: 100%; border-radius: 14px; box-shadow: 0 18px 40px var(--shadow); background: #000; aspect-ratio: 16 / 9; }

/* 세 단계 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.steps li { list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; min-width: 0; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--carrot); color: var(--carrot-ink); font-family: var(--display); font-size: 18px; margin-bottom: 10px; }
.steps h3 { font-size: 22px; margin-bottom: 6px; }
.steps img { border-radius: 10px; margin-top: 12px; border: 1px solid var(--line); }
.steps p { margin: 0; color: var(--muted); }
ol.steps { padding: 0; margin: 0; }

/* 앱 말풍선 모양 */
.bubble { position: relative; background: #fff8ec; color: #3b2a22; border: 1.5px solid #d9b89e; border-radius: 16px; padding: 10px 14px; font-size: 15px; line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06); }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 14px; height: 14px; background: #fff8ec; border-right: 1.5px solid #d9b89e;
  border-bottom: 1.5px solid #d9b89e; transform: translateX(-50%) rotate(45deg); }

/* 캐릭터 다섯 */
.cast { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: end; }
.cast figure { margin: 0; display: grid; gap: 12px; justify-items: center; text-align: center; min-width: 0; }
.cast img { width: 120px; height: 150px; object-fit: contain; }
.cast figcaption { font-family: var(--display); font-size: 20px; }
.cast figcaption span { display: block; font-family: var(--body); font-size: 13px; color: var(--muted); }

/* 감정 눈금 */
.scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; position: relative; margin-top: 8px; }
.scale::before { content: ""; position: absolute; left: 8.33%; right: 8.33%; top: 150px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--leaf), #e9b43a, var(--carrot), #d9534f); }
.scale div { display: grid; justify-items: center; gap: 22px; text-align: center; min-width: 0; }
.scale img { width: 96px; height: 120px; object-fit: contain; }
.scale b { font-family: var(--display); font-weight: 400; font-size: 19px; font-variant-numeric: tabular-nums; }
.scale span { display: block; font-size: 14px; color: var(--muted); }

/* 기능 칸 */
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.grid2 > * { min-width: 0; }
.feature h3 { font-size: 22px; margin: 12px 0 4px; }
.feature p { margin: 0; color: var(--muted); }
.feature img { border-radius: 12px; border: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding: 0; }
.chips li { list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 15px; }

/* 개인정보 약속 */
.promise { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding: 0; margin: 0; }
.promise li { list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.promise b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; margin-bottom: 4px; }
.promise span { color: var(--muted); font-size: 15px; }

/* 자주 묻는 질문 */
details { border-bottom: 1px solid var(--line); padding-block: 14px; }
summary { cursor: pointer; font-family: var(--display); font-size: 20px; }
details p { margin: 10px 0 0; color: var(--muted); }

/* 마지막 내려받기 */
.final { text-align: center; }
.final img { width: 120px; margin: 0 auto 16px; }
.final .cta { justify-content: center; margin-top: 20px; }

/* 문서(개인정보처리방침·이용약관) */
.doc { max-width: 760px; margin: 0 auto; padding-block: 28px 64px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 6px; }
.doc .date { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: 24px; margin: 34px 0 8px; }
.doc ul { padding-left: 20px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc .tablewrap { overflow-x: auto; }
.note { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--carrot); border-radius: 8px; padding: 12px 16px; }

footer { border-top: 1px solid var(--line); padding-block: 26px 40px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (max-width: 860px) {
  .hero, .grid2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cast { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
  .scale { grid-template-columns: repeat(3, 1fr); row-gap: 26px; }
  .scale::before { display: none; }
  .top nav { display: none; }
  .top .right { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

@media (max-width: 420px) {
  .brand span, .brand { font-size: 20px; }
  .brand img { width: 34px; height: 34px; }
  .langs { font-size: 13px; }
  .langs summary span { display: none; }   /* 아주 좁으면 언어 메뉴는 지구본만 */
  .langs summary { padding: 7px 9px; }
  .btn-sm span { display: none; }   /* 아주 좁으면 다운로드 버튼은 아이콘만 */
  .btn-sm { padding: 9px 12px; }
}

/* 정보: 묻고 답하기 대신 항목 - 내용 한 줄씩 바로 읽히게 */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 16px 0 0; }
.facts div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--display); font-size: 18px; }
.facts dd { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr; } .facts div { grid-template-columns: 7.5em 1fr; } }
section[id] { scroll-margin-top: 76px; }   /* 메뉴로 이동해도 제목이 위쪽 띠에 가리지 않게 */

/* 스타일 1~9: 토끼탈 아이 한 명을 9가지 모습으로 작게 한 줄 */
.styles { margin-top: 28px; }
.styles-label { margin: 0 0 8px; font-family: var(--display); font-size: 18px; }
.styles-row { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.styles-row figure { margin: 0; display: grid; justify-items: center; gap: 2px; }
.styles-row img { width: 100%; max-width: 80px; height: auto; aspect-ratio: 4 / 5; object-fit: contain; }
.styles-row figcaption { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .styles-row { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 12px; } }
