/* YORU SELECT — 軽量ダークテーマ (仕様書3.2準拠 / モバイルファースト / JS不要) */
:root {
  --bg: #0B0B0F;
  --bg-sub: #121219;
  --card: #181821;
  --card-hover: #20202B;
  --border: #2A2A35;
  --text: #F5F5F7;
  --text-sub: #A8A8B3;
  --text-weak: #777782;
  --accent: #E6397A;
  --accent-2: #8B5CF6;
  --sale: #FF4D4F;
  --ok: #22C55E;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  padding-bottom: 64px; /* bottom nav分 */
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ヘッダー */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 14px;
  background: rgba(11,11,15,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.logo { font-weight: 800; font-size: 18px; letter-spacing: .06em; white-space: nowrap; }
.logo span { color: var(--accent); }
.header-search { display: flex; flex: 1; min-width: 0; }
.header-search input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px;
  background: var(--bg-sub); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px 0 0 10px; font-size: 14px;
}
.header-search button {
  height: 38px; padding: 0 14px; font-size: 14px; cursor: pointer;
  background: var(--accent); color: #fff; border: 0; border-radius: 0 10px 10px 0;
}
.chip-nav {
  display: flex; gap: 8px; padding: 10px 14px; overflow-x: auto;
  border-bottom: 1px solid var(--border); background: var(--bg);
  scrollbar-width: none;
}
.chip-nav::-webkit-scrollbar { display: none; }
.chip-nav a {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 13px; color: var(--text-sub); white-space: nowrap;
}
.chip-nav a:hover { border-color: var(--accent); color: var(--text); }

.main { max-width: 1200px; margin: 0 auto; padding: 16px 14px 40px; }
.preview-banner {
  margin-bottom: 14px; padding: 8px 12px; border: 1px solid var(--accent-2);
  border-radius: 8px; color: var(--text-sub); font-size: 12px; text-align: center;
}

/* ヒーロー */
.hero { padding: 22px 4px 6px; }
.hero h1 { font-size: 22px; line-height: 1.4; }
.hero p { color: var(--text-sub); font-size: 13px; margin-top: 4px; }

/* セクション */
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.section h2 { font-size: 19px; margin-bottom: 12px; }
.section .more { font-size: 13px; color: var(--accent); }

/* 商品グリッド: スマホ2列 → 768px 3列 → 1024px 4列 → 1440px 5列 */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card {
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; transition: border-color .2s, transform .2s;
}
.card:hover { background: var(--card-hover); border-color: var(--accent-2); transform: translateY(-2px); }
.card-thumb {
  position: relative; display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-radius: 8px;
  aspect-ratio: 3 / 2; background: var(--bg-sub);
}
.card-thumb img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.card-doujin .card-thumb { aspect-ratio: 3 / 4; }
.card-doujin .card-title { -webkit-line-clamp: 3; min-height: 4.5em; }
.card-date, .card-genres {
  color: var(--text-weak); font-size: 11px; line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-noimage {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: var(--text-weak);
  font-size: 12px; letter-spacing: .2em;
}
.card-badges { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; line-height: 1.6;
}
.badge-vr { background: var(--accent-2); color: #fff; }
.badge-type { background: #334155; color: #fff; }
.badge-sale { background: var(--sale); color: #fff; }
.card-title {
  font-size: 13px; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.card-sub { font-size: 12px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-price { font-size: 13px; }
.price-sale { color: var(--sale); font-weight: 700; }
.price-regular { color: var(--text-weak); font-size: 12px; }
.price-unknown { color: var(--text-weak); font-size: 12px; }

/* チップ群 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px; background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; font-size: 13px; color: var(--text-sub);
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip-count { margin-left: 6px; font-size: 11px; color: var(--text-weak); }

/* 商品詳細 */
.product .back { margin-bottom: 10px; font-size: 13px; color: var(--text-sub); }
.product-hero { border-radius: 12px; overflow: hidden; background: var(--bg-sub); }
.product-image { width: auto; height: auto; max-width: 100%; margin: 0 auto; }
.product-doujin .product-hero {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3 / 4;
}
.product-doujin .product-image {
  width: auto; height: auto; max-width: 100%; max-height: min(78vh, 960px);
  object-fit: contain;
}
.product-noimage { aspect-ratio: 3/2; }
.product-doujin .product-noimage { aspect-ratio: 3/4; }
.product-badges { margin-top: 10px; display: flex; gap: 6px; }
.product-title { font-size: 18px; line-height: 1.5; margin-top: 8px; }
.product-actresses { margin-top: 6px; font-size: 14px; }
.product-actresses a { color: var(--accent); margin-right: 10px; }
.product-price { margin-top: 10px; font-size: 18px; }
.cta { margin: 14px 0; }
.btn {
  display: inline-block; text-align: center; padding: 13px 20px;
  border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer;
  min-height: 48px; border: 0;
}
.btn-cta, .btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-sub); width: 100%; }
.product-info h2, .product-genres h2 { font-size: 16px; margin: 20px 0 8px; }
.info-list { display: grid; grid-template-columns: 7em 1fr; gap: 6px 10px; font-size: 14px; }
.info-list dt { color: var(--text-weak); }
.info-list dd a { color: var(--accent); }
.note { margin-top: 16px; padding: 12px; background: var(--bg-sub); border: 1px solid var(--border); border-radius: 10px; font-size: 12px; color: var(--text-sub); }

/* 一覧 */
.list-title { font-size: 20px; margin-bottom: 4px; }
.list-kicker { display: block; font-size: 12px; color: var(--accent); letter-spacing: .1em; }
.list-count { color: var(--text-weak); font-size: 13px; margin-bottom: 12px; }
.empty-state {
  padding: 40px 16px; text-align: center; color: var(--text-sub);
  background: var(--bg-sub); border: 1px dashed var(--border); border-radius: 12px;
}
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; }
.page-link { padding: 9px 18px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; font-size: 14px; }
.page-now { color: var(--text-weak); font-size: 13px; }

/* 検索 */
.search-form { display: flex; gap: 8px; margin: 12px 0 18px; }
.search-form input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px;
  background: var(--bg-sub); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; font-size: 15px;
}
.search-form .btn { width: auto; padding: 0 18px; }

/* 静的ページ */
.static-page h1 { font-size: 21px; margin-bottom: 14px; }
.static-page h2 { font-size: 16px; margin: 18px 0 6px; color: var(--text); }
.static-page p, .static-page li { font-size: 14px; color: var(--text-sub); }
.static-page ul { padding-left: 1.4em; }
.contact-address { font-size: 15px; color: var(--text); word-break: break-all; }
.error-page { text-align: center; padding: 60px 0; }
.error-page h1 { font-size: 56px; color: var(--accent); }
.error-page .btn { width: auto; margin-top: 16px; }

/* フッター */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 24px 14px 30px; text-align: center; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; font-size: 13px; color: var(--text-sub); }
.footer-note { margin-top: 14px; font-size: 11px; color: var(--text-weak); }
.footer-copy { margin-top: 8px; font-size: 11px; color: var(--text-weak); }

/* モバイル下部ナビ */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; height: 56px;
  background: rgba(18,18,25,.95); backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
}
.bottom-nav a {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-sub);
}
.bottom-nav a:active { color: var(--accent); }

/* 年齢確認専用ページ(JS不要・Cookie同意まで全面表示) */
.age-gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: #06060a; padding: 20px;
}
.age-gate-box {
  max-width: 420px; width: 100%; text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 30px 22px;
}
.age-gate-logo { font-weight: 800; font-size: 20px; letter-spacing: .06em; }
.age-gate-logo span { color: var(--accent); }
.age-gate h2 { margin: 14px 0 8px; font-size: 18px; }
.age-gate p { font-size: 14px; color: var(--text-sub); }
.age-gate-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.age-gate-actions form { width: 100%; }
.age-gate-actions .btn { width: 100%; }
.age-gate-note { margin-top: 14px; font-size: 11px; color: var(--text-weak); }
.age-gate-note a { color: var(--text-sub); text-decoration: underline; }
.age-gate-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px;
  margin-top: 16px; font-size: 12px;
}
.age-gate-links a { color: var(--text-sub); text-decoration: underline; }

/* レスポンシブ */
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .hero h1 { font-size: 28px; }
  .main { padding: 20px 20px 60px; }
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
  .product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 26px; }
  .product > * { grid-column: 2; }
  .product .back { grid-column: 1 / -1; }
  .product-hero { grid-column: 1; grid-row: 2 / span 5; align-self: start; }
}
@media (max-width: 374px) {
  .main { padding-left: 8px; padding-right: 8px; }
  .grid { gap: 8px; }
  .card { padding: 6px; }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1440px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
