/* design.bafni.org 부품 모음 페이지의 배치만 정한다. 부품 모양(.card·.panel·.btn·.chip …)은 공용 CSS 그대로 보여 준다.
   색은 역할 변수만 참조한다(공용 디자인 규칙: 직접 색 금지). */
.gallery { max-width: 960px; margin: 0 auto; padding: 32px 16px 48px; display: grid; gap: 20px; }
.gallery-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 0 8px; }
.gallery-top h1 { margin: 0; font-size: 28px; line-height: 36px; font-weight: 800; }
.gallery-top .meta { margin: 2px 0 0; }
.gallery-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 8px; }
.gallery-sub { margin: 4px 0 0; font-size: 14px; line-height: 18px; color: var(--ink-soft); }
.gallery p { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* 색 견본: 원 + 변수 이름 + 지금 테마의 실제 값(스크립트가 채운다). */
.swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.swatches li { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 4px 8px; }
.swatch { grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.swatches .name { font-size: 13px; line-height: 17px; font-weight: 600; overflow-wrap: anywhere; }
.swatches .value { font-size: 12px; line-height: 15px; color: var(--ink-soft); overflow-wrap: anywhere; }

.radii { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.radii li { display: grid; justify-items: center; gap: 4px; font-size: 12px; line-height: 15px; color: var(--ink-soft); }
.radius-box { width: 64px; height: 48px; background: var(--panel); box-shadow: 0 0 0 1px var(--line); }

.type-scale { display: grid; gap: 8px; }
.t20 { font-size: 20px; line-height: 25px; font-weight: 700; }
.t16 { font-size: 16px; line-height: 20px; }
.t14 { font-size: 14px; line-height: 18px; }
.t13 { font-size: 13px; line-height: 17px; color: var(--ink-soft); }

/* 예시 아래 마크업: 예시 HTML을 스크립트가 글자로 옮겨 넣어 보여 준다(예시와 코드가 어긋나지 않게). */
.demo { display: grid; gap: 12px; }
.demo-code { margin: 0; padding: 12px; overflow-x: auto; border-radius: var(--radius-button); background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.demo-code code { white-space: pre; color: var(--ink-soft); }
