/* Earnlog 홈페이지 공통 스타일 — 생성기(tools/build.py)가 public/assets/site.css로 복사한다.
   색은 Earnlog 디자인 시스템 값 그대로. 캘린더 그림은 앱 화면을 옮긴 것이라 다크 모드에서도 라이트 고정. */

:root {
  --bg: #FCFCFC;
  --surface: #FFFFFF;
  --border: #E8E8E8;
  --ink: #111111;
  --muted: #6B6B6B;
  --gold: #FFC107;
  --gold-soft: #FFF8E1;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214;
    --surface: #1C1C1F;
    --border: #2E2E33;
    --ink: #F2F2F2;
    --muted: #A3A3AA;
    --gold-soft: #2A2414;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Hiragino Sans", "PingFang SC", "PingFang TC", "Noto Sans CJK KR", "Noto Sans CJK JP", "Noto Sans CJK SC", "Noto Sans CJK TC", Roboto, sans-serif;
  line-height: 1.6;
  overflow-wrap: break-word;
}

:lang(ko) { word-break: keep-all; }
:lang(ja), :lang(zh-Hans), :lang(zh-Hant) { line-break: strict; }

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* 머리 */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 22px 0 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; display: block; }
.langs { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.langs a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.langs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--gold); }

/* 첫 화면 */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 56px; padding: 40px 0 16px; }
.hero-copy { flex: 1 1 380px; min-width: 0; }
h1 { margin: 0 0 18px; font-size: clamp(30px, 2.6vw + 14px, 46px); line-height: 1.22; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.nw { white-space: nowrap; }
.lead { margin: 0 0 28px; font-size: 18px; line-height: 1.65; }
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 14px; }
.stores a { display: block; line-height: 0; border-radius: 8px; }
.stores img { height: 48px; width: auto; display: block; }
.note { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.shot { flex: 0 1 430px; min-width: 0; margin: 0 auto; }
.shot figcaption { margin-top: 10px; text-align: center; font-size: 12px; color: var(--muted); }

/* 본문 */
.block { padding: 64px 0 0; }
h2 { margin: 0 0 14px; font-size: 24px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
.who p { margin: 0; max-width: 720px; font-size: 17px; line-height: 1.7; }
.feat { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 32px; }
.feat li { flex: 1 1 300px; min-width: 0; padding: 18px 0; border-top: 1px solid var(--border); }
.feat h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.4; font-weight: 600; }
.feat p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); }
.box { background: var(--gold-soft); border-radius: 16px; padding: 32px clamp(20px, 3vw, 40px); }
.box ul { list-style: none; margin: 0; padding: 0; font-size: 17px; line-height: 1.75; font-weight: 500; }
.slogan { margin: 16px 0 0; font-size: 20px; line-height: 1.4; font-weight: 600; }

/* 바닥 */
.foot { margin-top: 72px; padding: 24px 0 48px; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.6; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 8px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a.pp { color: var(--ink); font-weight: 600; }
.foot p { margin: 0; }
.foot .legal { margin-top: 12px; font-size: 12px; line-height: 1.5; }

/* 404 */
.nf { padding: 72px 0 24px; }
.nf p { margin: 0 0 6px; font-size: 18px; }
.nf nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; font-size: 15px; }

/* 문서 — 처리방침 · 약관 · 지원(content/legal) */
.doc { max-width: 760px; padding: 40px 0 0; }
.doc h1 { margin: 0 0 24px; font-size: clamp(26px, 1.4vw + 20px, 36px); line-height: 1.3; }
.doc h2 { margin: 36px 0 10px; font-size: 19px; line-height: 1.45; }
.doc p { margin: 0 0 12px; font-size: 16px; line-height: 1.75; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 1.4em; font-size: 16px; line-height: 1.75; }
.doc li { margin: 0 0 6px; }
.doc a { text-decoration: underline; text-underline-offset: 2px; }
.doc .notice { margin: 0 0 24px; padding: 14px 16px; border-radius: 12px; background: var(--gold-soft); font-size: 15px; line-height: 1.6; }

/* 홈 — 기능 목록 아래 '곧 Pro에' 단락 */
.soon { margin-top: 28px; padding: 20px clamp(16px, 2.4vw, 24px); border: 1px solid var(--border); border-radius: 16px; }
.soon h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.4; font-weight: 600; }
.soon p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); }
.soon a { color: var(--ink); }

/* ── 앱 캘린더 그림 (앱 3단계 모양 · 값은 앱 코드 그대로 · 430px 폭에서 앱과 같은 크기, 좁으면 비율대로 줄어듦) ── */
.cal {
  container-type: inline-size;
  width: 100%;
  background: #FCFCFC;
  color: #111111;
  color-scheme: light;
  border: 1px solid #E8E8E8;
  border-radius: 28px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
  padding: 10px 0 18px;
  overflow: hidden;
}
.cal-head { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 12px; }
.cal-head > svg { width: 20px; height: 20px; flex: none; }
.cal-title { display: flex; align-items: center; gap: 6px; font-size: 18px; font-size: clamp(14px, 4.19cqi, 18px); font-weight: 800; }
.cal-title svg { width: 12px; height: 12px; flex: none; }
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); height: 34px; align-items: center; text-align: center; font-size: 12px; font-size: clamp(9px, 2.79cqi, 12px); font-weight: 500; color: #7A7A7A; }
.cal-dow .sun { color: #F05A4F; }
.cal-dow .sat { color: #5A72D8; }
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; min-height: 67px; padding-bottom: 16px; align-content: start; }
.d { grid-row: 1; height: 27px; margin-bottom: 3px; display: flex; align-items: center; justify-content: center; font-size: 13.5px; font-size: clamp(10px, 3.14cqi, 13.5px); font-weight: 700; font-variant-numeric: tabular-nums; }
.d.red { color: #F05A4F; }
.d.blue { color: #5A72D8; }
.d.today span { width: 27px; height: 27px; border-radius: 50%; background: #FFC107; color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.ev, .amt { margin: 0 2px; height: 10px; line-height: 10px; border-radius: 5px; white-space: nowrap; overflow: hidden; }
.ev { padding-left: 6px; font-size: 9.5px; font-size: clamp(6.5px, 2.21cqi, 9.5px); font-weight: 600; color: #212121; }
.ev > span { display: block; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 6px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 6px), transparent); }
.ev.multi { text-align: center; padding: 0 6px; }
.ev.g { background: linear-gradient(90deg, #7FD45C 0, #7FD45C 3px, #E7F7DA 3px); }
.ev.y { background: linear-gradient(90deg, #F0B800 0, #F0B800 3px, #FFE999 3px); }
.ev.b { background: linear-gradient(90deg, #4A94E8 0, #4A94E8 3px, #C7DDF5 3px); }
.ev.h { background: linear-gradient(90deg, #FF7650 0, #FF7650 3px, #FFCFBE 3px); }
.ev.cl { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.ev.cl.g { background: #E7F7DA; }
.ev.cl.y { background: #FFE999; }
.ev.cl.b { background: #C7DDF5; }
.ev.cr { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.amt { padding: 0 4px; padding: 0 clamp(2px, 0.93cqi, 4px); background: #FFF8E1; color: #8B5A00; font-size: 9px; font-size: clamp(6px, 2.09cqi, 9px); font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.c1 { grid-column-start: 1; } .c2 { grid-column-start: 2; } .c3 { grid-column-start: 3; } .c4 { grid-column-start: 4; }
.c5 { grid-column-start: 5; } .c6 { grid-column-start: 6; } .c7 { grid-column-start: 7; }
.s2 { grid-column-end: span 2; } .s3 { grid-column-end: span 3; } .s4 { grid-column-end: span 4; }
.s5 { grid-column-end: span 5; } .s6 { grid-column-end: span 6; } .s7 { grid-column-end: span 7; }
.r2 { grid-row: 2; } .r3 { grid-row: 3; } .r4 { grid-row: 4; } .r5 { grid-row: 5; } .r6 { grid-row: 6; }
.cal-foot { display: flex; gap: 10px; padding: 12px 14px 0; }
.add { flex: 0 0 auto; min-width: 34%; padding: 0 12px; height: 50px; border: 2px solid #FFC107; border-radius: 22px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-size: clamp(10px, 3.26cqi, 14px); font-weight: 700; white-space: nowrap; overflow: hidden; }
.add svg { width: 16px; height: 16px; flex: none; }
.tot { flex: 1 1 0; min-width: 0; height: 50px; border: 1px solid #E8E8E8; border-radius: 22px; background: #FFFFFF; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 0 16px; }
.tot-l { font-size: 12px; font-size: clamp(9px, 2.79cqi, 12px); line-height: 1.25; color: #7A7A7A; text-align: center; white-space: nowrap; overflow: hidden; }
.tot-v { font-size: 19px; font-size: clamp(13px, 4.42cqi, 19px); line-height: 1.2; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
