/* 정본한의원 건강정보 상세 전용 보강 스타일 */
body.single-post.jeongbone-site {
  --jb-detail-line: rgba(0, 82, 140, .16);
  --jb-detail-soft: rgba(234, 245, 251, .62);
}

html:has(body.single-post.jeongbone-site) {
  scroll-padding-top: 0;
}

body.single-post .jb-article-content h2 {
  scroll-margin-top: 112px;
}

body.admin-bar.single-post .jb-article-content h2 {
  scroll-margin-top: 144px;
}

body.single-post .jb-article-layout {
  grid-template-areas: "toc article cta";
}

body.single-post .jb-article-rail--toc {
  grid-area: toc;
}

body.single-post .jb-article-column {
  grid-area: article;
}

body.single-post .jb-article-rail--cta {
  grid-area: cta;
}

body.single-post .jb-article-rail--toc:empty {
  display: none;
}

body.single-post .jb-article-layout:not(:has(.jb-article-toc--desktop)) {
  width: min(100%, 1030px);
  grid-template-columns: minmax(0, 760px) 220px;
  grid-template-areas: "article cta";
  justify-content: center;
}

body.single-post .jb-post-kicker {
  margin: 0 0 10px;
  color: var(--jb-blue);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
}

body.single-post .jb-post-header .wp-block-post-date {
  margin-bottom: 17px;
  color: var(--jb-muted);
}

body.single-post .jb-post-header .wp-block-post-title {
  text-wrap: balance;
}

body.single-post .jb-article-toc--desktop {
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(0, 82, 140, .32) transparent;
  scrollbar-width: thin;
}

body.single-post .jb-article-content {
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

body.single-post .jb-article-content > p {
  margin: 0 0 1.45em;
}

body.single-post .jb-article-content > p:first-child:not(.groo-medical-disclaimer) {
  color: #454b4c;
  font-size: 1.08em;
  line-height: 1.95;
}

body.single-post .jb-article-content > p:has(> script[type="application/ld+json"]) {
  display: none;
}

body.single-post .jb-article-content .geo-answer {
  margin-block: 1.8em;
  padding: 20px 22px;
  border-left: 3px solid var(--jb-blue);
  background: var(--jb-detail-soft);
  color: #36474f;
}

body.single-post .jb-article-content :is(ul, ol) {
  margin: 1.5em 0 1.9em;
  padding-left: 1.55em;
}

body.single-post .jb-article-content :is(ul, ol) li {
  padding-left: .18em;
}

body.single-post .jb-article-content :is(ul, ol) li + li {
  margin-top: .58em;
}

body.single-post .jb-article-content ul li::marker {
  color: var(--jb-blue);
}

body.single-post .jb-article-content ol li::marker {
  color: var(--jb-blue-deep);
  font-weight: 700;
}

body.single-post .jb-article-content h4 {
  margin: 1.7em 0 .55em;
  font-family: var(--jb-sans);
  font-size: 1.08rem;
  font-weight: 700;
}

body.single-post .jb-article-content blockquote {
  margin: 2.1em 0;
  padding: 24px 26px;
  border: 0;
  border-left: 4px solid var(--jb-rose);
  background: #f5efeb;
  color: #414746;
  font-family: var(--jb-serif);
  font-size: 1.08em;
}

body.single-post .jb-article-content blockquote p:last-child {
  margin-bottom: 0;
}

body.single-post .jb-article-content :is(figure.wp-block-image, .wp-block-gallery, .wp-block-video, .wp-block-embed) {
  margin-block: clamp(32px, 5vw, 50px);
}

body.single-post .jb-article-content :is(img, video, iframe) {
  max-width: 100%;
}

body.single-post .jb-article-content figure.wp-block-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

body.single-post .jb-article-content figcaption {
  margin: 12px auto 0;
  color: var(--jb-muted);
  font-size: .78rem;
  line-height: 1.65;
  text-align: center;
}

body.single-post .jb-article-content :is(pre, code, kbd) {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

body.single-post .jb-article-content pre {
  max-width: 100%;
  margin: 2em 0;
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--jb-detail-line);
  background: #f1f3f4;
  font-size: .86rem;
  white-space: pre;
}

body.single-post .jb-article-content :not(pre) > code {
  padding: .14em .38em;
  background: #eef1f2;
  font-size: .9em;
}

body.single-post .jb-article-content hr {
  margin: 3em 0;
  border: 0;
  border-top: 1px solid var(--jb-detail-line);
}

body.single-post .jb-article-content details:not(.jb-article-toc) {
  margin: 1.8em 0;
  padding: 16px 18px;
  border: 1px solid var(--jb-detail-line);
  background: rgba(255, 255, 255, .54);
}

body.single-post .jb-article-content details:not(.jb-article-toc) > summary {
  min-height: 44px;
  color: var(--jb-blue-deep);
  cursor: pointer;
  font-weight: 700;
}

body.single-post .jb-article-content .groo-medical-disclaimer {
  margin-top: 3.2em;
  padding: 20px 22px;
  border-top: 1px solid var(--jb-detail-line);
  border-bottom: 1px solid var(--jb-detail-line);
  background: rgba(255, 255, 255, .45);
  color: var(--jb-muted);
  font-size: .82rem;
  line-height: 1.75;
}

body.single-post .jb-article-content :is(.jb-table-wrap, figure.wp-block-table).is-scrollable {
  position: relative;
  box-shadow: inset -16px 0 18px -18px rgba(0, 82, 140, .65), 0 10px 28px rgba(34, 53, 64, .07);
}

body.single-post .jb-article-content :is(.jb-table-wrap, figure.wp-block-table):focus-visible {
  outline: 3px solid var(--jb-blue);
  outline-offset: 3px;
}

body.single-post .jb-article-content table > tbody:first-child > tr:first-child > th {
  color: var(--jb-white) !important;
  background: var(--jb-blue-deep);
}

body.single-post .jb-post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(56px, 8vw, 88px);
  padding-top: 30px;
  border-top: 1px solid var(--jb-rule);
}

body.single-post .jb-post-nav .wp-block-post-navigation-link:empty {
  display: none;
}

body.single-post .jb-post-nav .post-navigation-link-next {
  text-align: right;
}

body.single-post .jb-post-nav a {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  height: 88px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--jb-blue-deep);
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.55;
  text-decoration: none;
}

body.single-post .jb-post-nav .post-navigation-link-previous a::before,
body.single-post .jb-post-nav .post-navigation-link-next a::after {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--jb-blue);
  font-size: 1.3rem;
  line-height: 1;
}

body.single-post .jb-post-nav .post-navigation-link-previous a::before {
  content: "←";
}

body.single-post .jb-post-nav .post-navigation-link-next a {
  justify-content: flex-end;
}

body.single-post .jb-post-nav .post-navigation-link-next a::after {
  content: "→";
}

body.single-post .jb-post-nav a:hover {
  color: var(--jb-blue);
}

body.single-post .jb-post-nav a:focus-visible {
  outline: 3px solid var(--jb-blue);
  outline-offset: 3px;
}

body.single-post .jb-article-content .page-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 44px 0;
  color: var(--jb-muted);
  font-size: .82rem;
}

body.single-post .jb-article-content .page-links .post-page-numbers {
  display: inline-flex;
  box-sizing: border-box;
  min-width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--jb-detail-line);
  background: var(--jb-white);
  color: var(--jb-blue-deep);
  text-decoration: none;
}

body.single-post .jb-article-content .page-links span.post-page-numbers.current {
  border-color: var(--jb-blue-deep);
  background: var(--jb-blue-deep);
  color: var(--jb-white);
}

body.single-post .jb-article-content .page-links a:focus-visible {
  outline: 3px solid var(--jb-blue);
  outline-offset: 3px;
}

@media (max-width: 1260px) {
  body.single-post .jb-article-main {
    padding-inline: 24px;
  }

  body.single-post .jb-article-layout,
  body.single-post .jb-article-layout:not(:has(.jb-article-toc--desktop)) {
    width: min(100%, 760px);
    max-width: 760px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "article";
  }

  body.single-post .jb-article-rail--toc,
  body.single-post .jb-article-rail--cta {
    display: none;
  }

  body.single-post .jb-article-toc--mobile {
    display: block;
    margin: 0 0 38px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--jb-detail-line);
    border-left: 3px solid var(--jb-blue);
    border-radius: 0 12px 12px 0;
    background: var(--jb-detail-soft);
  }

  body.single-post .jb-article-toc--mobile summary {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    color: var(--jb-blue-deep);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
  }

  body.single-post .jb-article-toc--mobile summary::-webkit-details-marker {
    display: none;
  }

  body.single-post .jb-article-toc--mobile summary::after {
    flex: 0 0 auto;
    content: "+";
    color: var(--jb-blue);
    font-size: 1.3rem;
    font-weight: 400;
  }

  body.single-post .jb-article-toc--mobile[open] summary::after {
    content: "−";
  }

  body.single-post .jb-article-toc--mobile summary small {
    margin-left: auto;
    color: var(--jb-muted);
    font-size: .72rem;
    font-weight: 500;
  }

  body.single-post .jb-article-toc--mobile summary:focus-visible {
    outline: 3px solid var(--jb-blue);
    outline-offset: -3px;
  }

  body.single-post .jb-article-toc--mobile nav {
    max-height: min(52vh, 440px);
    overflow-y: auto;
    padding: 4px 15px 17px;
    border-top: 1px solid var(--jb-detail-line);
  }

  body.single-post .jb-article-toc--mobile ol {
    margin-top: 10px;
  }
}

@media (max-width: 640px) {
  body.single-post .jb-post-header .wp-block-post-title {
    font-size: clamp(1.9rem, 8.4vw, 2.55rem);
    line-height: 1.3;
    text-wrap: pretty;
  }

  body.single-post .jb-article-content {
    font-size: 1rem;
    line-height: 1.86;
  }

  body.single-post .jb-article-content .geo-answer,
  body.single-post .jb-article-content blockquote,
  body.single-post .jb-article-content .groo-medical-disclaimer {
    padding: 18px 16px;
  }

  body.single-post .jb-post-nav {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  body.single-post .jb-post-nav .post-navigation-link-next {
    text-align: left;
  }

  body.single-post .jb-post-nav .post-navigation-link-next a {
    justify-content: flex-start;
  }

  body.single-post .jb-post-nav a {
    height: 104px;
    min-height: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.single-post .jb-article-toc a,
  body.single-post .jb-post-nav a {
    transition: none;
  }
}
