/* =========================================================================
   psychiatry/paper.css
   横浜基礎研究所「精神衛生保健担当者のための ICD-11 準拠 精神医学概論」
   章本文共通スタイル
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400&family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Noto+Serif+JP:wght@300;400;500;600&display=swap');

:root {
  --sumi: #1c1a17;
  --sumi-soft: #2b2824;
  --sumi-muted: #5a544b;
  --torinoko: #f5f0e6;
  --torinoko-deep: #ebe3d3;
  --washi: #faf6ed;
  --ai: #1f3a5f;
  --enji: #6b2a2a;
  --kin: #a88c4a;
  --line: #c8bfa9;
  --line-soft: #d8d0bc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Noto Serif JP", "EB Garamond", "Yu Mincho", serif;
  font-weight: 400;
  color: var(--sumi);
  background: var(--washi);
  line-height: 1.95;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.3;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0 0.08 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; transition: color .25s ease, border-color .25s ease; }

/* ---------- Breadcrumb ---------- */
.paper-nav {
  position: relative;
  z-index: 2;
  padding: 22px 56px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-family: "EB Garamond", "Noto Serif JP", serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--sumi-muted);
}
.paper-nav a {
  border-bottom: 1px solid transparent;
}
.paper-nav a:hover { color: var(--ai); border-bottom-color: var(--ai); }
.paper-nav .sep { margin: 0 12px; color: var(--line); }

/* ---------- Masthead ---------- */
.paper-masthead {
  position: relative;
  z-index: 2;
  padding: 64px 56px 48px;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}
.paper-masthead .ch-num {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.32em;
  color: var(--kin);
  font-variant: small-caps;
  margin-bottom: 18px;
}
.paper-masthead .title-jp {
  font-family: "Noto Serif JP", serif;
  font-weight: 500;
  font-size: clamp(24px, 3.2vw, 34px);
  letter-spacing: 0.16em;
  line-height: 1.55;
  color: var(--sumi);
  margin-bottom: 18px;
}
.paper-masthead .subtitle-jp {
  font-family: "Noto Serif JP", serif;
  font-weight: 400;
  font-size: clamp(15px, 1.5vw, 17px);
  letter-spacing: 0.14em;
  color: var(--sumi-muted);
  line-height: 1.65;
  margin-bottom: 22px;
}
.paper-masthead .rule {
  width: 60px;
  height: 1px;
  background: var(--kin);
  margin: 0 auto 22px;
}
.paper-masthead .title-eu {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(15px, 1.4vw, 18px);
  letter-spacing: 0.08em;
  color: var(--sumi-muted);
  line-height: 1.55;
  margin-bottom: 18px;
}
.paper-masthead .byline {
  font-family: "EB Garamond", serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--sumi-muted);
  font-variant: small-caps;
  margin-top: 18px;
}
.paper-masthead .byline strong {
  font-family: "Noto Serif JP", serif;
  font-weight: 500;
  color: var(--sumi);
  font-variant: normal;
  margin-right: 10px;
  letter-spacing: 0.1em;
}
.paper-masthead .version-mark {
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--kin);
  font-variant: small-caps;
  margin-top: 14px;
}

/* ---------- Body ---------- */
.paper-body {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 56px 80px;
}

.paper-body p {
  font-size: 15.5px;
  line-height: 2.05;
  color: var(--sumi-soft);
  text-align: justify;
  text-justify: inter-ideograph;
  margin-bottom: 1.1em;
  text-indent: 1em;
}

.paper-body p:first-of-type,
.paper-body h1 + p,
.paper-body h2 + p,
.paper-body h3 + p,
.paper-body blockquote + p,
.paper-body .clinical-box + p {
  text-indent: 0;
}

/* Headings */
.paper-body h2.ch-intro {
  font-family: "Noto Serif JP", serif;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.22em;
  text-align: center;
  color: var(--sumi);
  margin: 56px 0 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.paper-body h1.ch-1 {
  font-family: "Noto Serif JP", serif;
  font-weight: 500;
  font-size: 21px;
  letter-spacing: 0.16em;
  color: var(--sumi);
  margin: 64px 0 24px;
  padding: 14px 0 14px 18px;
  border-left: 3px solid var(--kin);
  line-height: 1.5;
}

.paper-body h2.ch-2 {
  font-family: "Noto Serif JP", serif;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.14em;
  color: var(--sumi);
  margin: 40px 0 18px;
  line-height: 1.5;
}

/* Blockquote (CDDR / textbook citations) */
.paper-body blockquote {
  margin: 22px 0 22px 0;
  padding: 22px 26px;
  background: var(--torinoko);
  border-left: 2px solid var(--kin);
  font-size: 14.5px;
  line-height: 1.85;
}
.paper-body blockquote p {
  text-indent: 0;
  margin-bottom: 0.7em;
  text-align: left;
}
.paper-body blockquote p:last-child { margin-bottom: 0; }
.paper-body blockquote .quote-eu {
  font-family: "EB Garamond", "Noto Serif JP", serif;
  font-style: italic;
  color: var(--sumi-soft);
  font-size: 14px;
  line-height: 1.7;
}
.paper-body blockquote .quote-ja {
  font-family: "Noto Serif JP", serif;
  color: var(--sumi);
  font-size: 14.5px;
  line-height: 1.85;
}
.paper-body blockquote .quote-source {
  font-family: "EB Garamond", "Noto Serif JP", serif;
  font-style: italic;
  font-size: 12.5px;
  color: var(--sumi-muted);
  letter-spacing: 0.06em;
  text-align: right;
  margin-top: 8px;
}

/* Citation marker */
.paper-body .cite {
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 0.78em;
  vertical-align: super;
  color: var(--ai);
  letter-spacing: 0.02em;
  margin: 0 0.05em;
}

.paper-body em {
  font-family: "EB Garamond", "Noto Serif JP", serif;
  font-style: italic;
}

/* Practical / clinical note box */
.paper-body .clinical-box {
  margin: 28px 0;
  padding: 22px 26px;
  border: 1px solid var(--line);
  background: rgba(245,240,230,0.45);
  font-size: 14.5px;
  line-height: 1.95;
}
.paper-body .clinical-box .box-title {
  font-family: "Noto Serif JP", serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--enji);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.paper-body .clinical-box p {
  text-indent: 0;
  margin-bottom: 0.7em;
  font-size: 14.5px;
}
.paper-body .clinical-box p:last-child { margin-bottom: 0; }

/* Inline list within paper body */
.paper-body ul.inline-bullet {
  margin: 0.6em 0 1em 1.4em;
  padding: 0;
  list-style: square;
}
.paper-body ul.inline-bullet li {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--sumi-soft);
  margin-bottom: 0.3em;
}

/* End mark */
.end-mark {
  text-align: center;
  margin: 48px 0 20px;
  font-size: 16px;
  color: var(--kin);
  letter-spacing: 0.5em;
}

/* ---------- References ---------- */
.references {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 40px auto 0;
  padding: 56px 56px 48px;
  background: var(--torinoko);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.references .ref-head {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.32em;
  color: var(--kin);
  font-variant: small-caps;
  text-align: center;
  margin-bottom: 4px;
}
.references .ref-head-jp {
  font-family: "Noto Serif JP", serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.22em;
  color: var(--sumi);
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.references .ref-entry {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--sumi-soft);
}
.references .ref-entry:last-child { border-bottom: none; }
.references .ref-no {
  font-family: "EB Garamond", serif;
  font-style: italic;
  color: var(--ai);
  margin-right: 8px;
  font-size: 13px;
  letter-spacing: 0.05em;
}
.references .ref-citloc {
  font-family: "Noto Serif JP", serif;
  font-size: 12.5px;
  color: var(--sumi-muted);
  margin-left: 6px;
}

/* ---------- Footer ---------- */
footer.paper-foot {
  padding: 36px 56px 32px;
  background: var(--torinoko-deep);
  border-top: 1px solid var(--line);
  font-family: "EB Garamond", "Noto Serif JP", serif;
  font-size: 12.5px;
  color: var(--sumi-muted);
  letter-spacing: 0.1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
footer.paper-foot a {
  border-bottom: 1px solid transparent;
}
footer.paper-foot a:hover { color: var(--ai); border-bottom-color: var(--ai); }
footer.paper-foot .imprint {
  font-style: italic;
  font-variant: small-caps;
  letter-spacing: 0.18em;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .paper-nav { padding: 16px 24px; }
  .paper-nav .sep { margin: 0 8px; }
  .paper-masthead { padding: 48px 24px 36px; }
  .paper-body { padding: 24px 24px 56px; }
  .paper-body blockquote { padding: 18px 20px; }
  .paper-body .clinical-box { padding: 18px 20px; }
  .paper-body h1.ch-1 { padding-left: 14px; }
  .references { padding: 40px 24px; }
  footer.paper-foot { padding: 28px 24px; flex-direction: column; align-items: flex-start; }
}
