/* スマホ幅を先に作り、広い画面で段を増やす */
:root {
  --bg: #f7f1e6;
  --paper: #ffffff;
  --ink: #3b3029;
  --muted: #7a6a5e;
  --accent: #d9793b;
  --limited: #6b5bd2;
  --lost: #b0413e;
  --line: #eadfd3;
  font-size: 17px;
}
* { box-sizing: border-box; }
/* .card などの display 指定より強く効かせる（未読だけ表示で既読のカードを隠すため） */
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Meiryo", system-ui, sans-serif;
  line-height: 1.7;
}
a { color: var(--accent); }
main, .site-header, .site-footer, .pr-notice { padding-inline: 16px; }
main { max-width: 1080px; margin: 0 auto; padding-block: 8px 32px; }

.pr-notice { margin: 0; padding-block: 4px; font-size: 0.75rem; color: var(--muted); background: #f3ebe1; text-align: center; }

.site-header { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding-block: 12px; }
.site-title { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.search-form { display: flex; gap: 6px; flex: 1 1 260px; max-width: 420px; }
.search-form input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 1rem; border: 1px solid var(--line); border-radius: 8px; }
.search-form button, .button { padding: 8px 14px; font-size: 1rem; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; text-decoration: none; display: inline-block; cursor: pointer; }

.tagline { font-size: 1.05rem; color: var(--muted); margin: 8px 0 0; }
h1 { font-size: 1.5rem; margin: 16px 0 4px; }
h2 { font-size: 1.2rem; margin: 32px 0 12px; padding-bottom: 4px; border-bottom: 2px solid var(--line); }
.shelf-description { color: var(--muted); margin-top: 0; }

.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.card-link { color: inherit; text-decoration: none; display: block; }
.card-image { width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; display: block; background: var(--line); }
.card-body { padding: 10px 12px 12px; }
.card-meta { margin: 0; font-size: 0.8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.card-title { font-size: 1rem; margin: 4px 0; line-height: 1.5; }
.card-excerpt { margin: 0; font-size: 0.88rem; color: var(--muted); }
.card-membership { margin: auto 0 0; padding: 8px 12px; font-size: 0.85rem; background: #f1eefc; }
.badge { font-size: 0.72rem; padding: 1px 8px; border-radius: 999px; color: #fff; white-space: nowrap; }
.badge--limited { background: var(--limited); }
.badge--lost { background: var(--lost); }
.badge--order { background: var(--accent); }
.badge--read { background: #8a7d72; }
.badge--paid { background: #b07a1e; }
.badge--pick { background: var(--accent); }

/* 既読は薄くしすぎない（読める濃さを保ったまま、未読と見分けがつく程度） */
.card--read { background: #f6f1ea; }
.card--read .card-image { opacity: 0.7; }
.card--read .card-title { color: var(--muted); }
.read-toggle { margin: 0 12px 10px; align-self: flex-start; padding: 4px 12px; font-size: 0.85rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; }
.unread-filter { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 0.95rem; cursor: pointer; }
.unread-filter input { width: 1.1rem; height: 1.1rem; }
.unread-count { color: var(--muted); font-size: 0.85rem; }
.read-storage-warning { margin: 8px 0; padding: 8px 12px; background: #fbe9e7; border-radius: 8px; font-size: 0.9rem; }
.search-read-mark { margin-right: 6px; vertical-align: middle; }

/* ---- ヘッダーのナビと訪問数 ---- */
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 0.95rem; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.visit-counter { padding: 3px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 0.85rem; white-space: nowrap; }
.site-header .search-form { display: none; }

/* PC ではヘッダーをスクロールしても残す。スマホは2段に折り返して高さを取るので固定しない */
@media (min-width: 760px) {
  html { scroll-padding-top: 72px; }
  .site-header {
    position: sticky; top: 0; z-index: 50; max-width: none; margin: 0;
    /* 帯は画面いっぱい、中身は本文（最大1080px＋余白16px）の左右端にそろえる */
    padding-inline: max(16px, calc((100% - 1080px) / 2 + 16px));
    background: rgba(247, 241, 230, 0.95); border-bottom: 1px solid var(--line);
  }
}

/* ---- トップ（ねこ家の玄関） ---- */
.section-en { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 0.78rem; letter-spacing: 0.22em; color: var(--muted); text-transform: uppercase; }
.section-ja { margin: 2px 0 10px; padding: 0; border: 0; font-size: 1.45rem; }
.section-lead { color: var(--muted); margin: 0 0 16px; }
.home-section { margin-top: 56px; }

.hero { position: relative; margin: 8px -16px 0; overflow: hidden; }
.hero-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-card { margin: -48px 16px 0; position: relative; padding: 18px 20px; background: rgba(255, 252, 245, 0.94);
  border-radius: 18px; box-shadow: 0 8px 28px rgba(80, 60, 40, 0.14); }
.hero--noimage .hero-card { margin-top: 16px; }
.hero-title { margin: 6px 0 8px; font-size: 1.55rem; line-height: 1.45; letter-spacing: 0.04em; }
.hero-lead { margin: 0; }
.hero-schedule { margin: 6px 0 0; font-size: 0.88rem; color: var(--muted); }
@media (min-width: 760px) {
  .hero { margin: 8px 0 0; border-radius: 22px; }
  .hero-card { position: absolute; left: 4%; top: 50%; transform: translateY(-50%); margin: 0; max-width: 42%; }
}

.family { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.family-card a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; height: 100%; padding: 16px 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.family-card a:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(80, 60, 40, 0.12); }
.family-image { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; background: #f1e7d6; }
.family-image--empty { display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.family-name { font-weight: 700; }
.family-name small { font-weight: 400; color: var(--muted); }
.family-intro { font-size: 0.86rem; color: var(--muted); line-height: 1.6; }
.family-more { margin-top: auto; font-size: 0.85rem; color: var(--accent); }

.series-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.series-card a { display: flex; flex-direction: column; height: 100%; background: var(--paper); border: 1px solid var(--line); border-left: 6px solid #b9a58f;
  border-radius: 6px 14px 14px 6px; overflow: hidden; color: var(--ink); text-decoration: none; }
.series-image { width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; }
.series-name { padding: 10px 12px 0; font-weight: 700; }
.series-meta { padding: 0 12px; font-size: 0.82rem; color: var(--muted); }
.series-progress { margin: 6px 12px 12px; align-self: flex-start; padding: 1px 10px; border-radius: 999px; background: #efe6d8; font-size: 0.8rem; }
.series-card--done .series-progress { background: #dfeee0; }

.goods-pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.goods-pair { padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.products { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.product { display: flex; gap: 8px; align-items: flex-start; }
.product-meta { flex: none; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; margin: 2px 0 0; }
.product-body { min-width: 0; }
.product-articles { margin: 4px 0 0; font-size: 0.82rem; color: var(--muted); }
.product-articles a { color: var(--muted); }
.product--pick .product-name { color: var(--accent); }
.product-name { color: var(--ink); font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.shop { flex: none; margin-top: 2px; padding: 0 8px; border-radius: 6px; font-size: 0.72rem; color: #fff; background: #8a7d72; }
.shop--amazon { background: #232f3e; }
.shop--rakuten { background: #bf0000; }
.goods-story { margin: 10px 0 0; font-size: 0.86rem; color: var(--muted); }
.products--list { gap: 14px; }
.goods-picked { margin: 8px 0 24px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--accent); border-radius: 12px; }
.goods-picked h2 { margin-top: 0; }
.goods-categories { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.goods-categories a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.goods-categories a[aria-current="page"] { border-color: var(--accent); color: var(--accent); }
.goods-categories .count { font-size: 0.8rem; color: var(--muted); }
.goods-by-article { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.goods-row { display: grid; gap: 12px; grid-template-columns: 1fr; }
.goods-row-products { padding: 12px 14px; background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; }
.goods-row-label { margin: 0 0 8px; font-size: 0.82rem; color: var(--muted); }
@media (min-width: 760px) { .goods-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; } }

.feature { display: grid; gap: 0; background: var(--paper); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.feature-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.feature-body { padding: 18px 20px 20px; }
.feature--dark { background: #3b3029; color: #f7efe3; border-color: #3b3029; }
.feature--dark .section-en, .feature--dark .section-lead { color: #d8c9b6; }
@media (min-width: 760px) { .feature { grid-template-columns: 1.1fr 1fr; align-items: center; } .feature-image { height: 100%; } }
.mini-list { margin: 0; padding-left: 1.2em; }
.mini-list li { margin: 4px 0; }
.search-form--large { max-width: 560px; }

/* スクロールで出す。JS が動かないときや動きを減らす設定では最初から見えている */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

.shelf-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.shelf-links a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.shelf-links small { color: var(--muted); }
.shelf-links .count { font-size: 0.8rem; color: var(--muted); }

.membership { margin-top: 32px; padding: 4px 16px 16px; background: #f1eefc; border-radius: 12px; }
.more { margin-top: 12px; }

.site-footer { max-width: 1080px; margin: 0 auto; padding-block: 16px 32px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.affiliate { font-size: 0.75rem; }
