/* 和訳 HTML 共通スタイル — 追加する各 HTML から同じパスで読み込む */

:root {
  --color-bg: #faf9f6;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #5c5c5c;
  --color-accent: #6b4f2a;
  --color-border: #e2ddd4;
  --font-serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro",
    "MS PMincho", "MS Mincho", serif;
  --font-sans: "Yu Gothic", "YuGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Meiryo", sans-serif;
  --measure: 42rem;
  --space-section: 2.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.9;
  letter-spacing: 0.02em;
  color: var(--color-text);
  background: var(--color-bg);
  background-image: linear-gradient(180deg, #f5f2eb 0%, var(--color-bg) 12rem);
}

.document {
  max-width: calc(var(--measure) + 4rem);
  margin: 0 auto;
  padding: 2.25rem 1.5rem 4rem;
}

.doc-header {
  margin-bottom: var(--space-section);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.doc-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  line-height: 1.45;
}

.doc-meta {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.doc-meta .filename {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.9em;
  word-break: break-all;
}

.prose {
  background: var(--color-surface);
  padding: 1.75rem 1.5rem 2.5rem;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.prose p {
  margin: 0 0 1.15em;
  text-align: justify;
  text-justify: inter-character;
  word-break: break-word;
  overflow-wrap: break-word;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* 見出し的な短行（ナビ記号・括弧のみなど）はやや控えめに */
.prose p:empty {
  display: none;
}

@media (max-width: 520px) {
  body {
    font-size: 1rem;
    line-height: 1.88;
  }

  .document {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .prose {
    padding: 1.25rem 1rem 2rem;
  }
}

@media print {
  body {
    background: #fff;
    font-size: 11pt;
    line-height: 1.75;
  }

  .document {
    max-width: none;
    padding: 0;
  }

  .prose {
    border: none;
    box-shadow: none;
    padding: 0;
  }
}
