/*
Theme Name: Kawari Theme
*/

/* ===== BASE ===== */
html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #f0f0fa;
  color: #231e5f;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  padding-top: 64px;
}

.wp-dinosaur-content {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

#wpadminbar {
  display: none !important;
}

/* ===== HEADER ===== */
.site-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: rgba(240, 240, 250, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  box-sizing: border-box;
}

.site-topbar-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header-logo {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.logo-main {
  display: block;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #231e5f;
  line-height: 1.1;
  margin: 0;
}

.logo-sub {
  display: block;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #231e5f;
  line-height: 1.1;
  margin: 0;
}

/* ===== MENU BUTTON ===== */
.menu-btn {
  position: relative;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.menu-btn span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: #231e5f;
  border-radius: 999px;
}

.menu-btn span:nth-child(1) { top: 0; }
.menu-btn span:nth-child(2) { top: 10px; }
.menu-btn span:nth-child(3) { top: 20px; }

.menu-btn.open span:nth-child(1) {
  top: 10px;
  transform: rotate(45deg);
}

.menu-btn.open span:nth-child(2) {
  opacity: 0;
}

.menu-btn.open span:nth-child(3) {
  top: 10px;
  transform: rotate(-45deg);
}

/* ===== DRAWER MENU ===== */
.menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 50%;
  max-width: 220px;
  height: 100dvh;
  background: rgba(240, 240, 250, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 100px 30px;
  transition: right 0.25s ease;
  z-index: 998;
  box-sizing: border-box;
  overflow: visible !important;
}

.menu.open {
  right: 0;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 22px;
  font-weight: 900;
}

.menu .icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 18px;
  min-height: 18px;
  margin-right: 0 !important;
  display: block;
  flex: 0 0 20px;
  overflow: visible;
}

.menu .icon path {
  stroke: currentColor;
  stroke-width: 1.8;
}

/* ===== ARTICLE ===== */
.wp-dinosaur-main {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 32px 20px 80px;
  box-sizing: border-box;
}

.wp-dinosaur-title {
  font-size: 36px;
  margin: 0 0 2px;
  font-weight: 800;
  line-height: 1.25;
}

.date,
.wp-dinosaur-meta {
  margin: 0 0 16px !important;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(35, 30, 95, 0.52);
}

/* ===== ARTICLE EYECATCH ===== */
.post-eyecatch {
  width: 100%;
  margin: 0 0 36px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-eyecatch img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center;
  display: block;
}

@media (max-width: 767px) {
  .wp-dinosaur-main > .post-eyecatch {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    margin-bottom: 28px !important;
  }

  .wp-dinosaur-main > .post-eyecatch img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
  }
}

/* ===== 本文 ===== */
.wp-dinosaur-content {
  font-size: 17px;
  line-height: 1.9;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wp-dinosaur-content p {
  margin: 0 0 1.8em;
  text-align: justify;
  text-align-last: left;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wp-dinosaur-content h2 {
  font-size: 24px;
  line-height: 1.45;
  margin: 2em 0 0.8em;
}

.wp-dinosaur-content h3 {
  font-size: 18px;
  line-height: 1.5;
  margin: 1.5em 0 0.6em;
}

/* ===== TAG ===== */
.wp-dinosaur-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}

.wp-dinosaur-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 5px 11px 4px;
  border-radius: 999px;

  font-size: 12px;
  line-height: 1;

  background: rgba(35, 30, 95, 0.1);
}

.wp-dinosaur-tag {
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wp-dinosaur-tag:active {
  opacity: 0.72;
}


@media (hover: hover) {
  .wp-dinosaur-tag:hover {
    opacity: 0.72;
  }
}

/* ===== TOC ===== */
.ez-toc-container {
  margin: 24px 0 32px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ez-toc-title-container {
  display: block !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
}

.ez-toc-title {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  color: #231e5f !important;
  text-transform: uppercase !important;
}

.ez-toc-btn,
.ez-toc-toggle,
.ez-toc-title-toggle,
.ez-toc-container a.ez-toc-pull-right,
.ez-toc-container .ez-toc-toggle-icon,
.ez-toc-container .eztoc-toggle,
.ez-toc-counter {
  display: none !important;
}

.ez-toc-list,
.ez-toc-list ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ez-toc-list li {
  margin: 0 !important;
  padding: 0 !important;
  border-top: 1px solid rgba(35, 30, 95, 0.12) !important;
}

.ez-toc-list li:last-child {
  border-bottom: 1px solid rgba(35, 30, 95, 0.12) !important;
}

.ez-toc-list a {
  display: block !important;
  padding: 12px 0 !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  color: rgba(35, 30, 95, 0.82) !important;
  text-decoration: none !important;
}

.ez-toc-list a:hover {
  opacity: 0.65;
}

.ez-toc-list ul {
  margin-left: 14px !important;
  padding-left: 10px !important;
  border-left: 1px solid rgba(35, 30, 95, 0.1) !important;
}

/* ===== CONTENT NAV ===== */
.novel-nav {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 640px;
  margin: 60px auto 0;
  padding: 0 16px 64px;
  box-sizing: border-box;
}

.novel-nav .nav-side {
  display: flex;
  align-items: center;
}

.novel-nav .nav-side.left {
  justify-content: flex-start;
}

.novel-nav .nav-side.right {
  justify-content: flex-end;
}

.novel-nav .nav-circle,
.novel-nav .nav-main {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #231e5f;
  border: 1.5px solid #231e5f;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.novel-nav .nav-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-sizing: border-box;
}

.novel-nav .nav-main {
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  box-sizing: border-box;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.novel-nav .nav-arrow {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .novel-nav .nav-circle:hover,
  .novel-nav .nav-main:hover {
    background: #231e5f;
    color: #fff;
    transform: translateY(-1px);
  }
}

@media (max-width: 767px) {
  .novel-nav {
    grid-template-columns: 40px minmax(0, 1fr) 40px !important;
    gap: 10px;
    margin-top: 36px;
    padding: 0 16px 64px;
  }

  .novel-nav .nav-side {
    width: 40px;
    height: 40px;
  }

  .novel-nav .nav-circle {
    width: 40px;
    height: 40px;
  }

  .novel-nav .nav-main {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 40px;
    font-size: 13px;
    padding: 0 14px;
  }

  .novel-nav .nav-arrow {
    width: 20px;
    height: 20px;
  }
}

/* ===== PC ===== */
@media (min-width: 768px) {
  body {
    padding-top: 0;
  }

  .site-topbar {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .logo-main {
    font-size: 22px;
    letter-spacing: 0.03em;
  }

  .logo-sub {
    font-size: 12px;
    margin-top: 3px;
    line-height: 1.1;
  }

  .wp-dinosaur-title {
    font-size: 42px;
  }
}

/* ===== SP ===== */
@media (max-width: 767px) {
  .wp-dinosaur-main {
    padding: 0px 20px 32px;
  }

  .wp-dinosaur-title {
    font-size: 24px !important;
    line-height: 1.3 !important;
    margin: 0 0 2px !important;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .wp-dinosaur-content {
    font-size: 16px;
    line-height: 1.95;
  }

  .wp-dinosaur-content p {
    text-align: justify !important;
    text-align-last: left !important;
  }
}

/* ===== 横ズレ修正版 ===== */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* 本文まわりだけはみ出し防止 */
.wp-dinosaur-main,
.wp-dinosaur-article,
.wp-dinosaur-content,
.post-eyecatch,
.ez-toc-container {
  max-width: 100%;
  min-width: 0;
}

.wp-dinosaur-title,
.wp-dinosaur-content p,
.wp-dinosaur-content h2,
.wp-dinosaur-content h3,
.ez-toc-list a {
  overflow-wrap: anywhere;
  word-break: break-word;
}


/* ===== ロゴクリック有効化 ===== */
.site-logo-wrap {
  position: relative;
  z-index: 1001;
  pointer-events: auto;
}

/* ヘッダー・メニューの重なり整理 */
.site-topbar {
  z-index: 1000;
}

.menu {
  z-index: 998;
}

.overlay {
  z-index: 997;
}

/* ===== スマホでメニュー開いた時だけロゴを消す ===== */
.site-topbar .site-logo-wrap,
.site-topbar .site-header-logo {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

@media (max-width: 767px) {
  .site-topbar.menu-open {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }

  .site-topbar.menu-open .site-logo-wrap,
  .site-topbar.menu-open .site-header-logo {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* ===== PAGE HERO ===== */
.page-hero {
  text-align: center;
  padding: 40px 16px 24px;
}

.page-title {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 900;
  font-size: 62px;
  line-height: 1;
  color: #231e5f;
  margin: 0;
}

.page-sub {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #231e5f;
  margin: 0;
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .page-title {
    font-size: 88px;
  }

  .page-sub {
    font-size: 22px;
    transform: translateY(-3px);
  }
}

/* ===== DIARY ARCHIVE ===== */
.diary-archive {
  width: min(100%, 880px);
  margin: 0 auto;
  padding: 32px 24px 96px;
  box-sizing: border-box;
}

.diary-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.diary-card {
  border-top: 1.5px solid rgba(35, 30, 95, 0.18);
  padding: 22px 0;
  box-sizing: border-box;
}

.diary-card:first-child {
  border-top: none;
}

.diary-card:last-child {
  border-bottom: 1.5px solid rgba(35, 30, 95, 0.18);
}

.diary-card-link {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.diary-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(35, 30, 95, 0.04);
}

.diary-card-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 767px) {
  .diary-card-link {
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
  }

  .diary-card-thumb {
    aspect-ratio: 16 / 9;
    border-radius: 8px;
  }
}

.diary-card-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.diary-card-body {
  padding: 0;
  box-sizing: border-box;
  min-width: 0;
}

.diary-card-meta {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(35, 30, 95, 0.52);

  display: flex;          /* ← これ追加 */
  align-items: center;    /* ← これ追加 */
  gap: 10px;              /* ← これ追加（ここが本命） */
}

.diary-card-meta .wp-dinosaur-tag {
  transform: translateY(-1px);
}

.diary-card-title {
  margin: 6px 0 4px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: #231e5f;
}

.diary-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diary-card-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  color: #231e5f;
  background: rgba(35, 30, 95, 0.1);
}

.diary-empty {
  font-size: 14px;
  color: rgba(35, 30, 95, 0.6);
}

@media (hover: hover) {
  .diary-card-link:hover {
    opacity: 0.72;
  }
}

@media (max-width: 767px) {
  .diary-archive {
    padding: 28px 16px 80px;
  }

  .diary-card {
    padding: 18px 0;
  }

  .diary-card-link {
    gap: 12px;
  }

  .diary-card-thumb {
    aspect-ratio: 16 / 9;
    border-radius: 8px;
  }

  .diary-card-meta {
    font-size: 12px;
    margin-bottom: 0;
  }

.diary-card-title {
  font-size: 18px;
  margin: 6px 0 8px;
}

  .diary-card-tags {
    gap: 8px;
  }

  .diary-card-tag {
    font-size: 11px;
    padding: 5px 10px;
  }
}

@media (min-width: 768px) {
  .diary-card-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ===== DIARY CARD TAP REACTION ===== */
.diary-card-link {
  transition: transform 0.18s ease, opacity 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.diary-card-link:active {
  transform: scale(0.985);
  opacity: 0.72;
}

/* ===== DIARY PAGINATION ===== */
.diary-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 48px auto 0;
  flex-wrap: wrap;
}

/* << < > >> */
.diary-pagination .page-nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid #231e5f;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #231e5f;
  text-decoration: none;
  font-size: 0;
  padding: 0;
  background: transparent;
  box-sizing: border-box;
}

/* 矢印だけ丸なし */
.diary-pagination .page-nav {
  width: auto;
  height: auto;
  border: none;
  border-radius: 0;
  padding: 0 6px;
}

/* 無効状態 */
.diary-pagination .page-nav.is-disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* 数字ラップ */
.diary-pagination .page-numbers-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

/* 通常ページ */
.diary-pagination .page-numbers {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid #231e5f;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #231e5f;
  text-decoration: none;
  font-size: 14px;
  background: transparent;
  box-sizing: border-box;
}

/* 現在ページ */
.diary-pagination .page-numbers.current {
  background: #231e5f;
  border-color: #231e5f;
  color: #f0f0fa;
}

/* … */
.diary-pagination .page-numbers.dots {
  border: none;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0 2px;
  background: transparent;
  color: rgba(35, 30, 95, 0.45);
  font-size: 14px;
}

/* SVG */
.diary-pagination .page-nav-icon {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* hover（PCのみ） */
@media (hover: hover) {
  .diary-pagination a:hover {
    background: #231e5f;
    color: #f0f0fa;
  }
}

@media (max-width: 767px) {
  .single .novel-nav {
    width: 100% !important;
    max-width: 640px !important;

    margin: 36px auto 0 !important;
    padding: 0 16px 40px !important;

    grid-template-columns: 40px minmax(0, 1fr) 40px !important;
    gap: 10px !important;
  }

  .single .novel-nav .nav-main {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

/* ===== DIARY FILTER ===== */
.diary-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 0 0 32px;
}

.diary-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #231e5f;
}

.diary-filter-select-wrap {
  position: relative;
}

.diary-filter-select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: no-repeat center / contain;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23231e5f' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.diary-filter select {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 16px;
  border: 1.5px solid #231e5f;
  border-radius: 999px;
  background: transparent;
  color: #231e5f;
  font-size: 14px;
  font-weight: 600;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  box-sizing: border-box;
  cursor: pointer;
}

.diary-filter select:focus {
  outline: none;
}

.filter-title::after {
  content: "：";
}

@media (max-width: 767px) {
  .diary-filter {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 0 0 28px;
  }

  .diary-filter-group {
    gap: 6px;
  }

.filter-title {
  font-size: 12px;
  letter-spacing: 0.03em;
}

  .diary-filter select {
    height: 44px;
    padding: 0 38px 0 14px;
    font-size: 13px;
  }

  .diary-filter-select-wrap::after {
    right: 14px;
    width: 14px;
    height: 14px;
  }
}

/* ===== UPDATE TAG ===== */
.update-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 4px 10px;
  border-radius: 999px;

  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.04em;

  color: #231e5f;
  background: rgba(35, 30, 95, 0.1);

  transform: translateY(-1px); /* ←囲いを上げる */
}

/* 👇文字だけ微調整（これが本命） */
.update-kind span {
  display: block;
  transform: translateY(0.5px); /* ←文字を少し下げる */
}

/* ===== PC UPDATE TITLE ===== */
@media (min-width: 768px) {
  .page-template-page-update .diary-card-link {
    grid-template-columns: 1fr;
  }

  .page-template-page-update .diary-card-title {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }
}

/* ===== TAP EFFECT ===== */
.site-topbar a,
.site-topbar button,
.menu a,
.wp-dinosaur-tag,
.diary-card-link,
.diary-pagination a,
.novel-nav a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.tap-effect {
  transform: scale(0.94);
  opacity: 0.72;
}

.diary-pagination a {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  background-clip: padding-box;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.diary-pagination a:focus,
.diary-pagination a:active {
  outline: none;
}

.diary-pagination .page-nav:active,
.diary-pagination .page-numbers:active {
  background: transparent;
  color: #231e5f;
}

.diary-pagination .page-numbers.current:active {
  background: #231e5f;
  color: #f0f0fa;
}

.diary-pagination a.tap-effect {
  transform: scale(0.94);
  opacity: 0.72;
}


/* ===== LINK CARD ===== */
.link-card {
  display: block;
  position: relative; /* ←ここに統合 */
  margin: 20px 0;
  text-decoration: none;
  color: inherit;

  border-radius: 18px;
  overflow: hidden;
}

/* サムネ */
.link-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.link-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* タイトル（左下ピル） */
.link-card-title {
  position: absolute;
  bottom: 6px;
  left: 6px;

  display: inline-flex;           /* ←中央揃え用 */
  align-items: center;            /* ←縦中央 */
  justify-content: center;

  margin: 0;
  padding: 4px 8px 3px;           /* ←下だけちょい詰め */

  font-size: 10px;
  font-weight: 700;
  line-height: 1;

  color: #fff;

  border-radius: 999px;           /* ←ぷに丸 */
  background: rgba(0, 0, 0, 0.5); /* ←ちょい軽く */

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  transform: translateY(1px);     /* ←これで下寄せ微調整 */
  max-width: 70%;
}

/* ===== LINK CARD FIX ===== */
.wp-dinosaur-content .link-card {
  position: relative;
  display: block;
  margin: 20px 0;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.wp-dinosaur-content .link-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.wp-dinosaur-content .link-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wp-dinosaur-content .link-card .link-card-title {
  position: absolute !important;
  left: 8px !important;
  bottom: 8px !important;

  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  margin: 0 !important;
  padding: 4px 8px 3px !important;

  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 700;

  color: #fff !important;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 999px;

  transform: translateY(1px);
  max-width: 70%;
}

/* ===== ARTICLE IMAGE SPACING ===== */
.wp-dinosaur-content figure,
.wp-dinosaur-content .wp-block-image {
  margin: 1.6em 0 2.2em !important;
}

.wp-dinosaur-content figure img,
.wp-dinosaur-content .wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
}

.wp-block-separator {
  border-color: rgba(35, 30, 95, 0.18) !important;

  margin-top: 2.8em !important;
  margin-bottom: 2.8em !important;
}

.diary-card-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  line-height: 1;
}

.diary-card-tag span {
  display: block;
  transform: translateY(0.5px);
}

.wp-dinosaur-content figure,
.wp-dinosaur-content .wp-block-image {
  margin: 1.8em 0 1.8em !important;
}

.wp-dinosaur-content figcaption,
.wp-dinosaur-content .wp-element-caption,
.wp-dinosaur-content .wp-caption-text {
  margin: 8px 0 0 !important;

  font-size: 13px;
  line-height: 1.7;
  text-align: center;
  color: rgba(35, 30, 95, 0.48);
}

@media (max-width: 767px) {
  body.single-post .novel-nav {
    display: grid !important;
    grid-template-columns: 40px 1fr 40px !important;
    gap: 8px !important;

    width: calc(100% + 24px) !important;
    max-width: none !important;

    margin-left: -12px !important;
    margin-right: -12px !important;

    margin-top: 92px !important;

    padding: 0 12px 20px !important;
    box-sizing: border-box;
  }

  body.single-post .novel-nav .nav-circle {
    width: 40px !important;
    height: 40px !important;
  }

  body.single-post .novel-nav .nav-main {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
  }
}

@media (max-width: 767px) {
  body.blog,
  body.archive,
  body.category,
  body.tag,
  body.page-template-page-diary,
  body.page-template-page-info {
    padding-top: 64px !important;
  }

  body.blog .page-hero,
  body.archive .page-hero,
  body.category .page-hero,
  body.tag .page-hero,
  body.page-template-page-diary .page-hero,
  body.page-template-page-info .page-hero {
    padding: 40px 16px 24px !important;
  }
}

@media (max-width: 767px) {
  body.single,
  body.single-post {
    padding-top: 64px !important;
  }

  body.single .wp-dinosaur-main,
  body.single-post .wp-dinosaur-main {
    padding-top: 0 !important;
  }

  body.single .post-eyecatch,
  body.single-post .post-eyecatch {
    margin-top: 0 !important;
  }
}