/* The new post page (2026-10-07 proposal): the black header and footer stay, the article reads in one light column.
   Used only on pages with the feature "article" (src/layouts/PostArticle.astro). Colours keep 4.5:1 or more against
   their background; gold is only a small accent, never the only colour of text people read. */
body.article-layout {
  --article-bg: #f6f4ef;
  --article-ink: #1d1d1d;
  --article-muted: #555049;     /* 7.0:1 on --article-bg */
  --article-line: #d9d4ca;
  --article-accent: #a8853a;    /* small marks only */
  --article-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --article-sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}

/* Header: a low black band (logo, language switch, menu button). The top page keeps its vertical menu. */
body.article-layout .navbar { height: 64px; background: #111; }
body.article-layout .navbar::after { display: none; }
body.article-layout .navbar-container { height: 64px; align-items: center; }
/* Proposal 2026-10-09: the logo stays in the flow at every width and is centred in the band with the language
   switch and the menu button (the theme makes it position: absolute at 26px from the top below 769px, and top: 0
   above then put it against the top edge). */
body.article-layout header .logo { position: relative; top: 0; left: 16px; }
body.article-layout .logo a { flex-direction: row; align-items: center; gap: 10px; }
body.article-layout .logo img { width: auto; height: 34px; min-width: 0; max-width: none; }
body.article-layout .logo .since { display: none; }
body.article-layout .navbar .menu { display: none; }
body.article-layout.navbar-hidden .navbar, html.navbar-hidden body.article-layout .navbar { top: 0; }
body.article-layout .menu-toggle {
  opacity: 1; visibility: visible; pointer-events: auto; display: flex;
  top: 0; right: 0; width: 64px; height: 64px; padding: 20px 14px; background: #111; z-index: 101000;
}
.article-lang { position: absolute; right: 72px; top: 0; height: 64px; display: flex; align-items: center; font-family: var(--article-sans); }
.article-lang a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding: 0 10px; color: #c9c9c9; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-decoration: none; }
.article-lang a[aria-current] { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
/* No English version (proposal 2026-10-09): "EN" only, lighter than JP and struck through, not a link; screen readers
   hear that there is no English version (.article-lang-sr). */
.article-lang-none { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding: 0 10px; color: #808080; font-size: 14px; font-weight: 700; letter-spacing: .08em; cursor: default; text-decoration: line-through; text-decoration-thickness: 1px; }
.article-lang-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The light page */
body.article-layout #content.article-page {
  background: var(--article-bg); color: var(--article-ink);
  padding: 104px 16px 64px; margin: 0; width: 100%; max-width: none; overflow-wrap: anywhere;
}
.article { max-width: 1000px; margin: 0 auto; }
.article-head, .article-body > *, .article-guidance, .article-related, .article-pager, .article-breadcrumbs { max-width: 700px; margin-left: auto; margin-right: auto; }

/* Back link, category, title, date, themes */
.article-back { margin: 0 0 20px; font-family: var(--article-sans); font-size: 15px; }
.article-back a, .article-cats a { color: var(--article-ink); text-decoration: underline; text-underline-offset: 4px; display: inline-flex; align-items: center; min-height: 44px; }
.article-cats { margin: 0; font-family: var(--article-sans); font-size: 14px; letter-spacing: .06em; display: flex; flex-wrap: wrap; gap: 0 16px; }
.article-cats a::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; background: var(--article-accent); border-radius: 50%; }
.article-title {
  font-family: var(--article-serif); font-weight: 700; color: var(--article-ink);
  font-size: clamp(26px, 1.25rem + 2.2vw, 40px); line-height: 1.45; letter-spacing: .02em;
  margin: 8px 0 16px; writing-mode: horizontal-tb; white-space: normal; overflow: visible; text-overflow: clip;
}
.article-date { margin: 0 0 12px; font-family: var(--article-sans); font-size: 14px; color: var(--article-muted); letter-spacing: .04em; }
.article-themes { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.article-themes a {
  display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border: 1px solid #8f877a; border-radius: 999px;
  font-family: var(--article-sans); font-size: 13px; color: var(--article-ink); text-decoration: none; background: #fff;
}
.article-themes a:hover, .article-themes a:focus-visible { border-color: var(--article-ink); text-decoration: underline; }
.article-themes li { position: relative; }
.article-themes li a::after { content: ""; position: absolute; inset: -6px 0; }   /* 44px to touch */

/* Main photo: a little wider than the text */
.article-hero { margin: 32px auto 40px; max-width: 1000px; }
.article-hero img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: #ebe7df; }

/* Body: one centred column */
.article-body { font-family: var(--article-serif); font-size: 17px; line-height: 1.9; letter-spacing: .03em; color: var(--article-ink); }
@media (min-width: 768px) { .article-body { font-size: 18px; line-height: 1.95; } }
.article-body p { margin: 0 auto 1.4em; max-width: 700px; color: inherit; }
.article-body h2, .article-body h3, .article-body h4 { font-family: var(--article-serif); color: var(--article-ink); line-height: 1.5; letter-spacing: .03em; }
.article-body h2 { font-size: 1.35em; margin: 2.4em auto 1em; }
/* The body's headings with text (h2.article-heading, marked when the page is put together): a grey line above, and
   on its left end a gold line drawn as the reader scrolls (--line-draw 0 -> 1, set by the page's script; without the
   script or with reduced motion it stays drawn). The lines sit in the space above the text, never over it. */
.article-body h2.article-heading { padding-top: .9em; border-top: 1px solid var(--article-line); position: relative; }
.article-body h2.article-heading::before { content: ""; position: absolute; top: -1px; left: 0; width: 150px; max-width: 40%; height: 1px; background: var(--article-accent); transform: scaleX(var(--line-draw, 1)); transform-origin: left center; }
/* The theme puts a line before every h2 of a page (scripts.js .line-container): not on these pages. */
body.article-layout .line-container { display: none !important; }
.article-body h3 { font-size: 1.15em; margin: 2em auto .8em; }
.article-body h4 { font-size: 1em; margin: 1.6em auto .6em; }
.article-body ul, .article-body ol { margin: 0 auto 1.4em; padding-left: 1.4em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin: .3em 0; color: inherit; list-style: inherit; }
.article-body li::marker { color: var(--article-muted); }
.article-body a { color: #1d3f6e; text-decoration: underline; text-underline-offset: 3px; }   /* 9:1 */
.article-body strong { font-weight: 700; }
.article-body img { max-width: 100%; height: auto; }
/* Pictures in the body (2026-10-09): one rule for one picture, a row of pictures and an embedded picture. Every
   block is as wide as the text column at most and sits in its middle; a picture is centred in its block and never
   wider than itself; a row of pictures is centred (a row of three with one or two pictures does not lean left). */
.article-body > figure, .article-body > .wp-block-image, .article-body > .mz-gallery, .article-body > .wp-block-gallery,
.article-body > .wp-block-embed, .article-body > .wp-block-media-text, .article-body > .wp-block-columns, .article-body > .wp-block-video {
  max-width: 700px; margin: 2em auto;
}
.article-body figure, .article-body .wp-block-image { float: none; text-align: center; }
.article-body figure > img, .article-body .wp-block-image img, .article-body > p > img, .article-body > div > img { display: block; float: none; margin-left: auto; margin-right: auto; max-width: 100%; height: auto; }
.article-body .mz-gallery { justify-content: center; }
.article-body figcaption { font-family: var(--article-sans); font-size: 14px; color: var(--article-muted); margin-top: 8px; line-height: 1.6; }
.article-body iframe { max-width: 100%; }
.article-body .wp-block-embed__wrapper { position: relative; }
.article-body table { max-width: 100%; display: block; overflow-x: auto; }
.article-body .wp-block-buttons { margin: 1.6em auto; }
.article-body .wp-block-button__link { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px; border: 1px solid var(--article-ink); color: var(--article-ink); background: transparent; text-decoration: none; font-family: var(--article-sans); font-size: 15px; }

/* After the article: guidance, related posts, back and previous / next */
.article-guidance { margin-top: 56px; padding: 28px 0; border-top: 1px solid var(--article-ink); border-bottom: 1px solid var(--article-line); }
.article-guidance h2 { font-family: var(--article-serif); font-size: 18px; margin: 0 0 8px; color: var(--article-ink); }
.article-guidance p { font-family: var(--article-sans); font-size: 15px; line-height: 1.8; margin: 0 0 8px; color: var(--article-ink); }
.article-guidance ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 24px; font-family: var(--article-sans); font-size: 15px; }
.article-guidance a { color: var(--article-ink); text-decoration: underline; text-underline-offset: 4px; display: inline-flex; align-items: center; min-height: 44px; }
.article-guidance-request { margin: 8px 0 0; }
/* Address, hours, closed days, telephone (2026-10-08); the theme's "dl dt / dl dd" table styles are undone. */
.article-guidance-info { margin: 16px 0 8px; padding: 0; font-family: var(--article-sans); font-size: 15px; line-height: 1.8; color: var(--article-ink); }
.article-guidance-info div { display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: 16px; padding: 4px 0; }
.article-guidance-info dt { color: var(--article-muted); margin: 0; width: auto; padding: 0; border: 0; display: block; line-height: inherit; }
.article-guidance-info dd { margin: 0; width: auto; padding: 0; border: 0; line-height: inherit; }
.article-guidance-info a { min-height: 0; }
.article-en .article-guidance-info div { grid-template-columns: 5.5em minmax(0, 1fr); }
/* No second line when the guidance is the last part before the breadcrumbs (they have their own line). */
.article-guidance:last-child { border-bottom: 0; padding-bottom: 0; }
.article-related { margin-top: 48px; }
.article-related h2 { font-family: var(--article-serif); font-size: 18px; margin: 0 0 12px; color: var(--article-ink); }
.article-related ul { list-style: none; margin: 0; padding: 0; }
.article-related li { border-top: 1px solid var(--article-line); }
.article-related li:last-child { border-bottom: 1px solid var(--article-line); }
.article-related a { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; color: var(--article-ink); text-decoration: none; }
.article-related img { flex: 0 0 120px; width: 120px; height: 80px; object-fit: cover; }
.article-related-text { display: flex; flex-direction: column; gap: 6px; }
.article-related-title { font-family: var(--article-serif); font-size: 16px; line-height: 1.6; }
.article-related a:hover .article-related-title, .article-related a:focus-visible .article-related-title { text-decoration: underline; }
.article-related time { font-family: var(--article-sans); font-size: 13px; color: var(--article-muted); }
.article-pager { margin-top: 40px; font-family: var(--article-sans); }
.article-pager ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.article-pager li a { display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 12px 0; color: var(--article-ink); text-decoration: none; }
.article-pager .article-next { grid-column: 2; text-align: right; }
.article-pager-label { font-size: 13px; color: var(--article-muted); }
.article-pager-title { font-family: var(--article-serif); font-size: 15px; line-height: 1.6; text-decoration: underline; text-underline-offset: 3px; }
body.article-layout #breadcrumbs.article-breadcrumbs {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0 8px; max-width: 700px; margin: 32px auto 0; padding: 24px 0 0;
  position: static; width: auto; background: none; font-family: var(--article-sans); font-size: 13px; color: var(--article-muted);
  border-top: 1px solid var(--article-line);
}
/* Every item centred in its 44px row at 13px (2026-10-08): the theme's "#breadcrumbs li { line-height: 1; font-size: .8em }"
   made the items smaller and left the last one, without a link, at the top of the row. */
body.article-layout #breadcrumbs.article-breadcrumbs li { margin: 0; padding: 0; color: var(--article-muted); display: inline-flex; align-items: center; min-height: 44px; font-size: inherit; line-height: 1.5; }
body.article-layout #breadcrumbs.article-breadcrumbs li::before, body.article-layout #breadcrumbs.article-breadcrumbs li::after { content: none; }
body.article-layout #breadcrumbs.article-breadcrumbs a { color: var(--article-ink); text-decoration: underline; display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 600px) {
  body.article-layout #content.article-page { padding-top: 88px; }
  .article-related img { flex-basis: 96px; width: 96px; height: 64px; }
  .article-pager ul { grid-template-columns: 1fr; }
  .article-pager .article-next { grid-column: 1; text-align: left; }
  .article-lang { right: 64px; }
}

/* English: Latin text is set a little larger and less loose */
.article-en .article-body { font-size: 18px; line-height: 1.75; letter-spacing: 0; }
.article-en .article-title { letter-spacing: 0; line-height: 1.3; }

/* Fixed pages in this form (src/layouts/PageArticle.astro, 2026-10-08): a lead under the title. */
.article-lead { font-family: var(--article-serif); font-size: 18px; line-height: 1.8; margin: 0 0 8px; color: var(--article-ink); }

/* The main photo (proposal 2026-10-08): a fixed frame, cut at --hero-position (eyecatch.position in the post data).
   16:9 on PC (at most 1000 x 562px), 3:2 on phones. Tall photos: plan A the same frame (default position a little
   above the middle, where faces usually are); plan B (html.hero-tall-fit, ?tall=b) kept tall, centred. */
.article-hero img { width: 100%; height: auto; max-height: none; aspect-ratio: 16 / 9; object-fit: cover; object-position: var(--hero-position, 50% 50%); background: none; }
.article-hero--tall img { object-position: var(--hero-position, 50% 35%); }
html.hero-tall-fit .article-hero--tall img { width: auto; max-width: 100%; height: auto; max-height: 560px; aspect-ratio: auto; object-fit: contain; margin: 0 auto; }
@media (max-width: 600px) {
  .article-hero img { aspect-ratio: 3 / 2; }
  html.hero-tall-fit .article-hero--tall img { max-height: 440px; aspect-ratio: auto; }
}

/* The Japanese lists お知らせ (2026-10-10 proposal 3), in the post page's form: the category filter, then the posts. */
.records { max-width: 700px; margin: 0 auto; }
.records-head { margin: 8px 0 28px; }
.records-tabs { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 16px; border-bottom: 1px solid var(--article-line); font-family: var(--article-sans); font-size: 15px; }
.records-tabs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--article-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.records-tabs a[aria-current] { color: var(--article-ink); border-bottom-color: var(--article-ink); }
.records-list { list-style: none; margin: 0; padding: 0; }
.records-list li { border-bottom: 1px solid var(--article-line); }
.record { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; padding: 16px 0; color: var(--article-ink); text-decoration: none; }
.record img, .record-noimage { display: block; width: 180px; height: 120px; object-fit: cover; background: #ebe7df; }
.record-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.record-title { font-family: var(--article-serif); font-size: 17px; line-height: 1.6; }
.record:hover .record-title { text-decoration: underline; text-underline-offset: 3px; }
.record-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--article-sans); font-size: 14px; line-height: 1.6; color: var(--article-muted); }
.record-labels { display: flex; flex-wrap: wrap; gap: 6px; }
.record-labels span { font-family: var(--article-sans); font-size: 12px; line-height: 1.5; padding: 2px 10px; border: 1px solid #8f877a; border-radius: 999px; color: var(--article-ink); }
@media (max-width: 600px) {
  .record { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
  .record img, .record-noimage { width: 120px; height: 80px; }
  .record-title { font-size: 16px; }
}
