/* =========================================================
   ゆげ 部品カタログ（見本帳）
   見本そのものは style.css の部品をそのまま使う。このファイルは見本帳の枠（並べ方とメモ）だけ。
   ========================================================= */

.cat-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.cat-header__inner { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.cat-header__sub { font-size: 14px; }
.cat-header nav { margin-left: auto; display: flex; gap: 24px; font-size: 14px; }
.cat-header nav a { display: inline-flex; align-items: center; min-height: 44px; }

.cat-intro { padding-block: 64px 48px; display: flex; flex-direction: column; gap: 12px; }
.cat-note { margin-top: 12px; max-width: 46em; padding-left: 16px; border-left: 1px solid var(--wood); font-size: 14px; line-height: 1.8; }
.cat-toc { margin-top: 24px; }
.cat-toc ol { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-toc a {
  display: inline-flex; align-items: center; height: 44px; padding: 0 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; text-decoration: none;
}
.cat-toc a:hover { background: var(--hover); }

.cat-sec { padding-block: 64px; border-top: 1px solid var(--line); scroll-margin-top: 0; }
.cat-sec > .sec-head { margin-bottom: 32px; }
.cat-sec h3.cat-h { font-size: 16px; font-weight: 700; line-height: 1.6; margin: 32px 0 12px; }
.cat-sec > .sec-head + h3.cat-h, .grid-2 > div > h3.cat-h:first-child, .grid-3 > div > h3.cat-h:first-child { margin-top: 0; }

/* 見本の台（紙の面）とメモ */
.stage { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.stage--milk { background: var(--bg); }
.stage--flush { padding: 0; overflow: hidden; }
.memo { margin-top: 12px; font-size: 13px; line-height: 1.6; }
.memo li { position: relative; padding-left: 16px; }
.memo li + li { margin-top: 4px; }
.memo li::before { content: ""; position: absolute; left: 0; top: .8em; width: 8px; height: 1px; background: var(--wood); }
.memo code, .cat code { font-family: var(--font-sans); font-size: .95em; padding: 0 4px; background: var(--tint-wood); border-radius: var(--radius-sm); overflow-wrap: anywhere; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .stage { padding: 20px; }
  .cat-header nav { display: none; }
  .cat-intro { padding-block: 48px 32px; }
}

/* 色 */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.swatch { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.swatch__chip { height: 72px; border-bottom: 1px solid var(--line); }
.swatch__body { padding: 12px; font-size: 13px; line-height: 1.6; }
.swatch__name { font-size: 14px; font-weight: 700; }
.swatch__hex { font-variant-numeric: tabular-nums; }

/* 文字の階梯 */
.type-row { display: grid; grid-template-columns: 12em minmax(0, 1fr); gap: 16px; align-items: baseline; padding-block: 16px; border-bottom: 1px solid var(--line); }
.type-row:first-child { border-top: 1px solid var(--line); }
.type-row__spec { font-size: 13px; line-height: 1.6; }
.type-row__sample { min-width: 0; overflow-wrap: anywhere; }
.type-display { font-family: var(--font-heading); font-weight: 700; font-size: 56px; line-height: 1.3; letter-spacing: .06em; }
@media (max-width: 640px) {
  .type-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .type-display { font-size: 36px; }
}

/* 形 */
.shape-row { display: flex; flex-wrap: wrap; gap: 24px; }
.shape { display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.6; }
.shape__box { width: 144px; height: 96px; background: var(--surface); border: 1px solid var(--line); }
.stage--milk .shape__box { background: var(--surface); }
.rules-demo { display: flex; flex-direction: column; gap: 16px; font-size: 13px; }
.rules-demo span { display: block; margin-top: 4px; }
.rule-line { height: 0; border-top: 1px solid var(--line); }
.rule-wood { height: 0; border-top: 1px solid var(--wood); }
.rule-accent { height: 0; border-top: 2px solid var(--accent); width: 96px; }
.rule-dot { height: 0; border-top: 1px dotted var(--text-2); }

/* 写真 */
.ratio-fig .ph { border-radius: var(--radius-md); }
.ratio-fig figcaption { margin-top: 8px; font-size: 13px; line-height: 1.6; }
.ratio-fig figcaption b { font-size: 14px; }
.hero--demo .hero__name { font-size: 40px; }
@media (max-width: 640px) { .hero--demo .hero__name { font-size: 32px; } }

/* 状態札の並び */
.tag-table { width: 100%; }
.tag-table th, .tag-table td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 13px; line-height: 1.6; }
.tag-table th { font-weight: 500; white-space: nowrap; }
.tag-table thead th { font-size: 13px; }
@media (max-width: 640px) {
  .tag-table thead { display: none; }
  .tag-table, .tag-table tbody, .tag-table tr { display: block; }
  .tag-table tr { padding-block: 12px; border-bottom: 1px solid var(--line); }
  .tag-table th, .tag-table td { display: block; padding: 0; border: 0; }
  .tag-table td + td { margin-top: 4px; }
}

/* 静止した見本（固定・スティッキーを外す） */
.demo-header { position: static; }
.demo-bar {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; max-width: 390px; height: 64px; padding: 8px 12px;
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow-bar);
}
.demo-bar .btn { width: 100%; padding: 0 12px; }
.demo-phone { max-width: 390px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg); }
.demo-sheet { position: static; width: 320px; max-width: 100%; opacity: 1; transform: none; border: 1px solid var(--line); border-radius: var(--radius-lg) 0 0 var(--radius-lg); }

.cat-footer { border-top: 1px solid var(--line); padding-block: 32px 48px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
