/* MGK 共通フォーマット v1。仕様と検査手順は site-format/フォーマット規則.md。 */
body[data-mgk-format="1"] {
  --mgk-page-width: 1176px;
  --mgk-sidebar-width: 304px;
  --mgk-column-gap: 48px;
  --mgk-page-gutter: 48px;
  overflow-wrap: anywhere;
}
body[data-mgk-format="1"] img,
body[data-mgk-format="1"] video { max-width: 100%; }

/* 外側で一度だけ余白を取る。過去の余白リセットや二重paddingをここで統一。 */
html body#mgk-site[data-mgk-format="1"] #body_wrap #content.l-content {
  box-sizing: border-box;
  width: 100% !important;
  max-width: var(--mgk-page-width) !important;
  margin: 0 auto 80px !important;
  padding: 48px var(--mgk-page-gutter) 0 !important;
  align-items: start;
}
html body#mgk-site[data-mgk-format="1"] #body_wrap #content #main_content {
  min-width: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible;
}
html body#mgk-site[data-mgk-format="1"] #body_wrap #main_content > .l-mainContent__inner,
html body#mgk-site[data-mgk-format="1"] #body_wrap #main_content .post_content {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
html body#mgk-site[data-mgk-format="1"] #body_wrap #main_content > .l-mainContent__inner {
  padding-top: 0 !important;
}
html body#mgk-site[data-mgk-format="1"] #body_wrap #main_content .post_content > .wrap,
html body#mgk-site[data-mgk-format="1"] #body_wrap #main_content .post_content > section > .wrap,
html body#mgk-site[data-mgk-format="1"] #body_wrap #main_content .post_content > div > .wrap {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
html body#mgk-site[data-mgk-layout="external"] #body_wrap #content.l-content {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--mgk-sidebar-width) !important;
  gap: var(--mgk-column-gap) !important;
}
html body#mgk-site[data-mgk-layout="external"] #body_wrap #content #sidebar {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
}
html body#mgk-site[data-mgk-layout="embedded"] #body_wrap #content.l-content,
html body#mgk-site[data-mgk-layout="single"] #body_wrap #content.l-content {
  display: block !important;
}
html body#mgk-site[data-mgk-layout="embedded"] #body_wrap #content > #sidebar,
html body#mgk-site[data-mgk-layout="single"] #body_wrap #content > #sidebar { display: none !important; }
html body#mgk-site[data-mgk-format="1"] #body_wrap #main_content .wrap.columns {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--mgk-sidebar-width) !important;
  gap: var(--mgk-column-gap) !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  align-items: start;
}
html body#mgk-site[data-mgk-format="1"] #body_wrap #main_content .wrap.columns > main,
html body#mgk-site[data-mgk-format="1"] #body_wrap #main_content .wrap.columns > aside {
  min-width: 0;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

/* 記事はタイトル・日付・本文を同じ列に揃える。 */
html body#mgk-site[data-mgk-template="article"] #body_wrap #main_content .p-articleHead,
html body#mgk-site[data-mgk-template="article"] #body_wrap #main_content .p-articleMetas.-top {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
}
html body#mgk-site[data-mgk-template="article"][data-mgk-layout="embedded"] #body_wrap #main_content > .l-mainContent__inner > .p-articleHead,
html body#mgk-site[data-mgk-template="article"][data-mgk-layout="embedded"] #body_wrap #main_content > .l-mainContent__inner > .p-articleMetas.-top {
  max-width: calc(100% - var(--mgk-sidebar-width) - var(--mgk-column-gap)) !important;
}
html body#mgk-site[data-mgk-template="article"] #body_wrap #main_content .p-articleHead { margin-bottom: 16px !important; }
html body#mgk-site[data-mgk-template="article"] #body_wrap #main_content .p-articleMetas.-top { margin-bottom: 28px !important; }
html body#mgk-site[data-mgk-template="article"] #body_wrap #main_content .post_content { margin-top: 0 !important; }
html body#mgk-site[data-mgk-template="article"] #body_wrap #main_content .post_content > .wrap.columns { margin-top: 0 !important; }
html body#mgk-site[data-mgk-template="article"] #body_wrap #main_content h1,
html body#mgk-site[data-mgk-template="glossary"] #body_wrap #main_content h1,
html body#mgk-site[data-mgk-template="archive"] #body_wrap #main_content h1 {
  font-size: 32px !important;
  line-height: 1.5 !important;
  letter-spacing: .01em;
}
html body#mgk-site[data-mgk-template="article"] #body_wrap #main_content .post_content,
html body#mgk-site[data-mgk-template="article"] #body_wrap #main_content .wrap.columns > main,
html body#mgk-site[data-mgk-template="glossary"] #body_wrap #main_content .post_content {
  font-size: 16px;
  line-height: 1.85;
}
html body#mgk-site[data-mgk-template="article"] #body_wrap #main_content .post_content h2,
html body#mgk-site[data-mgk-template="glossary"] #body_wrap #main_content .post_content h2 {
  font-size: 24px !important;
  line-height: 1.55 !important;
}

/* 独立したサポート・規約文書も本文の読み幅と端の余白を共通化。 */
body[data-mgk-template="document-plain"] {
  box-sizing: border-box;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px;
  font-size: 16px;
  line-height: 1.8;
}
body[data-mgk-template="document-plain"] table { table-layout: fixed; max-width: 100%; }
body[data-mgk-template="document-plain"] th,
body[data-mgk-template="document-plain"] td { overflow-wrap: anywhere; }
body[data-mgk-template="document-plain"] h1 { font-size: 28px; line-height: 1.5; }

@media (max-width: 959px) {
  body[data-mgk-format="1"] { --mgk-page-gutter: 24px; --mgk-column-gap: 32px; }
  html body#mgk-site[data-mgk-format="1"] #body_wrap #content.l-content {
    display: block !important;
    padding: 32px var(--mgk-page-gutter) 0 !important;
    margin-bottom: 64px !important;
  }
  html body#mgk-site[data-mgk-format="1"] #body_wrap #main_content .wrap.columns {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html body#mgk-site[data-mgk-layout="external"] #body_wrap #content #sidebar {
    margin: 32px 0 0 !important;
  }
  html body#mgk-site[data-mgk-template="article"][data-mgk-layout="embedded"] #body_wrap #main_content > .l-mainContent__inner > .p-articleHead,
  html body#mgk-site[data-mgk-template="article"][data-mgk-layout="embedded"] #body_wrap #main_content > .l-mainContent__inner > .p-articleMetas.-top {
    max-width: 100% !important;
  }
  html body#mgk-site[data-mgk-template="article"] #body_wrap #main_content h1,
  html body#mgk-site[data-mgk-template="glossary"] #body_wrap #main_content h1,
  html body#mgk-site[data-mgk-template="archive"] #body_wrap #main_content h1 { font-size: 26px !important; }
  html body#mgk-site[data-mgk-template="article"] #body_wrap #main_content .post_content h2,
  html body#mgk-site[data-mgk-template="glossary"] #body_wrap #main_content .post_content h2 { font-size: 22px !important; }
  body[data-mgk-template="document-plain"] { padding: 32px 24px; }
  body[data-mgk-template="document-plain"] h1 { font-size: 24px; }
}

/* パンくずは実際のリンク文字を使い、旧CSSの疑似テキスト置換を解除。 */
html body#mgk-site[data-mgk-format="1"] #breadcrumb a.p-breadcrumb__text[href="https://mgkinc.co.jp/glossary-index/"] {
  font-size: inherit !important;
  line-height: inherit !important;
}
html body#mgk-site[data-mgk-format="1"] #breadcrumb a.p-breadcrumb__text[href="https://mgkinc.co.jp/glossary-index/"]::after {
  content: none !important;
}
/* 左の固定共有ボタンを画面内の余白に収める。狭い幅は既存の本文末共有を使う。 */
@media (min-width: 1280px) {
  html body#mgk-site[data-mgk-format="1"] #body_wrap .c-shareBtns.-fix {
    left: max(16px, calc((100vw - 1176px) / 2 - 50px)) !important;
  }
}
@media (max-width: 1279px) {
  html body#mgk-site[data-mgk-format="1"] #body_wrap .c-shareBtns.-fix { display: none !important; }
}
