:root {
  color-scheme: dark;
  --bg:           #0f0f0f;
  --bg-alt:       #141414;
  --ink:          #e8e6e2;
  --muted:        #888680;
  --line:         #272523;
  --panel:        #1a1917;
  --panel-soft:   #222120;
  --accent:       #c9364f;
  --accent-dim:   #7f1531;
  --focus:        #4fa8d5;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* ---- Header ---- */

.site-header {
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner,
.site-footer__inner,
.section,
.content,
.home-hero {
  margin: 0 auto;
  max-width: 1120px;
  padding-left: 24px;
  padding-right: 24px;
}

.site-header__inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 68px;
}

/* ---- Search ---- */

.search-wrap {
  flex: 1;
  max-width: 360px;
  position: relative;
}

.search-form {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 6px;
  padding: 0 10px;
  transition: border-color .15s;
}

.search-form:focus-within {
  border-color: var(--focus);
}

.search-icon {
  color: var(--muted);
  flex-shrink: 0;
  height: 16px;
  width: 16px;
}

.search-input {
  background: none;
  border: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  flex: 1;
  min-width: 0;
  outline: none;
  padding: 9px 0;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input::-webkit-search-cancel-button { display: none; }

.search-clear {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 4px;
}

.search-results {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  left: 0;
  max-height: 480px;
  overflow-y: auto;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 100;
}

.search-result-item {
  align-items: center;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  text-decoration: none;
  transition: background .12s;
}

.search-result-item:hover {
  background: var(--panel-soft);
}

.search-result-thumb {
  border-radius: 4px;
  flex-shrink: 0;
  height: 40px;
  object-fit: cover;
  width: 56px;
}

.search-result-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.search-result-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-result-sub {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 12px 10px;
  margin: 0;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand__mark {
  align-items: center;
  background: var(--accent);
  border-radius: 7px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  height: 34px;
  justify-content: center;
  letter-spacing: 0;
  width: 34px;
}

.brand__text {
  font-size: 17px;
  letter-spacing: 0.02em;
}

.primary-nav,
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.primary-nav a,
.footer-nav a {
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  padding: 7px 11px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.primary-nav a:hover,
.footer-nav a:hover {
  background: var(--panel-soft);
  color: var(--ink);
}

/* ---- Main / layout ---- */

main {
  min-height: 62vh;
}

.section,
.content {
  padding-bottom: 56px;
  padding-top: 56px;
}

.section + .section {
  padding-top: 0;
}

/* ---- Hero ---- */

.home-hero {
  padding-bottom: 56px;
  padding-top: 80px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 10% 50%, rgba(201, 54, 79, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero__copy {
  max-width: 720px;
  position: relative;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1,
h2 {
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 18px;
}

/* ---- Section header ---- */

.section__header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section__header a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

.section__header a:hover {
  color: #e05070;
}

/* ---- Post grid ---- */

.post-list,
.post-grid {
  display: grid;
  margin-top: 0;
}

.post-list {
  gap: 8px;
}

.post-grid {
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-item {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 60px;
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s;
}

.post-item:hover {
  background: var(--panel-soft);
  border-color: rgba(201, 54, 79, 0.35);
}

.post-item time {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 13px;
}

/* ---- Post card ---- */

.post-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding: 0;
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.post-card:hover {
  border-color: rgba(201, 54, 79, 0.4);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.post-card__image {
  aspect-ratio: 3 / 2;
  background: var(--panel-soft);
  border-radius: 0;
  display: block;
  object-fit: cover;
  width: 100%;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
}

.post-card__meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  gap: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-card strong {
  color: var(--ink);
  display: block;
  font-size: 15px;
  line-height: 1.45;
}

.post-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

/* ---- Taxonomy grid ---- */

.taxonomy-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.taxonomy-grid a {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 110px;
  padding: 18px 20px;
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s;
}

.taxonomy-grid a:hover {
  background: var(--panel-soft);
  border-color: rgba(201, 54, 79, 0.4);
}

.taxonomy-grid span {
  color: var(--accent);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.taxonomy-grid strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

/* ---- Pagination ---- */

.pagination {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  padding: 8px 14px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.pagination a:hover {
  background: var(--panel-soft);
  border-color: rgba(201, 54, 79, 0.4);
}

.pagination span {
  color: var(--muted);
}

/* ---- Empty state ---- */

.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  margin-top: 0;
  padding: 20px;
}

/* ---- Content (article) ---- */

.content {
  max-width: 860px;
}

.content h1 {
  margin-bottom: 24px;
}

.content h2 {
  margin: 36px 0 12px;
}

.content ul {
  padding-left: 22px;
}

.article-hero {
  margin: 0 0 32px;
}

.article-hero img {
  aspect-ratio: 16 / 9;
  background: var(--panel-soft);
  border-radius: 10px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.article-hero figcaption {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

/* ---- Site map ---- */

.site-map {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.site-map section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.site-map h2 {
  font-size: 17px;
}

.site-map a {
  color: var(--accent);
  text-decoration: none;
}

/* ---- Article tag links ---- */

.article-tags {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 40px;
  padding-top: 28px;
}

.article-tags__group {
  align-items: flex-start;
  display: flex;
  gap: 12px;
}

.article-tags__label {
  color: var(--muted);
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding-top: 4px;
  text-transform: uppercase;
  width: 64px;
}

.article-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.article-tag {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  padding: 4px 10px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.article-tag:hover {
  background: var(--panel-soft);
  border-color: rgba(201, 54, 79, 0.4);
  color: var(--ink);
}

/* ---- FANZA product (article inline) ---- */

.fanza-product {
  margin: 40px 0;
}

.fanza-product__samples {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 32px;
}

.fanza-product__samples img {
  border-radius: 6px;
  display: block;
  width: 100%;
  height: auto;
}

.fanza-product__video {
  margin-bottom: 32px;
}

.fanza-product__video iframe {
  aspect-ratio: 3 / 2;
  background: #000;
  border-radius: 8px;
  display: block;
  height: auto;
  width: 100%;
}

.fanza-product__video-note {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 0;
}

.fanza-product__cta {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}

.fanza-product__btn {
  background: var(--accent);
  border-radius: 8px;
  color: #fff;
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 32px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.fanza-product__btn:hover {
  background: #e04060;
  transform: translateY(-1px);
}

.fanza-product__credit {
  color: var(--muted);
  font-size: 12px;
  margin: 14px 0 0;
}

.fanza-product__credit a {
  color: var(--muted);
}

.fanza-product__missing {
  color: var(--muted);
  font-size: 13px;
}

/* ---- Product card ---- */

.product-card {
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 20px;
  grid-template-columns: 140px 1fr;
  margin: 32px 0;
  padding: 20px;
}

.product-card img {
  border-radius: 6px;
  max-width: 100%;
}

.product-card a,
.age-actions button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  margin-top: 14px;
  padding: 10px 18px;
  text-decoration: none;
  transition: background 0.15s;
}

.product-card a:hover,
.age-actions button:hover {
  background: #e04060;
}

.product-card small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 10px;
}

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

.site-footer__inner {
  align-items: flex-start;
  display: flex;
  gap: 32px;
  justify-content: space-between;
  padding-bottom: 32px;
  padding-top: 32px;
}

.site-footer p {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
  max-width: 480px;
}

/* ---- Age gate ---- */

.age-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.age-gate {
  max-width: 560px;
  padding: 24px;
  text-align: center;
}

.age-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.age-actions a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 18px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.age-actions a:hover {
  background: var(--panel-soft);
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-wrap {
    max-width: 240px;
  }
}

@media (max-width: 680px) {
  .site-header__inner {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
  }
  .search-wrap {
    flex: 1 1 100%;
    max-width: none;
    order: 3;
  }
  .site-footer__inner,
  .post-item,
  .section__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-hero {
    padding-bottom: 44px;
    padding-top: 52px;
  }

  h1 {
    font-size: 32px;
  }

  .taxonomy-grid,
  .site-map,
  .post-grid {
    grid-template-columns: 1fr 1fr;
  }

  .product-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .taxonomy-grid,
  .site-map {
    grid-template-columns: 1fr 1fr;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }
}
