/* 출처: design/tokens/tokens.css (디자인팀, 2026-10-14) 의 복사본.
   수정은 원본에서 하고 이 파일은 다시 복사한다. 직접 고치지 말 것. (개발팀) */
/* ==========================================================================
   withI 디자인 토큰 (design/tokens/tokens.css)
   - 관리: 디자인팀. 색상·글꼴·크기·간격·둥글기·그림자는 이 파일 하나에서만 정의한다.
   - 톤: 따뜻하고 차분한 웨딩 (아이보리 바탕, 로즈우드 강조, 세이지 보조)
   - 대비: 본문 텍스트/배경 WCAG AA(4.5:1) 이상. 수치는 handoff 문서 참고.
   - 글꼴: Google Fonts "Noto Serif KR", "Noto Sans KR" (둘 다 SIL Open Font License 1.1)
     HTML <head>에서 아래 링크로 불러온다(이 파일은 @import 하지 않음: 렌더 차단 방지).
     https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&family=Noto+Serif+KR:wght@500;700&display=swap
   ========================================================================== */

:root {
  color-scheme: light;

  /* ---- 원색 팔레트 (직접 쓰지 말고 아래 의미 토큰을 쓴다) ---- */
  --palette-ivory-50:  #fdfaf5;
  --palette-ivory-100: #f8f1e7;
  --palette-ivory-200: #efe3d3;
  --palette-sand-300:  #dcc9b2;
  --palette-ink-900:   #2b211d;
  --palette-ink-700:   #5a4a42;
  --palette-rose-700:  #9c3f4f;
  --palette-rose-800:  #7f3140;
  --palette-rose-100:  #f6e3e4;
  --palette-sage-700:  #4f6b58;
  --palette-gold-500:  #b8925a;

  /* ---- 의미 토큰: 라이트 (기본) ---- */
  --color-bg:            var(--palette-ivory-50);   /* 페이지 바탕 */
  --color-bg-subtle:     var(--palette-ivory-100);  /* 섹션 바탕 */
  --color-surface:       #ffffff;                   /* 카드 */
  --color-border:        var(--palette-ivory-200);
  --color-border-strong: #9a836b;                   /* 입력창 테두리 (비텍스트 대비 3:1 이상) */
  --color-text:          var(--palette-ink-900);    /* 본문 */
  --color-text-muted:    var(--palette-ink-700);    /* 보조 본문 (AA 통과) */
  --color-accent:        var(--palette-rose-700);   /* 강조·링크·버튼 */
  --color-accent-hover:  var(--palette-rose-800);
  --color-accent-soft:   var(--palette-rose-100);   /* 강조 배경 */
  --color-on-accent:     #ffffff;                   /* 버튼 위 글자 */
  --color-secondary:     var(--palette-sage-700);
  --color-ornament:      var(--palette-gold-500);   /* 장식선·아이콘 (텍스트 사용 금지) */
  --color-deep:          #2c4435;                   /* 짙은 숲색 면 (청첩장 2 표지·강조 면) */
  --color-on-deep:       #fdfaf5;                   /* deep 면 위 글자 */
  --color-sky:           #35507a;                   /* 새벽 하늘색 면 (청첩장 3 표지·주 버튼) */
  --color-on-sky:        #ffffff;                   /* sky 면 위 글자 */
  --color-sky-soft:      #e8eef7;                   /* 청첩장 3 페이지 바탕 */
  --color-peach:         #f1d4c2;                   /* 청첩장 3 장식(해) 전용, 텍스트 사용 금지 */
  /* 청첩장 4~9 (개발팀, Stitch 지침 기반). 장식 전용 표시가 있는 색은 글자에 쓰지 않는다. */
  --color-hanji:         #f6f1e6;                   /* 4 한지 바탕 */
  --color-hanji-deep:    #e9e0cd;                   /* 4 페이지 바깥 */
  --color-ink:           #1f1c1a;                   /* 4 먹 (글자·버튼) */
  --color-on-ink:        #f6f1e6;
  --color-seal:          #a8322b;                   /* 4 낙관·소제목 */
  --color-mono-bg:       #ffffff;                   /* 5 */
  --color-mono-ink:      #111111;
  --color-mono-line:     #d9d9d9;                   /* 5 격자선 (글자 금지) */
  --color-mono-muted:    #5c5c5c;
  --color-sage-wash:     #e6eee3;                   /* 6 물빛 (면 전용) */
  --color-blush-wash:    #f6e2df;                   /* 6 물빛 (면 전용) */
  --color-blush:         #e3aea6;                   /* 6 꽃 장식 전용 */
  --color-leaf:          #7d9c80;                   /* 6 잎 장식 전용 */
  --color-leaf-text:     #4e6b52;                   /* 6 소제목 글자 */
  --color-garden-ink:    #3d4f40;                   /* 6 제목·버튼 */
  --color-on-garden:     #ffffff;
  --color-night:         #121a2e;                   /* 7 밤하늘 (라이트·다크 같음) */
  --color-night-deep:    #0b1020;
  --color-gold:          #d9b871;                   /* 7 금빛 글자·테 */
  --color-on-gold:       #121a2e;
  --color-cream:         #f3ead8;                   /* 7 본문 글자 */
  --color-paper:         #f3eee4;                   /* 8 종이 */
  --color-paper-deep:    #e2dacb;
  --color-press:         #141414;                   /* 8 먹 */
  --color-on-press:      #f3eee4;
  --color-press-red:     #b3261e;                   /* 8 소제목 */
  --color-sand:          #f6ebde;                   /* 9 바탕 */
  --color-clay-soft:     #ecd5c1;                   /* 9 면 */
  --color-clay:          #a4471f;                   /* 9 버튼 */
  --color-on-clay:       #ffffff;
  --color-clay-text:     #8f3d1a;                   /* 9 소제목 글자 */
  --color-sun:           #e8a96c;                   /* 9 해 장식 전용 */
  --color-focus:         #1f5fbf;                   /* 키보드 포커스 링 */
  --color-success:       #2f6b3f;
  --color-error:         #a32020;

  /* ---- 글꼴 ---- */
  --font-serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", serif;
  --font-sans:  "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, -apple-system, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium:  500;
  --font-weight-bold:    700;

  /* ---- 글자 크기 단계 (모바일→데스크톱 유동, 기준 16px) ---- */
  --text-xs:   0.8125rem;                                /* 13px */
  --text-sm:   0.875rem;                                 /* 14px */
  --text-base: 1rem;                                     /* 16px */
  --text-lg:   1.125rem;                                 /* 18px */
  --text-xl:   clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);   /* 20→24 */
  --text-2xl:  clamp(1.5rem, 1.25rem + 1vw, 2rem);       /* 24→32 */
  --text-3xl:  clamp(1.875rem, 1.4rem + 2vw, 3rem);      /* 30→48 */
  --text-display: clamp(2.5rem, 1.8rem + 3vw, 4rem);     /* 40→64 (워드마크) */
  --leading-tight: 1.3;
  --leading-normal: 1.7;   /* 한글 본문 */
  --tracking-wide: 0.08em;

  /* ---- 간격 (4px 기반) ---- */
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 4rem;     /* 64 */
  --space-9: 6rem;     /* 96 */
  --gutter:  var(--space-4);    /* 모바일 좌우 여백 16px */
  --content-max: 72rem;         /* 1152px */
  --reading-max: 40rem;         /* 640px */

  /* ---- 둥글기 ---- */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* ---- 그림자 ---- */
  --shadow-sm: 0 1px 2px rgb(43 33 29 / 0.06);
  --shadow-md: 0 4px 16px rgb(43 33 29 / 0.08), 0 1px 3px rgb(43 33 29 / 0.05);
  --shadow-lg: 0 16px 40px rgb(43 33 29 / 0.12);

  /* ---- 움직임 ---- */
  --duration-fast: 150ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---- 의미 토큰: 다크 (버튼으로 고른 사람만. 처음 들어온 사람은 기기 설정과 상관없이 밝은 화면, 대표님 지시 2026-10-27) ---- */
:root[data-theme="dark"] {
  --color-bg:            #1c1715;
  --color-bg-subtle:     #241e1b;
  --color-surface:       #2a2320;
  --color-border:        #3d3430;
  --color-border-strong: #7d6c62;
  --color-text:          #f3ebe2;
  --color-text-muted:    #cbbcae;
  --color-accent:        #e8a3ad;
  --color-accent-hover:  #f2bcc4;
  --color-accent-soft:   #3a2529;
  --color-on-accent:     #2b1419;
  --color-secondary:     #a9c4b0;
  --color-ornament:      #c9a876;
  --color-deep:          #1f3026;
  --color-on-deep:       #f3ebe2;
  --color-sky:           #a9c1e8;
  --color-on-sky:        #14233d;
  --color-sky-soft:      #1a2332;
  --color-peach:         #c99a82;
--color-hanji:         #1c1a17;
--color-hanji-deep:    #141210;
--color-ink:           #ece4d4;
--color-on-ink:        #1c1a17;
--color-seal:          #e0786d;
--color-mono-bg:       #111111;
--color-mono-ink:      #f0f0f0;
--color-mono-line:     #3a3a3a;
--color-mono-muted:    #b0b0b0;
--color-sage-wash:     #1e2620;
--color-blush-wash:    #2e2224;
--color-blush:         #a8736c;
--color-leaf:          #7fa283;
--color-leaf-text:     #a9c9ad;
--color-garden-ink:    #bcd4bf;
--color-on-garden:     #142016;
--color-paper:         #1b1916;
--color-paper-deep:    #121110;
--color-press:         #eee7da;
--color-on-press:      #1b1916;
--color-press-red:     #ff8f84;
--color-sand:          #221915;
--color-clay-soft:     #33251d;
--color-clay:          #e39a72;
--color-on-clay:       #2a140a;
--color-clay-text:     #eba684;
--color-sun:           #a96a40;
  --color-hanji:         #1c1a17;
  --color-hanji-deep:    #141210;
  --color-ink:           #ece4d4;
  --color-on-ink:        #1c1a17;
  --color-seal:          #e0786d;
  --color-mono-bg:       #111111;
  --color-mono-ink:      #f0f0f0;
  --color-mono-line:     #3a3a3a;
  --color-mono-muted:    #b0b0b0;
  --color-sage-wash:     #1e2620;
  --color-blush-wash:    #2e2224;
  --color-blush:         #a8736c;
  --color-leaf:          #7fa283;
  --color-leaf-text:     #a9c9ad;
  --color-garden-ink:    #bcd4bf;
  --color-on-garden:     #142016;
  --color-paper:         #1b1916;
  --color-paper-deep:    #121110;
  --color-press:         #eee7da;
  --color-on-press:      #1b1916;
  --color-press-red:     #ff8f84;
  --color-sand:          #221915;
  --color-clay-soft:     #33251d;
  --color-clay:          #e39a72;
  --color-on-clay:       #2a140a;
  --color-clay-text:     #eba684;
  --color-sun:           #a96a40;
  --color-focus:         #8ab4ff;
  --color-success:       #8fd19e;
  --color-error:         #ff9b9b;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px rgb(0 0 0 / 0.45);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg:            #1c1715;
  --color-bg-subtle:     #241e1b;
  --color-surface:       #2a2320;
  --color-border:        #3d3430;
  --color-border-strong: #7d6c62;
  --color-text:          #f3ebe2;
  --color-text-muted:    #cbbcae;
  --color-accent:        #e8a3ad;
  --color-accent-hover:  #f2bcc4;
  --color-accent-soft:   #3a2529;
  --color-on-accent:     #2b1419;
  --color-secondary:     #a9c4b0;
  --color-ornament:      #c9a876;
  --color-deep:          #1f3026;
  --color-on-deep:       #f3ebe2;
  --color-sky:           #a9c1e8;
  --color-on-sky:        #14233d;
  --color-sky-soft:      #1a2332;
  --color-peach:         #c99a82;
  --color-focus:         #8ab4ff;
  --color-success:       #8fd19e;
  --color-error:         #ff9b9b;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px rgb(0 0 0 / 0.45);
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration-fast: 0ms; }
}

/* withI 표기(모든 화면 공통, 2026-10-25): 세리프 + 끝 글자 I 만 사이트 강조색(초대장 테마와 상관없이 로고 색). 작은 글자에서 "withl"로 읽히지 않게 사이트 로고와 같은 모양으로 쓴다 */
.wm { font-family: var(--font-serif); font-style: normal; letter-spacing: 0.01em; }
.wm-i { color: var(--color-accent); padding-left: 0.03em; }
