/*
Theme Name: YOMIFUKA Doujin
Author: Local Site Operations
Description: Evidence-first discovery theme for the YOMIFUKA doujin catalog.
Version: 0.1.4
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: yomifuka-doujin
*/

:root {
  color-scheme: light;
  --yd-ink: #171318;
  --yd-muted: #6c646b;
  --yd-paper: #fffdfb;
  --yd-soft: #f5f0f3;
  --yd-line: #dfd7dc;
  --yd-red: #b61636;
  --yd-red-dark: #831127;
  --yd-plum: #472036;
  --yd-green: #087546;
  --yd-focus: #086fca;
  --yd-width: 1240px;
  --yd-serif: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--yd-paper); color: var(--yd-ink); }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
.screen-reader-text { position: absolute; 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 { z-index: 99999; width: auto; height: auto; padding: 10px; clip: auto; background: #fff; }
.yd-wrap { width: min(calc(100% - 48px), var(--yd-width)); margin-inline: auto; }
.yd-site a:focus-visible, .yd-site button:focus-visible, .yd-site input:focus-visible { outline: 3px solid var(--yd-focus); outline-offset: 3px; }

.yd-utility { padding: 7px 24px; background: #181318; color: #d8d0d5; font-size: 11px; text-align: center; letter-spacing: .06em; }
.yd-header { border-bottom: 1px solid var(--yd-line); background: rgba(255,253,251,.98); }
.yd-header__main { display: grid; grid-template-columns: 250px minmax(320px, 620px); gap: 18px 42px; align-items: center; padding: 20px 0 15px; }
.yd-brand { text-decoration: none; }
.yd-brand strong { display: block; color: var(--yd-red); font-family: var(--yd-serif); font-size: 30px; letter-spacing: .08em; }
.yd-brand small { display: block; margin-top: 2px; color: var(--yd-muted); font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.yd-search { display: flex; min-height: 48px; border: 1px solid #8f858b; background: #fff; }
.yd-search:focus-within { border-color: var(--yd-focus); box-shadow: 0 0 0 3px rgba(8,111,202,.16); }
.yd-search input { min-width: 0; flex: 1; padding: 0 16px; border: 0; outline: 0; }
.yd-search button { min-width: 88px; border: 0; background: var(--yd-green); color: #fff; font-weight: 900; cursor: pointer; }
.yd-nav { grid-column: 1 / -1; border-top: 1px solid #eee7eb; padding-top: 13px; }
.yd-nav ul { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; }
.yd-nav a { font-size: 12px; font-weight: 850; text-decoration: none; }
.yd-nav a:hover { color: var(--yd-red); }

.yd-intro { border-bottom: 1px solid var(--yd-line); background: linear-gradient(110deg, rgba(182,22,54,.08), transparent 45%), var(--yd-soft); }
.yd-intro__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 54px; align-items: center; min-height: 300px; padding-block: 48px; }
.yd-kicker { margin: 0 0 10px; color: var(--yd-red); font-family: var(--yd-serif); font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.yd-intro h1 { margin: 0; font-family: var(--yd-serif); font-size: clamp(36px, 4.4vw, 58px); font-weight: 600; line-height: 1.22; }
.yd-intro__copy > p:last-child { max-width: 610px; margin: 18px 0 0; color: var(--yd-muted); font-size: 14px; line-height: 1.9; }
.yd-status { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--yd-line); background: var(--yd-line); }
.yd-status div { min-height: 96px; padding: 18px; background: #fff; }
.yd-status span { display: block; color: var(--yd-muted); font-size: 11px; }
.yd-status strong { display: block; margin-top: 7px; font-family: var(--yd-serif); font-size: 25px; }
.yd-status small { font-size: 10px; color: var(--yd-muted); }

.yd-quick { border-bottom: 1px solid var(--yd-line); background: #fff; }
.yd-quick__grid { display: flex; }
.yd-quick__label { display: flex; flex: 0 0 120px; align-items: center; color: var(--yd-muted); font-family: var(--yd-serif); font-size: 10px; letter-spacing: .16em; }
.yd-quick a { display: flex; flex: 1 1 0; min-height: 64px; align-items: center; justify-content: space-between; padding: 0 18px; border-left: 1px solid var(--yd-line); font-size: 12px; font-weight: 850; text-decoration: none; }
.yd-quick a::after { content: "→"; color: var(--yd-red); }

.yd-section { padding: 62px 0; }
.yd-section--soft { border-block: 1px solid var(--yd-line); background: var(--yd-soft); }
.yd-section-head { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 30px; margin-bottom: 25px; border-bottom: 2px solid var(--yd-ink); padding-bottom: 13px; }
.yd-section-head h1, .yd-section-head h2 { margin: 0; font-family: var(--yd-serif); font-size: 30px; font-weight: 650; }
.yd-section-head p { max-width: 500px; margin: 0; color: var(--yd-muted); font-size: 12px; line-height: 1.7; text-align: right; }
.yd-section-head p:first-of-type { margin-left: auto; }
.yd-section-link { margin-left: auto; color: var(--yd-red-dark); font-size: 12px; font-weight: 850; text-underline-offset: 3px; }

.yd-entity-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.yd-entity { min-height: 115px; padding: 18px; border: 1px solid var(--yd-line); background: #fff; text-decoration: none; transition: transform .16s ease, border-color .16s ease; }
.yd-entity:hover { transform: translateY(-2px); border-color: var(--yd-red); }
.yd-entity b { display: inline-grid; min-width: 44px; min-height: 28px; padding: 4px 8px; place-items: center; background: var(--yd-red); color: #fff; font-size: 10px; letter-spacing: .08em; }
.yd-entity strong { display: block; margin-top: 12px; font-family: var(--yd-serif); font-size: 16px; }
.yd-entity small { color: var(--yd-muted); font-size: 10px; }

.yd-work-list { display: grid; gap: 14px; }
.yd-card { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 164px; overflow: hidden; border: 1px solid var(--yd-line); background: #fff; }
.yd-card__media { position: relative; overflow: hidden; background: #ece7e9; aspect-ratio: 16 / 10; }
.yd-card__media img { width: 100%; height: 100%; object-fit: contain; background: #ece7e9; }
.yd-card__empty { display: grid; width: 100%; height: 100%; place-items: center; color: #898087; font-size: 11px; }
.yd-card__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-content: center; padding: 22px 24px; }
.yd-card__meta { margin: 0 0 8px; color: var(--yd-red); font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.yd-card h3 { margin: 0; font-family: var(--yd-serif); font-size: 20px; line-height: 1.45; }
.yd-card h3 a { text-decoration: none; }
.yd-card h3 a:hover { color: var(--yd-red); text-decoration: underline; }
.yd-card__summary { margin: 10px 0 0; color: var(--yd-muted); font-size: 12px; line-height: 1.7; }
.yd-card__date { align-self: start; color: var(--yd-muted); font-size: 10px; white-space: nowrap; }
.yd-empty { padding: 28px; border: 1px solid var(--yd-line); background: #fff; color: var(--yd-muted); line-height: 1.8; }
.yd-pagination { display: flex; justify-content: center; margin-top: 28px; }
.yd-pagination a { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 24px; border: 1px solid var(--yd-red-dark); color: var(--yd-red-dark); font-size: 13px; font-weight: 850; text-decoration: none; }
.yd-pagination a:hover { background: var(--yd-red-dark); color: #fff; }

.yd-guide { display: grid; grid-template-columns: .8fr 1.2fr; gap: 52px; }
.yd-guide h2 { margin: 0; font-family: var(--yd-serif); font-size: 32px; }
.yd-guide > div > p:last-child { color: var(--yd-muted); line-height: 1.9; }
.yd-guide ol { margin: 0; padding: 0; list-style: none; counter-reset: guide; }
.yd-guide li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; border-top: 1px solid var(--yd-line); padding: 17px 0; counter-increment: guide; }
.yd-guide li::before { content: "0" counter(guide); color: var(--yd-red); font-family: var(--yd-serif); font-size: 18px; }
.yd-guide strong { display: block; }
.yd-guide span { display: block; margin-top: 4px; color: var(--yd-muted); font-size: 12px; }

.yd-article { width: min(calc(100% - 48px), 980px); margin: 0 auto; padding: 55px 0 80px; }
.yd-article__head { border-bottom: 1px solid var(--yd-line); padding-bottom: 25px; }
.yd-article__head h1 { margin: 0; font-family: var(--yd-serif); font-size: clamp(30px, 4vw, 48px); line-height: 1.35; }
.yd-article__date { color: var(--yd-muted); font-size: 11px; }
.yd-article__facts { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 0; padding: 0; list-style: none; }
.yd-article__facts li { padding: 5px 9px; border: 1px solid var(--yd-line); background: var(--yd-soft); color: var(--yd-muted); font-size: 11px; }
.yd-article__visual { margin: 28px 0; background: var(--yd-soft); }
.yd-article__visual img { max-height: 680px; margin: auto; object-fit: contain; }
.yd-article__content { font-size: 16px; line-height: 1.95; }
.yd-article__content h2 { margin: 42px 0 14px; border-bottom: 2px solid var(--yd-ink); padding-bottom: 10px; font-family: var(--yd-serif); font-size: 27px; line-height: 1.45; }
.yd-article__content .fanza-lead { margin: 28px 0; padding: 18px 20px; border-left: 4px solid var(--yd-red); background: var(--yd-soft); }
.yd-article__content .fanza-sample-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.yd-article__content .fanza-sample-grid figure { margin: 0; overflow: hidden; background: var(--yd-soft); }
.yd-article__content .fanza-sample-grid img { width: 100%; margin: 0; object-fit: contain; }
.yd-article__content .fanza-affiliate-button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; padding: 0 24px; border: 2px solid var(--yd-red-dark); background: var(--yd-red-dark); color: #fff; font-weight: 850; text-decoration: none; }
.yd-article__content .fanza-affiliate-button:hover { background: #fff; color: var(--yd-red-dark); }
.yd-article__content img { height: auto; margin: 22px auto; }
.yd-article__content a { color: var(--yd-red-dark); }
.yd-source-note { margin-top: 34px; padding: 20px; border: 1px solid var(--yd-line); background: var(--yd-soft); color: var(--yd-muted); font-size: 12px; line-height: 1.8; }

.yd-page { width: min(calc(100% - 48px), 900px); margin: 0 auto; padding: 55px 0 80px; }
.yd-page__head { border-bottom: 2px solid var(--yd-ink); padding-bottom: 22px; }
.yd-page__head h1 { margin: 0; font-family: var(--yd-serif); font-size: clamp(30px, 4vw, 46px); line-height: 1.35; }
.yd-page__date { display: block; margin-top: 12px; color: var(--yd-muted); font-size: 11px; }
.yd-page__content { font-size: 16px; line-height: 1.95; }
.yd-page__content > *:first-child { margin-top: 28px; }
.yd-page__content h2 { margin: 42px 0 14px; border-bottom: 1px solid var(--yd-line); padding-bottom: 10px; font-family: var(--yd-serif); font-size: 25px; line-height: 1.45; }
.yd-page__content h3 { margin: 30px 0 10px; font-family: var(--yd-serif); font-size: 20px; }
.yd-page__content ul, .yd-page__content ol { padding-left: 1.5em; }
.yd-page__content li + li { margin-top: 8px; }
.yd-page__content a { color: var(--yd-red-dark); text-underline-offset: 3px; }
.yd-page__contact { margin-top: 38px; border: 1px solid var(--yd-line); padding: 24px; background: var(--yd-soft); }
.yd-page__contact h2 { margin: 0 0 10px; border: 0; padding: 0; font-family: var(--yd-serif); font-size: 23px; }
.yd-page__contact p { margin: 0; color: var(--yd-muted); }
.yd-page__contact a { display: inline-flex; min-height: 48px; align-items: center; margin-top: 16px; padding: 0 18px; border: 1px solid var(--yd-red-dark); background: #fff; color: var(--yd-red-dark); font-weight: 850; text-decoration: none; }
.yd-page__contact a:hover { background: var(--yd-red-dark); color: #fff; }
.yd-page__notice { margin-top: 38px; border-left: 4px solid var(--yd-red); padding: 16px 18px; background: var(--yd-soft); color: var(--yd-muted); font-size: 13px; line-height: 1.8; }

.yd-footer { border-top: 1px solid var(--yd-line); background: #181318; color: #d7cfd4; }
.yd-footer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 34px 0; }
.yd-footer strong { color: #fff; font-family: var(--yd-serif); }
.yd-footer p { margin: 8px 0 0; font-size: 11px; line-height: 1.8; }
.yd-footer nav { display: flex; justify-content: end; align-items: center; gap: 20px; }
.yd-footer a { display: inline-flex; min-height: 36px; align-items: center; font-size: 12px; }

@media (max-width: 900px) {
  .yd-intro__grid { grid-template-columns: 1fr; gap: 28px; }
  .yd-entity-grid { grid-template-columns: repeat(3, 1fr); }
  .yd-quick__label { display: none; }
}

@media (max-width: 620px) {
  .yd-wrap, .yd-article, .yd-page { width: min(calc(100% - 28px), var(--yd-width)); }
  .yd-utility { padding: 7px 14px; font-size: 10px; line-height: 1.4; }
  .yd-header__main { grid-template-columns: 1fr; gap: 8px; padding: 10px 0 7px; }
  .yd-brand strong { font-size: 23px; }
  .yd-brand small { display: none; }
  .yd-search { min-height: 42px; }
  .yd-nav { overflow-x: auto; }
  .yd-nav { padding-top: 4px; }
  .yd-nav ul { width: max-content; flex-wrap: nowrap; }
  .yd-nav a { display: inline-flex; min-height: 44px; align-items: center; }
  .yd-intro__grid { min-height: 0; gap: 13px; padding-block: 18px; }
  .yd-kicker { margin-bottom: 6px; font-size: 10px; }
  .yd-intro h1 { font-size: 29px; line-height: 1.17; }
  .yd-intro__copy > p:last-child { margin-top: 9px; font-size: 12px; line-height: 1.5; }
  .yd-status div { min-height: 56px; padding: 7px 10px; }
  .yd-status span { font-size: 9px; }
  .yd-status strong { margin-top: 2px; font-size: 17px; }
  .yd-status small { display: none; }
  .yd-quick a { min-height: 44px; justify-content: center; padding-inline: 5px; border-bottom: 1px solid var(--yd-line); font-size: 10px; }
  .yd-quick a::after { display: none; }
  .yd-section { padding: 28px 0; }
  .yd-section-head { display: block; }
  .yd-section-head { margin-bottom: 16px; padding-bottom: 9px; }
  .yd-section-head h1, .yd-section-head h2 { font-size: 25px; }
  .yd-section-head p, .yd-section-head p:first-of-type { margin: 5px 0 0; line-height: 1.5; text-align: left; }
  .yd-section-link { display: inline-flex; min-height: 44px; align-items: center; margin: 8px 0 -8px; }
  .yd-entity-grid { grid-template-columns: repeat(2, 1fr); }
  .yd-card { grid-template-columns: 128px minmax(0, 1fr); min-height: 132px; }
  .yd-card__media { aspect-ratio: auto; min-height: 132px; }
  .yd-card__body { display: block; padding: 14px; }
  .yd-card h3 { font-size: 15px; }
  .yd-card__summary { display: none; }
  .yd-card__date { display: block; margin-top: 8px; }
  .yd-guide { grid-template-columns: 1fr; gap: 20px; }
  .yd-article { padding-top: 34px; }
  .yd-article__content { font-size: 15px; }
  .yd-article__content h2 { margin-top: 34px; font-size: 23px; }
  .yd-article__content .fanza-sample-grid { grid-template-columns: 1fr; }
  .yd-article__content .fanza-affiliate-button { width: 100%; padding-inline: 14px; }
  .yd-page { padding-top: 34px; }
  .yd-page__content { font-size: 15px; }
  .yd-page__content h2 { margin-top: 34px; font-size: 22px; }
  .yd-page__contact { padding: 18px; }
  .yd-page__contact a { width: 100%; justify-content: center; padding-inline: 12px; }
  .yd-footer__grid { grid-template-columns: 1fr; }
  .yd-footer nav { justify-content: start; flex-wrap: wrap; }
  .yd-footer a { min-height: 44px; }
}
