/*
Theme Name: AV Search Lab
Author: Site Owner
Description: 正規配信AV作品の検索・分類・自動更新に対応したカタログテーマ
Version: 2.1.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: av-search-lab
*/
/* =========================================================
   AV Search Lab 2.0 — layout, accessibility and UI overrides
   ========================================================= */
:root {
  --bg: #0b0d12;
  --surface: #141821;
  --surface-2: #1b202b;
  --text: #f4f6fb;
  --muted: #aab1c0;
  --line: #2a3140;
  --accent: #ff4f91;
  --accent-2: #8c6bff;
  --success: #47d18c;
  --max: 1180px;
  --radius: 16px;
  --shadow: 0 16px 40px rgba(0,0,0,.28);
}

html { background: var(--bg) !important; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg) !important;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
  min-height: 100vh;
}
img { 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: 12px; left: 12px; z-index: 999999;
  width: auto; height: auto; padding: 10px 14px; margin: 0;
  clip: auto; background: #fff; color: #111; border-radius: 8px;
}

.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(11,13,18,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.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: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-branding { min-width: 0; }
.site-title { margin: 0 !important; font-size: 22px; line-height: 1.2; font-weight: 900; letter-spacing: .01em; }
.site-title a { text-decoration: none; }
.site-tagline { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.site-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-nav a, .site-search-button {
  border: 1px solid transparent; background: transparent; color: var(--text);
  padding: 9px 11px; border-radius: 10px; text-decoration: none; cursor: pointer;
  font-size: 14px; font-weight: 700;
}
.site-nav a:hover, .site-search-button:hover { background: var(--surface-2); border-color: var(--line); }
.site-search-button { background: linear-gradient(135deg,var(--accent),var(--accent-2)); border: 0; }
.adult-disclosure { background: #121620; border-bottom: 1px solid var(--line); }
.adult-disclosure__inner { display: flex; gap: 12px; padding-block: 9px; align-items: center; color: var(--muted); font-size: 12px; }
.adult-disclosure strong { color: #fff; background: #9b1c31; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }

.site-main { padding-block: 34px 72px; }
.home-main { padding-top: 26px; }
.home-hero {
  border: 1px solid var(--line); border-radius: 24px; overflow: visible;
  background: radial-gradient(circle at 90% 10%, rgba(140,107,255,.28), transparent 35%),
              linear-gradient(135deg,#191d28,#11141c);
  box-shadow: var(--shadow);
}
.home-hero__content { padding: clamp(28px,6vw,64px); max-width: 900px; }
.home-hero h2 { margin: 6px 0 16px !important; font-size: clamp(30px,5vw,54px); line-height: 1.22; letter-spacing: -.03em; }
.home-hero p { color: #c8ceda; max-width: 760px; }
.eyebrow { margin: 0 0 6px !important; color: #f98bb4; font-weight: 900; letter-spacing: .12em; font-size: 12px; }

.av-search { display: grid; grid-template-columns: minmax(220px,2fr) minmax(150px,1fr) minmax(150px,1fr) auto; gap: 10px; margin-top: 24px; }
.av-search input, .av-search select { min-width: 0; width: 100%; color: #fff; background: #0d1017; border: 1px solid #3a4252; border-radius: 12px; padding: 13px 14px; outline: none; }
.av-search input:focus, .av-search select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,79,145,.15); }
.av-search button, .button { border: 0; border-radius: 12px; padding: 13px 20px; color: #fff; background: linear-gradient(135deg,var(--accent),var(--accent-2)); font-weight: 900; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.ac-wrap { position: relative; }
.ac-list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; max-height: 320px; overflow: auto; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: #11151d; box-shadow: var(--shadow); }
.ac-list:empty { display: none; }
.ac-list li { padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.ac-list li:hover { background: var(--surface-2); }

.home-section, .content-section { margin-top: 42px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 4px 16px; }
.section-heading h2, .content-section > h2 { margin: 0 !important; font-size: clamp(23px,3vw,32px); line-height: 1.3; }
.section-more { color: #fff; text-decoration: none; border-bottom: 1px solid #6d7482; font-size: 14px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: 14px; }
.chip:hover { border-color: #5c6578; transform: translateY(-1px); }
.chip span { color: var(--muted); font-size: 11px; }
.chip-list--compact .chip { padding: 6px 10px; font-size: 13px; }

.grid, .catalog-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 16px; padding: 0 !important; }
.card { display: block; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.card:hover { transform: translateY(-4px); border-color: #505a6c; box-shadow: 0 12px 26px rgba(0,0,0,.3); }
.card__image, .card img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; background: #090b10; }
.card-body { padding: 11px 12px 13px; }
.card-code { color: #f58bb2; font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.card-title { margin-top: 3px; height: auto !important; min-height: 2.8em; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { color: var(--muted); font-size: 11px; margin-top: 7px; }

.prose-card, .source-note, .empty-state { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: clamp(20px,4vw,34px); }
.prose-card p:last-child { margin-bottom: 0; }
.archive-header { margin-bottom: 24px; padding: clamp(24px,5vw,46px); border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(135deg,var(--surface),#11151d); }
.archive-header h1 { margin: 4px 0 8px !important; font-size: clamp(30px,5vw,48px); line-height: 1.25; }
.archive-header p { margin: 0; color: var(--muted); }
.archive-search { margin: 0 0 24px; grid-template-columns: 1fr 160px auto; }

.pagination { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 34px; }
.pagination .page-numbers { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); text-decoration: none; }
.pagination .current { background: var(--accent); border-color: var(--accent); }

.breadcrumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-bottom: 20px; }
.breadcrumbs a { text-decoration: none; color: #d7dbe4; }
.av-detail__header h1 { margin: 5px 0 8px !important; font-size: clamp(27px,4vw,44px); line-height: 1.35; }
.affiliate-disclosure { color: var(--muted); font-size: 12px; }
.av-detail__hero { display: grid; grid-template-columns: minmax(280px,420px) 1fr; gap: clamp(24px,5vw,54px); align-items: start; margin-top: 26px; }
.av-detail__cover { margin: 0; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background: #07090d; box-shadow: var(--shadow); }
.av-detail__cover img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.av-detail__summary { padding-top: 4px; }
.lead { font-size: 17px; color: #dce0e8; }
.work-facts, .profile-facts { margin: 22px 0; border-top: 1px solid var(--line); }
.work-facts > div, .profile-facts > div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.work-facts dt, .profile-facts dt { color: var(--muted); font-size: 13px; }
.work-facts dd, .profile-facts dd { margin: 0; font-weight: 700; }
.term-group { margin-top: 18px; }
.term-group__label { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 7px; }
.primary-cta { margin-top: 24px; display: flex; justify-content: center; align-items: center; min-height: 58px; padding: 12px 20px; border-radius: 14px; background: linear-gradient(135deg,var(--accent),#ff7a4f); color: #fff; font-weight: 900; text-align: center; text-decoration: none; box-shadow: 0 12px 25px rgba(255,79,145,.2); }
.cta-note { color: var(--muted); font-size: 11px; text-align: center; margin-top: 7px; }
.video-wrap { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: #000; aspect-ratio: 16/9; }
.video-wrap iframe, .video-wrap video { width: 100%; height: 100%; border: 0; display: block; }
.sample-gallery { columns: 3 260px; column-gap: 14px; }
.sample-gallery a, .sample-gallery img { display: block; width: 100%; }
.sample-gallery a, .sample-gallery > img { break-inside: avoid; margin-bottom: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.ad-slot { margin: 34px auto; min-height: 20px; text-align: center; overflow: hidden; }

.profile-hero { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; padding: clamp(24px,5vw,44px); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.profile-hero__image img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 2px solid #3e4658; }
.profile-hero h1 { margin: 4px 0 !important; font-size: clamp(30px,5vw,46px); }
.profile-ruby { color: var(--muted); margin-top: 0; }
.profile-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 14px; }
.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); }
.profile-card span { display: block; margin-top: 8px; font-size: 13px; font-weight: 800; }

.analysis-grid, .feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.analysis-card, .feature-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.analysis-card a, .feature-card a { text-decoration: none; }
.analysis-card__image img, .feature-card__image img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.analysis-card__body, .feature-card__body { padding: 16px; }
.analysis-card h2, .feature-card h2 { margin: 0 0 7px !important; font-size: 17px; }
.analysis-card p, .feature-card p { color: var(--muted); font-size: 13px; }
.score-badge { display: inline-block; background: rgba(71,209,140,.15); color: var(--success); border: 1px solid rgba(71,209,140,.35); border-radius: 999px; padding: 4px 9px; font-size: 11px; }
.analysis-result { display: grid; grid-template-columns: minmax(280px,460px) 1fr; gap: 34px; align-items: start; }
.analysis-result__image img { width: 100%; border-radius: 18px; }
.candidate-list { list-style: none; padding: 0; }
.candidate-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.candidate-rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); font-weight: 900; }

.site-footer { border-top: 1px solid var(--line); background: #090b0f; }
.site-footer__inner { padding-block: 36px 110px; color: var(--muted); font-size: 13px; }
.site-footer__inner strong { color: #fff; font-size: 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0; }
.site-footer a { color: #dbe0e9; }
.site-footer__legal { font-size: 11px; }

/* Search drawer inherited from the previous theme */
#search-overlay { position: fixed; inset: 0; z-index: 1998; background: rgba(0,0,0,.72); display: none; }
#search-overlay.open { display: block; }
.search-panel { position: fixed; z-index: 1999; top: 0; right: 0; bottom: 0; width: min(92vw,520px); overflow-y: auto; padding: 18px; background: #11151d; border-left: 1px solid var(--line); transform: translateX(105%); transition: transform .22s ease; box-shadow: -18px 0 50px rgba(0,0,0,.45); }
.search-panel.open { transform: translateX(0); }
.search-header { display: flex; align-items: center; justify-content: space-between; font-weight: 900; font-size: 18px; }
#close-search { border: 1px solid var(--line); border-radius: 50%; width: 38px; height: 38px; background: var(--surface-2); color: #fff; cursor: pointer; }
.search-tabs { display: flex; gap: 8px; margin: 18px 0; }
.search-tabs .tab { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface); color: #fff; }
.search-tabs .tab.active { background: var(--accent); border-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.pref-grid-container { display: grid; gap: 10px; }
.pref-item, .fav-strong-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface); }
.search-top-btn { width: 100%; margin: 10px 0 18px; border: 0; border-radius: 10px; background: linear-gradient(135deg,var(--accent),var(--accent-2)); color: #fff; padding: 12px; font-weight: 900; }
.fav-ac input { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #0b0e14; color: #fff; }
.fav-suggest { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; background: #171b24; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.fav-suggest > * { padding: 9px; cursor: pointer; }

@media (max-width: 1000px) {
  .grid, .catalog-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .profile-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .site-header { position: static; }
  .site-header__inner { align-items: flex-start; flex-direction: column; padding-block: 16px; gap: 12px; }
  .site-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .site-nav a, .site-search-button { white-space: nowrap; }
  .adult-disclosure__inner { align-items: flex-start; }
  .av-search, .archive-search { grid-template-columns: 1fr; }
  .grid, .catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .av-detail__hero, .analysis-result { grid-template-columns: 1fr; }
  .av-detail__cover { max-width: 520px; margin-inline: auto; }
  .profile-hero { grid-template-columns: 120px 1fr; gap: 18px; }
  .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 160px; }
}
@media (max-width: 480px) {
  .site-main, .site-header__inner, .adult-disclosure__inner, .site-footer__inner { width: min(calc(100% - 22px),var(--max)); }
  .site-tagline { display: none; }
  .home-hero__content { padding: 26px 20px; }
  .home-hero h2 { font-size: 31px; }
  .grid, .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card-title { font-size: 12px; }
  .profile-hero { grid-template-columns: 1fr; text-align: center; }
  .profile-hero__image { max-width: 150px; margin-inline: auto; }
  .profile-facts > div { grid-template-columns: 90px 1fr; text-align: left; }
  .profile-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .analysis-grid, .feature-grid { grid-template-columns: 1fr; }
  .work-facts > div { grid-template-columns: 90px 1fr; }
}

/* Additional complete-theme components */
*, *::before, *::after { box-sizing: border-box; }
body { overflow-wrap: anywhere; }
h1, h2, h3, h4 { color: var(--text); }
p, ul, ol, dl { max-width: 100%; }
input::placeholder { color: #7f8798; }
select option { background: #11151d; color: #fff; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(255,79,145,.5);
  outline-offset: 2px;
}
.button:hover, .primary-cta:hover, .av-search button:hover, .search-top-btn:hover { filter: brightness(1.08); }
.term-description { color: #c9cfda; }
.term-description p:last-child { margin-bottom: 0; }
.source-note h2, .prose-card h1, .prose-card h2, .prose-card h3 { margin-top: 0; }
.prose-card a { color: #ff9bc0; }
.feature-hero-image { margin: 24px 0; }
.feature-hero-image img { display: block; width: 100%; border-radius: 16px; }
.update-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.update-list li { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.update-list li:last-child { border-bottom: 0; }
.update-list time { color: var(--muted); font-variant-numeric: tabular-nums; }
.update-list a { text-decoration: none; }
.update-list a:hover { color: #ff9bc0; }

/* Ranking and AI details */
.rank-box { display: grid; grid-template-columns: 100px 1fr; gap: 20px; align-items: center; margin: 24px 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.analysis-score { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: linear-gradient(135deg,var(--accent),var(--accent-2)); font-size: 25px; font-weight: 900; }
.rank-works { margin-top: 20px; }
.candidate-list a { color: #ff9bc0; }

/* Preference search drawer */
.search-panel form, .search-panel { color: var(--text); }
.search-content { padding-bottom: 34px; }
.search-note, .pref-note, .search-guide, .search-empty { color: var(--muted); font-size: 12px; }
.pref-enable { display: flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 800; }
.pref-enable input, .fav-strong-item input { accent-color: var(--accent); }
.pref-slider { margin-top: 12px; }
.pref-slider input[type="range"] { width: 100%; accent-color: var(--accent); }
.pref-labels { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.fav-strong-prefs { display: grid; gap: 8px; }
.fav-strong-item { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.fav-strong-item.strong { border-color: rgba(255,79,145,.55); }
.fav-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: #fff; text-align: left; }
.fav-item:hover { background: var(--surface-2); }
.fav-item .c { color: var(--muted); font-size: 11px; }
.search-result { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.actress-result-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.actress-result-link { display: flex; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-decoration: none; }
.actress-result-link:hover { border-color: #596276; }
.actress-face { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #080a0e; }
.actress-name { font-size: 13px; font-weight: 800; }

/* Safe ad and media layout */
.ad-slot iframe, .ad-slot img { max-width: 100%; }
.video-wrap video { object-fit: contain; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (max-width: 760px) {
  .rank-box { grid-template-columns: 1fr; }
  .analysis-score { width: 76px; height: 76px; }
  .update-list li { grid-template-columns: 1fr; gap: 3px; }
}
@media (max-width: 420px) {
  .actress-result-list { grid-template-columns: 1fr; }
}
