/*
Theme Name: AV Search Lab 2.2 Optimized
Author: Site Owner
Description: 正規配信AV作品の検索・分類・自動更新に対応した高速カタログテーマ
Version: 2.2.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: av-search-lab
*/

:root {
  --bg: #f5f5f6;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --text: #252525;
  --muted: #6f7278;
  --line: #dedfe2;
  --line-strong: #c8cbd0;
  --accent: #d93668;
  --accent-dark: #b52351;
  --accent-soft: #fff0f5;
  --success: #21845b;
  --warning: #a86100;
  --max: 1180px;
  --radius: 8px;
  --shadow: 0 2px 10px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus, .skip-link:focus {
  position: fixed !important; top: 10px; left: 10px; z-index: 999999;
  width: auto; height: auto; padding: 9px 13px; margin: 0;
  clip: auto; background: #fff; color: #111; border: 2px solid var(--accent); border-radius: 6px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--line);
}
.site-header__inner,
.adult-disclosure__inner,
.site-footer__inner,
.site-main {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}
.site-header__inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-branding { min-width: 0; }
.site-title { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: .01em; }
.site-title a { text-decoration: none; color: #222; }
.site-title a::before { content: ""; display: inline-block; width: 5px; height: 20px; margin-right: 9px; vertical-align: -3px; border-radius: 2px; background: var(--accent); }
.site-tagline { margin: 4px 0 0 14px; color: var(--muted); font-size: 11px; }
.site-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.site-nav a {
  padding: 9px 11px;
  border-radius: 6px;
  text-decoration: none;
  color: #444;
  font-size: 13px;
  font-weight: 700;
}
.site-nav a:hover { background: #f2f2f3; color: var(--accent-dark); }

.adult-disclosure { background: #2c2d30; color: #f2f2f2; }
.adult-disclosure__inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}
.adult-disclosure strong { color: #fff; white-space: nowrap; }
.adult-disclosure span { color: #cfd0d2; }

.site-main { padding-block: 28px 72px; }
.home-main { padding-top: 22px; }
.eyebrow {
  margin: 0 0 5px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
h1, h2, h3, h4 { color: #202124; line-height: 1.35; }
h1 { font-size: clamp(26px,4vw,38px); }
h2 { font-size: clamp(21px,3vw,28px); }

.home-hero {
  margin-bottom: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.home-hero__content { padding: 30px; }
.home-hero h1 { margin: 0 0 10px; font-size: clamp(26px,4vw,36px); }
.home-hero__lead { max-width: 760px; margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.home-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.home-shortcuts a {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #555;
  text-decoration: none;
  font-size: 12px;
}
.home-shortcuts a:hover { border-color: #c7a0ad; color: var(--accent-dark); }

.av-search {
  display: grid;
  grid-template-columns: minmax(220px,1.7fr) minmax(150px,1fr) minmax(150px,1fr) auto;
  gap: 8px;
}
.av-search input,
.av-search select,
.archive-search input,
.archive-search select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 9px 11px;
  outline: 0;
}
.av-search input:focus,
.av-search select:focus,
.archive-search input:focus,
.archive-search select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,54,104,.10); }
.av-search button,
.archive-search button,
.button,
.primary-cta {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.av-search button:hover,
.archive-search button:hover,
.button:hover,
.primary-cta:hover { background: var(--accent-dark); }

.ac-wrap { position: relative; }
.ac-list {
  display: none;
  position: absolute;
  z-index: 100;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
}
.ac-list.open { display: block; }
.ac-item {
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #333;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
.ac-item:hover { background: #f7f1f3; color: var(--accent-dark); }

.home-section, .content-section { margin-top: 42px; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #333;
}
.section-heading h2 { margin: 0; font-size: 23px; }
.section-more { color: var(--accent-dark); font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.section-more:hover { text-decoration: underline; }

.chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: #3d3d3d;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.chip:hover { border-color: #d69bad; background: var(--accent-soft); color: var(--accent-dark); }
.chip__count, .chip span { color: #8a8c91; font-size: 10px; font-weight: 600; }
.chip-list--compact { gap: 6px; }

.grid, .catalog-grid {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 14px;
}
.card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: #c99aaa; transform: translateY(-1px); }
.card__image { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: #ececee; }
.card-body { padding: 9px 10px 11px; }
.card-code { margin-bottom: 4px; color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: 4.2em;
  color: #252525;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.card-meta { margin-top: 6px; color: #8a8c91; font-size: 10px; }

.prose-card, .source-note, .empty-state {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.prose-card p:first-child { margin-top: 0; }
.prose-card p:last-child { margin-bottom: 0; }
.home-about__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.home-about__grid h3 { margin: 0 0 7px; font-size: 16px; }
.home-about__grid p { margin: 0; color: var(--muted); font-size: 13px; }

.archive-header { margin-bottom: 20px; }
.archive-header h1 { margin: 2px 0 7px; }
.archive-header > p:last-child { color: var(--muted); }
.archive-search {
  display: grid;
  grid-template-columns: minmax(220px,1fr) 170px auto;
  gap: 8px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 18px;
  color: #7a7c80;
  font-size: 11px;
}
.breadcrumbs a { color: #555; text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-dark); text-decoration: underline; }

.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 30px; }
.pagination .page-numbers {
  display: inline-flex;
  min-width: 36px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  text-decoration: none;
  font-size: 12px;
}
.pagination .current { border-color: var(--accent); background: var(--accent); color: #fff; }

.av-detail__header { margin-bottom: 20px; }
.av-detail__header h1 { margin: 4px 0 8px; font-size: clamp(24px,3.4vw,36px); }
.affiliate-disclosure { margin: 0; color: var(--muted); font-size: 11px; }
.av-detail__hero {
  display: grid;
  grid-template-columns: minmax(280px,420px) minmax(0,1fr);
  gap: 30px;
  align-items: start;
}
.av-detail__cover { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.av-detail__cover img { width: 100%; }
.av-detail__summary { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.lead { margin-top: 0; color: #4f5054; font-size: 14px; }
.work-facts, .profile-facts { margin: 18px 0; border-top: 1px solid var(--line); }
.work-facts > div, .profile-facts > div {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.work-facts dt, .profile-facts dt { color: #777a80; font-size: 12px; font-weight: 700; }
.work-facts dd, .profile-facts dd { margin: 0; font-size: 13px; }
.term-group { margin-top: 16px; }
.term-group__label { display: block; margin-bottom: 6px; color: #555; font-size: 11px; font-weight: 800; }
.primary-cta { display: block; margin-top: 20px; font-size: 15px; }
.cta-note { margin: 7px 0 0; color: var(--muted); font-size: 10px; text-align: center; }

.video-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #111; }
.video-wrap video, .video-wrap iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.sample-gallery { columns: 4 220px; column-gap: 10px; }
.sample-gallery a { display: block; margin-bottom: 10px; break-inside: avoid; }
.sample-gallery img { width: 100%; border-radius: 6px; border: 1px solid var(--line); }
.ad-slot { margin: 26px auto; text-align: center; overflow: hidden; }
.ad-slot iframe, .ad-slot img { max-width: 100%; }
.source-note { color: var(--muted); font-size: 12px; }
.source-note h2 { margin-top: 0; color: #333; font-size: 17px; }

.profile-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.profile-hero__image img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
.profile-hero h1 { margin: 2px 0 4px; }
.profile-ruby { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.term-description { color: #555; font-size: 13px; }
.profile-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; }
.profile-card { display: block; text-align: center; text-decoration: none; }
.profile-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); background: #eee; }
.profile-card span { display: block; margin-top: 7px; font-size: 12px; font-weight: 700; }

.analysis-grid, .feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.analysis-card, .feature-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.analysis-card a, .feature-card a { text-decoration: none; }
.analysis-card__image img, .feature-card__image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.analysis-card__body, .feature-card__body { padding: 14px; }
.analysis-card h2, .feature-card h2 { margin: 0 0 6px; font-size: 16px; }
.analysis-card p, .feature-card p { color: var(--muted); font-size: 12px; }
.score-badge { display: inline-block; padding: 3px 7px; border: 1px solid #abd5c1; border-radius: 4px; background: #eff9f4; color: var(--success); font-size: 10px; font-weight: 800; }
.analysis-result { display: grid; grid-template-columns: minmax(260px,430px) 1fr; gap: 28px; align-items: start; }
.analysis-result__image img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.candidate-list { list-style: none; padding: 0; }
.candidate-list li { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.candidate-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #f0f0f2; font-size: 11px; font-weight: 800; }
.rank-box { display: grid; grid-template-columns: 90px 1fr; gap: 18px; align-items: center; margin: 22px 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.analysis-score { display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 22px; font-weight: 900; }

.update-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.update-list li { display: grid; grid-template-columns: 105px 1fr; gap: 16px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.update-list li:last-child { border-bottom: 0; }
.update-list time { color: var(--muted); font-size: 12px; }
.update-list a { text-decoration: none; }
.update-list a:hover { color: var(--accent-dark); }

.empty-state { text-align: center; }
.empty-state h2 { margin-top: 0; }

.site-footer { border-top: 1px solid var(--line); background: #fff; }
.site-footer__inner { padding-block: 30px 48px; color: var(--muted); font-size: 12px; }
.site-footer__inner strong { color: #333; font-size: 16px; }
.site-footer__about p { margin: 5px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; margin: 15px 0; }
.site-footer a { color: #555; text-decoration: none; }
.site-footer a:hover { color: var(--accent-dark); text-decoration: underline; }
.site-footer__legal { max-width: 840px; font-size: 10px; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(217,54,104,.22);
  outline-offset: 2px;
}

@media (max-width: 1050px) {
  .grid, .catalog-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .profile-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
}
@media (max-width: 850px) {
  .site-header { position: static; }
  .site-header__inner { align-items: flex-start; flex-direction: column; padding-block: 14px; gap: 9px; }
  .site-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .site-nav a { white-space: nowrap; }
  .av-search { grid-template-columns: 1fr 1fr; }
  .av-search button { grid-column: span 2; }
  .grid, .catalog-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .av-detail__hero, .analysis-result { grid-template-columns: 1fr; }
  .av-detail__cover { max-width: 520px; margin-inline: auto; }
  .home-about__grid { grid-template-columns: 1fr; gap: 16px; }
  .profile-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .site-main, .site-header__inner, .adult-disclosure__inner, .site-footer__inner { width: min(calc(100% - 20px), var(--max)); }
  .site-tagline { display: none; }
  .adult-disclosure__inner { align-items: flex-start; padding-block: 7px; }
  .home-hero__content { padding: 20px 16px; }
  .av-search, .archive-search { grid-template-columns: 1fr; }
  .av-search button { grid-column: auto; }
  .grid, .catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
  .card-body { padding: 7px 8px 9px; }
  .card-title { font-size: 11px; }
  .section-heading { align-items: center; }
  .section-heading h2 { font-size: 20px; }
  .profile-hero { grid-template-columns: 120px 1fr; gap: 16px; padding: 16px; }
  .profile-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .analysis-grid, .feature-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sample-gallery { columns: 2 150px; }
}
@media (max-width: 430px) {
  .grid, .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-hero { grid-template-columns: 1fr; text-align: center; }
  .profile-hero__image { max-width: 140px; margin-inline: auto; }
  .profile-facts > div, .work-facts > div { grid-template-columns: 88px 1fr; text-align: left; }
  .profile-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
  .analysis-grid, .feature-grid { grid-template-columns: 1fr; }
  .update-list li { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
