/* メーカーの買い物係が教える調達知識 — 共通スタイル */
:root {
  --bg: #FBF6EC;
  --paper: #FFFDF8;
  --band: #F3EBDC;
  --ink: #3B3632;
  --sub: #5A534C;
  --sub2: #6B635B;
  --link: #2F6B67;
  --link-hover: #1F4F4C;
  --line-card: #E8DDCB;
  --line-dash: #E3D6BF;
  --line-strong: #C9B48E;
  --marker: #F6DE9C;
  --mustard: #E2B13C;
  --teal: #6FA8A3;
  --pink: #F1A99A;
  --chip-law-bg: #DCEBE8; --chip-law: #2F6B67;
  --chip-practice-bg: #F6E7BE; --chip-practice: #7A5A0E;
  --chip-career-bg: #F6DDD3; --chip-career: #8A4A36;
  --font-head: 'Zen Maru Gothic', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.95;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--paper); padding: 8px 14px; border-radius: 10px; }

/* ヘッダー */
.site-header { background: var(--bg); border-bottom: 2px dashed var(--line-dash); }
.site-header .wrap { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 48px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand img { width: 44px; height: 44px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 17px; }
.brand-catch { font-size: 12px; color: var(--sub2); }
.main-nav { display: flex; flex-wrap: wrap; gap: 0 4px; font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--link); }

/* フッター */
.site-footer { background: var(--band); border-top: 2px dashed var(--line-dash); }
.site-footer .wrap { padding-top: 40px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 24px; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-name { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 17px; }
.footer-author { margin: 0; font-size: 14px; color: var(--sub); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 4px; font-size: 14px; font-weight: 500; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); }
.footer-note { margin: 0; font-size: 13px; line-height: 1.8; color: var(--sub); }
.footer-copy { margin: 0; font-size: 12px; color: var(--sub2); }

/* 共通部品 */
.chip { display: inline-block; padding: 3px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; line-height: 1.6; white-space: nowrap; }
.chip-law { background: var(--chip-law-bg); color: var(--chip-law); }
.chip-practice { background: var(--chip-practice-bg); color: var(--chip-practice); }
.chip-career { background: var(--chip-career-bg); color: var(--chip-career); }
.card { background: var(--paper); border: 1.5px solid var(--line-card); border-radius: 20px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font-family: var(--font-head); font-weight: 700; text-decoration: none; }
.btn-primary { background: var(--link); color: var(--paper); }
.btn-primary:hover { background: var(--link-hover); color: var(--paper); }
.btn-outline { border: 2px solid var(--ink); color: var(--ink); }
.btn-outline:hover { color: var(--link); border-color: var(--link); }
.circle { border-radius: 50%; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; flex-shrink: 0; line-height: 0; }
.circle.center { align-items: center; }
.bg-mustard { background: #F6E7BE; }
.bg-pink { background: #F6DDD3; }
.note-box { margin: 40px 0 0; padding: 16px 20px; border-radius: 14px; background: var(--band); font-size: 13px; line-height: 1.8; color: var(--sub); }
.note-box p { margin: 0; }
.mail-box { padding: 14px 18px; border-radius: 14px; background: var(--paper); border: 2px dashed var(--line-strong); font-weight: 700; word-break: break-all; }
.h-section { margin: 0 0 20px; font-family: var(--font-head); font-size: 26px; line-height: 1.5; }

/* トップ */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 48px; padding: 48px 0 56px; }
.hero-text { flex: 999 1 420px; min-width: 0; }
.hero-label { margin: 0 0 12px; display: inline-block; padding: 4px 14px; border-radius: 999px; background: #F6E7BE; color: #7A5A0E; font-size: 14px; font-weight: 700; }
.hero h1 { margin: 0 0 16px; font-family: var(--font-head); font-weight: 700; font-size: clamp(30px, 5vw, 46px); line-height: 1.4; letter-spacing: 0.02em; }
.hero-lead { margin: 0 0 28px; max-width: 34em; color: var(--sub); }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-chara { flex: 1 1 260px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.balloon { margin: 0; padding: 10px 18px; background: var(--paper); border: 2px solid var(--ink); border-radius: 22px 22px 22px 6px; font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.cats { padding: 8px 0 56px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cat-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; color: var(--ink); text-decoration: none; }
.cat-card:hover { color: var(--ink); border-color: var(--line-strong); }
.cat-head { display: flex; align-items: center; gap: 12px; }
.cat-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cat-card h3 { margin: 0; font-family: var(--font-head); font-size: 21px; }
.cat-card p { margin: 0; font-size: 15px; line-height: 1.8; color: var(--sub); }
.more { font-size: 15px; font-weight: 700; color: var(--link); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); text-decoration: none; }
.post-card:hover { color: var(--ink); border-color: var(--line-strong); }
.post-thumb { height: 180px; background: #F6E7BE; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; line-height: 0; }
.post-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 24px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--sub2); }
.post-card h3 { margin: 0; font-family: var(--font-head); font-size: 19px; line-height: 1.6; }
.post-card p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--sub); }
.empty { padding: 22px; border-radius: 20px; border: 2px dashed #DCCFB9; color: var(--sub2); font-size: 15px; }

/* 1カラムのページ */
.page-main { max-width: 760px; margin: 0 auto; padding: 40px 20px 88px; }
.page-main h1 { margin: 0 0 24px; font-family: var(--font-head); font-weight: 700; font-size: clamp(26px, 5vw, 34px); line-height: 1.5; }
.page-legal { font-size: 16px; }
.info-box { margin: 40px 0 0; padding: 18px 22px; border-radius: 14px; background: var(--paper); border: 1.5px solid var(--line-card); font-size: 14px; line-height: 1.9; }
.info-box p { margin: 0; }
.profile-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 32px; padding: 28px; border-radius: 24px; }
.profile-hero .who { flex: 1 1 280px; min-width: 0; }
.profile-hero .who-label { margin: 0 0 4px; font-size: 13px; color: var(--sub2); }
.profile-hero h2 { margin: 0 0 10px; font-family: var(--font-head); font-weight: 700; font-size: 24px; line-height: 1.5; }
.profile-hero p { margin: 0 0 8px; }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 32px; padding: 32px 28px; border-radius: 24px; }
.contact-card .txt { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.contact-card p { margin: 0; }
.contact-card .mail-box { background: var(--bg); font-size: 18px; }
.contact-notes { margin: 32px 0 0; padding: 20px 22px 20px 2.2em; border-radius: 16px; background: var(--band); font-size: 14px; line-height: 1.9; color: var(--sub); }

/* 記事 */
.crumbs { padding: 18px 0 6px; font-size: 13px; color: var(--sub2); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.crumbs li + li::before { content: "›"; margin: 0 8px; }
.layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px; padding-bottom: 80px; }
.layout > article, .layout > .main-col { flex: 999 1 600px; min-width: 0; max-width: 760px; }
.article-head { padding: 12px 0 24px; }
.article-head h1 { margin: 14px 0; font-family: var(--font-head); font-weight: 700; font-size: clamp(25px, 5.2vw, 34px); line-height: 1.5; }
.dates { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13px; color: var(--sub2); }
.eyecatch { margin: 0 0 32px; position: relative; height: clamp(260px, 44vw, 340px); border-radius: 24px; background: #F6E7BE; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.eyecatch .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.eyecatch .chara { position: relative; width: 190px; }
.sidebar { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding-top: 12px; }
.side-profile { padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.side-profile .name { margin: 4px 0 0; font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.side-profile p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--sub); }
.side-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 700; }
.side-cats { padding: 22px; }
.side-cats h2 { margin: 0 0 8px; font-family: var(--font-head); font-size: 17px; }
.side-cats ul { margin: 0; padding: 0; list-style: none; }
.side-cats a { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 500; }
.side-cats a:hover { color: var(--link); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.author-box { margin: 24px 0 0; padding: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.author-box .txt { flex: 1 1 260px; min-width: 0; }
.author-box .label { margin: 0; font-size: 12px; color: var(--sub2); }
.author-box .name { margin: 0 0 4px; font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.author-box .desc { margin: 0 0 6px; font-size: 14px; line-height: 1.8; }
.author-box a { font-size: 14px; font-weight: 700; }
.next-link { display: flex; flex-direction: column; gap: 4px; margin: 24px 0 0; padding: 20px 22px; border-radius: 20px; background: var(--link); color: var(--paper); text-decoration: none; }
.next-link:hover { background: var(--link-hover); color: var(--paper); }
.next-link .k { font-size: 13px; font-weight: 700; }
.next-link .t { font-family: var(--font-head); font-weight: 700; font-size: 17px; line-height: 1.6; }
.related { margin: 40px 0 0; }
.related h2 { margin: 0 0 14px; font-family: var(--font-head); font-size: 21px; line-height: 1.5; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.related-grid a { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; color: var(--ink); text-decoration: none; }
.related-grid a .t { font-family: var(--font-head); font-weight: 700; font-size: 16px; line-height: 1.6; }

/* 本文 */
.prose p { margin: 0 0 1.5em; }
.prose h2 { font-family: var(--font-head); font-weight: 700; font-size: clamp(21px, 4.2vw, 26px); line-height: 1.55; margin: 2.8em 0 1.1em; padding: 14px 20px; background: var(--band); border-radius: 16px; scroll-margin-top: 16px; }
.prose h3 { font-family: var(--font-head); font-weight: 700; font-size: clamp(18px, 3.6vw, 20px); line-height: 1.6; margin: 2.2em 0 .8em; padding-bottom: 6px; border-bottom: 2px dashed #D9C9AC; }
.prose h4 { font-family: var(--font-head); font-weight: 700; font-size: 17px; line-height: 1.6; margin: 1.8em 0 .6em; padding-left: 12px; border-left: 4px solid var(--teal); }
.prose ul, .prose ol { margin: 0 0 1.7em; padding-left: 1.5em; }
.prose li { margin: .35em 0; }
.prose strong { font-weight: 700; box-shadow: inset 0 -0.42em 0 var(--marker); }
.prose hr { border: 0; border-top: 2px dashed var(--line-dash); margin: 3em 0; }
.prose .tbl { overflow-x: auto; margin: 0 0 1.8em; border: 1.5px solid var(--line-dash); border-radius: 14px; background: var(--paper); -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 15px; line-height: 1.7; }
.prose th { background: var(--chip-law-bg); color: #234F4C; text-align: left; padding: 10px 14px; white-space: nowrap; }
.prose td { padding: 10px 14px; border-top: 1px solid #EDE3D2; vertical-align: top; }
.prose figure { margin: 0 0 2.2em; }
.prose figcaption { margin-top: 10px; font-size: 13px; line-height: 1.7; color: var(--sub2); text-align: center; }
.page-legal .prose p { margin: 0 0 1.3em; }
.page-legal .prose h2 { font-size: clamp(19px, 3.8vw, 22px); margin: 2.2em 0 .9em; padding: 10px 18px; border-radius: 14px; }
.page-profile .prose h2 { font-size: clamp(20px, 4vw, 24px); margin: 2.4em 0 1em; padding: 12px 18px; }
.toc { margin: 2.4em 0; padding: 22px 24px; border-radius: 18px; background: var(--paper); border: 2px solid var(--line-dash); }
.toc .t { margin: 0 0 8px; font-family: var(--font-head); font-weight: 700; font-size: 17px; }
.toc ol { margin: 0; padding-left: 1.4em; font-size: 15px; line-height: 1.9; }
.summary { margin: 0 0 1.8em; padding: 22px 24px 8px; border-radius: 18px; background: var(--paper); border: 2px solid var(--mustard); }
.summary ul { margin: 0 0 1em; }

/* 図 */
.fig-center { display: flex; justify-content: center; }
.fig-pair { display: flex; flex-wrap: wrap; gap: 16px; }
.fig-pair > div { flex: 1 1 260px; min-width: 0; padding: 12px 12px 16px; border-radius: 20px; background: var(--paper); border: 1.5px solid var(--line-card); }
.fig-pair img { display: block; width: 100%; }
.fig-pair .lbl { margin: 6px 0 0; text-align: center; font-size: 15px; font-weight: 700; line-height: 1.6; }
.fig-relay img { display: block; width: 100%; border-radius: 20px; background: var(--paper); }
.relay-labels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; text-align: center; font-size: 14px; line-height: 1.6; }
.relay-labels b { display: block; }
.relay-labels span { color: var(--sub2); }
.qcd { position: relative; width: 100%; max-width: 520px; aspect-ratio: 520 / 470; margin: 0 auto; border-radius: 24px; background: var(--paper); border: 1.5px solid var(--line-card); }
.qcd > svg.tri { position: absolute; inset: 0; width: 100%; height: 100%; }
.qcd .item { position: absolute; transform: translate(-50%, -30%); width: 140px; text-align: center; line-height: 1.5; }
.qcd .item svg { display: block; margin: 0 auto; }
.qcd .item b { display: block; margin-top: 4px; font-family: var(--font-head); font-size: 17px; }
.qcd .item span { display: block; font-size: 12px; color: var(--sub); white-space: nowrap; }
.qcd .center { position: absolute; left: 50%; top: 57%; transform: translate(-50%, -50%); width: 84px; height: 84px; }
.qcd .center img { width: 70px; }

/* 図：ルールの札 */
.rule { display: inline-block; margin: 0 6px 4px 0; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.7; white-space: nowrap; }
.rule-tori { background: var(--chip-law-bg); color: var(--chip-law); }
.rule-b1 { background: var(--chip-career-bg); color: var(--chip-career); }
.rule-b2 { background: var(--mustard); color: var(--ink); }
.rule-none { background: transparent; color: var(--sub2); border: 1.5px dashed var(--line-strong); text-decoration: line-through; }

/* 図：登場人物と対象範囲 */
.fig-parties .parties { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr); gap: 0 12px; padding: 22px 20px; border-radius: 24px; background: var(--paper); border: 1.5px solid var(--line-card); }
.p-col { display: flex; flex-direction: column; }
.p-node, .m-node { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--bg); border: 2px solid var(--ink); line-height: 1.5; }
.p-node svg, .m-node svg { flex-shrink: 0; }
.p-node b, .m-node b { display: block; font-family: var(--font-head); font-size: 18px; }
.p-node span:not(.circle), .m-node span:not(.circle) { display: block; font-size: 12px; color: var(--sub); }
.p-me { background: #FDF3D6; border-color: var(--mustard); }
.p-link { display: flex; gap: 12px; padding: 4px 0 4px 38px; min-height: 92px; }
.p-arrow { position: relative; flex-shrink: 0; width: 0; border-left: 3px solid var(--ink); margin: 0 0 8px; }
.p-arrow::after { content: ""; position: absolute; left: -9px; bottom: -8px; border: 7.5px solid transparent; border-top: 10px solid var(--ink); border-bottom: 0; }
.p-link-dash .p-arrow { border-left-style: dashed; }
.p-link-body { padding: 8px 0 6px 8px; font-size: 13px; line-height: 1.6; }
.p-link-body p, .p-bracket-body p { margin: 0 0 4px; }
.p-act { font-weight: 700; font-size: 14px; }
.p-note { color: var(--sub); font-size: 12px; }
.p-link-dash .p-note { color: #8A4A36; font-weight: 700; }
.p-bracket { position: relative; display: flex; align-items: center; padding: 34px 0; }
.p-bracket::before { content: ""; position: absolute; left: 0; top: 34px; bottom: 34px; width: 26px; border: 4px solid var(--mustard); border-left: 0; border-radius: 0 18px 18px 0; }
.p-bracket-body { position: relative; margin-left: 38px; padding: 12px 12px 8px; border-radius: 16px; background: #FDF3D6; font-size: 13px; line-height: 1.6; }
.p-new { display: inline-block; padding: 2px 10px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 700; }
.rule-legend { list-style: none; margin: 14px 0 0; padding: 0; font-size: 13px; line-height: 1.7; color: var(--sub); }
.rule-legend li { margin: 0 0 4px; }

/* 図：持込納入と引取り */
.fig-mh > div { padding: 16px 16px 12px; }
.mh-title { margin: 0 0 12px; font-family: var(--font-head); font-weight: 700; font-size: 18px; text-align: center; line-height: 1.4; }
.mh-title small { display: block; font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--sub2); }
.m-flow { display: flex; flex-direction: column; }
.m-node { padding: 8px 12px; }
.m-node svg { width: 44px; height: 44px; }
.m-node b { font-size: 16px; }
.m-arrow { padding: 2px 0 2px 22px; font-size: 12px; font-weight: 700; color: var(--sub); }
.m-arrow span { display: inline-block; width: 26px; font-size: 18px; color: var(--ink); }
.mh-rules { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 2px dashed var(--line-dash); font-size: 13px; line-height: 1.6; }
.mh-rules li { margin: 0 0 10px; }
.mh-rules b { display: block; margin: 2px 0 0; font-size: 14px; }
.prose .mh-rules, .prose .rule-legend { padding-left: 0; }
.prose .mh-rules li, .prose .rule-legend li { margin: 0 0 8px; }

@media (max-width: 520px) {
  .fig-parties .parties { grid-template-columns: minmax(0, 1fr) 112px; gap: 0 8px; padding: 16px 12px; }
  .p-node { gap: 8px; padding: 8px 10px; }
  .p-node svg, .p-node .circle { width: 40px !important; height: 40px !important; }
  .p-node .circle img { width: 34px; height: 34px; }
  .p-node b { font-size: 16px; }
  .p-link { padding-left: 26px; }
  .p-bracket::before { width: 14px; border-width: 3px; }
  .p-bracket-body { margin-left: 20px; padding: 10px 8px 6px; font-size: 12px; }
  .p-bracket-body .rule { white-space: normal; }
}

@media (max-width: 420px) {
  .qcd .item { width: 110px; }
  .qcd .item svg { width: 56px; height: 56px; }
  .qcd .center { width: 64px; height: 64px; }
  .qcd .center img { width: 54px; }
}
