/* ===== サブカル総合Index CSS ===== */
:root {
  --sub-bg: #f8f5fa;
  --sub-card-bg: #ffffff;
  --sub-text: #1a1a1a;
  --sub-text-sub: #555555;
  --sub-accent: #7b1fa2;
  --sub-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --sub-shadow-hover: 0 6px 20px rgba(0,0,0,0.12);
  --sub-radius: 12px;
  --sub-radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  background: var(--sub-bg);
  color: var(--sub-text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sub-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ===== スキップリンク ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
  font-size: 14px;
}
.skip-link:focus { top: 0; }

/* ===== ヘッダー ===== */
.sub-header {
  background: linear-gradient(135deg, #6a1b9a 0%, #7c4096 40%, #9c27b0 100%);
  color: #fff;
  padding: 48px 20px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.sub-header::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.sub-header__inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}
.sub-header__title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.2);
  letter-spacing: 0.03em;
}
.sub-header__subtitle {
  font-size: clamp(0.85rem, 2vw, 1rem);
  opacity: 0.92;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}
.sub-header__count {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255,255,255,0.2);
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

/* ===== コンテナ ===== */
.sub-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}

/* ===== パンくず ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 16px 0;
  font-size: 13px;
  list-style: none;
}
.breadcrumb-link {
  color: var(--sub-accent);
  text-decoration: none;
}
.breadcrumb-link:hover { text-decoration: underline; }
.breadcrumb-separator {
  color: #999;
  font-size: 12px;
}

/* ===== カテゴリークイックナビ ===== */
.category-quicknav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 14px 8px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 245, 250, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 24px;
}
.qnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.qnav-btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.qnav-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ===== ローディング ===== */
.sub-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--sub-text-sub);
  font-size: 14px;
}
.sub-loading__spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(123,31,162,0.2);
  border-top-color: var(--sub-accent);
  border-radius: 50%;
  animation: sub-spin 0.7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes sub-spin { to { transform: rotate(360deg); } }

/* ===== カテゴリーセクション ===== */
.sub-section {
  margin-bottom: 32px;
  border-radius: var(--sub-radius);
  overflow: hidden;
  box-shadow: var(--sub-shadow);
  background: var(--sub-card-bg);
}

.sub-section__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #fff;
}
.sub-section__header-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}
.sub-section__header h2 {
  font-size: 1.1em;
  font-weight: 700;
  flex: 1;
  line-height: 1.3;
}
.sub-section__count {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.85;
  margin-left: 4px;
}
.sub-section__more {
  color: #fff;
  opacity: 0.9;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 14px;
  transition: all 0.2s;
}
.sub-section__more:hover {
  background: rgba(255,255,255,0.2);
  text-decoration: none;
  opacity: 1;
}

/* ===== アイテムグリッド ===== */
.sub-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px;
}

.sub-item {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--sub-radius-sm);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  background: #fafafa;
  border: 1px solid rgba(0,0,0,0.04);
}
.sub-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--sub-shadow-hover);
  text-decoration: none;
}

.sub-item__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f0ecf4;
}

.sub-item__name {
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: var(--sub-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== noscript ===== */
.noscript-links {
  padding: 24px;
  background: var(--sub-card-bg);
  border-radius: var(--sub-radius);
}
.noscript-links a {
  display: inline-block;
  margin: 4px 6px;
  padding: 8px 16px;
  background: rgba(123,31,162,0.1);
  color: var(--sub-accent);
  font-weight: 600;
  border-radius: 6px;
}

/* ===== フッター ===== */
.sub-footer {
  background: var(--sub-card-bg);
  margin-top: 40px;
  padding: 24px 16px;
  font-size: 13px;
  color: var(--sub-text-sub);
}
.sub-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.footer-nav a {
  font-size: 12px;
  color: var(--sub-text-sub);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--sub-accent); }
.footer-copyright {
  font-size: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* ===== AdSense ===== */
.ad-slot {
  margin: 24px 0;
  text-align: center;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .sub-header { padding: 36px 16px 28px; }
  .sub-header__title { font-size: 1.5rem; }

  .category-quicknav {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding: 10px 8px;
  }
  .category-quicknav::-webkit-scrollbar { display: none; }
  .qnav-btn { font-size: 11px; padding: 6px 10px; }

  .sub-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .sub-container { padding: 0 8px; }
  .sub-header { padding: 28px 12px 22px; }

  .sub-items-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px;
  }
  .sub-item__name {
    font-size: 11px;
    padding: 5px 6px;
  }
  .sub-section__header {
    padding: 10px 12px;
  }
  .sub-section__header h2 { font-size: 1em; }
  .footer-nav { gap: 12px; }
}

/* ===== モーション軽減 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 印刷 ===== */
@media print {
  .sub-header, .category-quicknav, .sub-footer, .ad-slot { display: none; }
}
