/* nhentaicomic — マンガのコマ枠をモチーフにしたスタイル */

:root {
  --paper: #f6f2f7;
  --surface: #ffffff;
  --ink: #231b2b;
  --muted: #6d6475;
  --accent: #e03e6b;
  --accent-ink: #ffffff;
  --tag: #6c5a8e;
  --sale: #f0b429;
  --sale-ink: #231b2b;
  --frame: 3px solid var(--ink);
  --drop: 4px 4px 0 var(--ink);
  --font-head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #19131f;
    --surface: #241c2c;
    --ink: #ede6f2;
    --muted: #b3a9bc;
    --accent: #ff6f97;
    --accent-ink: #19131f;
    --tag: #c3b2e3;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
}

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

a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

h1, h2 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.35;
}

h1 { font-size: clamp(1.4rem, 1rem + 1.8vw, 2rem); margin: 0 0 16px; }

h2 { font-size: 1.25rem; margin: 0 0 16px; }

/* ---------- ヘッダー・フッター ---------- */

.site-header {
  background: var(--surface);
  border-bottom: var(--frame);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 10px;
}

.logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  text-decoration: none;
}

.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }

.nav a { text-decoration: none; font-weight: 700; }

.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.pr-note {
  margin: 0;
  padding: 4px 16px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  margin-top: 72px;
  padding: 32px 0 40px;
  border-top: var(--frame);
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer p { margin: 6px 0; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 16px; }

.footer-nav a { color: var(--ink); }

/* ---------- コマ枠 ---------- */

.panel {
  display: block;
  background: var(--surface);
  border: var(--frame);
  box-shadow: var(--drop);
}

/* ---------- 一覧 ---------- */

.list-head { margin: 32px 0 24px; }

.list-head p { margin: 0; color: var(--muted); }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 28px 18px;
}

@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

.card { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.card-link { text-decoration: none; }

.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.card-cover img { width: 100%; height: 100%; object-fit: contain; }

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.5;
}

.card-link:hover .card-title { text-decoration: underline; text-underline-offset: 3px; }

.card-circle { font-size: 0.85rem; color: var(--tag); text-decoration: none; }

.card-circle:hover { text-decoration: underline; }

.card-price { font-size: 0.9rem; }

.rank {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  padding: 2px 10px 4px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-head);
  font-size: 0.9rem;
}

.rank-top { background: var(--accent); color: var(--accent-ink); font-size: 1.05rem; }

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

.pagination a { font-weight: 700; }

/* ---------- 価格・タグ・ボタン ---------- */

.price-now { font-weight: 700; }

.price-was { color: var(--muted); font-size: 0.85em; }

.price-off {
  display: inline-block;
  padding: 0 6px;
  background: var(--sale);
  color: var(--sale-ink);
  font-size: 0.8em;
  font-weight: 700;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }

.chips a {
  display: inline-block;
  padding: 1px 12px;
  border: 2px solid var(--tag);
  border-radius: 999px;
  color: var(--tag);
  font-size: 0.85rem;
  line-height: 1.7;
  text-decoration: none;
}

.chips a:hover { background: var(--tag); color: var(--surface); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px 28px;
  border: var(--frame);
  box-shadow: var(--drop);
  font-family: var(--font-head);
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
}

.btn:active { transform: translate(4px, 4px); box-shadow: none; }

.btn-buy { background: var(--accent); color: var(--accent-ink); }

/* ---------- 作品ページ ---------- */

.breadcrumb { margin: 20px 0 0; font-size: 0.85rem; color: var(--muted); }

.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }

.breadcrumb li + li::before { content: "›"; margin: 0 8px; }

.work-head {
  display: grid;
  gap: 28px;
  margin-top: 24px;
}

@media (min-width: 760px) {
  .work-head { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 40px; align-items: start; }
}

.work-cover img { width: 100%; height: auto; }

.spec { width: 100%; border-collapse: collapse; margin-bottom: 20px; }

.spec th, .spec td {
  padding: 10px 0;
  border-bottom: 1px dashed var(--muted);
  vertical-align: top;
  text-align: left;
}

.spec th { width: 6.5em; font-weight: 400; color: var(--muted); }

.work-price { font-size: 1.3rem; margin: 0 0 20px; }

.work-section { margin-top: 56px; }

.work-section > p { max-width: 40em; }

.work-section h2 {
  padding-left: 12px;
  border-left: 6px solid var(--accent);
}

/* サンプル画像はマンガのページのようにコマ割りで並べる */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gallery .panel { position: relative; aspect-ratio: 3 / 4; overflow: hidden; }

.gallery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery .panel:first-child { grid-column: span 2; }

@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .gallery .panel:first-child { grid-row: span 2; aspect-ratio: auto; }
}

.buy-again { margin-top: 40px; text-align: center; }

/* ---------- 固定ページ ---------- */

.doc { max-width: 40em; margin-top: 28px; }

.doc section { margin-top: 32px; }

@media (prefers-reduced-motion: reduce) {
  .btn:active { transform: none; }
}

@media (max-width: 759px) {
  .work-info .btn-buy, .buy-again .btn-buy { width: 100%; }
}
