/* ── Variables ── */
:root {
  --bg:           #f0f2f5;
  --surface:      #ffffff;
  --surface-soft: #f8f8f8;
  --line:         #e4e4e4;
  --line-strong:  #c8c8c8;
  --text:         #111111;
  --text-soft:    #444444;
  --muted:        #888888;
  --accent:       #c0171d;
  --accent-dark:  #961217;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; height: auto; }

/* ── Header ── */
.site-header {
  background: var(--surface);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.site-nav a {
  padding: 0 10px;
  height: 44px;
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-soft);
  border-left: 1px solid var(--line);
}

.site-nav a:first-child { border-left: 0; }

.site-nav a:hover {
  background: var(--bg);
  color: var(--text);
}

/* ── Header search ── */
.site-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  flex-shrink: 0;
  margin-left: auto;
}

.site-search__input {
  border: 0;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
  height: 30px;
  padding: 0 10px;
  width: 200px;
  font-family: inherit;
}

.site-search__input::placeholder { color: var(--muted); }

.site-search__btn {
  border: 0;
  border-left: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-soft);
  height: 30px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
  white-space: nowrap;
}

.site-search__btn:hover {
  background: var(--bg);
  color: var(--accent);
}

/* ── Page shell ── */
.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px 60px;
}

/* ── Site hero ── */
.site-hero {
  background: linear-gradient(150deg, #e8f0fb 0%, #f3f6fb 60%, #f5f7fa 100%);
  border: 1px solid #d8e4f5;
  padding: 22px 24px 20px;
  margin-bottom: 10px;
}

.site-hero__badge {
  display: inline-block;
  background: rgba(74, 144, 226, 0.12);
  color: #3a72c8;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.site-hero__title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.site-hero__desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 18px;
  max-width: 640px;
}

/* ── Site stat bar ── */
.site-stat-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.site-stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px 24px 14px;
  min-width: 160px;
}

.site-stat-card__label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.site-stat-card__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

/* ── List page: top bar ── */
.archive-top {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 11px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.archive-top__title {
  font-size: 1rem;
  font-weight: 700;
}

.archive-top__meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 14px;
}

/* ── Utility bar ── */
.utility-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.utility-bar__sep { color: var(--line-strong); }

/* ── Thumbnail grid ── */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 10px;
  align-items: start;
}

/* ── Card ── */
.archive-card {
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.archive-card__thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.archive-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
  transition: opacity 0.15s;
}

.archive-card__thumb:hover img { opacity: 0.85; }

.archive-card__body {
  padding: 10px 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.archive-card__title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.archive-card__title a { color: var(--text); }
.archive-card__title a:hover { color: var(--accent); }

.archive-card__meta {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  margin-top: auto;
}

.archive-card__actress {
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-card__price {
  font-size: 0.76rem;
  color: var(--accent);
  font-weight: 700;
}

/* ── Empty state ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
}

.pagination a:hover {
  background: var(--bg);
  color: var(--text);
}

.pagination .current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 700;
}

.pagination .disabled {
  color: var(--muted);
  background: var(--surface-soft);
}

/* ── Detail page wrapper ── */
.entry-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 22px 26px 32px;
}

/* ── Entry title + id row ── */
.entry-title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}

.entry-id-row {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

/* ── Detail: media row (video + jacket) ── */
.entry-media {
  display: block;
  margin-bottom: 20px;
}

.video-placeholder {
  background: #111;
  color: var(--muted);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
}

/* ── Detail: meta section ── */
.meta-section {
  margin-bottom: 20px;
}

/* ── Detail: bottom CTA ── */
.cta-block--bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  margin-bottom: 0;
}

/* ── Video block ── */
.video-block {
  margin-bottom: 16px;
  max-width: 820px;
}

.video-block__player {
  background: #000;
  border: 1px solid var(--line-strong);
  width: min(100%, 460px);
  margin: 0 auto;
  overflow: hidden;
}

.video-block__player iframe {
  display: block;
  width: 100%;
  aspect-ratio: 14 / 9;
  border: 0;
}

.video-block__ext {
  margin-top: 6px;
  font-size: 0.76rem;
}

.video-block__ext a {
  color: var(--accent);
  text-decoration: underline;
}

/* ── CTA block ── */
.cta-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 28px;
  background: var(--accent);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

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

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.82rem;
}

.btn-ghost:hover { background: var(--bg); }

/* ── Entry body: meta + sidebar ── */
.entry-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 28px;
  align-items: start;
}

/* ── Metadata table ── */
.meta-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.meta-table tr { border-bottom: 1px solid var(--line); }

.meta-table th {
  width: 100px;
  padding: 8px 10px 8px 0;
  color: var(--muted);
  font-weight: 400;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.meta-table td {
  padding: 8px 0;
  vertical-align: top;
  font-weight: 500;
}

/* ── Gallery ── */
.gallery-block {
  margin-top: 20px;
}

.gallery-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.gallery-strip img {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.gallery-placeholder {
  width: 90px;
  height: 60px;
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── Sidebar ── */
.entry-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.entry-poster {
  border: 1px solid var(--line);
  background: #eee;
}

.entry-poster img { width: 100%; display: block; }

.entry-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entry-back {
  font-size: 0.78rem;
  color: var(--muted);
}

.entry-back a {
  color: var(--accent);
  text-decoration: underline;
}

/* ── DB item list ── */
.db-notice {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px 16px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.db-notice strong { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .archive-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

@media (max-width: 860px) {
  .archive-grid { grid-template-columns: 1fr; }
  .entry-body {
    grid-template-columns: 1fr;
  }
  .entry-sidebar {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .entry-poster { width: 180px; }
  .entry-media {
    display: block;
  }
  .entry-media__jacket {
    flex-direction: row;
    align-items: flex-start;
  }
  .entry-media__jacket img { width: 150px; }
  .site-search__input { width: 130px; }
}

@media (max-width: 640px) {
  .archive-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .archive-card__thumb {
    aspect-ratio: 16 / 10;
    border-bottom: 1px solid var(--line);
  }
  .site-header__inner {
    height: auto;
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .site-search { width: 100%; }
  .site-search__input { width: 100%; flex: 1; }
  .site-nav a { border-left: 0; padding: 0 8px; }
  .entry-wrap { padding: 14px 14px 24px; }
  .entry-title { font-size: 1.1rem; }
  .video-block { max-width: 100%; }
  .video-block__player { width: min(100%, 420px); }
  .entry-media { grid-template-columns: 1fr; }
  .entry-media__jacket { flex-direction: row; }
  .entry-media__jacket img { width: 120px; }
}


.db-notice {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px 14px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.meta-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.entry-media__video {
  min-width: 0;
  max-width: 560px;
}

.entry-package {
  margin-top: 18px;
}

.entry-jacket-link {
  display: block;
  width: min(100%, 560px);
  border: 1px solid var(--line);
  background: var(--surface);
}

.entry-jacket-link img {
  display: block;
  width: 100%;
  height: auto;
}

.video-placeholder {
  min-height: 258px;
  padding: 18px;
  text-align: center;
}

.video-placeholder--notice {
  background: #111;
  color: #ddd;
  border: 1px solid var(--line-strong);
}

.video-placeholder--notice p + p {
  margin-top: 6px;
}

.video-placeholder--link {
  color: #9aa4ae;
  text-decoration: none;
  cursor: pointer;
}

.video-placeholder--link:hover {
  color: #c6d0da;
}

.meta-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
}

.meta-table th,
.meta-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.82rem;
}

.meta-table tr:first-child th,
.meta-table tr:first-child td {
  border-top: 0;
}

.meta-table th {
  width: 132px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-weight: 700;
  text-align: left;
}

.entry-description {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-soft);
}

.stub-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px;
}

.stub-panel__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.stub-panel p + p {
  margin-top: 8px;
}

.stub-panel__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.86rem;
  white-space: nowrap;
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--text);
}

@media (max-width: 900px) {
  .site-header__inner {
    height: auto;
    padding: 10px 16px;
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .site-search {
    width: 100%;
    margin-left: 0;
  }

  .site-search__input {
    width: 100%;
  }

  .entry-media {
    display: block;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 12px 12px 40px;
  }

  .entry-wrap {
    padding: 16px;
  }

  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta-table th,
  .meta-table td {
    display: block;
    width: 100%;
  }

  .meta-table th {
    border-top: 1px solid var(--line);
    border-bottom: 0;
  }

  .meta-table tr:first-child th {
    border-top: 0;
  }
}
