/*
Theme Name: 神奈川矯正歯科医会
Theme URI:
Author: APR Laboratory
Description: 日本臨床矯正歯科医会 神奈川支部 カスタムクラシックテーマ
Version: 1.0.0
Text Domain: kanagawa-ortho
*/

/* ============================================
   header_nav01 テキストナビ（4項目）
   /css/styles.css でスプライト廃止・テキスト表示に統一済み。
   nav01=市民セミナー / nav02=TOPICS / nav03=症例紹介 / nav-book=出版物
   ============================================ */

/* ============================================
   コンテンツ幅調整
   /css/styles.css: #content{570px} / #nav{310px} / #nav ul,li{290px} を上書き
   WordPress ブログ側: #wrapper 900px 内
     #content 680px + gap 20px + #nav 200px = 900px（はみ出しなし）
   main_bg.jpg は right 配置で幅変更により位置ズレするため除去
   ============================================ */
#main {
  background-image: none;
}
#content {
  width: 680px;
  float: left;
  margin-right: 20px;
}
#nav {
  width: 200px;
  float: right;
}
#nav ul {
  width: auto;
  margin: 0;
}
#nav li {
  width: auto;
}

/* ============================================
   サイドバーなしレイアウト（ブログTOPで使用）
   ============================================ */
#main.no-sidebar {
  background-image: none;
}
#main.no-sidebar #content {
  width: 100%;
  float: none;
  margin-right: 0;
}

/* ============================================
   body 背景画像
   styles.css は body_bg02.jpg を使用しているが、ブログ側は専用画像を使用
   ============================================ */
body {
  background: url(/images/body_bg02_blog.jpg) top repeat-x;
}

/* ============================================
   #main 見出し テキスト化
   既存CSS: #main h2 { height:120px; text-indent:-9999px; }
           #main h3 { height:40px;  text-indent:-9999px; }
           #main h4 { height:20px;  text-indent:-9999px; }
   上記は body id="xxx" 付きページの画像スプライト前提設計。
   WordPress ページには body id がないため画像は表示されないが
   text-indent:-9999px でテキストが不可視になるため上書きが必要。
   ============================================ */
#main h2 {
  height: auto;
  text-indent: 0;
  background-image: none;
  background-color: #028eaf;
  color: #fff;
  font-size: 16px;
  font-weight: normal;
  letter-spacing: 0.08em;
  padding: 10px 15px;
  margin: 0;
}
#main h2#title01 {
  font-size: 24px;
  padding: 14px 22px;
  line-height: 1.35;
}
#main h3 {
  height: auto;
  text-indent: 0;
  background-image: none;
  font-size: 13px;
  font-weight: bold;
  color: #028eaf;
  border-bottom: 1px solid #028eaf;
  padding: 3px 0 3px 8px;
  margin: 1em 0 0.5em;
  clear: both;
}
#main h4 {
  height: auto;
  text-indent: 0;
  background-image: none;
  font-size: 13px;
  font-weight: bold;
  color: #444;
  border-left: 3px solid #028eaf;
  padding: 2px 0 2px 8px;
  margin: 0.8em 0 0.4em;
}

/* ============================================
   記事本文（TOPICS 詳細 entry-content）
   #main h2/h3/h4 の上書きをブロックエディター内に継承させないための打ち消し
   ============================================ */
.entry-content {
  line-height: 1.7;
  color: #666;
  margin-top: 1em;
}
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  height: auto;
  text-indent: 0;
  background-image: none;
  background-color: transparent;
  color: #028eaf;
  font-weight: bold;
  letter-spacing: 0;
  padding: 3px 0 3px 8px;
  border-bottom: 1px solid #028eaf;
  border-left: none;
  margin: 1em 0 0.5em;
  clear: both;
}
.entry-content h2 { font-size: 15px; }
#main .entry-content h2,
#main .entry-content h3,
#main .entry-content h4,
#main .entry-content h5,
#main .entry-content h6 {
  margin: 1.4em 0 0.9em;
}
#main .entry-content h3 {
  height: auto;
  text-indent: 0;
  background: none;
  background-image: none;
  background-color: transparent;
  color: #028eaf;
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 0;
  padding: 3px 0 3px 8px;
  border-bottom: 1px solid #028eaf;
  border-left: none;
  clear: both;
}
#main .entry-content h4 {
  height: auto;
  text-indent: 0;
  background: none;
  background-image: none;
  font-size: 13px;
  font-weight: bold;
  color: #444;
  border-bottom: none;
  border-left: 3px solid #028eaf;
  padding: 2px 0 2px 8px;
  clear: none;
}
#main .entry-content h5 {
  height: auto;
  text-indent: 0;
  background: none;
  background-image: none;
  font-size: 12px;
  font-weight: bold;
  color: #444;
  border: none;
  border-left: 3px solid #ccc;
  padding: 2px 0 2px 8px;
  clear: none;
}
#main .entry-content h6 {
  height: auto;
  text-indent: 0;
  background: none;
  background-image: none;
  font-size: 12px;
  font-weight: bold;
  color: #666;
  border: none;
  padding: 0;
  clear: none;
}
.entry-content p  { margin: 0.6em 0; }
/* ul / ol 左位置を揃える（#content ul li より詳細度を上げる） */
#main .entry-content ul,
#main .entry-content ol {
  margin: 0.6em 0;
  padding: 0;
  list-style: none;
}
#main .entry-content ul li {
  list-style: none;
  background: url(/images/li_bg.jpg) 0 0.45em no-repeat;
  padding-left: 14px;
}
#main .entry-content ol {
  counter-reset: entry-ol;
}
#main .entry-content ol li {
  list-style: none;
  counter-increment: entry-ol;
  position: relative;
  padding-left: 14px;
}
#main .entry-content ol li::before {
  content: counter(entry-ol) ".";
  position: absolute;
  left: 0;
  width: 14px;
  color: #666;
}
.entry-content img { max-width: 100%; height: auto; }
.entry-content a   { text-decoration: underline; color: #028eaf; }
.entry-content a:hover { color: #de91a2; }
/* #content table の margin-left:20px を上書き（100%幅+左余白で横スクロールになるため） */
#main .entry-content table {
  border-collapse: collapse;
  border: 1px solid #999;
  font-size: 100%;
  color: #666;
  margin: 0.5em 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
#main .entry-content table th,
#main .entry-content table td {
  padding: 4px 6px;
  border: 1px solid #999;
  word-break: break-word;
}
#main .entry-content table th {
  background: #DEFCF8;
  color: #007F73;
}
#main .entry-content blockquote {
  margin: 0.6em 0;
  padding: 0.6em 1em;
  border-left: 4px solid #028eaf;
  background: #f4f8f9;
  color: #666;
}

/* TOPICS 本文：写真横並び（折り返し・コンテナ内に収める） */
#main .entry-content .nl-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1.4em 0 0.9em;
  max-width: 100%;
}
#main .entry-content .nl-photos img {
  flex: 1 1 140px;
  min-width: 0;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
#main .entry-content .nl-photos img:only-child {
  flex: 0 1 auto;
}

/* ============================================
   TOPICS 一覧 (category-topics.php)
   ============================================ */
.topics-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* 静的 styles.css #content ul li の li_bg.jpg をブログ一覧では不使用 */
#content .topics-list li,
#content .case-list li,
#content .blog-top-case-list li {
  background: none;
  padding-left: 0;
}
.topics-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #ddd;
  align-items: stretch;
}
.topics-item-thumb {
  flex: 0 0 200px;
  max-width: 200px;
}
.topics-item-thumb-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #f0f0f0;
  border: 1px solid #ddd;
}
.topics-item-thumb-link img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}
.topics-item-thumb-link-none {
  min-height: 133px;
}
.topics-item-thumb-none {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 133px;
  font-size: 0.75em;
  color: #bbb;
  background: #f5f5f5;
}
.topics-item-cat {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.3;
  color: #fff;
  background: #028eaf;
  letter-spacing: 0.02em;
}
.topics-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topics-item-date {
  color: #888;
  font-size: 12px;
  margin: 0 0 6px;
}
/* 一覧タイトル: #main h3 の詳細度を上書き（Blog 内のみ） */
#main .topics-item-title {
  height: auto;
  text-indent: 0;
  background: none;
  background-image: none;
  border-bottom: none;
  color: #333;
  font-size: 15px;
  font-weight: bold;
  padding: 0;
  margin: 0 0 8px;
  clear: none;
  line-height: 1.5;
  text-align: left;
}
#main .topics-item-title a {
  text-decoration: underline;
  color: #333;
}
#main .topics-item-title a:hover {
  color: #028eaf;
}
.topics-item-excerpt {
  color: #666;
  font-size: 13px;
  margin: 0 0 12px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.topics-item-excerpt .meta-label {
  font-weight: bold;
  margin-right: 3px;
}
#content p.topics-item-footer {
  margin: auto 0 0;
  padding: 0;
  text-align: right;
}
#content a.topics-item-more,
#content a.topics-item-more:link,
#content a.topics-item-more:visited,
#content a.topics-item-more:hover,
#content a.topics-item-more:focus {
  display: inline-block;
  padding: 5px 14px;
  font-size: 12px;
  line-height: 1.4;
  color: #555;
  text-decoration: none;
  border: 1px solid #bbb;
  background: #fff;
}
#content a.topics-item-more:hover,
#content a.topics-item-more:focus {
  color: #028eaf;
  border-color: #028eaf;
  background: #f8fcfd;
}

/* -------------------------------------------
   TOPICS 一覧：カード型グリッド (.nl-card-grid)
   ------------------------------------------- */
.nl-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  align-content: start;
}
.nl-card-grid .nl-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  gap: 0;
  border-bottom: none;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nl-card-grid .nl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.nl-card__media {
  flex: 0 0 auto;
}
.nl-card__media-link {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  /* aspect-ratio 非対応ブラウザ向けフォールバック */
  min-height: 140px;
  overflow: hidden;
  background: #eef1f4;
}
.nl-card__media-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: top;
}
.nl-card__media-link--none {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}
.nl-card__media-placeholder {
  font-size: 12px;
  color: #bbb;
  letter-spacing: 0.05em;
}
.nl-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 16px 18px;
  background: #fff;
}
.nl-card__label {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 10px;
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: #fff;
  background: #028eaf;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
/* カテゴリごとのバッジ色（スラッグで拡張可能） */
.nl-card__label--topics {
  background: #1e5f8a;
}
.nl-card__label--test {
  background: #028eaf;
}
.nl-card__label--uncategorized {
  background: #7a8a94;
}
.nl-card__label--case {
  background: #5a7a6a;
}
.case-archive-filter-label {
  margin: 0 0 20px;
  color: #444;
  font-size: 14px;
  line-height: 1.6;
}
.case-archive-list .nl-card__excerpt .meta-label {
  color: #888;
}
.nl-card__date {
  display: block;
  margin: 0 0 8px;
  color: #888;
  font-size: 12px;
  line-height: 1.4;
}
#main .nl-card-grid .nl-card__title {
  height: auto;
  text-indent: 0;
  background: none;
  background-image: none;
  border-bottom: none;
  color: #222;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.5;
  margin: 0 0 10px;
  padding: 0;
  clear: none;
  text-align: left;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
#main .nl-card-grid .nl-card__title a {
  color: #222;
  text-decoration: none;
}
#main .nl-card-grid .nl-card__title a:hover {
  color: #028eaf;
}
.nl-card__excerpt {
  flex-grow: 1;
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.nl-card__footer {
  flex: 0 0 auto;
  margin-top: 14px;
  padding-top: 0;
  text-align: center;
}
#content a.nl-card__more,
#content a.nl-card__more:link,
#content a.nl-card__more:visited {
  display: inline-block;
  padding: 8px 22px;
  font-size: 12px;
  line-height: 1.4;
  color: #444;
  text-decoration: none;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
#content a.nl-card__more:hover,
#content a.nl-card__more:focus {
  color: #028eaf;
  border-color: #028eaf;
  background: #f8fcfd;
}

@media screen and (max-width: 959px) {
  .nl-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media screen and (max-width: 600px) {
  .nl-card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .nl-card-grid .nl-card {
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.13);
  }
  .nl-card__body {
    padding: 12px 14px 16px;
  }
}

/* NEWS LETTER ARCHIVE バナー */
.nl-archive-section {
  margin-top: 2.5em;
  padding-top: 1.5em;
  border-top: 1px solid #dce8ec;
}
.nl-archive-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding: 1.2em 1.4em;
  background: #f4f8f9;
  border-left: 4px solid #028eaf;
}
.nl-archive-banner__title {
  margin: 0 0 0.25em;
  font-size: 15px;
  font-weight: bold;
  color: #028eaf;
  letter-spacing: 0.04em;
}
.nl-archive-banner__desc {
  margin: 0;
  font-size: 12px;
  color: #666;
}
.nl-archive-banner__btn {
  flex-shrink: 0;
  display: inline-block;
  padding: 0.55em 1.2em;
  font-size: 13px;
  color: #fff;
  background: #028eaf;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.nl-archive-banner__btn:hover {
  background: #016f88;
  color: #fff;
  text-decoration: none;
}
.nl-pdf-archive-intro {
  margin: 0 0 1em;
  color: #666;
  font-size: 13px;
  line-height: 1.7;
}
.nl-pdf-archive-list {
  margin: 0 10px;
  padding: 0;
}
.nl-pdf-archive-list dt {
  background: url(/images/li_bg.jpg) 0 9px no-repeat;
  padding-left: 10px;
  float: left;
  clear: left;
  font-weight: normal;
  width: 8em;
  color: #007F73;
  font-size: 13px;
  margin: 0;
}
.nl-pdf-archive-list dd {
  margin: 0 0 0.6em 8.5em;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
}
.nl-pdf-archive-list dd a {
  color: #028eaf;
  text-decoration: underline;
}
.nl-pdf-archive-list dd a:hover {
  color: #de91a2;
}
.nl-pdf-archive-link {
  margin-top: 1.5em;
  padding-top: 1em;
  border-top: 1px solid #ece8e2;
}
.nl-pdf-archive-link__title {
  margin: 0 0 0.4em;
  font-size: 14px;
  font-weight: bold;
  color: #444;
}
.nl-pdf-archive-link a {
  color: #028eaf;
  text-decoration: none;
}
.nl-pdf-archive-link a:hover {
  color: #de91a2;
  text-decoration: underline;
}

/* ============================================
   TOPICS 詳細 (single.php)
   ============================================ */
#main.nl-single {
  background: #f7f4ef;
  padding-bottom: 28px;
}
#main.nl-single.nl-archive-list > h2#title01 {
  margin: 16px 0 0;
  padding: 14px 22px 14px 24px;
  font-size: 24px;
  box-sizing: border-box;
}
.nl-single-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  margin: 0;
  padding: 40px 24px;
  background-color: #4a6275;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}
.nl-single-hero--no-image {
  background-image: linear-gradient(135deg, #4a6275 0%, #6f8798 100%);
}
.nl-single-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
}
.nl-single-hero__title {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  line-height: 1.45;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.nl-single-body {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0 0 24px;
  box-sizing: border-box;
}
#main.nl-single .nl-single-main {
  flex: 1 1 auto;
  width: auto;
  float: none;
  margin: 0;
  min-width: 0;
  padding: 0;
}
#main.nl-single #nav {
  flex: 0 0 200px;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  float: none;
  padding: 0;
  margin: 0;
}
.nl-single-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 20px 24px 24px;
  margin: 0;
}
.nl-single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ece8e2;
  color: #777;
  font-size: 13px;
  line-height: 1.5;
}
.nl-single-meta__date {
  color: #777;
}
.nl-single-meta__author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nl-single-meta__author-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d9dde2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v1.2h19.2v-1.2c0-3.2-6.4-4.8-9.6-4.8z'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}
.nl-single-meta__author-name {
  color: #555;
}
.nl-single-meta__cat {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: #fff;
  background: #028eaf;
  border-radius: 999px;
}
.nl-single-meta__cat--topics {
  background: #1e5f8a;
}
.nl-single-meta__cat--test {
  background: #028eaf;
}
.nl-single-meta__cat--uncategorized {
  background: #7a8a94;
}
#main.nl-single .nl-single-card__title {
  height: auto;
  text-indent: 0;
  background: none;
  background-image: none;
  border-bottom: none;
  color: #222;
  font-size: 22px;
  font-weight: bold;
  line-height: 1.45;
  margin: 0 0 18px;
  padding: 0;
  clear: none;
  text-align: left;
}
.nl-single-card__content {
  margin-top: 0;
}
.nl-single-card__nav {
  margin-top: 1.5em;
}
.nl-single-card__back {
  margin: 1em 0 0;
}

/* サイドバー：左カードと同トーン */
#main.nl-single #nav {
  padding: 0;
  background: transparent;
  border-top: none;
}
#main.nl-single #nav .nav-widget {
  margin-bottom: 0;
}
#main.nl-single #nav ul.nav-cat-list {
  margin: 0;
  padding: 0;
  width: auto;
}
#main.nl-single #nav .nav-cat-list li {
  width: auto;
}
#main.nl-single #nav .nav-widget-categories {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 20px 24px 24px;
}
#main.nl-single #nav .nav-widget-title {
  color: #222;
  font-size: 15px;
  font-weight: bold;
  margin: 0 0 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid #ece8e2;
}
#main.nl-single #nav .nav-cat-list > li > a,
#main.nl-single #nav .nav-cat-list .children a {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #444;
  text-align: left;
  text-decoration: none;
  background: #faf8f5;
  border-bottom: none;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}
#main.nl-single #nav .nav-cat-list .children a {
  padding-left: 28px;
}
#main.nl-single #nav .nav-cat-list > li > a::before,
#main.nl-single #nav .nav-cat-list .children a::before {
  content: '>';
  margin-right: 8px;
  color: #aaa;
  font-size: 11px;
}
#main.nl-single #nav .nav-cat-list > li > a:hover,
#main.nl-single #nav .nav-cat-list .children a:hover {
  color: #028eaf;
  background: #f3efe8;
}
#main.nl-single #nav .nav-cat-list .current-cat > a,
#main.nl-single #nav .nav-cat-list .current-cat-parent > a {
  color: #222;
  font-weight: bold;
  background: #f7f4ef;
}
#main.nl-single #nav .nav-cat-list .children {
  margin: 0;
  padding: 0;
  width: 100%;
}
#main.nl-single #nav .nav-cat-list .children li {
  width: 100%;
  margin: 0;
  padding: 0;
}
#main.nl-single #nav .nav-cat-list .children li:last-child a {
  margin-bottom: 0;
}

.post-date {
  color: #007F73;
  font-size: 0.85em;
  margin: 0 0 0.8em;
}
.post-category {
  font-size: 0.85em;
  color: #666;
  margin: 0 0 0.3em;
}
.post-thumbnail {
  margin-bottom: 1em;
}
.post-thumbnail img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid #ccc;
}
.topics-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 2em 0 1.5em;
  padding: 16px 0 0;
  border-top: none;
  border-bottom: none;
  font-size: 14px;
  line-height: 1.4;
}
.topics-nav-prev,
.topics-nav-next {
  flex: 1 1 0;
  max-width: none;
}
.topics-nav-prev {
  text-align: left;
}
.topics-nav-next {
  text-align: right;
  margin-left: 0;
}
.topics-nav-back {
  flex: 0 0 auto;
  text-align: center;
}
.topics-nav-back a {
  display: inline-block;
  padding: 8px 28px;
  border: 1px solid #222;
  color: #222;
  text-decoration: none;
  background: #fff;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.topics-nav-prev a,
.topics-nav-next a {
  color: #222;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.topics-nav-prev a:hover,
.topics-nav-next a:hover,
.topics-nav-back a:hover {
  opacity: 0.65;
  color: #222;
  text-decoration: none;
}
.topics-nav-disabled {
  color: #ccc;
  white-space: nowrap;
  user-select: none;
}

/* ============================================
   症例紹介 一覧 (archive-case.php / taxonomy-case_category.php)
   ============================================ */
.case-filter {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin-bottom: 1.4em;
  padding: 0.8em 1em;
  background: #f4f8f9;
  border-left: 4px solid #028eaf;
}
.case-filter__label {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: bold;
  color: #028eaf;
}
.case-filter__select {
  flex: 1;
  max-width: 240px;
  padding: 0.4em 0.6em;
  font-size: 13px;
  border: 1px solid #b0cfd7;
  background: #fff;
  cursor: pointer;
  outline-color: #028eaf;
}
.case-filter__empty {
  padding: 1em;
  color: #666;
  font-size: 13px;
  text-align: center;
}
.case-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.case-list-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #ddd;
  align-items: stretch;
}
.case-list-item-thumb {
  flex: 0 0 200px;
  max-width: 200px;
}
.case-list-item-thumb-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #f0f0f0;
  border: 1px solid #ddd;
}
.case-list-item-thumb-link img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}
.case-list-item-thumb-link-none {
  min-height: 133px;
}
.case-list-item-thumb-none {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 133px;
  font-size: 0.75em;
  color: #bbb;
  background: #f5f5f5;
}
.case-list-item-cat {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.3;
  color: #fff;
  background: #028eaf;
  letter-spacing: 0.02em;
}

/* 主訴別アーカイブ */
.case-category-title {
  font-size: 14px;
  color: #444;
  margin: 0 0 6px;
}
.case-category-back {
  margin-bottom: 1em;
  font-size: 0.9em;
}
.case-category-back a {
  color: #028eaf;
  text-decoration: none;
}
.case-category-back a:hover {
  text-decoration: underline;
}

/* ============================================
   症例紹介 詳細 (single-case.php)
   ============================================ */
.case-single .nl-single-meta__cat--case {
  background: #5a7a6a;
}
.nl-single-card__content.case-single-content {
  color: #333;
  font-size: 14px;
  line-height: 1.8;
}
.case-detail-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  border: 1px solid #d8d8d8;
  margin: 0;
  margin-left: 0;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 1.8;
  color: #333;
}
/* 共通 styles.css の #content table { margin-left:20px } を無効化 */
#content .case-detail-table,
#main #content .case-detail-table {
  margin: 0;
  margin-left: 0;
}
.case-detail-table th,
.case-detail-table td {
  border-bottom: 1px solid #d8d8d8;
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}
.case-detail-table tr:last-child th,
.case-detail-table tr:last-child td {
  border-bottom: none;
}
.case-detail-table th {
  width: 28%;
  min-width: 120px;
  background: #1a4d72;
  color: #fff;
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
}
.case-detail-table td {
  background: #fff;
}
.case-detail-table td p {
  margin: 0 0 1em;
}
.case-detail-table td p:last-child {
  margin-bottom: 0;
}
.case-detail-photos {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 24px;
}
/* 写真①② Before/After 比較スライダー */
.case-compare {
  width: 100%;
  margin: 0;
}
.case-compare .wrap-compare {
  width: 100%;
}
.case-compare-slider,
.case-compare .twentytwenty-container {
  width: 100%;
  max-width: 100%;
}
.case-compare .twentytwenty-container img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}
.case-compare .twentytwenty-before-label,
.case-compare .twentytwenty-after-label {
  opacity: 1;
}
.case-compare .twentytwenty-container.active .twentytwenty-before-label,
.case-compare .twentytwenty-container.active .twentytwenty-after-label {
  opacity: 1;
}
.case-compare .twentytwenty-before-label:before,
.case-compare .twentytwenty-after-label:before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: #008D80 !important;
  color: #fff !important;
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 1.2;
  padding: 10px;
  border-radius: 2px;
  height: auto;
  width: auto;
}
.case-compare .twentytwenty-horizontal .twentytwenty-before-label:before,
.case-compare .twentytwenty-horizontal .twentytwenty-after-label:before {
  top: 10px;
  margin-top: 0;
}
.case-compare .twentytwenty-horizontal .twentytwenty-before-label:before {
  left: 10px;
}
.case-compare .twentytwenty-horizontal .twentytwenty-after-label:before {
  right: 10px;
}
.case-detail-photos-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.case-detail-photos-row--2 .case-detail-photo {
  flex: 1 1 calc(50% - 6px);
  max-width: calc(50% - 6px);
}
.case-detail-photos-row--3 .case-detail-photo {
  flex: 1 1 calc(33.333% - 8px);
  max-width: calc(33.333% - 8px);
}
.case-detail-photo {
  margin: 0;
  overflow: hidden;
  background: #eef1f4;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.case-detail-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: none;
  border-radius: 0;
  vertical-align: top;
}
.case-thumbnail {
  margin-bottom: 1em;
}
.case-thumbnail img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid #ccc;
}

/* 症例メタ情報テーブル（既存サイトの #content table スタイルに準拠） */
.case-meta-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #999;
  font-size: 100%;
  color: #666;
  margin: 0.8em 0;
}
.case-meta-table th,
.case-meta-table td {
  padding: 4px 8px;
  border: 1px solid #999;
  text-align: left;
  vertical-align: top;
}
.case-meta-table th {
  background: #DEFCF8;
  color: #007F73;
  width: 30%;
  white-space: nowrap;
  font-weight: bold;
}

/* 術前術後写真グリッド（2+3+3） */
.case-photos {
  margin: 1em 0;
}
.case-photos-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.case-photos-row img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid #ccc;
}
.case-photos-row-2 img  { width: calc(50% - 3px); }
.case-photos-row-3 img  { width: calc(33.333% - 4px); }


/* ============================================
   ブログ TOP (index.php)
   既存 index.html の #index #content dl スタイルを参考に再現
   ============================================ */
.blog-top-section {
  margin-bottom: 2em;
}
#blog-top-nl-list {
  margin: 0 10px;
  padding: 0;
}
#blog-top-nl-list dt {
  list-style: none;
  background: url(/images/li_bg.jpg) 0 9px no-repeat;
  padding-left: 10px;
  float: left;
  clear: left;
  font-weight: normal;
  width: 8em;
  color: #007F73;
  font-size: 13px;
}
#blog-top-nl-list dd {
  margin-left: 8.5em;
  font-size: 13px;
  padding: 2px 0;
}
#blog-top-nl-list dd a {
  text-decoration: underline;
  color: #028eaf;
}
#blog-top-nl-list dd a:hover {
  color: #de91a2;
}
.blog-top-case-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.blog-top-case-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
  align-items: flex-start;
}
.blog-top-case-thumb {
  flex: 0 0 80px;
}
.blog-top-case-thumb img {
  width: 80px;
  height: auto;
  display: block;
  border: 1px solid #ccc;
}
.blog-top-case-thumb-none {
  width: 80px;
  height: 55px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  color: #aaa;
}
.blog-top-case-body {
  flex: 1;
}
.blog-top-case-title {
  font-size: 13px;
  font-weight: bold;
  margin: 0 0 3px;
}
.blog-top-case-title a {
  text-decoration: none;
  color: #028eaf;
}
.blog-top-case-title a:hover {
  text-decoration: underline;
}
.blog-top-more {
  clear: both;
  text-align: right;
  margin-top: 8px;
  font-size: 0.9em;
}
.blog-top-more a {
  color: #028eaf;
  text-decoration: none;
}
.blog-top-more a:hover {
  text-decoration: underline;
}

/* ============================================
   共通
   ============================================ */
.back-link {
  margin-top: 1.5em;
}
.back-link a {
  color: #028eaf;
  text-decoration: none;
}
.back-link a:hover {
  text-decoration: underline;
}

.pagination {
  clear: both;
  text-align: center;
  margin: 1.5em 0;
}
.pagination a,
.pagination span {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #ccc;
  margin: 0 2px;
  text-decoration: none;
  color: #028eaf;
  font-size: 0.9em;
}
.pagination .current {
  background: #028eaf;
  color: #fff;
  border-color: #028eaf;
}
.pagination a:hover {
  background: #f0f0f0;
}

/* 404 */
.not-found-message {
  padding: 1em 0;
}
.not-found-message p {
  margin-bottom: 0.8em;
}

/* ============================================
   ブログ用サイドバー (#nav)
   ============================================ */
.nav-widget {
  margin-bottom: 1.5em;
}

/* カテゴリー一覧（参考: グレーブロック + 黄緑アクセント） */
.nav-widget-categories .nav-widget-title {
  color: #333;
  font-size: 14px;
  font-weight: bold;
  border-bottom: none;
  padding: 0;
  margin: 0 0 10px;
  clear: none;
  text-align: left;
}
.nav-widget-categories .nav-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}
.nav-widget-categories .nav-cat-list li {
  margin: 0;
  padding: 0;
  width: auto;
  list-style: none;
  border: none;
  background: transparent;
}
.nav-widget-categories .nav-cat-list > li > a,
.nav-widget-categories .nav-cat-list .children a {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 10px 11px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  text-align: left;
  text-decoration: none;
  background: #f4f6f8;
  border-bottom: 1px solid #fff;
}
.nav-widget-categories .nav-cat-list .children a {
  padding-left: 28px;
}
.nav-widget-categories .nav-cat-list > li > a::before,
.nav-widget-categories .nav-cat-list .children a::before {
  content: '>';
  margin-right: 8px;
  color: #666;
  font-size: 12px;
}
.nav-widget-categories .nav-cat-list > li > a:hover,
.nav-widget-categories .nav-cat-list .children a:hover {
  color: #028eaf;
  text-decoration: none;
  background: #eef1f4;
}
.nav-widget-categories .nav-cat-list .current-cat > a,
.nav-widget-categories .nav-cat-list .current-cat-parent > a {
  font-weight: bold;
}
.nav-widget-categories .nav-cat-list .children {
  margin: 0;
  padding: 0;
  width: 100%;
  list-style: none;
}
.nav-widget-categories .nav-cat-list > li > a {
  margin-bottom: 0;
}
.nav-widget-categories .nav-cat-list .children li {
  margin: 0;
  padding: 0;
  width: 100%;
}

.nav-post-list,
.nav-archive-list,
.nav-case-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-post-list li,
.nav-archive-list li,
.nav-case-cat-list li {
  border-bottom: 1px dotted #ddd;
  padding: 4px 0 4px 6px;
  font-size: 12px;
  line-height: 1.5;
}
.nav-post-list a,
.nav-archive-list a,
.nav-case-cat-list a {
  color: #028eaf;
  text-decoration: none;
}
.nav-post-list a:hover,
.nav-archive-list a:hover,
.nav-case-cat-list a:hover {
  color: #de91a2;
  text-decoration: underline;
}
.nav-post-date {
  display: block;
  color: #007F73;
  font-size: 0.9em;
}
.nav-case-count {
  color: #999;
  font-size: 0.9em;
  margin-left: 3px;
}
.nav-more {
  text-align: right;
  margin: 4px 0 0;
  font-size: 12px;
}
.nav-more a {
  color: #028eaf;
  text-decoration: none;
}
.nav-more a:hover {
  text-decoration: underline;
  color: #de91a2;
}

/* ============================================
   ヘッダー：769px 以上は静的サイトと同じ PC 仕様を維持
   （styles.css の #wrapper 900px / #header 91px をテーマ側で上書きしない）
   ============================================ */
@media screen and (min-width: 769px) {
  body #wrapper {
    width: 900px;
    margin: 1px auto;
    overflow: visible;
  }
  body #header {
    width: 900px;
    height: 91px;
    background: url(/images/header_bg.jpg) 0 0 no-repeat;
  }
  body #header_nav02 {
    width: 900px;
  }
  body #header_nav02 ul {
    display: block;
    width: 900px;
  }
  body #header .section,
  body ul#header_nav01 {
    display: block;
  }
}

/* ============================================
   WordPress 管理バー補正
   ============================================ */
@media screen {
  html.admin-bar #header {
    margin-top: 0;
  }
}

/* ============================================
   レスポンシブ対応
   PC固定900pxの既存サイトに対して最低限の崩れ防止を追加
   ============================================ */
@media screen and (max-width: 959px) {
  body {
    background-color: #f0f4f5;
  }
  /* ヘッダーは 768px ブレイクポイントまで styles.css の PC 仕様を維持（769px 以上は上記 min-width ルール） */
  #content {
    width: 100%;
    float: none;
    margin-right: 0;
    padding: 1em 16px;
    box-sizing: border-box;
  }
  #nav {
    width: 100%;
    float: none;
    padding: 0.5em 16px 1.5em;
    box-sizing: border-box;
    border-top: 1px solid #e0e0e0;
    margin-top: 1em;
  }
  #main {
    background-image: none;
    background-color: #f0f4f5;
  }
  #main h2 {
    font-size: 14px;
    padding: 8px 10px;
  }
  #main h2#title01 {
    font-size: 20px;
    padding: 12px 16px;
  }
  #footer .section {
    width: 100%;
    padding: 7px 10px;
    box-sizing: border-box;
  }
  /* 画像の横はみ出し防止 */
  #content img,
  .entry-content img,
  .case-photos img {
    max-width: 100%;
    height: auto;
  }
  /* カードメディア画像は object-fit: cover を維持 */
  .nl-card__media-link img {
    height: 100%;
    max-width: 100%;
  }
  /* TOPICS 詳細・一覧 */
  .nl-single-body {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }
  #main.nl-single .nl-single-main,
  #main.nl-single #nav {
    flex: none;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  #main.nl-single.nl-archive-list > h2#title01 {
    margin: 0;
    padding: 14px 16px;
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: 0.06em;
    color: #fff;
    background-color: #028eaf;
    background-image: none;
    height: auto;
    border-bottom: none;
    box-sizing: border-box;
  }
  #main.nl-single #nav {
    margin-top: 1em;
    border-top: none;
    padding: 0 10px;
    box-sizing: border-box;
  }
  .nl-single-hero {
    min-height: 220px;
    padding: 28px 16px;
  }
  .nl-single-hero__title {
    font-size: 26px;
    line-height: 1.4;
  }
  .nl-single-card {
    padding: 18px 16px 22px;
  }
  #main.nl-single .nl-single-card__title {
    font-size: 18px;
  }
  /* NEWS LETTER ARCHIVE バナー: SP で縦積み */
  .nl-archive-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8em;
  }
  .nl-archive-banner__btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  /* 症例絞り込み: SP で縦積み */
  .case-filter {
    flex-wrap: wrap;
    gap: 0.5em;
  }
  .case-filter__select {
    max-width: 100%;
    width: 100%;
  }
}

@media screen and (max-width: 600px) {
  .nl-single-hero {
    min-height: 180px;
    padding: 24px 12px;
  }
  .nl-single-hero__title {
    font-size: 26px;
    line-height: 1.4;
  }
  .nl-single-meta {
    gap: 8px 12px;
    font-size: 12px;
  }
  /* TOPICS 一覧（旧横並び・nl-card-grid 以外） */
  .topics-list:not(.nl-card-grid) .topics-item {
    flex-direction: column;
    gap: 8px;
  }
  .topics-list:not(.nl-card-grid) .topics-item-thumb {
    flex: none;
  }
  /* 症例紹介 一覧: 縦積み */
  .case-list-item {
    flex-direction: column;
    gap: 8px;
  }
  .case-list-item-thumb {
    flex: none;
  }
  /* 症例詳細写真: スマホは1列 */
  .case-detail-photos-row {
    flex-direction: column;
    gap: 10px;
  }
  .case-detail-photos-row--2 .case-detail-photo,
  .case-detail-photos-row--3 .case-detail-photo {
    flex: none;
    max-width: 100%;
  }
  /* 症例写真（旧クラス）: 3列→2列 */
  .case-photos-row-3 img {
    width: calc(50% - 3px);
  }
  /* 症例詳細テーブル: スマホは縦積み */
  .case-detail-table th,
  .case-detail-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .case-detail-table th {
    border-bottom: none;
    padding: 10px 12px;
  }
  .case-detail-table td {
    border-bottom: 1px solid #d8d8d8;
    padding: 12px 14px 16px;
  }
  /* ブログ TOP 症例: 縦積み */
  .blog-top-case-item {
    flex-direction: column;
    gap: 6px;
  }
  /* ページネーション */
  .pagination a,
  .pagination span {
    padding: 6px 8px;
    margin: 1px;
  }
  /* TOPICS 前後ナビ: コンパクトに横並び維持 */
  .topics-navigation {
    gap: 8px;
    margin: 1.5em 0 1em;
    padding-top: 12px;
    font-size: 12px;
  }
  .topics-nav-back a {
    padding: 6px 14px;
    font-size: 12px;
  }
  /* NEWS LETTER ARCHIVE バナー: ボタン全幅 */
  .nl-archive-banner__btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  /* 症例カード画像: アスペクト固定解除 */
  .nl-card__media-link {
    aspect-ratio: 16 / 9;
  }
}

/* ============================================
   768px 以下：静的サイト styles.css の挙動に合わせた WP 固有補正
   styles.css @max-width:768px で
     ・#header_nav02 ul → display:none
     ・#header, #wrapper, #header_nav02 → width:auto !important
     ・body:not(#index) div#header_nav02 → font-size:10px; padding:5px 15px;
                                           background:white; border-bottom:1px solid #51d0c6;
   が既に適用される。ここでは WP 固有要素の追加補正のみ行う。
   ============================================ */
@media screen and (max-width: 768px) {
  /* WP 管理バーによる位置ズレを打ち消す */
  html.admin-bar #wrapper {
    margin-top: 0;
  }

  /* パンくず <p> のリンク色・折り返し */
  div#header_nav02 p {
    color: #666;
    line-height: 1.5;
    word-break: break-word;
  }
  div#header_nav02 p a {
    color: #028eaf;
    text-decoration: none;
  }

  /* styles.css の * { float:none } により崩れる WP コンテンツ要素を補正 */
  .entry-content img {
    display: block;
    margin: 0 auto;
  }
  .nl-card__media-link img {
    display: block;
    height: 100%;
    object-fit: cover;
  }

  /* TOPICS / 症例紹介 一覧：SP 時のみコンテンツ左右余白 */
  #main.nl-single.nl-archive-list .nl-single-main {
    padding: 10px;
    box-sizing: border-box;
  }

  /*
   * 一覧 h2#title01
   * styles.css body:not(#index) #main h2 の白背景・height:100px を上書き
   */
  #main.nl-single.nl-archive-list > h2#title01 {
    margin: 0;
    padding: 14px 10px;
    font-size: 18px;
    font-weight: normal;
    line-height: 1.4;
    letter-spacing: 0.06em;
    color: #fff !important;
    background: #028eaf !important;
    background-image: none !important;
    height: auto !important;
    min-height: 0;
    border-bottom: 2px solid #51d0c6;
    display: block;
    text-indent: 0;
    text-align: left;
    box-sizing: border-box;
  }

  #main.nl-single.nl-archive-list {
    background: #f0f4f5;
    padding-bottom: 16px;
  }
}
