/* 공정당당 components — every value comes from tokens.css (Montage scale). Load after tokens.css. */

/* ---------- Root & layout ---------- */
.gd-root {
  container-type: inline-size;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.gd-root *, .gd-root *::before, .gd-root *::after { box-sizing: border-box; }
.gd-root :where(h1, h2, h3, h4, p, ul, ol, figure) { margin: 0; }
.gd-root :where(h1, h2, h3) { text-wrap: balance; }
/* Zero-specificity so every component class (.gd-btn--kakao, .gd-btn--text, …) wins over the plain-link reset. */
:where(.gd-root) :where(a) { color: inherit; }
.gd-root :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.gd-container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter-lg); }
.gd-section { padding-block: var(--space-80); }
.gd-section--raised { background: var(--bg-raised); }
.gd-stack { display: flex; flex-direction: column; }
.gd-num { font-variant-numeric: tabular-nums; }
.gd-muted { color: var(--text-secondary); }
.gd-strong { color: var(--text-strong); }

/* Responsive heading roles (desktop → mobile, Montage sizes) */
.gd-h-hero { font-size: 56px; line-height: 72px; letter-spacing: -0.0319em; font-weight: 700; color: var(--text-strong); }
.gd-h-page { font-size: 40px; line-height: 52px; letter-spacing: -0.0282em; font-weight: 700; color: var(--text-strong); }
.gd-h-section { font-size: 28px; line-height: 38px; letter-spacing: -0.0236em; font-weight: 700; color: var(--text-strong); }
.gd-h-card { font-size: 22px; line-height: 30px; letter-spacing: -0.0194em; font-weight: 600; color: var(--text-strong); }

/* Catchphrase: gradients on 정정 / 공정 only */
.gd-catch-jj { background: linear-gradient(180deg, var(--catch-sky), var(--catch-blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gd-catch-gj { background: linear-gradient(180deg, var(--catch-teal), var(--catch-mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Button (Montage button sizes) ---------- */
.gd-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; font-family: inherit; font-weight: 600;
  text-decoration: none; white-space: nowrap; vertical-align: middle;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.gd-btn svg { flex-shrink: 0; }
.gd-btn--lg { min-height: var(--control-lg); padding: 13px var(--space-20); gap: var(--space-6); border-radius: var(--radius-14); font-size: 15px; line-height: 22px; letter-spacing: 0.0096em; }
.gd-btn--md { min-height: var(--control-md); padding: var(--space-10) var(--space-16); gap: var(--space-4); border-radius: var(--radius-12); font-size: 14px; line-height: 20px; letter-spacing: 0.0145em; }
.gd-btn--sm { min-height: var(--control-sm); padding: var(--space-8) var(--space-12); gap: var(--space-4); border-radius: var(--radius-10); font-size: 12px; line-height: 16px; letter-spacing: 0.0252em; }
.gd-btn--primary { background: var(--brand-fill); color: var(--on-brand); }
.gd-btn--primary:hover { background: var(--brand-fill-hover); color: var(--on-brand); }
.gd-btn--secondary { background: var(--fill-normal); color: var(--text-primary); }
.gd-btn--secondary:hover { background: var(--fill-strong); color: var(--text-primary); }
.gd-btn--outline { background: transparent; color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--line-normal); }
.gd-btn--outline:hover { background: var(--fill-subtle); color: var(--text-primary); }
.gd-btn--text { background: transparent; color: var(--brand); padding-inline: 0; min-height: auto; }
.gd-btn--text:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.gd-btn--kakao { background: var(--kakao-fill); color: var(--kakao-text); }
.gd-btn--kakao:hover { background: var(--kakao-fill); color: var(--kakao-text); filter: brightness(0.94); }
.gd-btn--block { width: 100%; }
.gd-btn[disabled], .gd-btn[aria-disabled="true"] { background: var(--fill-subtle); color: var(--text-disabled); cursor: default; }

/* ---------- Sign in with Google (Google dark theme spec) ---------- */
.gd-google {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: var(--control-md); padding: 0 12px 0 8px;
  border: 0; border-radius: var(--radius-full); cursor: pointer;
  background: var(--google-fill); color: var(--google-text);
  box-shadow: inset 0 0 0 1px var(--google-stroke);
  font-family: inherit; font-size: 14px; line-height: 20px; letter-spacing: 0.0145em; font-weight: 500;
  white-space: nowrap; text-decoration: none;
}
.gd-google:hover { background: var(--google-hover); color: var(--google-text); }
.gd-google__g { width: 24px; height: 24px; border-radius: var(--radius-full); background: #ffffff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gd-google__g svg { width: 16px; height: 16px; }
.gd-google--lg { min-height: var(--control-lg); padding: 0 16px 0 12px; font-size: 15px; line-height: 22px; letter-spacing: 0.0096em; }

/* ---------- Text field ---------- */
.gd-field { display: flex; flex-direction: column; gap: var(--space-8); min-width: 0; }
.gd-label { font-size: 14px; line-height: 20px; letter-spacing: 0.0145em; font-weight: 600; color: var(--text-primary); }
.gd-label-opt { font-weight: 500; color: var(--text-secondary); }
.gd-input {
  width: 100%; min-height: var(--control-lg); padding: 13px var(--space-16);
  border: 1px solid var(--line-normal); border-radius: var(--radius-12);
  background: var(--surface); color: var(--text-primary);
  font-family: inherit; font-size: 15px; line-height: 22px; letter-spacing: 0.0096em;
}
.gd-input::placeholder { color: var(--text-tertiary); }
.gd-input:hover { border-color: rgba(112,115,124,0.52); }
.gd-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-subtle); }
.gd-textarea { min-height: 120px; line-height: 24px; resize: vertical; }
.gd-help { font-size: 13px; line-height: 18px; letter-spacing: 0.0194em; font-weight: 500; color: var(--text-secondary); }
.gd-error { font-size: 13px; line-height: 18px; letter-spacing: 0.0194em; font-weight: 600; color: var(--negative); }
.gd-check { display: flex; gap: var(--space-12); align-items: flex-start; font-size: 14px; line-height: 20px; letter-spacing: 0.0145em; color: var(--text-secondary); cursor: pointer; }
.gd-check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--brand-fill); }

/* ---------- Badge ---------- */
.gd-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--space-8); border-radius: var(--radius-8); font-size: 12px; line-height: 16px; letter-spacing: 0.0252em; font-weight: 600; white-space: nowrap; }
.gd-badge--neutral { background: var(--fill-normal); color: var(--text-secondary); }
.gd-badge--brand { background: var(--brand-subtle); color: var(--brand); }
.gd-badge--solid { background: var(--brand-fill); color: var(--on-brand); }
.gd-badge--breaking { background: var(--negative-fill); color: var(--on-brand); }
.gd-tag { font-size: 12px; line-height: 16px; letter-spacing: 0.0252em; font-weight: 600; color: var(--brand); }

/* ---------- Card ---------- */
.gd-card { background: var(--surface); border-radius: var(--radius-16); padding: var(--space-24); }
.gd-card--lg { border-radius: var(--radius-20); padding: var(--space-32); }

/* ---------- Section header ---------- */
.gd-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-16); flex-wrap: wrap; margin-bottom: var(--space-32); }
.gd-section-head__text { display: flex; flex-direction: column; gap: var(--space-8); min-width: 0; }
.gd-section-desc { font-size: 16px; line-height: 26px; letter-spacing: 0.0057em; color: var(--text-secondary); }

/* ---------- Site header ---------- */
.gd-header { position: relative; background: var(--bg-base); border-bottom: 1px solid var(--line-subtle); }
.gd-header__bar { height: var(--header-height); display: flex; align-items: center; gap: var(--space-24); }
.gd-header__logo { display: flex; align-items: center; flex-shrink: 0; }
.gd-header__logo img { height: 28px; width: auto; display: block; }
.gd-nav { display: flex; align-items: center; gap: var(--space-4); }
.gd-nav a { display: inline-flex; align-items: center; min-height: var(--control-md); padding: 0 var(--space-12); border-radius: var(--radius-10); font-size: 14px; line-height: 20px; letter-spacing: 0.0145em; font-weight: 500; color: var(--text-secondary); text-decoration: none; }
.gd-nav a:hover { color: var(--text-primary); background: var(--fill-subtle); }
.gd-nav a[aria-current="page"] { color: var(--text-strong); font-weight: 600; }
.gd-header__actions { display: flex; align-items: center; gap: var(--space-8); margin-left: auto; }
.gd-header__menu { display: none; width: var(--control-md); padding: 0; }
.gd-mnav { display: none; flex-direction: column; padding: var(--space-8) var(--gutter-sm) var(--space-16); border-top: 1px solid var(--line-subtle); }
.gd-mnav a { display: flex; align-items: center; min-height: var(--control-lg); font-size: 16px; line-height: 24px; letter-spacing: 0.0057em; font-weight: 500; color: var(--text-primary); text-decoration: none; }

/* ---------- News ---------- */
.gd-thumb { display: block; overflow: hidden; background: var(--surface); }
.gd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gd-news-card { display: flex; flex-direction: column; gap: var(--space-12); text-decoration: none; color: var(--text-primary); min-width: 0; }
.gd-news-card .gd-thumb { aspect-ratio: 16 / 10; border-radius: var(--radius-12); }
.gd-news-card__title { font-size: 18px; line-height: 26px; letter-spacing: -0.002em; font-weight: 600; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gd-news-card:hover .gd-news-card__title { text-decoration: underline; text-underline-offset: 3px; }
.gd-news-meta { font-size: 13px; line-height: 18px; letter-spacing: 0.0194em; font-weight: 500; color: var(--text-secondary); }
.gd-news-row { display: flex; gap: var(--space-16); align-items: center; padding-block: var(--space-16); border-bottom: 1px solid var(--line-subtle); text-decoration: none; color: var(--text-primary); }
.gd-news-row .gd-thumb { width: 112px; aspect-ratio: 3 / 2; border-radius: var(--radius-8); flex-shrink: 0; }
.gd-news-row__title { font-size: 17px; line-height: 24px; letter-spacing: 0; font-weight: 600; }
.gd-news-row:hover .gd-news-row__title { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Post ---------- */
.gd-post { display: flex; flex-direction: column; gap: var(--space-8); padding-block: var(--space-20); border-bottom: 1px solid var(--line-subtle); }
.gd-post__title { font-size: 18px; line-height: 26px; letter-spacing: -0.002em; font-weight: 600; color: var(--text-primary); text-decoration: none; }
.gd-post__title:hover { text-decoration: underline; text-underline-offset: 3px; }
.gd-post__excerpt { font-size: 15px; line-height: 24px; letter-spacing: 0.0096em; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gd-post__meta { display: flex; gap: var(--space-12); flex-wrap: wrap; font-size: 13px; line-height: 18px; letter-spacing: 0.0194em; font-weight: 500; color: var(--text-secondary); }
.gd-avatar { width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--fill-normal); color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 18px; font-weight: 600; flex-shrink: 0; }

/* ---------- Tabs (segmented) ---------- */
.gd-tabs { display: inline-flex; gap: var(--space-4); padding: var(--space-4); border-radius: var(--radius-12); background: var(--fill-subtle); }
.gd-tab { min-height: 36px; padding: 0 var(--space-12); border: 0; border-radius: var(--radius-8); background: transparent; color: var(--text-secondary); font-family: inherit; font-size: 14px; line-height: 20px; letter-spacing: 0.0145em; font-weight: 500; cursor: pointer; }
.gd-tab[aria-pressed="true"] { background: var(--fill-normal); color: var(--text-strong); font-weight: 600; }

/* ---------- Pledge ---------- */
.gd-pledge-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--space-12); }
.gd-pledge-list li { display: flex; gap: var(--space-12); align-items: flex-start; font-size: 16px; line-height: 24px; letter-spacing: 0.0057em; color: var(--text-primary); }
.gd-pledge-list li::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--brand); margin-top: 9px; flex-shrink: 0; }
.gd-count { font-size: 14px; line-height: 20px; letter-spacing: 0.0145em; font-weight: 500; color: var(--text-secondary); }
.gd-count b { color: var(--text-strong); font-weight: 600; font-variant-numeric: tabular-nums; }
.gd-live { display: inline-block; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--mint); vertical-align: middle; }

/* ---------- Share card (서약 카드 이미지): 종이 한 장 + 펜 글씨, 두 색만 ---------- */
.gd-share-card { position: relative; overflow: hidden; width: 100%; background: var(--paper); border-radius: var(--radius-4); display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-12); padding: 8% 9%; color: var(--pen-ink); font-family: var(--font-hand); }
.gd-share-card--square { aspect-ratio: 1 / 1; }
.gd-share-card--story { aspect-ratio: 9 / 16; padding: 16% 11% 10%; }
.gd-share-card__date { font-family: var(--font-hand); font-size: 18px; line-height: 22px; color: var(--pen-ink-soft); }
.gd-share-card__vow { font-size: 28px; line-height: 34px; letter-spacing: 0; color: var(--pen-ink); white-space: pre-line; }
.gd-share-card__note { font-size: 22px; line-height: 28px; color: var(--pen-ink); }
.gd-share-card__sign { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-12); }
.gd-share-card__name { font-size: 30px; line-height: 34px; color: var(--pen-ink); padding: 0 var(--space-8) var(--space-2); border-bottom: 1px solid var(--pen-ink-soft); white-space: nowrap; }
.gd-share-card__meta { font-family: var(--font-sans); font-size: 11px; line-height: 14px; letter-spacing: 0.0311em; font-weight: 500; color: var(--pen-ink-soft); }
.gd-share-card--story .gd-share-card__vow { font-size: 30px; line-height: 40px; }
.gd-share-card--story .gd-share-card__note { font-size: 24px; line-height: 32px; }

/* ---------- Pledge paper (서약서): 손으로 쓴 서약서 한 장. 화면 안의 서약서와 공유 이미지(정사각·세로)가 같은 종이다 ---------- */
.gd-pledge-paper { position: relative; display: flex; flex-direction: column; gap: var(--space-16); width: 100%; padding: var(--space-32) var(--space-32) var(--space-24); background: var(--paper); color: var(--pen-ink); border-radius: var(--radius-4); box-shadow: var(--shadow-paper); font-family: var(--font-hand); container: gd-paper / inline-size; overflow: hidden; }
.gd-pledge-paper__title { margin: 0; font-size: 36px; line-height: 40px; letter-spacing: 0.12em; text-align: center; font-weight: 400; color: var(--pen-ink); }
.gd-pledge-paper__lead { margin: 0; font-size: 24px; line-height: 32px; }
.gd-pledge-paper__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-8); }
.gd-pledge-paper__list li { display: flex; gap: var(--space-8); font-size: 24px; line-height: 32px; }
.gd-pledge-paper__list li > span:first-child { flex-shrink: 0; color: var(--pen-ink-soft); }
.gd-pledge-paper__list li > span:last-child, .gd-pledge-paper__lead { text-wrap: pretty; }
.gd-pledge-paper__list li:lang(zh) > span:last-child, .gd-pledge-paper__list li:lang(ja) > span:last-child { text-wrap: balance; }
.gd-pledge-paper__list li:lang(ja) { word-break: auto-phrase; }
.gd-pledge-paper__sign { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-16); min-height: 64px; padding-top: var(--space-16); border-top: 1px solid var(--paper-line); }
.gd-pledge-paper__date { font-size: 20px; line-height: 24px; color: var(--pen-ink-soft); white-space: nowrap; }
.gd-pledge-paper__blank { min-width: 120px; padding-bottom: var(--space-2); border-bottom: 1px solid var(--pen-ink-soft); font-size: 20px; line-height: 24px; text-align: center; color: var(--pen-ink-soft); }
.gd-pledge-paper__signed { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); text-align: right; min-width: 0; }
.gd-pledge-paper__signline { font-size: 28px; line-height: 32px; color: var(--pen-ink); }
.gd-pledge-paper__no { font-family: var(--font-sans); font-size: 12px; line-height: 16px; letter-spacing: 0.0252em; font-weight: 500; color: var(--pen-ink-soft); }
/* 서명 전: 종이 맨 아래 응원 한마디(선택) 한 줄 + 바로 아래 '서명하기' 버튼. 누르면 둘이 한 번에 간다. */
.gd-pledge-paper__actions { display: flex; flex-direction: column; gap: var(--space-12); }
.gd-pledge-paper__note { display: block; width: 100%; min-height: 44px; margin: 0; padding: 10px var(--space-2); border: 0; border-bottom: 1px solid var(--pen-ink-soft); border-radius: 0; background: transparent; color: var(--pen-ink); font-family: var(--font-sans); font-size: 16px; line-height: 24px; letter-spacing: 0.0057em; font-weight: 500; -webkit-appearance: none; appearance: none; }
.gd-pledge-paper__note::placeholder { color: var(--pen-ink-soft); opacity: 1; }
.gd-pledge-paper__note:hover { border-bottom-color: var(--pen-ink); }
.gd-pledge-paper__note:focus { outline: none; border-bottom-color: var(--pen-ink); box-shadow: 0 1px 0 0 var(--pen-ink); background: color-mix(in srgb, var(--pen-ink) 6%, transparent); }
/* '서명하기' 버튼: 펜 잉크 바탕 + 종이색 글자, 글꼴은 본문 글꼴. */
.gd-pledge-paper__action { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin: 0; padding: 14px var(--space-20); border: 0; border-radius: var(--radius-14); background: var(--pen-ink); color: var(--paper); font-family: var(--font-sans); font-size: 16px; line-height: 24px; letter-spacing: 0.0057em; font-weight: 600; text-align: center; cursor: pointer; transition: background-color .15s ease; }
.gd-pledge-paper__action:hover { background: color-mix(in srgb, var(--pen-ink) 84%, var(--paper)); color: var(--paper); }
.gd-pledge-paper__action:active { background: color-mix(in srgb, var(--pen-ink) 92%, #000000); }
.gd-pledge-paper__action:focus-visible { outline: 2px solid var(--pen-ink); outline-offset: 3px; }
/* 서약서 이미지(한국어 화면): 종이에 쓰인 부분(제목·첫 줄·세 항목)을 손글씨 그림 한 장이 대신한다(투명 배경·펜 잉크색, 999×985).
   그림 안에 옆 약 2.7%·위아래 약 3%의 빈 여백이 있어, 화면 안 종이는 위 여백을 12로·그림과 아래(입력칸·서명 줄) 사이를 4로 줄인다
   — 글씨가 종이 위에서 글꼴 종이와 비슷한 자리(위 약 22~26·아래 약 14~18, 390~1440 폭)에 온다. 폭은 종이 안쪽 폭 전체. */
.gd-pledge-paper__img { display: block; width: 100%; height: auto; }
.gd-pledge-paper:not(.gd-pledge-paper--square):not(.gd-pledge-paper--story):not(.gd-pledge-paper--og):has(.gd-pledge-paper__img) { padding-top: var(--space-12); gap: var(--space-4); }
@container (max-width: 767px) {
  .gd-pledge-paper:not(.gd-pledge-paper--square):not(.gd-pledge-paper--story):not(.gd-pledge-paper--og) { padding: var(--space-24) var(--space-20) var(--space-20); }
  .gd-root:lang(ja) .gd-pledge-paper:not(.gd-pledge-paper--square):not(.gd-pledge-paper--story):not(.gd-pledge-paper--og) { padding-inline: var(--space-16); }
}
@container gd-paper (max-width: 380px) {
  .gd-pledge-paper__title { font-size: 30px; line-height: 34px; }
  .gd-pledge-paper__lead, .gd-pledge-paper__list li { font-size: 22px; line-height: 28px; }
  .gd-pledge-paper__signline { font-size: 24px; line-height: 28px; }
  .gd-pledge-paper__date, .gd-pledge-paper__blank { font-size: 18px; line-height: 22px; }
  /* 일본어 손글씨(Klee One)는 글자 폭이 넓어, 좁은 종이에서는 '一、'를 글 안에 넣어 한 줄을 끝까지 쓴다(항목마다 두 줄 안). */
  .gd-pledge-paper__list li:lang(ja) { display: block; font-size: 21px; line-height: 28px; text-wrap: balance; }
}
/* 공유 이미지 비율. 글자가 종이 폭에 비례해 커지고 작아진다(cqw) — 이미지처럼 어떤 크기에서도 같은 모양. */
.gd-pledge-paper--square, .gd-pledge-paper--story { padding: 8% 9%; gap: 0; justify-content: space-between; border-radius: 0; }
.gd-pledge-paper--square { aspect-ratio: 1 / 1; }
/* 세로(스토리): 위아래 14%(= 폭의 24.9%)는 비워 둔다(인스타그램 화면 요소가 덮는 자리). 제목~서명 줄을 한 덩어리로 가운데. */
.gd-pledge-paper--story { aspect-ratio: 9 / 16; padding: 24.9% 10%; justify-content: center; }
.gd-pledge-paper--story .gd-pledge-paper__sign { margin-top: 7cqw; }
.gd-pledge-paper--square .gd-pledge-paper__title, .gd-pledge-paper--story .gd-pledge-paper__title { font-size: 9.4cqw; line-height: 10.4cqw; }
.gd-pledge-paper--square .gd-pledge-paper__lead, .gd-pledge-paper--square .gd-pledge-paper__list li { font-size: 6.2cqw; line-height: 8.2cqw; gap: 1.8cqw; }
.gd-pledge-paper--square .gd-pledge-paper__list { gap: 2.4cqw; }
.gd-pledge-paper--story .gd-pledge-paper__title { font-size: 11.6cqw; line-height: 13cqw; }
.gd-pledge-paper--story .gd-pledge-paper__lead, .gd-pledge-paper--story .gd-pledge-paper__list li { font-size: 7.6cqw; line-height: 10.6cqw; gap: 2.2cqw; }
.gd-pledge-paper--story .gd-pledge-paper__list { gap: 4.4cqw; }
.gd-pledge-paper--square .gd-pledge-paper__sign, .gd-pledge-paper--story .gd-pledge-paper__sign { min-height: 0; padding-top: 3cqw; gap: 3cqw; }
.gd-pledge-paper--square .gd-pledge-paper__date, .gd-pledge-paper--story .gd-pledge-paper__date { font-size: 4.4cqw; line-height: 5.4cqw; }
.gd-pledge-paper--square .gd-pledge-paper__signline, .gd-pledge-paper--story .gd-pledge-paper__signline { font-size: 6.2cqw; line-height: 7.2cqw; }
.gd-pledge-paper--square .gd-pledge-paper__no, .gd-pledge-paper--story .gd-pledge-paper__no { font-size: 3cqw; line-height: 4cqw; }
.gd-pledge-paper__body { display: flex; flex-direction: column; gap: var(--space-12); }
.gd-pledge-paper--square .gd-pledge-paper__body { gap: 3.6cqw; }
.gd-pledge-paper--story .gd-pledge-paper__body { gap: 6.4cqw; }
/* 공유 이미지 위 서약서 이미지: 정사각은 서명 줄까지 한 장에 들어가도록 안쪽 폭의 80%(가운데), 세로는 안쪽 폭 전체. */
.gd-pledge-paper--square .gd-pledge-paper__img { width: 80cqw; margin-inline: auto; }
.gd-pledge-paper--story .gd-pledge-paper__img { width: 100%; }
/* 링크 미리보기(1200×630): 종이 위에 손글씨 두 줄 + 작은 한 줄, 가는 선 아래 남색 로고와 캐치프레이즈. 값은 1200 폭 기준(글 폭 1024)을 cqw로 옮긴 것. */
.gd-pledge-paper--og { aspect-ratio: 1200 / 630; padding: calc(100% * 40 / 1200) calc(100% * 88 / 1200) calc(100% * 52 / 1200); gap: 0; border-radius: 0; box-shadow: none; }
.gd-pledge-paper__og-text { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.gd-pledge-paper__og-head { margin: 0; font-size: 7.8125cqw; line-height: 8.59375cqw; color: var(--pen-ink); }
.gd-pledge-paper__og-sub { margin: 1.953125cqw 0 0; font-size: 4.4921875cqw; line-height: 5.2734375cqw; color: var(--pen-ink-soft); }
.gd-pledge-paper__og-foot { display: flex; align-items: center; justify-content: space-between; gap: 3.125cqw; padding-top: 2.734375cqw; border-top: max(1px, 0.1953125cqw) solid var(--paper-line); }
.gd-pledge-paper__og-logo { display: block; height: 4.296875cqw; width: auto; }
.gd-pledge-paper__og-catch { font-family: var(--font-sans); font-size: 2.734375cqw; line-height: 3.7109375cqw; letter-spacing: -0.0236em; font-weight: 700; color: var(--pen-ink); white-space: nowrap; }

/* ---------- Handwritten pledge (수기 인증) ---------- */
.gd-hw-card { display: flex; flex-direction: column; gap: var(--space-12); min-width: 0; }
.gd-hw-photo { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--radius-12); overflow: hidden; background: var(--surface); container: gd-hw / inline-size; }
.gd-hw-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gd-hw-paper { position: absolute; inset: 7% 9%; background: var(--paper); background-image: repeating-linear-gradient(180deg, transparent 0, transparent 27px, var(--paper-line) 27px, var(--paper-line) 28px); border-radius: 2px; padding: 12% 10%; transform: rotate(-1.5deg); font-family: var(--font-hand); font-size: 19px; line-height: 28px; color: var(--pen-ink); overflow: hidden; }
.gd-hw-badge { position: absolute; left: var(--space-8); top: var(--space-8); z-index: 1; background: var(--bg-base); color: var(--text-secondary); }
.gd-hw-info { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); min-width: 0; }
.gd-hw-name { font-family: var(--font-sans); font-size: 14px; line-height: 20px; letter-spacing: 0.0145em; font-weight: 600; color: var(--text-strong); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-hw-meta { font-family: var(--font-sans); font-size: 13px; line-height: 18px; letter-spacing: 0.0194em; font-weight: 500; color: var(--text-secondary); }
@container gd-hw (max-width: 220px) {
  .gd-hw-paper { font-size: 14px; line-height: 21px; padding: 10% 9%; background-image: repeating-linear-gradient(180deg, transparent 0, transparent 20px, var(--paper-line) 20px, var(--paper-line) 21px); }
}
.gd-dropzone { border: 1.5px dashed var(--line-normal); border-radius: var(--radius-16); padding: var(--space-32) var(--space-24); display: flex; flex-direction: column; align-items: center; gap: var(--space-8); text-align: center; background: var(--fill-subtle); color: var(--text-secondary); }
.gd-dropzone:hover { border-color: var(--brand); }

/* ---------- Theme · language · account (v4) ---------- */
/* Cards keep a hairline in light mode (surface-border is transparent in dark). */
.gd-card { box-shadow: inset 0 0 0 1px var(--surface-border); }
.gd-share-card, .gd-hw-paper { box-shadow: var(--shadow-paper); }
/* Logo pairs: white art on dark, navy art on light. */
.gd-logo-light { display: none !important; }
[data-theme="light"] .gd-logo-dark { display: none !important; }
[data-theme="light"] .gd-logo-light { display: block !important; }
/* CJK: Pretendard for Latin, then the platform CJK face; handwriting face per language. */
.gd-root:lang(zh) { --font-sans: "GD Pretendard", "Pretendard Variable", Pretendard, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; --font-hand: "Long Cang", "Nanum Pen Script", cursive; }
.gd-root:lang(ja) { --font-sans: "GD Pretendard", "Pretendard Variable", Pretendard, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif; --font-hand: "Klee One", "Nanum Pen Script", cursive; }
/* keep-all is a Korean rule: Chinese and Japanese must be allowed to break between characters (strict kinsoku), English breaks at spaces. Korean text quoted inside another language keeps keep-all. */
.gd-root:lang(en), .gd-root:lang(zh), .gd-root:lang(ja) { word-break: normal; }
.gd-root:lang(zh), .gd-root:lang(ja) { line-break: strict; }
.gd-root [lang="ko"] { word-break: keep-all; }

.gd-btn--ghost { background: transparent; color: var(--text-secondary); }
.gd-btn--ghost:hover { background: var(--fill-subtle); color: var(--text-primary); }
.gd-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: var(--control-md); height: var(--control-md); padding: 0; border: 0; border-radius: var(--radius-12); background: transparent; color: var(--text-secondary); cursor: pointer; flex-shrink: 0; }
.gd-iconbtn:hover { background: var(--fill-subtle); color: var(--text-primary); }

.gd-pop-wrap { position: relative; display: inline-flex; }
.gd-pop { position: absolute; top: calc(100% + var(--space-8)); right: 0; z-index: 30; min-width: 220px; padding: var(--space-8); border-radius: var(--radius-14); background: var(--surface); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; }
.gd-pop__head { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-8) var(--space-12) var(--space-12); }
.gd-pop__item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); width: 100%; min-height: 44px; padding: 0 var(--space-12); border: 0; border-radius: var(--radius-10); background: transparent; color: var(--text-primary); font-family: inherit; font-size: 15px; line-height: 22px; letter-spacing: 0.0096em; font-weight: 500; text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.gd-pop__item:hover { background: var(--fill-subtle); color: var(--text-primary); }
.gd-pop__item[aria-checked="true"] { color: var(--brand); font-weight: 600; }
.gd-pop__sep { height: 1px; background: var(--line-subtle); margin: var(--space-8) 0; }
.gd-acct { display: inline-flex; align-items: center; gap: var(--space-8); min-height: var(--control-md); padding: 0 var(--space-8) 0 var(--space-4); border: 0; border-radius: var(--radius-full); background: transparent; color: var(--text-primary); font-family: inherit; font-size: 14px; line-height: 20px; letter-spacing: 0.0145em; font-weight: 600; cursor: pointer; white-space: nowrap; }
.gd-acct:hover { background: var(--fill-subtle); }

.gd-mnav__group { display: flex; flex-direction: column; gap: var(--space-8); margin-top: var(--space-8); padding-top: var(--space-16); border-top: 1px solid var(--line-subtle); }
.gd-mnav__label { font-size: 13px; line-height: 18px; letter-spacing: 0.0194em; font-weight: 500; color: var(--text-secondary); }
.gd-chips { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.gd-chip { min-height: 40px; padding: 0 var(--space-16); border: 0; border-radius: var(--radius-full); background: transparent; box-shadow: inset 0 0 0 1px var(--line-normal); color: var(--text-secondary); font-family: inherit; font-size: 14px; line-height: 20px; letter-spacing: 0.0145em; font-weight: 500; cursor: pointer; }
.gd-chip:hover { background: var(--fill-subtle); color: var(--text-primary); }
.gd-chip[aria-pressed="true"] { background: var(--brand-subtle); box-shadow: inset 0 0 0 1px var(--brand); color: var(--text-strong); font-weight: 600; }

/* Account pages */
.gd-step-label { font-size: 13px; line-height: 18px; letter-spacing: 0.0194em; font-weight: 600; color: var(--brand); }
.gd-agree { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-16); border-radius: var(--radius-12); background: var(--fill-subtle); }
.gd-agree__all { padding-bottom: var(--space-12); border-bottom: 1px solid var(--line-subtle); color: var(--text-strong); font-weight: 600; }
.gd-agree__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); }
.gd-kv { display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); flex-wrap: wrap; padding-block: var(--space-16); border-bottom: 1px solid var(--line-subtle); }
.gd-kv__k { font-size: 14px; line-height: 20px; letter-spacing: 0.0145em; font-weight: 500; color: var(--text-secondary); min-width: 96px; }
.gd-kv__v { font-size: 15px; line-height: 22px; letter-spacing: 0.0096em; font-weight: 600; color: var(--text-primary); }
.gd-dialog { border-radius: var(--radius-16); background: var(--surface); box-shadow: var(--shadow-pop); padding: var(--space-24); display: flex; flex-direction: column; gap: var(--space-12); }
.gd-btn--danger { background: var(--negative-fill); color: var(--on-brand); }
.gd-btn--danger:hover { background: var(--negative-fill); color: var(--on-brand); filter: brightness(0.94); }
.gd-btn--danger-text { background: transparent; color: var(--negative); padding-inline: 0; min-height: auto; }
.gd-btn--danger-text:hover { color: var(--negative); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.gd-footer { background: var(--surface-sunken); border-top: 1px solid var(--line-subtle); padding-block: var(--space-48); }
.gd-footer a { color: var(--text-secondary); text-decoration: none; font-size: 14px; line-height: 20px; letter-spacing: 0.0145em; }
.gd-footer a:hover { color: var(--text-primary); }

/* ---------- Responsive (container widths = Montage breakpoints) ---------- */
@container (max-width: 991px) {
  .gd-nav, .gd-hide-md { display: none !important; }
  .gd-header__menu { display: inline-flex; }
  .gd-mnav { display: flex; }
}
@container (max-width: 767px) {
  .gd-container { padding-inline: var(--gutter-sm); }
  .gd-section { padding-block: var(--space-48); }
  .gd-h-hero { font-size: 32px; line-height: 44px; letter-spacing: -0.0253em; }
  .gd-h-page { font-size: 28px; line-height: 38px; letter-spacing: -0.0236em; }
  .gd-h-section { font-size: 24px; line-height: 32px; letter-spacing: -0.023em; }
  .gd-h-card { font-size: 20px; line-height: 28px; letter-spacing: -0.012em; }
  .gd-card { padding: var(--space-20); }
  .gd-card--lg { padding: var(--space-24); }
  .gd-section-head { margin-bottom: var(--space-24); }
  .gd-hide-sm { display: none !important; }
  .gd-btn--lg { white-space: normal; }
}
