:root {
  --paper: #faf9f6;
  --ink: #303a34;
  --muted: #6b7169;
  --accent: #3c5949;
  --link: #466779;
  --line: #dedfd6;
  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 20px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
a { color: var(--link); text-underline-offset: 5px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
img { max-width: 100%; height: auto; vertical-align: middle; }
button, summary { cursor: pointer; }
button { font: inherit; }
[hidden] { display: none !important; }
h1, h2 { font-weight: 600; line-height: 1.5; letter-spacing: .02em; }
h1 { font-size: clamp(26px, 3.5vw, 36px); }
h2 { margin: 32px 0 16px; font-size: 22px; }
p, dl { margin: 0 0 24px; }
dt { margin-top: 24px; font-weight: 600; }
dd { margin: 8px 0 0 20px; }
strong { font-weight: 600; }
.plain-list { margin: 0 0 24px; padding-left: 20px; list-style: none; }
.plain-list li { margin-top: 8px; }
.container { width: min(100% - 48px, 960px); margin-inline: auto; }
main { min-height: 55vh; padding-block: 48px 80px; }
main > .container:not(.home) { max-width: 880px; }
.page-header { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.page-header h1 { margin: 0; letter-spacing: .02em; }
hr { height: 0; margin: 40px 0; border: 0; border-top: 1px solid var(--line); }
.center, .top-image { text-align: center; }
.m-img { margin-block: 24px; border-radius: 4px; }
.profile-name { margin-bottom: 16px; font-size: 24px; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 10; padding: 8px 16px; background: white; }
.skip-link:focus { top: 8px; }

/* Header and navigation */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header, .site-header a, .site-header .menu-toggle, .site-header .nav-group:has([aria-current="page"]) > summary { color: var(--ink); }
.site-header .brand-subtitle { color: #59625b; }
.header-inner { width: min(100% - 48px, 1120px); min-height: 106px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { flex-shrink: 0; white-space: nowrap; display: flex; flex-direction: column; text-decoration: none; }
.brand-name { font: 600 30px/1.5 var(--font-sans); letter-spacing: .04em; }
.brand-subtitle { color: var(--muted); font-size: 16px; letter-spacing: .02em; }
#site-nav { display: flex; align-items: center; gap: 24px; font-size: 20px; }
#site-nav a { display: block; padding-block: 10px; text-decoration: none; }
#site-nav a:hover, #site-nav [aria-current="page"] { text-decoration: underline; }
.nav-group { position: relative; }
.nav-group summary { padding-block: 10px; white-space: nowrap; }
.nav-group:has([aria-current="page"]) > summary { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.nav-group summary::marker { color: var(--muted); font-size: 10px; }
.nav-dropdown { position: absolute; top: 100%; left: -20px; z-index: 5; min-width: 180px; padding: 12px 20px; background: white; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 12px 28px #303a3410; }
.menu-toggle { display: none; padding: 8px 14px; color: var(--accent); background: transparent; border: 1px solid var(--line); border-radius: 4px; font-size: 16px; }

/* Home */
.home .top-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin: 8px auto 36px; }
.top-title img { max-width: 40%; max-height: 100px; width: auto; object-fit: contain; }
.top-title img:first-child { width: 96px; max-width: 24%; }
.top-title img:nth-child(2) { max-width: calc(100% - 112px); }
.top-title img.sub-title { max-width: 100%; }
.hero-image { display: block; width: 100%; max-width: 880px; margin-inline: auto; border-radius: 4px; }
.top-desc { max-width: 780px; margin: 40px auto; text-align: center; font-size: 22px; line-height: 2; }
.home > hr { max-width: 888px; margin-inline: auto; }
.related-sites { margin: 48px auto 0; }
.related-sites h2 { margin: 0 0 28px; text-align: center; font-size: 22px; letter-spacing: .02em; }
.related-sites-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; width: min(100%, 888px); margin-inline: auto; }
.related-site { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.related-site:hover { border-color: #83917c; background: #f1f3ec; }
.related-site-image { display: flex; align-items: center; justify-content: center; height: 150px; }
.related-site-image img { width: auto; max-height: 100%; }

/* Content */
.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table td, .table th { padding: 18px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.table tbody tr:nth-child(odd) { background: #f1f2ec; }
.table th { font-weight: 600; }
.event-table { table-layout: fixed; }
.event-table th { width: 40%; }
.event-table td:nth-child(2) { width: 32%; }
.event-table td:nth-child(3) { width: 28%; }
.event-table th, .event-table td { vertical-align: top; }
.event-time { display: inline-block; white-space: nowrap; }
.well { margin-bottom: 32px; padding: 28px; background: #f0f2ec; border-radius: 4px; }
address { font-style: normal; }
.lead { font-size: 24px; }
.map { margin-block: 32px; text-align: center; }
.map iframe { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: 480px; border: 0; }
.map small { display: inline-block; margin-top: 12px; }
.newsletter-sort { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 32px; font-size: 16px; }
.newsletter-sort select { max-width: 100%; padding: 8px 36px 8px 12px; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.newsletter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; list-style: none; margin: 32px 0 0; padding: 0; }
.newsletter-grid li { min-width: 0; }
.thumbnail { height: 100%; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.thumbnail > a { display: block; text-align: center; text-decoration: none; }
.thumbnail > a:hover h2 { text-decoration: underline; text-underline-offset: 5px; }
.thumbnail img { height: 240px; width: 100%; object-fit: contain; }
.thumbnail h2 { margin: 20px 0 16px; font-size: 22px; }
.thumbnail p { margin: 0; color: var(--muted); font-size: 16px; }
.error-page { padding-block: 48px; }

/* Priest photographs */
.priest-photo { width: 100%; max-width: 460px; margin: 40px auto; }
.priest-portrait { max-width: 340px; }
.priest-photo img { display: block; width: 100%; height: auto; border-radius: 4px; }
.priest-bio p { margin-bottom: 16px; }
.priest-bio p:last-child { margin-bottom: 0; }

/* History photographs */
.history-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-block: 32px; }
.history-photo { width: 100%; max-width: 520px; margin: 32px auto; }
.history-photo img { display: block; width: 100%; height: auto; border-radius: 4px; }
.history-photo figcaption { margin-top: 12px; text-align: center; color: var(--muted); font-size: 18px; line-height: 1.7; }
.history-gallery .history-photo { max-width: none; margin: 0; }
.history-gallery img { height: 280px; object-fit: contain; }

/* Footer */
.site-footer { padding: 28px 20px; border-top: 1px solid var(--line); text-align: center; }
.footer-social { display: flex; justify-content: center; gap: 12px; }
.footer-social a { display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.copyright { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 767px) {
  .priest-photo { margin-block: 32px; }
  .history-gallery { grid-template-columns: 1fr; gap: 28px; }
  .history-gallery img { height: auto; max-height: 360px; }
  .container, .header-inner { width: calc(100% - 40px); }
  main { padding-block: 32px 56px; }
  .page-header { margin-bottom: 28px; padding-bottom: 20px; }
  .home .top-title { gap: 8px; margin-bottom: 28px; }
  .top-title img { max-height: 64px; }
  .top-desc { margin-block: 28px; text-align: left; }
  .desktop-break { display: none; }
  .related-sites-grid { grid-template-columns: 1fr; max-width: 400px; gap: 16px; }
  .related-sites { margin-top: 32px; }
  .newsletter-grid { grid-template-columns: 1fr; gap: 20px; }
  .table { font-size: 14px; }
  .table td, .table th { padding: 14px 8px; }
  .event-table .event-time { max-width: 100%; white-space: normal; }
  .well { padding: 20px; }
  dd { margin-left: 12px; }
}

@media (max-width: 979px) {
  .header-inner { min-height: 88px; flex-wrap: wrap; gap: 0 12px; padding-block: 16px; }
  .brand-name { font-size: 28px; }
  .brand-subtitle { font-size: 14px; }
  .menu-toggle { display: block; }
  #site-nav { width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-top: 16px; }
  #site-nav.collapsible { display: none; }
  #site-nav.is-open { display: flex; }
  #site-nav > a, .nav-group { border-top: 1px solid var(--line); }
  #site-nav a, .nav-group summary { padding-block: 12px; }
  .nav-dropdown { position: static; padding: 0 20px 12px; border: 0; box-shadow: none; }
}
