/* ==========================================================
   ガネーシャ商会 記事本文ページ
   ========================================================== */

body.single-post { background: var(--gh-bg); }

.gh-single-page,
.gh-single-page * { box-sizing: border-box; }

.gh-single-page {
  color: var(--gh-body);
  background: var(--gh-bg);
  font-family: var(--gh-sans);
  overflow: hidden;
}

.gh-single-page a { color: inherit; text-decoration: none; }
.gh-single-page img { max-width: 100%; height: auto; }

.gh-single-page h1,
.gh-single-page h2,
.gh-single-page h3,
.gh-single-page h4,
.gh-single-page h1::before,
.gh-single-page h1::after,
.gh-single-page h2::before,
.gh-single-page h2::after,
.gh-single-page h3::before,
.gh-single-page h3::after,
.gh-single-page h4::before,
.gh-single-page h4::after {
  background: none !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Breadcrumb */
.gh-single-breadcrumb-wrap { padding-top: 28px; }
.gh-single-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #9a8d85;
  font-size: 12px;
  line-height: 1.6;
}
.gh-single-breadcrumb a:hover { color: var(--gh-pink); }
.gh-single-breadcrumb strong { font-weight: 400; color: #8c817b; }

/* Main layout */
.gh-single-main { padding: 38px 0 74px; }
.gh-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 780px) minmax(250px, 300px);
  justify-content: space-between;
  align-items: start;
  gap: 56px;
}

.gh-article { min-width: 0; }

/* Article heading */
.gh-article-header { margin-bottom: 30px; }
.gh-article-category {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #efb7cf, #dc82b3);
  color: #fff !important;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
}
.gh-article-header h1 {
  margin: 0 0 20px !important;
  padding: 0 !important;
  font-family: var(--gh-serif) !important;
  font-size: clamp(34px, 3.7vw, 50px) !important;
  font-weight: 500 !important;
  line-height: 1.55 !important;
  letter-spacing: .025em !important;
  color: var(--gh-text) !important;
}
.gh-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: #9b918a;
  font-size: 12px;
  line-height: 1.6;
}
.gh-article-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.gh-meta-icon { color: #caa69a; font-size: 11px; }
.gh-article-lead {
  margin: 22px 0 0;
  color: #625951;
  font-size: 15px;
  line-height: 2.05;
  letter-spacing: .02em;
}

.gh-article-eyecatch {
  overflow: hidden;
  margin: 0 0 28px;
  border-radius: 10px;
  background: #f8f1ec;
  box-shadow: 0 10px 30px rgba(91,70,59,.06);
}
.gh-article-eyecatch img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

/* Article body */
.gh-article-content {
  color: #554c46;
  font-size: 16px;
  line-height: 2.05;
  letter-spacing: .018em;
}
.gh-article-content > *:first-child { margin-top: 0; }
.gh-article-content p { margin: 0 0 1.55em; }
.gh-article-content a:not(.gh-button) {
  color: #b54f8e;
  text-decoration: underline;
  text-decoration-color: rgba(181,79,142,.34);
  text-underline-offset: 4px;
}
.gh-article-content a:hover { color: var(--gh-pink-deep); }

.gh-article-content h2 {
  position: relative;
  margin: 2.4em 0 .85em !important;
  padding: 0 0 12px 46px !important;
  font-family: var(--gh-serif) !important;
  font-size: 27px !important;
  font-weight: 500 !important;
  line-height: 1.65 !important;
  letter-spacing: .025em !important;
  color: var(--gh-text) !important;
  border-bottom: 1px solid #eadfd9 !important;
}
.gh-article-content h2::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: .20em !important;
  width: 34px !important;
  height: 34px !important;
  background: url("../images/ganesha-mark.png") center/contain no-repeat !important;
  opacity: .8;
}
.gh-article-content h3 {
  margin: 1.9em 0 .7em !important;
  padding: 0 0 0 14px !important;
  font-family: var(--gh-serif) !important;
  font-size: 21px !important;
  font-weight: 500 !important;
  line-height: 1.7 !important;
  color: #554943 !important;
  border-left: 2px solid rgba(213,107,179,.6) !important;
}
.gh-article-content h4 {
  margin: 1.7em 0 .6em !important;
  padding: 0 !important;
  font-family: var(--gh-serif) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.7 !important;
  color: #5a4d46 !important;
}
.gh-article-content ul,
.gh-article-content ol { margin: 1.2em 0 1.6em; padding-left: 1.7em; }
.gh-article-content li { margin-bottom: .52em; }
.gh-article-content li::marker { color: #d77db3; }
.gh-article-content blockquote {
  position: relative;
  margin: 1.8em 0;
  padding: 22px 70px 22px 58px;
  border: 1px solid #efd8de;
  border-radius: 9px;
  background: #fffaf8;
  color: #6b5f58;
}
.gh-article-content blockquote::before {
  content: "“";
  position: absolute;
  left: 20px;
  top: 5px;
  color: #efb5c9;
  font-family: Georgia, serif;
  font-size: 55px;
  line-height: 1;
}
.gh-article-content blockquote::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 15px;
  width: 38px;
  height: 38px;
  background: url("../images/ganesha-mark.png") center/contain no-repeat;
  opacity: .6;
}
.gh-article-content img { border-radius: 8px; }
.gh-article-content figure { max-width: 100%; margin: 1.8em 0; }
.gh-article-content figcaption { margin-top: 8px; color: #9c918b; font-size: 12px; text-align: center; }
.gh-article-content hr { border: 0; border-top: 1px solid #eee3de; margin: 2.4em 0; }
.gh-article-content table { width: 100%; margin: 1.8em 0; border-collapse: collapse; font-size: 14px; background: #fff; }
.gh-article-content th,
.gh-article-content td { padding: 12px 14px; border: 1px solid #eadfd9; vertical-align: top; }
.gh-article-content th { background: #fbf4f1; color: #5a4c45; }

/* TOC - common WP / theme/plugin patterns */
.gh-article-content #toc_container,
.gh-article-content .toc_container,
.gh-article-content .ez-toc-container,
.gh-article-content .outline,
.gh-article-content .contents-outline,
.gh-article-content nav.toc,
.gh-article-content .toc {
  width: 100% !important;
  max-width: none !important;
  margin: 1.8em 0 2.2em !important;
  padding: 20px 26px !important;
  border: 1px solid #eadfd9 !important;
  border-radius: 9px !important;
  background: #fffaf8 !important;
  box-shadow: none !important;
  color: #5d524b !important;
}
.gh-article-content #toc_container a,
.gh-article-content .toc_container a,
.gh-article-content .ez-toc-container a,
.gh-article-content .toc a { color: #645852 !important; text-decoration: none !important; }

/* Buttons inserted in article */
.gh-article-content .wp-block-button__link,
.gh-article-content a[class*="button"],
.gh-article-content a[class*="btn"] {
  border-radius: 999px !important;
}

/* Existing diagnosis CTA inserted inside article content */
.gh-article-content :is(.wp-block-group, .wp-block-cover, [class*="cta"], [class*="diagnosis"], [class*="shindan"]):has(a[href*="page_id=300"]) {
  text-align: center !important;
}
.gh-article-content :is(.wp-block-group, .wp-block-cover, [class*="cta"], [class*="diagnosis"], [class*="shindan"]):has(a[href*="page_id=300"]) p,
.gh-article-content :is(.wp-block-group, .wp-block-cover, [class*="cta"], [class*="diagnosis"], [class*="shindan"]):has(a[href*="page_id=300"]) h2,
.gh-article-content :is(.wp-block-group, .wp-block-cover, [class*="cta"], [class*="diagnosis"], [class*="shindan"]):has(a[href*="page_id=300"]) h3 {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
/* Fallback for custom HTML CTA wrappers that use inline background/border styling */
.gh-article-content div[style]:has(a[href*="page_id=300"]) > p {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Sidebar */
.gh-single-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 20px;
}
.gh-single-side-card {
  overflow: hidden;
  border: 1px solid var(--gh-border);
  border-radius: 10px;
  background: rgba(255,253,252,.96);
  box-shadow: var(--gh-shadow);
}
.gh-single-side-card > h2 {
  margin: 0 !important;
  padding: 16px 18px 13px !important;
  font-family: var(--gh-serif) !important;
  font-size: 19px !important;
  font-weight: 500 !important;
  color: var(--gh-text) !important;
  border-bottom: 1px solid #eee3de !important;
}
.gh-single-side-card--diagnosis {
  padding: 26px 22px 24px;
  text-align: center;
  background:
    radial-gradient(circle at 82% 15%, rgba(213,107,179,.10), transparent 30%),
    linear-gradient(145deg, #fffaf5, #fffdfc 70%);
}
.gh-single-side-card--diagnosis img { width: 82px; margin: 0 auto 10px; opacity: .82; }
.gh-single-side-kicker { margin: 0; color: #877870; font-family: var(--gh-serif); font-size: 15px; }
.gh-single-side-card--diagnosis h2 {
  margin: 4px 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
  font-family: var(--gh-serif) !important;
  font-size: 23px !important;
  font-weight: 500 !important;
  color: var(--gh-text) !important;
}
.gh-single-side-card--diagnosis > p:last-of-type { margin: 0 0 18px; font-size: 13px; line-height: 1.8; }
.gh-single-side-card--diagnosis .gh-button { width: 100%; min-height: 44px; padding: 10px 15px; font-size: 13px; }

.gh-single-recent-list { padding: 8px 14px 12px; }
.gh-single-recent {
  display: grid;
  grid-template-columns: 70px minmax(0,1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0e7e2;
}
.gh-single-recent:last-child { border-bottom: 0; }
.gh-single-recent__thumb { display: block; aspect-ratio: 1.18; overflow: hidden; border-radius: 5px; background: #fbf3ef; }
.gh-single-recent__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gh-single-recent__thumb > span { display: block; width: 100%; height: 100%; background: linear-gradient(135deg,#fff3f1,#f7e5ef); }
.gh-single-recent__body { min-width: 0; }
.gh-single-recent__body strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 0 0 5px;
  color: #574b45;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}
.gh-single-recent__body time { color: #a89c95; font-size: 10px; }

.gh-single-side-categories nav { display: block; }
.gh-single-side-categories nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 10px 17px;
  border-bottom: 1px solid #f0e7e2;
  color: #5d514b;
  font-size: 13px;
}
.gh-single-side-categories nav a:last-child { border-bottom: 0; }
.gh-single-side-categories nav a:hover,
.gh-single-side-categories nav a.is-current { background: #fff3f5; color: #b64f8d; }
.gh-single-side-categories nav b { color: #d49bb8; font-size: 17px; font-weight: 400; }

/* Bottom diagnosis */
.gh-single-diagnosis { padding: 20px 0 48px; }
.gh-single-diagnosis__panel {
  position: relative;
  overflow: hidden;
  min-height: 174px;
  display: grid;
  grid-template-columns: 155px minmax(0,1fr) auto;
  gap: 25px;
  align-items: center;
  padding: 24px 38px;
  border: 1px solid #ecd9d1;
  border-radius: 10px;
  background:
    radial-gradient(circle at 93% 20%, rgba(239,194,207,.25), transparent 29%),
    linear-gradient(100deg, #fff8f0, #fffaf8 62%, #fff2f5);
}
.gh-single-diagnosis__panel::before,
.gh-single-diagnosis__panel::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(207,164,132,.18);
  border-radius: 45% 55% 50% 50%;
  transform: rotate(35deg);
}
.gh-single-diagnosis__panel::before { left: -75px; top: -92px; }
.gh-single-diagnosis__panel::after { right: -95px; bottom: -115px; }
.gh-single-diagnosis__panel > img { position: relative; z-index: 1; width: 120px; margin: auto; opacity: .78; }
.gh-single-diagnosis__copy { position: relative; z-index: 1; text-align: center; }
.gh-single-diagnosis__copy > p { margin: 0; color: #987d70; font-family: var(--gh-serif); font-size: 14px; }
.gh-single-diagnosis__copy h2 {
  margin: 2px 0 8px !important;
  padding: 0 !important;
  font-family: var(--gh-serif) !important;
  font-size: 29px !important;
  font-weight: 500 !important;
  color: var(--gh-text) !important;
}
.gh-single-diagnosis__copy span { display: block; max-width: 560px; margin-left: auto; margin-right: auto; color: #74665f; font-size: 13px; line-height: 1.8; text-align: center; }
.gh-single-diagnosis__panel .gh-button { position: relative; z-index: 1; min-width: 180px; }

/* Sections */
.gh-single-section { padding: 34px 0 60px; }
.gh-single-section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  color: #c7a58d;
}
.gh-single-section-head img { width: 34px; opacity: .66; }
.gh-single-section-head h2 {
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--gh-serif) !important;
  font-size: 29px !important;
  font-weight: 500 !important;
  color: var(--gh-text) !important;
}
.gh-single-section-head > span { font-size: 28px; color: #d9c3b3; transform: rotate(90deg); }

.gh-single-related { padding-top: 18px; }
.gh-single-related-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.gh-single-related-card {
  display: grid;
  grid-template-columns: 125px minmax(0,1fr);
  min-height: 142px;
  overflow: hidden;
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  background: #fffdfb;
  box-shadow: 0 8px 24px rgba(91,70,59,.04);
}
.gh-single-related-card__image { display: block; min-height: 100%; overflow: hidden; background: #faf1ec; }
.gh-single-related-card__image img { width: 100%; height: 100%; object-fit: cover; }
.gh-single-related-card__image > span { display: block; width: 100%; height: 100%; background: linear-gradient(135deg,#fff3f1,#f4e7ed); }
.gh-single-related-card__body { min-width: 0; padding: 14px 13px; }
.gh-single-related-card__body p { margin: 0 0 5px; color: #d276a8; font-size: 10px; font-weight: 600; }
.gh-single-related-card__body h3 {
  margin: 0 0 8px !important;
  padding: 0 !important;
  font-family: var(--gh-serif) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.65 !important;
  color: #594c46 !important;
}
.gh-single-related-card__body time { color: #a89c95; font-size: 10px; }

.gh-single-other-cats { padding-top: 18px; padding-bottom: 70px; }
.gh-single-cat-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.gh-single-cat-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  background: #fffdfb;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.gh-single-cat-card:hover { transform: translateY(-2px); border-color: #e5cbd8; box-shadow: 0 10px 25px rgba(91,70,59,.05); }
.gh-single-cat-card img { width: 38px; opacity: .68; }
.gh-single-cat-card__dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #eadbd4;
  background: radial-gradient(circle at 35% 30%,#fff,#f7e6ee 70%);
  position: relative;
}
.gh-single-cat-card__dot::after { content: "◇"; position: absolute; inset: 0; display: grid; place-items: center; color: #cf94b5; font-size: 17px; }
.gh-single-cat-card strong { color: #5d5049; font-family: var(--gh-serif); font-size: 12px; font-weight: 500; line-height: 1.5; }
.gh-single-cat-card b { color: #d29ab7; font-size: 17px; font-weight: 400; }

.gh-article-pages { display: flex; gap: 8px; margin-top: 30px; }
.gh-article-pages a,
.gh-article-pages > span { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--gh-border); }

@media (max-width: 1000px) {
  .gh-single-layout { grid-template-columns: minmax(0,1fr) 270px; gap: 32px; }
  .gh-single-diagnosis__panel { grid-template-columns: 125px minmax(0,1fr); }
  .gh-single-diagnosis__panel .gh-button { grid-column: 2; justify-self: start; }
  .gh-single-cat-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .gh-single-breadcrumb-wrap { padding-top: 20px; }
  .gh-single-main { padding-top: 28px; padding-bottom: 54px; }
  .gh-single-layout { grid-template-columns: 1fr; gap: 48px; }
  .gh-single-sidebar { position: static; grid-template-columns: 1fr 1fr; }
  .gh-single-side-card--diagnosis { grid-row: span 1; }
  .gh-single-side-categories { grid-column: 1 / -1; }
  .gh-single-side-categories nav { display: grid; grid-template-columns: 1fr 1fr; }
  .gh-single-side-categories nav a:nth-child(odd) { border-right: 1px solid #f0e7e2; }
  .gh-single-related-card { grid-template-columns: 100px minmax(0,1fr); }
  .gh-single-related-grid { gap: 12px; }
}

@media (max-width: 640px) {
  .gh-single-breadcrumb-wrap { width: min(100% - 32px,1160px); }
  .gh-single-main .gh-shell,
  .gh-single-diagnosis .gh-shell,
  .gh-single-section .gh-shell { width: min(100% - 32px,1160px); }

  .gh-single-breadcrumb { font-size: 10px; gap: 5px; }
  .gh-article-header { margin-bottom: 22px; }
  .gh-article-category { min-height: 27px; margin-bottom: 13px; padding: 5px 13px; font-size: 10px; }
  .gh-article-header h1 { margin-bottom: 15px !important; font-size: 29px !important; line-height: 1.55 !important; }
  .gh-article-meta { gap: 6px 14px; font-size: 10px; }
  .gh-article-lead { margin-top: 16px; font-size: 14px; line-height: 1.95; }
  .gh-article-eyecatch { margin-bottom: 22px; border-radius: 7px; }
  .gh-article-content { font-size: 15px; line-height: 2; }
  .gh-article-content h2 { margin-top: 2.15em !important; padding-left: 38px !important; font-size: 22px !important; }
  .gh-article-content h2::before { top: .18em !important; width: 28px !important; height: 28px !important; }
  .gh-article-content h3 { font-size: 18px !important; }
  .gh-article-content blockquote { padding: 20px 50px 20px 45px; }
  .gh-article-content blockquote::before { left: 14px; font-size: 45px; }
  .gh-article-content blockquote::after { right: 12px; bottom: 12px; width: 30px; height: 30px; }
  .gh-article-content #toc_container,
  .gh-article-content .toc_container,
  .gh-article-content .ez-toc-container,
  .gh-article-content .outline,
  .gh-article-content .contents-outline,
  .gh-article-content nav.toc,
  .gh-article-content .toc { padding: 18px !important; }

  .gh-single-sidebar { grid-template-columns: 1fr; gap: 16px; }
  .gh-single-side-categories { grid-column: auto; }
  .gh-single-side-categories nav { grid-template-columns: 1fr; }
  .gh-single-side-categories nav a:nth-child(odd) { border-right: 0; }

  .gh-single-diagnosis { padding-top: 0; padding-bottom: 38px; }
  .gh-single-diagnosis__panel {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 26px 22px;
    text-align: center;
  }
  .gh-single-diagnosis__panel > img { width: 85px; }
  .gh-single-diagnosis__copy h2 { font-size: 25px !important; }
  .gh-single-diagnosis__copy span { font-size: 12px; }
  .gh-single-diagnosis__panel .gh-button { grid-column: auto; justify-self: center; margin-top: 7px; min-width: 190px; }

  .gh-single-section { padding: 28px 0 45px; }
  .gh-single-section-head { margin-bottom: 18px; gap: 8px; }
  .gh-single-section-head h2 { font-size: 24px !important; }
  .gh-single-section-head img { width: 29px; }

  .gh-single-related-grid { grid-template-columns: 1fr; }
  .gh-single-related-card { grid-template-columns: 112px minmax(0,1fr); min-height: 126px; }
  .gh-single-related-card__body h3 { font-size: 13px !important; }

  .gh-single-other-cats { padding-top: 10px; padding-bottom: 55px; }
  .gh-single-cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gh-single-cat-card { min-height: 68px; grid-template-columns: 34px minmax(0,1fr) auto; padding: 10px; }
  .gh-single-cat-card img { width: 31px; }
  .gh-single-cat-card__dot { width: 30px; height: 30px; }
  .gh-single-cat-card strong { font-size: 11px; }
}

@media (max-width: 380px) {
  .gh-single-cat-grid { grid-template-columns: 1fr; }
}
