:root {
  --site-max-width: 1140px;
  --article-max-width: 800px;
  --side-padding: 16px;
  --shelf-gap: 10px;
  --cover-ratio: 3 / 4.2;
  --card-title-size: 0.8rem;
  --card-meta-size: 0.72rem;
  
  --bg-color: #ffffff;
  --text-main: #222222;
  --text-sub: #777777;
  --border-color: #e8e8e8;
  --bg-light: #f7f7f7;
  
  --accent-color: #0066cc;
  --accent-hover: #004d99;
  --cta-bg: #0066cc;
  --cta-hover: #004d99;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

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

/* Accessibility: 明確な focus-visible リングを維持 */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.site-container {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
}

.main-content {
  padding-bottom: 30px;
}

.single-container {
  max-width: var(--article-max-width);
}

/* ===================================================
   Header
   =================================================== */
.site-header {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-color);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
}
.site-logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.header-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-main);
  border-radius: 4px;
}

/* ===================================================
   Search UI
   =================================================== */
.search-form-section {
  padding: 16px 0 8px;
}
.search-bar-form {
  display: flex;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
}
.search-input-field {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  background-color: var(--bg-light);
  color: var(--text-main);
}
.search-input-field:focus {
  border-color: var(--accent-color);
  background-color: #fff;
}
.search-submit-btn {
  width: 50px;
  height: 44px;
  background-color: var(--accent-color);
  border: none;
  border-radius: 6px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.search-guide-box {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-sub);
  font-size: 0.9rem;
}

/* ===================================================
   Shelf UI (横スクロール / 複数スマホ幅対応)
   =================================================== */
.shelf-section {
  padding: 20px 0 8px;
}
.shelf-header {
  margin-bottom: 12px;
}
.shelf-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}
.shelf-scroll-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: var(--shelf-gap);
  padding-bottom: 14px;
  margin: 0 calc(var(--side-padding) * -1);
  padding-left: var(--side-padding);
  padding-right: var(--side-padding);
}
.shelf-scroll-container::-webkit-scrollbar {
  display: none;
}
.shelf-scroll-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.work-card {
  flex: 0 0 calc((100% - (var(--shelf-gap) * 2.4)) / 3.4);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .work-card {
    flex: 0 0 calc((100% - (var(--shelf-gap) * 5)) / 6.2);
    max-width: 170px;
  }
}

.work-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 4px;
}

.card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: var(--cover-ratio);
  background-color: var(--bg-light);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: var(--bg-light);
}

/* プレースホルダー（画像が存在しない場合の表示） */
.pbr-no-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-light);
  color: var(--text-sub);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  user-select: none;
}

.card-info {
  margin-top: 6px;
}
.card-title {
  font-size: var(--card-title-size);
  line-height: 1.35;
  font-weight: 600;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}
.card-actress {
  font-size: var(--card-meta-size);
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* ===================================================
   Genre Section
   =================================================== */
.genre-section {
  padding-bottom: 24px;
}
.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.genre-tag-item {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--text-main);
}

/* ===================================================
   Archive / Search Grid
   =================================================== */
.archive-header {
  padding: 16px 0 12px;
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 8px;
}
@media (min-width: 768px) {
  .works-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px 14px;
  }
}
.works-grid .work-card {
  flex: none;
  width: 100%;
}
.no-results {
  padding: 30px 0;
  color: var(--text-sub);
}

.pagination {
  margin: 30px 0;
  text-align: center;
}
.pagination .page-numbers {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 2px;
  border: 1px solid var(--border-color);
  background: var(--bg-light);
  color: var(--text-main);
  border-radius: 4px;
  font-size: 0.85rem;
}
.pagination .page-numbers.current {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* ===================================================
   Single Article
   =================================================== */
.breadcrumbs {
  font-size: 0.75rem;
  color: var(--text-sub);
  padding: 14px 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumbs .sep {
  margin: 0 4px;
}
.breadcrumbs a {
  color: var(--text-sub);
}

.single-title {
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
}

.profile-box {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.profile-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 16px;
  font-size: 0.82rem;
}
.profile-item .label {
  color: var(--text-sub);
  margin-right: 6px;
}
.profile-item .val {
  color: var(--text-main);
  font-weight: 500;
}

/* WordPressエディタ本文スタイル */
.single-synopsis {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-main);
  margin-bottom: 24px;
}
.single-synopsis p {
  margin-bottom: 1em;
}
.single-synopsis h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.5em 0 0.6em;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}
.single-synopsis h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.2em 0 0.5em;
}
.single-synopsis ul,
.single-synopsis ol {
  margin: 0 0 1em 1.4em;
}
.single-synopsis li {
  margin-bottom: 0.3em;
}
.single-synopsis blockquote {
  margin: 1.2em 0;
  padding: 8px 14px;
  border-left: 3px solid var(--accent-color);
  background-color: var(--bg-light);
  color: var(--text-sub);
}
.single-synopsis figure {
  margin: 1.2em 0;
  max-width: 100%;
}

.sample-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  background-color: var(--bg-color);
}
.sample-img-wrap {
  width: 100%;
  background-color: var(--bg-color);
  overflow: hidden;
}
.sample-img-wrap img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.cta-weak-wrap {
  margin: 16px 0 24px;
  text-align: center;
}
.cta-weak {
  display: inline-block;
  padding: 12px 20px;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 1px dashed var(--accent-color);
  border-radius: 4px;
}
.cta-weak .arrow {
  margin-left: 4px;
}

.cta-main-wrap {
  margin: 28px 0 36px;
  text-align: center;
}
.cta-btn-main {
  display: block;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  background-color: var(--cta-bg);
  color: #ffffff;
  text-align: center;
  padding: 15px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}
.cta-btn-main:active {
  background-color: var(--cta-hover);
}

.error-404-container {
  padding: 50px 16px;
  text-align: center;
}
.error-text {
  margin: 12px 0 20px;
  color: var(--text-sub);
  font-size: 0.9rem;
}
.back-home-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-main);
  font-size: 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  margin-top: 30px;
  background: var(--bg-color);
}
.copyright {
  font-size: 0.75rem;
  color: var(--text-sub);
  text-align: center;
}

/* ===================================================
   Actress Taxonomy Hub v0.2
   =================================================== */
.actress-archive {
  padding-bottom: 48px;
}

.actress-archive .breadcrumbs {
  margin-bottom: 4px;
}

.actress-hub-header {
  padding: 8px 0 18px;
}

.actress-hub-heading {
  margin-bottom: 14px;
}

.actress-hub-kicker {
  margin: 0 0 3px;
  color: var(--text-sub);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.actress-hub-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.actress-hub-title {
  margin: 0;
  min-width: 0;
  color: var(--text-main);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.actress-hub-total {
  flex: none;
  color: var(--text-sub);
  font-size: 0.76rem;
}

.actress-hub-description {
  max-width: 820px;
  margin: -2px 0 14px;
  color: var(--text-sub);
  font-size: 0.86rem;
  line-height: 1.75;
}

.actress-hub-profile {
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
}

.actress-hub-profile-main {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.actress-hub-profile-name {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 20px;
  border-right: 1px solid var(--border-color);
  background: var(--bg-light);
}

.actress-hub-profile-name-label {
  color: var(--text-sub);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.actress-hub-profile-name strong {
  color: var(--text-main);
  font-size: 1.12rem;
  line-height: 1.35;
}

.actress-hub-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.actress-hub-profile-item {
  min-width: 0;
  padding: 13px 15px;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.actress-hub-profile-item:nth-child(3n) {
  border-right: 0;
}

.actress-hub-profile-item dt,
.actress-hub-profile-item dd {
  margin: 0;
}

.actress-hub-profile-item dt {
  margin-bottom: 2px;
  color: var(--text-sub);
  font-size: 0.7rem;
  font-weight: 600;
}

.actress-hub-profile-item dd {
  color: var(--text-main);
  font-size: 0.87rem;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.actress-hub-tax-link {
  color: var(--accent-color);
  font-weight: 700;
}

.actress-hub-tax-link:hover,
.actress-hub-see-all:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.actress-hub-socials {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-top: 1px solid var(--border-color);
  background: #fff;
}

.actress-hub-socials-label {
  flex: none;
  color: var(--text-sub);
  font-size: 0.72rem;
  font-weight: 700;
}

.actress-hub-socials-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.actress-hub-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: #fff;
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 700;
}

.actress-hub-social-link:hover,
.actress-hub-tag:hover {
  border-color: #c5c5c5;
  background: var(--bg-light);
}

.actress-hub-section {
  padding: 26px 0 6px;
}

.actress-hub-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.actress-hub-section .shelf-title {
  font-size: 1.12rem;
}

.actress-hub-count {
  flex: none;
  color: var(--text-sub);
  font-size: 0.72rem;
}

.actress-archive .works-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 10px;
}

.actress-archive .works-grid .work-card {
  min-width: 0;
  max-width: none;
}

.actress-archive .card-cover {
  border-radius: 6px;
}

.actress-archive .card-title {
  font-size: 0.82rem;
}

.actress-hub-related {
  margin-top: 24px;
  padding: 22px 0 0;
  border-top: 1px solid var(--border-color);
}

.actress-hub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.actress-hub-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-light);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
}

.actress-hub-same-cup {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border-color);
}

.actress-hub-see-all {
  flex: none;
  color: var(--accent-color);
  font-size: 0.76rem;
  font-weight: 650;
}

.actress-archive .pbr-social-feed {
  margin-top: 30px;
}

@media (min-width: 768px) {
  .actress-archive .works-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px 16px;
  }
}

@media (min-width: 1024px) {
  .actress-archive .works-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .actress-hub-profile-main {
    grid-template-columns: 1fr;
  }

  .actress-hub-profile-name {
    padding: 14px 15px;
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .actress-hub-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actress-hub-profile-item:nth-child(3n) {
    border-right: 1px solid var(--border-color);
  }

  .actress-hub-profile-item:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 520px) {
  .actress-hub-title-row {
    align-items: flex-end;
  }

  .actress-hub-title {
    font-size: 1.38rem;
  }

  .actress-hub-profile-grid {
    grid-template-columns: 1fr 1fr;
  }

  .actress-hub-profile-item {
    padding: 11px 12px;
  }

  .actress-hub-socials {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px 13px;
  }

  .actress-hub-socials-list {
    width: 100%;
  }

  .actress-hub-social-link {
    flex: 1 1 auto;
  }

  .actress-archive .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 10px;
  }

  .actress-archive .card-title {
    font-size: 0.8rem;
  }
}

/* ===================================================
   Actress Taxonomy Social Feed v0.2.1
   4-post layout: desktop 2x2 / mobile 1 column
   =================================================== */
.actress-hub-social-feed {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  overflow: hidden;
}

.actress-hub-social-feed .pbr-social-feed {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.actress-hub-social-feed .pbr-social-feed__network {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.actress-hub-social-feed .pbr-social-feed__instagram-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  align-items: start;
}

.actress-hub-social-feed .pbr-social-feed__instagram-item,
.actress-hub-social-feed .pbr-instagram-embed {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.actress-hub-social-feed .instagram-media,
.actress-hub-social-feed iframe {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.actress-hub-social-feed .pbr-instagram-embed__fallback {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.actress-hub-social-feed .pbr-social-feed__network-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 620px) {
  .actress-hub-social-feed {
    margin-top: 24px;
    padding-top: 20px;
  }

  .actress-hub-social-feed .pbr-social-feed__instagram-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* ===================================================
   Actress Taxonomy Social Feed v0.2.2 FINAL
   Single Instagram post layout
   =================================================== */
.actress-hub-social-feed {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  overflow: hidden;
}

.actress-hub-social-feed .pbr-social-feed {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.actress-hub-social-feed .pbr-social-feed__instagram-grid {
  display: block !important;
  width: 100% !important;
  max-width: 540px !important;
  min-width: 0 !important;
}

.actress-hub-social-feed .pbr-social-feed__instagram-item,
.actress-hub-social-feed .pbr-instagram-embed,
.actress-hub-social-feed .instagram-media,
.actress-hub-social-feed iframe {
  width: 100% !important;
  max-width: 540px !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 620px) {
  .actress-hub-social-feed {
    margin-top: 24px;
    padding-top: 20px;
  }

  .actress-hub-social-feed .pbr-social-feed__instagram-grid,
  .actress-hub-social-feed .pbr-social-feed__instagram-item,
  .actress-hub-social-feed .pbr-instagram-embed,
  .actress-hub-social-feed .instagram-media,
  .actress-hub-social-feed iframe {
    max-width: 100% !important;
  }
}


/* ===================================================
   v0.9.0: Card sample count + desktop shelf navigation
   =================================================== */
.card-sample-count {
  position: absolute;
  left: 7px;
  bottom: 7px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.76);
  color: #fff;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.01em;
  pointer-events: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shelf-nav {
  display: none;
  align-items: center;
  gap: 6px;
}

.shelf-nav-button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: #fff;
  color: var(--text-main);
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, opacity .15s ease;
}

.shelf-nav-button:hover:not(:disabled) {
  border-color: #c9c9c9;
  background: var(--bg-light);
}

.shelf-nav-button:disabled {
  opacity: .28;
  cursor: default;
}

@media (min-width: 768px) {
  .shelf-nav {
    display: flex;
  }

  .shelf-scroll-container {
    scroll-behavior: smooth;
  }
}

@media (max-width: 767px) {
  .card-sample-count {
    left: 6px;
    bottom: 6px;
    min-height: 22px;
    padding: 3px 6px;
    font-size: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shelf-scroll-container {
    scroll-behavior: auto;
  }
}


/* ===================================================
   Actress archive: inline series cards
   Series is one visual item inside the normal works grid.
   =================================================== */
.works-grid .pbr-series-inline-card {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
}
.works-grid .pbr-series-inline-card .card-cover {
  width: 100%;
}
.works-grid .pbr-series-inline-card .card-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.works-grid .pbr-series-inline-card .pbr-series-inline-badge {
  white-space: nowrap;
}
.works-grid .pbr-series-inline-card .card-title {
  color: var(--text-main);
}
.works-grid .pbr-series-inline-card .card-actress {
  color: var(--accent-color);
  font-weight: 600;
}
