:root {
  --brown: #744f3d;
  --brown-dark: #5b3c2d;
  --brown-light: #8b6249;
  --gold: #d9b86c;
  --gold-light: #f0d9a8;
  --paper: #f6f3ef;
  --ink: #333;
  --content-width: 760px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.home {
  width: 100%;
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.home-title-wrap {
  padding: 26px 20px 0;
}

.home-title-box {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 20px;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--brown-light),
    var(--brown) 45%,
    var(--brown-dark)
  );
  border: 1px solid rgb(217 184 108 / 55%);
  box-shadow:
    0 6px 18px rgb(116 79 61 / 22%),
    inset 0 0 0 1px rgb(255 255 255 / 6%);
}

.home-title-box::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgb(217 184 108 / 28%);
  pointer-events: none;
}

.home-title-box h1 {
  margin: 0;
  color: var(--gold-light);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: 14px;
  text-indent: 14px;
  line-height: 1.25;
  text-shadow: 0 2px 6px rgb(0 0 0 / 35%);
}

.home-content-width {
  width: var(--content-width);
  max-width: calc(100% - 44px);
  margin-inline: auto;
}

.home-hero {
  margin-top: 22px;
}

.home-hero img {
  width: 100%;
}

.home-members-link {
  margin-top: 24px;
}

.home-members-link a {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  color: var(--gold-light);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 5px;
  text-indent: 5px;
  text-decoration: none;
  background:
    linear-gradient(
      90deg,
      rgb(217 184 108 / 12%),
      transparent 32%,
      transparent 68%,
      rgb(217 184 108 / 12%)
    ),
    linear-gradient(180deg, #7d5541, #62402f);
  border: 1px solid rgb(217 184 108 / 58%);
  box-shadow: 0 7px 20px rgb(91 60 45 / 22%);
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.home-members-link a:hover,
.home-members-link a:focus-visible {
  color: #fff3dc;
  background:
    linear-gradient(
      90deg,
      rgb(217 184 108 / 18%),
      transparent 32%,
      transparent 68%,
      rgb(217 184 108 / 18%)
    ),
    linear-gradient(180deg, #8b6249, #744f3d);
  box-shadow: 0 10px 24px rgb(91 60 45 / 30%);
  transform: translateY(-2px);
}

.home-nav {
  padding-top: 14px;
}

.home-nav-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-nav-list a {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  padding: 16px 10px;
  overflow: hidden;
  color: #f3e6d6;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 24px;
  letter-spacing: 3px;
  text-indent: 3px;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(180deg, #7d5541, #6b4835);
  border: 1px solid rgb(217 184 108 / 45%);
  box-shadow: 0 4px 12px rgb(91 60 45 / 18%);
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.home-nav-list a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: width 180ms ease;
}

.home-nav-list a:hover,
.home-nav-list a:focus-visible {
  color: #fff3dc;
  background: linear-gradient(180deg, #8b6249, #744f3d);
  box-shadow: 0 8px 18px rgb(91 60 45 / 28%);
  transform: translateY(-3px);
}

.home-nav-list a:hover::after,
.home-nav-list a:focus-visible::after {
  width: 56%;
}

.home-banner {
  margin-top: 28px;
}

.home-banner img {
  width: 100%;
  border: 1px solid rgb(217 184 108 / 28%);
  box-shadow: 0 8px 26px rgb(60 40 30 / 14%);
}

.site-footer {
  margin-top: auto;
  padding: 24px 16px;
  color: #777;
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
  background: var(--paper);
}

@media (max-width: 820px) {
  .home-title-wrap {
    padding: 16px 12px 0;
  }

  .home-title-box {
    padding: 22px 12px;
  }

  .home-title-box h1 {
    font-size: 28px;
    letter-spacing: 8px;
    text-indent: 8px;
  }

  .home-content-width {
    max-width: calc(100% - 24px);
  }

  .home-hero {
    margin-top: 14px;
  }

  .home-members-link {
    margin-top: 14px;
  }

  .home-members-link a {
    min-height: 56px;
    padding: 10px 8px;
    font-size: 18px;
    letter-spacing: 2px;
    text-indent: 2px;
  }

  .home-nav {
    padding-top: 10px;
  }

  .home-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .home-nav-list a {
    min-height: 64px;
    padding-inline: 6px;
    font-size: 17px;
    letter-spacing: 2px;
    text-indent: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-nav-list a,
  .home-nav-list a::after,
  .home-members-link a {
    transition: none;
  }
}

.site-header {
  display: flex;
  justify-content: center;
  min-height: 64px;
  background: #fff;
  border-bottom: 1px solid #eee8e2;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 1120px;
}

.site-nav a {
  display: flex;
  min-height: 64px;
  align-items: center;
  padding: 0 17px;
  color: #4d4b47;
  font-size: 16px;
  text-decoration: none;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--brown);
  background: #f8f5f0;
}

.page-title {
  margin: 0;
  padding: 38px 18px;
  color: var(--gold-light);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 8px;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--brown-light),
    var(--brown),
    var(--brown-dark)
  );
}

.article-shell {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 28px 24px 54px;
}

.article-card {
  padding: 30px 34px 40px;
  color: #4d4b47;
  font-size: 17px;
  line-height: 1.95;
  background: #fff;
}

.category-editor-image {
  display: block;
  width: min(100% - 48px, 860px);
  max-height: 440px;
  margin: 22px auto 0;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgb(93 68 54 / 14%);
}

.category-editor-image[hidden] {
  display: none;
}

.category-admin-body p {
  margin: 0 0 15px;
  text-indent: 2em;
}

.article-lead {
  margin: 0 0 30px;
  padding: 22px 26px;
  color: #393632;
  font-size: 18px;
  line-height: 1.9;
  text-indent: 0;
  background: #f8f5f0;
  border-left: 4px solid var(--brown);
  border-radius: 0 8px 8px 0;
}

.article-card h2 {
  margin: 34px 0 14px;
  padding-bottom: 10px;
  color: var(--brown);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
  border-bottom: 1px solid #e8e0d8;
}

.article-card h2:first-of-type {
  margin-top: 20px;
}

.article-card p {
  margin: 0 0 15px;
  text-indent: 2em;
}

.article-card .article-lead,
.article-card .article-note,
.article-card .article-source {
  text-indent: 0;
}

.article-card ul {
  margin: 0 0 18px;
  padding-left: 1.55em;
}

.article-card li {
  margin: 8px 0;
  padding-left: 3px;
}

.article-card strong {
  color: #5d4436;
  font-weight: 600;
}

.article-note {
  margin: 24px 0 !important;
  padding: 17px 20px;
  color: #6b573f;
  line-height: 1.85;
  background: #fdf7e9;
  border: 1px solid #f0e2c2;
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
}

.article-source {
  margin-top: 30px !important;
  color: #8c837c;
  font-size: 14px;
  text-align: right;
}

.temple-gallery {
  display: grid;
  gap: 28px;
  max-width: 720px;
  margin: 30px auto 0;
}

.temple-gallery figure {
  margin: 0;
}

.temple-gallery img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgb(93 68 54 / 16%);
}

.temple-gallery figcaption {
  margin-top: 8px;
  color: #786f68;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.member-page-shell {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 24px 58px;
}

.member-page-shell .article-lead {
  margin-bottom: 28px;
}

.member-page-shell .category-admin-body {
  margin-bottom: 24px;
}

.member-grid {
  display: grid;
  gap: 28px;
}

.member-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: stretch;
  justify-content: center;
}

.member-card {
  width: calc((100% - 44px) / 3);
  max-width: 290px;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e7ddd2;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(80 53 39 / 13%);
}

.member-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  background: #dbe3e8;
}

.member-card-copy {
  padding: 15px 14px 18px;
  text-align: center;
}

.member-card-copy span {
  display: block;
  color: var(--brown);
  font-size: 14px;
  letter-spacing: 2px;
}

.member-card-copy h2 {
  margin: 7px 0 0;
  color: #3e332d;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 3px;
}

@media (max-width: 767px) {
  .site-nav a {
    min-height: 44px;
    padding: 5px 10px;
    font-size: 14px;
  }

  .page-title {
    padding: 26px 12px;
    font-size: 26px;
    letter-spacing: 5px;
  }

  .article-shell {
    padding: 18px 12px 38px;
  }

  .article-card {
    padding: 20px 16px 28px;
    font-size: 16px;
    line-height: 1.9;
  }

  .article-lead {
    padding: 16px;
    font-size: 16px;
  }

  .article-card h2 {
    margin-top: 28px;
    font-size: 21px;
  }

  .temple-gallery {
    gap: 20px;
  }

  .member-page-shell {
    padding: 18px 12px 38px;
  }

  .member-grid {
    gap: 18px;
  }

  .member-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .member-card {
    width: min(100%, 360px);
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav a {
    transition: none;
  }
}

.query-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f3f5f6;
}

.query-hero {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
  background: #e8e3d9;
}

.query-hero img {
  width: 100%;
  height: auto;
}

.query-main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}

.query-notice {
  margin: 0 0 18px;
  padding: 11px 14px;
  color: #6b573f;
  font-size: 14px;
  line-height: 1.6;
  background: #fdf7e9;
  border-left: 4px solid var(--gold);
}

.query-card {
  padding: 30px 32px 34px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 14px rgb(30 55 66 / 13%);
}

.query-card h1 {
  margin: 0 0 12px;
  color: #273743;
  font-size: 27px;
  line-height: 1.35;
}

.query-description {
  margin: 0 0 22px;
  color: #667177;
  line-height: 1.7;
}

.query-form label {
  display: block;
  margin: 18px 0 8px;
  color: #47545c;
  font-size: 16px;
  font-weight: 600;
}

.query-form input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  color: #333;
  font-size: 16px;
  border: 1px solid #a7b0b4;
  border-radius: 8px;
  outline: none;
}

.query-form input:focus {
  border-color: #218eae;
  box-shadow: 0 0 0 3px rgb(33 142 174 / 14%);
}

.query-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 22px;
  color: #fff;
  font-size: 17px;
  border: 0;
  border-radius: 8px;
  background: #218eae;
  cursor: pointer;
}

.query-submit:hover,
.query-submit:focus-visible {
  background: #187f9d;
}

.query-message {
  min-height: 1.7em;
  margin: 18px 0 0;
  color: #a7332a;
  line-height: 1.7;
}

.query-result {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e5e9eb;
}

.query-result[hidden] {
  display: none;
}

.query-result h2 {
  margin: 0 0 20px;
  color: #293943;
  font-size: 22px;
  text-align: center;
}

.query-photo {
  width: 176px;
  max-width: 100%;
  margin: 0 auto 22px;
  overflow: hidden;
  border-radius: 6px;
}

.query-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.query-fields {
  display: grid;
  gap: 0;
  margin: 0;
}

.query-field {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 4px;
  border-bottom: 1px solid #e5e9eb;
}

.query-field dt {
  color: #526068;
  font-weight: 600;
}

.query-field dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .query-main {
    padding: 18px 12px 42px;
  }

  .query-card {
    padding: 23px 18px 28px;
  }

  .query-card h1 {
    font-size: 24px;
  }

  .query-field {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
