/* kiyaku.html 用: Word 出力の見た目をWeb向けに整える */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #4b5563;
  --line: #e5e7eb;
  --title: #0f172a;
  --accent: #1f3864;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Meiryo", "Yu Gothic UI", "Yu Gothic", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", sans-serif;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-text-size-adjust: 100%;
  word-break: normal;
  overflow-wrap: anywhere;
}

.WordSection1 {
  max-width: 980px;
  margin: 24px auto;
  padding: 40px 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

/* Word 由来の標準段落を基準に整える */
p.MsoNormal {
  margin: 0 0 0.95rem !important;
  font-size: 15px !important;
  line-height: 1.9 !important;
  color: var(--text) !important;
}

/* 文頭空白だけの段落が多いため高さを抑制 */
p.MsoNormal:has(> span:only-child),
p.MsoNormal:empty {
  margin-bottom: 0.35rem !important;
}

/* 先頭タイトル（利用規約） */
p.MsoNormal[align="center"] {
  margin-bottom: 1.8rem !important;
  text-align: center !important;
}

p.MsoNormal[align="center"] b,
p.MsoNormal[align="center"] strong {
  font-size: 32px !important;
  line-height: 1.25 !important;
  letter-spacing: 0.08em;
  color: var(--title) !important;
  display: inline-block;
}

/* 章見出し（■ 第◯章 ...） */
p.MsoNormal u span {
  color: var(--accent) !important;
  text-decoration-color: transparent !important;
}

/* 条見出し（第◯条...） */
p.MsoNormal b span {
  font-weight: 700 !important;
  color: #111827 !important;
}

span {
  font-family: inherit !important;
}

/* Wordの特殊span指定を無効化 */
span[lang="EN-US"] {
  font-family: inherit !important;
}

/* 空行用の段落を詰めすぎない */
p.MsoNormal br {
  line-height: 1.4;
}

a {
  color: #1d4ed8;
  text-underline-offset: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.4rem 0;
}

/* Office 独自タグの余白ノイズを抑制 */
o\:p {
  display: none;
}

@media (max-width: 900px) {
  .WordSection1 {
    margin: 12px;
    padding: 20px 16px;
    border-radius: 10px;
  }

  p.MsoNormal {
    font-size: 14px !important;
    line-height: 1.8 !important;
  }

  p.MsoNormal[align="center"] b,
  p.MsoNormal[align="center"] strong {
    font-size: 24px !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .WordSection1 {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  p.MsoNormal {
    font-size: 10.5pt !important;
    line-height: 1.7 !important;
  }
}
