.fanza-page {
  --catalog-muted: #555854;
}

.fanza-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.fanza-header-inner,
.fanza-catalog,
.fanza-footer-inner {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.fanza-header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.fanza-header-inner > span {
  color: var(--catalog-muted);
  font-size: 13px;
}

.fanza-catalog {
  padding-block: 48px 64px;
}

.fanza-kicker {
  margin-bottom: 12px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.fanza-intro {
  max-width: 780px;
  margin-bottom: 32px;
}

.fanza-intro h1 {
  margin-bottom: 20px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.35;
}

.fanza-intro p {
  margin-bottom: 12px;
}

.fanza-scope,
.fanza-note {
  color: var(--catalog-muted);
  font-size: 13px;
  line-height: 1.8;
}

.fanza-preview {
  margin-bottom: 28px;
  padding: 16px 20px;
  background: var(--warn-soft);
  border: 1px solid #dfc5a4;
  border-radius: var(--radius-md);
}

.fanza-preview p {
  margin: 5px 0 0;
}

.fanza-search {
  max-width: 780px;
  margin-bottom: 36px;
}

.fanza-search label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}

.fanza-search-controls {
  display: flex;
  gap: 10px;
}

.fanza-search-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.fanza-suggestions {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  inset-inline: 0;
  max-height: min(420px, 55vh);
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 8px 24px #25242124;
}

.fanza-suggestions[hidden] {
  display: none;
}

.fanza-suggestions > li {
  min-height: 44px;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
}

.fanza-suggestions > li:hover,
.fanza-suggestions > li[aria-selected="true"] {
  color: var(--ink);
  background: var(--accent-soft);
  outline: 1px solid var(--accent-dark);
  outline-offset: -1px;
}

.fanza-suggestion-title,
.fanza-suggestion-kind {
  display: block;
  overflow-wrap: anywhere;
}

.fanza-suggestion-title {
  font-size: 14px;
  line-height: 1.5;
}

.fanza-suggestion-kind {
  margin-top: 4px;
  color: var(--catalog-muted);
  font-size: 11px;
}

.fanza-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.fanza-search input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 16px;
}

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

.fanza-button,
.fanza-text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.fanza-button-primary {
  color: #fff;
  background: var(--accent-dark);
}

.fanza-button-primary:hover {
  background: #89192e;
}

.fanza-button-secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
}

.fanza-button-secondary:hover {
  background: var(--surface-2);
  border-color: #898b87;
}

.fanza-page a:focus-visible,
.fanza-page button:focus-visible,
.fanza-page input:focus-visible,
.fanza-page summary:focus-visible,
.fanza-performers-scroll:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 3px;
}

.fanza-results-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.fanza-results-heading h2 {
  margin: 0;
  font-size: 20px;
}

.fanza-results-heading p {
  margin: 0;
  color: var(--catalog-muted);
  font-size: 13px;
}

.fanza-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
}

.fanza-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.fanza-card-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--catalog-muted);
  font-size: 12px;
}

.fanza-card-source > span:first-child {
  padding: 4px 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.fanza-card h3 {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

.fanza-title-link {
  color: inherit;
  text-decoration: none;
}

.fanza-title-link:hover {
  text-decoration: underline;
}

.fanza-card-facts {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 11px;
}

.fanza-card-facts div {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 8px;
}

.fanza-card-facts dt {
  color: var(--catalog-muted);
}

.fanza-card-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.fanza-performer-tags {
  margin-top: 8px;
}

.fanza-performers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fanza-performers li {
  min-width: 0;
}

.fanza-performers-more {
  margin-top: 6px;
}

.fanza-performers-more summary {
  min-height: 44px;
  padding: 11px 4px;
  color: var(--accent-dark);
  font-size: 13px;
  cursor: pointer;
}

.fanza-performers-scroll {
  max-height: 180px;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.fanza-performers a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 5px 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.fanza-card-media {
  display: grid;
  height: 130px;
  min-height: 0;
  margin: 0 0 10px;
  padding: 4px;
  place-items: center;
  background: var(--surface-2);
  border-radius: 8px;
}

.fanza-card-media img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.fanza-media-link {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  place-items: center;
}

.fanza-card-media p {
  margin: 0;
  color: var(--catalog-muted);
  font-size: 12px;
}

.fanza-provenance {
  margin-top: 8px;
  padding-top: 0;
  color: var(--catalog-muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.8;
}

.fanza-provenance summary {
  min-height: 44px;
  padding-block: 12px;
  cursor: pointer;
}

.fanza-provenance p {
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.fanza-card-action {
  margin-top: 0;
}

.fanza-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  align-items: start;
  gap: 8px;
}

.fanza-card-actions .fanza-button {
  width: 100%;
  padding-inline: 8px;
  font-size: 13px;
}

.fanza-commerce {
  margin-bottom: 10px;
  padding: 8px;
  background: var(--surface-2);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.fanza-price-current {
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
}

.fanza-price-discount {
  display: inline-block;
  margin: 0;
  padding: 2px 4px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 4px;
  font-size: 10px;
}

.fanza-price-list {
  margin-left: 0;
  color: var(--catalog-muted);
  font-size: 10px;
}

.fanza-commerce-deliveries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 6px 10px;
  margin: 0;
}

.fanza-commerce-deliveries > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding-block: 3px;
}

.fanza-commerce-deliveries dt {
  font-size: 11px;
  line-height: 1.4;
}

.fanza-commerce-deliveries dd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 5px;
  margin: 0;
  line-height: 1.4;
}

.fanza-commerce-note {
  margin: 4px 0 0;
  color: var(--catalog-muted);
  font-size: 11px;
  line-height: 1.5;
}

.fanza-commerce-note summary {
  min-height: 44px;
  padding-block: 12px;
  cursor: pointer;
}

.fanza-commerce-note p {
  margin: 0 0 4px;
}

.fanza-commerce-note time {
  white-space: normal;
}

.fanza-card > .fanza-commerce-note {
  margin: 0 0 8px;
}

.fanza-ad-notice {
  margin-bottom: 0;
  color: var(--catalog-muted);
  font-size: 11px;
}

.fanza-card-action .fanza-button {
  width: 100%;
}

.fanza-sample-action {
  display: contents;
}

.fanza-sample-action .fanza-button {
  width: 100%;
}

.fanza-manual-links {
  grid-column: 1 / -1;
  margin-top: 0;
  font-size: 12px;
}

.fanza-manual-links summary {
  min-height: 44px;
  padding-block: 11px;
  cursor: pointer;
}

.fanza-manual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.fanza-manual-actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.fanza-manual-links .fanza-note,
.fanza-popup-status {
  margin: 6px 0;
}

.fanza-popup-status,
.fanza-sample-action > .fanza-link-unavailable {
  grid-column: 1 / -1;
}

.fanza-button:disabled {
  color: var(--catalog-muted);
  background: var(--surface-2);
  cursor: not-allowed;
}

.fanza-link-unavailable {
  margin: 6px 0 0;
  color: var(--catalog-muted);
  font-size: 12px;
}

.fanza-paging {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

.fanza-paging > span {
  color: var(--catalog-muted);
  font-size: 12px;
  white-space: nowrap;
}

.fanza-data-note,
.fanza-empty {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.fanza-data-note {
  margin-top: 40px;
  color: var(--catalog-muted);
  background: var(--surface-2);
  font-size: 13px;
}

.fanza-data-note h2,
.fanza-empty h2 {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
}

.fanza-data-note p:last-child,
.fanza-empty p:last-child {
  margin-bottom: 0;
}

.fanza-age-main {
  display: grid;
  min-height: 58vh;
  place-items: center;
}

.fanza-age-panel {
  width: 100%;
  max-width: 540px;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.fanza-age-panel h1 {
  font-size: clamp(26px, 4vw, 32px);
  line-height: 1.4;
}

.fanza-age-form {
  margin-block: 24px 8px;
}

.fanza-age-form button {
  width: 100%;
}

.fanza-text-link {
  padding-inline: 0;
  text-decoration: underline;
}

.fanza-footer {
  color: var(--catalog-muted);
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.fanza-footer-inner {
  padding-block: 28px;
}

.fanza-footer p {
  margin-bottom: 12px;
}

.fanza-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.fanza-footer nav a,
.fanza-credit a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

@media (max-width: 1000px) {
  .fanza-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fanza-header-inner,
  .fanza-catalog,
  .fanza-footer-inner {
    width: calc(100% - 32px);
  }

  .fanza-header-inner {
    min-height: 64px;
  }

  .fanza-header-inner > span {
    font-size: 11px;
  }

  .fanza-catalog {
    padding-block: 32px 40px;
  }

  .fanza-card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .fanza-card {
    padding: 14px;
  }

  .fanza-age-panel {
    padding: 24px;
  }

  .fanza-results-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .fanza-search-controls {
    gap: 8px;
  }

  .fanza-search-controls .fanza-button {
    padding-inline: 14px;
  }

  .fanza-paging {
    gap: 8px;
  }

  .fanza-paging .fanza-button {
    padding-inline: 12px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .fanza-paging {
    flex-wrap: wrap;
  }

  .fanza-paging > span {
    flex-basis: 100%;
    order: -1;
    text-align: center;
  }
}
