/* ============================================================
   まとめアンテナ — 訪問者側のデザイン
   ------------------------------------------------------------
   色はすべて下の :root で指定しています。ここを変えればサイト全体が変わります。
   （管理画面の「メインカラー」を指定した時だけ、uploads/theme.css が --accent を上書きします）
   ============================================================ */

:root {
  /* ---- 基本の7色 ---- */
  --bg: #f6f7f4;          /* ページの背景 */
  --panel: #ffffff;       /* カード・ヘッダーの背景 */
  --line: #e2e6e0;        /* 枠線 */
  --text: #1e2a23;        /* 文字 */
  --text-dim: #5f6b63;    /* 薄い文字（日時など） */
  --accent: #2f7d4f;      /* 主役の色（深緑） */
  --hot: #c4531b;         /* 差し色（カテゴリタグなど） */

  /* ---- 上の色から自動で作る色（ここは触らなくてOK） ---- */
  --accent-dark: color-mix(in srgb, var(--accent) 82%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 9%, #fff);
  --accent-ring: color-mix(in srgb, var(--accent) 22%, transparent);
  --hot-soft: color-mix(in srgb, var(--hot) 8%, #fff);
  --stripe: color-mix(in srgb, var(--accent) 7%, transparent);

  /* ---- 順位の色（1〜3位） ---- */
  --rank-1: #c9a227;
  --rank-2: #94a0a8;
  --rank-3: #b0703c;

  /* ---- その他 ---- */
  --danger: #c53030;
  --success: #2f7d4f;
  --shadow: 0 1px 2px rgba(20, 40, 30, .05), 0 2px 8px rgba(20, 40, 30, .04);
  --shadow-hover: 0 6px 18px rgba(20, 40, 30, .10);
  --radius: 10px;
  --container: 1180px;
  --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  overflow-x: hidden;               /* 横スクロールを発生させない（古いブラウザ用） */
  overflow-x: clip;                 /* 上部固定のカテゴリタブを邪魔しない書き方 */
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   ヘッダー
   ============================================================ */
.site-header {
  background: var(--panel);
  border-bottom: 3px solid var(--accent);     /* 下端の細いアクセントライン */
}

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

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;                         /* 角丸の四角 */
  background: var(--accent);
  color: #fff;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-size: 21px; font-weight: 900; line-height: 1.3; letter-spacing: .02em; }
.brand-desc {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-image { display: block; max-height: 64px; max-width: 100%; width: auto; }

/* ヘッダーの検索窓 */
.header-search {
  flex: 1 1 240px;
  max-width: 320px;
  display: flex;
  align-items: center;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.header-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: var(--panel); }
.header-search input {
  flex: 1;
  min-width: 0;
  padding: 8px 4px 8px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.header-search input::-webkit-search-cancel-button { cursor: pointer; }
.header-search button {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.header-search button:hover { color: var(--accent-dark); }

.header-nav { display: flex; gap: 2px; flex: none; }
.header-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text);
  transition: background-color .15s, color .15s;
}
.header-nav a:hover { background: var(--accent-soft); color: var(--accent); }
.header-nav a.is-current { color: var(--accent); background: var(--accent-soft); }

/* ============================================================
   カテゴリタブ（丸いボタン型・横スクロール・画面上部に固定）
   ============================================================ */
.category-tabs {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(6px);
  -webkit-backdrop-filter: saturate(1.4) blur(6px);
}
.category-tabs-inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-top: 10px;
  padding-bottom: 10px;
}
.category-tabs-inner::-webkit-scrollbar { display: none; }
.category-tabs-inner a {
  flex: none;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-dim);
  transition: border-color .15s, color .15s, background-color .15s;
}
.category-tabs-inner a:hover { border-color: var(--accent); color: var(--accent); }
.category-tabs-inner a.is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* ============================================================
   レイアウト
   ============================================================ */
.site-main { padding-top: 22px; padding-bottom: 48px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.content { min-width: 0; }

.page-title {
  margin: 0 0 16px;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.4;
}
.page-count { margin-left: 10px; font-size: 13px; font-weight: 500; color: var(--text-dim); }

.section-title {
  margin: 34px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  font-size: 17px;
  font-weight: 700;
}

.empty-message {
  padding: 48px 16px;
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-dim);
}

/* ============================================================
   記事カード
   ============================================================ */
.article-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));   /* パソコン2列 */
  gap: 12px;
}

.article-card {
  position: relative;
  display: flex;
  gap: 12px;
  height: 100%;
  padding: 11px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.article-card:hover {
  transform: translateY(-2px);                  /* 少し浮き上がる */
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.article-card:hover .card-title { color: var(--accent); }
.article-card:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }

/* 読み込み時にふわっと出す（控えめ） */
@keyframes card-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.article-grid > li { animation: card-in .45s ease both; }
.article-grid > li:nth-child(2) { animation-delay: .03s; }
.article-grid > li:nth-child(3) { animation-delay: .06s; }
.article-grid > li:nth-child(4) { animation-delay: .09s; }
.article-grid > li:nth-child(5) { animation-delay: .12s; }
.article-grid > li:nth-child(6) { animation-delay: .15s; }
.article-grid > li:nth-child(n+7) { animation-delay: .18s; }

.card-thumb {
  display: block;                               /* 中の枠（.card-thumb-wrap）に入っても大きさを保つ */
  flex: none;
  width: 116px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}
.card-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* NEWマーク（取り込みから3時間以内） */
.card-thumb-wrap { position: relative; flex: none; display: block; }
.badge-new {
  position: absolute;
  white-space: nowrap;
  top: 4px;
  left: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--hot);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.meta-updated { color: var(--hot); font-weight: 700; font-size: 11px; }

/* サムネイルが無い記事の代替枠（斜めの縞模様） */
.is-noimage {
  position: relative;
  background-color: var(--accent-soft);
  background-image: repeating-linear-gradient(
    -45deg,
    var(--stripe) 0 7px,
    transparent 7px 14px
  );
}
.is-noimage::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.card-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;                        /* 3行で省略 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s;
}

.card-meta {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 12px;
  color: var(--text-dim);
}
.meta-site {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent);                         /* サイト名はアクセント色 */
  font-weight: 700;
}
.meta-cat {                                     /* カテゴリは差し色の枠付きタグ */
  padding: 0 8px;
  border: 1px solid var(--hot);
  border-radius: 4px;
  color: var(--hot);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  background: var(--hot-soft);
}
.meta-clicks { font-weight: 700; color: var(--text); }

/* ---------- ランキング ---------- */
.article-grid.is-ranking { grid-template-columns: minmax(0, 1fr); }
.is-ranking .article-card { align-items: center; }
.rank-badge {
  flex: none;
  width: 46px;
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.rank-badge.rank-1 { color: var(--rank-1); font-size: 36px; }
.rank-badge.rank-2 { color: var(--rank-2); font-size: 32px; }
.rank-badge.rank-3 { color: var(--rank-3); font-size: 30px; }

.period-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.period-tabs a {
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 13px;
  font-weight: 500;
}
.period-tabs a:hover { border-color: var(--accent); color: var(--accent); }
.period-tabs a.is-current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.ranking-note { margin: -6px 0 14px; font-size: 12px; color: var(--text-dim); }

/* ============================================================
   ページ送り（今いるページは色を反転）
   ============================================================ */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 26px 0;
}
.pagination a, .pagination span {
  min-width: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}
.pagination a {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--accent);
  transition: border-color .15s, background-color .15s;
}
.pagination a:hover { border-color: var(--accent); background: var(--accent-soft); }
.pagination .is-current { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.pagination .page-gap { min-width: auto; padding: 8px 2px; color: var(--text-dim); }

/* ============================================================
   フリースペース（広告枠）
   ============================================================ */
.freespace { margin: 0 0 16px; text-align: center; overflow: hidden; max-width: 100%; }
.freespace-index-bottom, .freespace-article-bottom { margin: 16px 0 0; }
.freespace-article-before-button { margin: 20px 0; }
.freespace iframe, .freespace img, .freespace ins { max-width: 100%; }

/* ============================================================
   サイドバー
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.widget {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.widget-title {
  margin: 0 0 12px;
  padding-bottom: 9px;
  border-bottom: 2px solid var(--accent);
  font-size: 15px;
  font-weight: 900;
}
.widget-empty { margin: 0; color: var(--text-dim); font-size: 13px; }
.widget-more { display: block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--accent); text-align: right; }
.widget-more:hover { text-decoration: underline; }

.popular-list { list-style: none; margin: 0; padding: 0; }
.popular-list li + li { border-top: 1px dashed var(--line); }
.popular-list a { display: flex; gap: 10px; padding: 9px 0; align-items: flex-start; }
.popular-list a:hover .popular-title { color: var(--accent); }
.popular-rank {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 900;
}
.popular-rank.rank-1 { background: var(--rank-1); border-color: var(--rank-1); color: #fff; }
.popular-rank.rank-2 { background: var(--rank-2); border-color: var(--rank-2); color: #fff; }
.popular-rank.rank-3 { background: var(--rank-3); border-color: var(--rank-3); color: #fff; }
.popular-title {
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s;
}

.category-list { list-style: none; margin: 0; padding: 0; }
.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 14px;
  transition: background-color .15s, color .15s;
}
.category-list a:hover { background: var(--accent-soft); color: var(--accent); }
.category-list .count {
  min-width: 28px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-dim);
  font-size: 11px;
  text-align: center;
}

.widget-register { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.widget-register p { margin: 0 0 12px; font-size: 13px; color: var(--text-dim); }

/* ============================================================
   相互RSS（他のアンテナサイトの新着）
   ============================================================ */
.mutual-area {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.content > .pagination + .mutual-area, .article-grid + .mutual-area { margin-top: 16px; }
.mutual-title a { color: var(--text); }
.mutual-title a:hover { color: var(--accent); }
.mutual-title a::after { content: " ›"; color: var(--accent); }
.mutual-list { list-style: none; margin: 0; padding: 0; }
.mutual-list li + li { border-top: 1px dashed var(--line); }
.mutual-list a {
  display: block;
  padding: 7px 0 7px 14px;
  position: relative;
  font-size: 13px;
  line-height: 1.55;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mutual-list a::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--hot);
}
.mutual-list a:hover { color: var(--accent); }

/* ============================================================
   ボタン（アクセント色の塗り。乗せると少し濃く）
   ============================================================ */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s, box-shadow .15s, transform .1s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.btn-block { display: block; width: 100%; }

/* ============================================================
   記事ページ
   ============================================================ */
.article-detail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}
.article-cat {
  display: inline-block;
  padding: 1px 10px;
  border: 1px solid var(--hot);
  border-radius: 4px;
  background: var(--hot-soft);
  color: var(--hot);
  font-size: 12px;
  font-weight: 700;
}
.article-title { margin: 10px 0 8px; font-size: 24px; font-weight: 900; line-height: 1.5; }
.article-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 20px; color: var(--text-dim); font-size: 13px; }
.article-meta .meta-site { font-weight: 700; color: var(--accent); }

.article-image { margin: 0 0 18px; }
.article-image img { display: block; max-height: 420px; width: auto; margin: 0 auto; border-radius: 8px; }

.article-summary { margin: 0 0 22px; font-size: 16px; line-height: 1.95; }

.article-content { font-size: 16px; line-height: 1.95; }
.article-content img { border-radius: 8px; }
.article-content h2 { margin: 1.8em 0 .6em; padding: 4px 0 4px 12px; border-left: 4px solid var(--accent); font-size: 20px; font-weight: 900; }
.article-content h3 { margin: 1.5em 0 .5em; font-size: 18px; font-weight: 700; }
.article-content blockquote { margin: 1em 0; padding: 10px 16px; border-left: 4px solid var(--line); background: var(--bg); color: var(--text-dim); }
.article-content a { color: var(--accent); text-decoration: underline; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.article-content th, .article-content td { border: 1px solid var(--line); padding: 6px 10px; min-width: 6em; }  /* 1文字ずつ折り返さない（はみ出す分は表の中で横スクロール） */
.article-content th { background: var(--bg); }
.article-content pre { max-width: 100%; overflow-x: auto; padding: 12px; background: var(--bg); border-radius: 6px; }

.tag-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list a {
  display: inline-block;
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 13px;
  color: var(--text-dim);
  transition: border-color .15s, color .15s;
}
.tag-list a:hover { border-color: var(--accent); color: var(--accent); }

.btn-readmore {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 18px 20px;
  font-size: 19px;
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--accent-dark);
}
.btn-readmore:hover { box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 65%, #000); }
.btn-readmore:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--accent-dark); }
.btn-sub { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; opacity: .92; }

/* ============================================================
   登録サイト一覧
   ============================================================ */
.site-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px 18px;
}
.site-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.site-name { font-size: 16px; font-weight: 700; color: var(--accent); }
a.site-name:hover { text-decoration: underline; }
.site-cat {
  padding: 0 9px;
  border: 1px solid var(--hot);
  border-radius: 4px;
  background: var(--hot-soft);
  font-size: 12px;
  font-weight: 700;
  color: var(--hot);
}
.site-desc { margin: 6px 0 0; font-size: 14px; }
.site-meta { margin: 6px 0 0; font-size: 12px; color: var(--text-dim); }

/* ============================================================
   フォーム（サイト登録）
   ============================================================ */
.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}
.form-lead { margin: 0 0 20px; font-size: 14px; color: var(--text-dim); }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.form-help { margin: 4px 0 0; font-size: 12px; color: var(--text-dim); }
.req { color: var(--danger); }
.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }  /* スパム対策の隠し欄（画面外に置かずに隠す） */

/* ブラウザの自動入力で欄が水色になるのを防ぐ */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--panel) inset;
  box-shadow: 0 0 0 1000px var(--panel) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: background-color 9999s ease-out 0s;
}
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--panel) inset, 0 0 0 3px var(--accent-ring);
  box-shadow: 0 0 0 1000px var(--panel) inset, 0 0 0 3px var(--accent-ring);
}

.alert { margin-bottom: 16px; padding: 14px 16px; border-radius: 8px; border: 1px solid; border-left-width: 5px; font-size: 14px; }
.alert p, .alert ul { margin: 6px 0 0; }
.alert ul { padding-left: 1.2em; }
.alert-success { background: color-mix(in srgb, var(--success) 8%, #fff); border-color: color-mix(in srgb, var(--success) 35%, #fff); border-left-color: var(--success); color: color-mix(in srgb, var(--success) 75%, #000); }
.alert-error { background: color-mix(in srgb, var(--danger) 7%, #fff); border-color: color-mix(in srgb, var(--danger) 30%, #fff); border-left-color: var(--danger); color: color-mix(in srgb, var(--danger) 80%, #000); }

.notice-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 24px;
  text-align: center;
}

/* ============================================================
   フッター
   ============================================================ */
.site-footer { background: var(--panel); border-top: 3px solid var(--accent); color: var(--text-dim); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 22px;
  padding-bottom: 22px;
  font-size: 13px;
}
.copyright { margin: 0; }
.footer-rss {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--hot);
  border-radius: 999px;
  color: var(--hot);
  font-weight: 700;
}
.footer-rss:hover { background: var(--hot-soft); }

/* ============================================================
   動きを減らす設定の人には、アニメーションを止める
   ============================================================ */
/* ============================================================
   逆アクセスランキング・ピックアップ
   ============================================================ */
.widget-sub, .section-sub { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--text-dim); }
.in-list a { align-items: center; }
.in-list .popular-title { flex: 1; min-width: 0; }
.in-count { flex: none; font-size: 11px; font-weight: 700; color: var(--hot); font-variant-numeric: tabular-nums; }
.page-lead { margin: -6px 0 14px; font-size: 13px; color: var(--text-dim); }
.site-in { font-weight: 700; color: var(--hot); }
.in-pickup { margin-bottom: 26px; }
.in-pickup .section-title { margin-top: 0; }

/* ============================================================
   DLsite おすすめ作品（PR）
   ============================================================ */
.pr-label {
  display: inline-block;
  margin-right: 8px;
  padding: 0 6px;
  border: 1px solid var(--text-dim);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-dim);
  vertical-align: 2px;
}
.dlsite-box {
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 20px;
}
.dlsite-box-title { margin: 0 0 12px; font-size: 16px; font-weight: 900; }
.dlsite-preview-note { margin: 0 0 10px; padding: 6px 10px; border-radius: 6px; background: var(--hot-soft); color: var(--hot); font-size: 12px; }
.dlsite-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.dlsite-grid-side { grid-template-columns: minmax(0, 1fr); gap: 0; }
.dlsite-grid-inline { margin: 1em 0; grid-template-columns: minmax(0, 260px); }
.dlsite-card a { display: flex; flex-direction: column; gap: 6px; height: 100%; color: var(--text); text-decoration: none; }
.dlsite-card a:hover .dlsite-title { color: var(--accent); }
.dlsite-thumb { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.dlsite-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shop-badge { position: absolute; right: 6px; bottom: 6px; padding: 0 6px; border-radius: 3px; font-size: 10px; font-weight: 900; line-height: 1.7; color: #fff; }
.shop-dlsite { background: #1f4fa3; }
.shop-fanza { background: #b8133b; }
.dlsite-off { position: absolute; top: 6px; left: 6px; padding: 1px 7px; border-radius: 4px; background: var(--hot); color: #fff; font-size: 11px; font-weight: 900; }
.dlsite-text { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.dlsite-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s;
}
.dlsite-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 12px; margin-top: auto; }
.dlsite-price { font-size: 14px; font-weight: 900; color: var(--hot); }
.dlsite-official { color: var(--text-dim); }
.dlsite-rate { color: var(--rank-1); font-weight: 700; }
.dlsite-rate small { color: var(--text-dim); font-weight: 500; }
/* サイドバーは横並び（小さい画像＋文字） */
.dlsite-grid-side .dlsite-card + .dlsite-card { border-top: 1px dashed var(--line); }
.dlsite-grid-side .dlsite-card a { flex-direction: row; align-items: flex-start; gap: 10px; padding: 9px 0; }
.dlsite-grid-side .dlsite-thumb { flex: none; width: 92px; }
.article-content .dlsite-grid { padding: 0; }
.article-content .dlsite-card a { text-decoration: none; color: var(--text); }

/* ============================================================
   作品・キャラ（タグ）／インフィード広告／セール速報
   ============================================================ */
.tag-cloud { margin: 0; }
.tag-cloud a { font-size: 12px; padding: 3px 10px; }
.tag-index a { font-size: 14px; padding: 5px 14px; }
.tag-count { margin-left: 5px; font-size: 11px; color: var(--text-dim); }
.article-grid > .infeed { grid-column: 1 / -1; min-width: 0; overflow: hidden; text-align: center; }
.sale-section .section-title { margin-top: 24px; }
.dlsite-end { font-size: 11px; color: var(--hot); }

/* 年齢確認 */
.age-locked, .age-locked body { overflow: hidden; }
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 16, 12, .86);
  backdrop-filter: blur(6px);
}
.age-gate-box {
  width: 100%;
  max-width: 420px;
  padding: 28px 24px;
  border-radius: 14px;
  background: var(--panel);
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.age-gate-site { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--accent); }
.age-gate-title { margin: 0 0 12px; font-size: 21px; font-weight: 900; }
.age-gate-text { margin: 0 0 20px; font-size: 13px; line-height: 1.8; color: var(--text-dim); text-align: left; }
.age-gate-actions { display: grid; gap: 10px; }
.age-gate-actions .btn { display: block; padding: 13px; font-size: 15px; }
.age-gate-no { border-color: var(--line); color: var(--text-dim); background: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .article-card:hover { transform: none; }
}

/* ============================================================
   レスポンシブ
   ============================================================ */
/* 検索窓：PC（961px以上）はサイドバーの一番上、それより狭い画面はヘッダー */
.sidebar-search { flex: none; max-width: none; margin-left: 0; background: var(--panel); }
@media (min-width: 961px) {
  .header-search-top { display: none; }
  .header-nav { margin-left: auto; }
}
@media (max-width: 960px) {
  .sidebar-search { display: none; }
}

/* メニューが7つになっても、ロゴの文字が折り返さないよう少し詰める */
.brand-name { white-space: nowrap; }
@media (max-width: 1300px) and (min-width: 821px) {
  .header-search-top { flex-basis: 170px; }
  .header-nav a { padding: 8px 9px; font-size: 13px; }
}
/* 横幅が足りない時（検索窓がヘッダーにある幅）はメニューを2段目に */
@media (max-width: 960px) and (min-width: 821px) {
  .header-inner { flex-wrap: wrap; row-gap: 8px; }
  .brand { flex: none; }
  .header-nav { order: 3; width: 100%; }
}

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }      /* サイドバーを下へ */
}

@media (max-width: 820px) {
  .header-inner { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .header-search { max-width: none; flex: none; margin-left: 0; }
  .header-nav { overflow-x: auto; scrollbar-width: none; }
  .header-nav::-webkit-scrollbar { display: none; }
  .header-nav a { flex: 1; text-align: center; padding: 8px 6px; background: var(--bg); }
}

/* スマホ（680px以下）：記事カード1列 */
@media (max-width: 680px) {
  .header-nav { flex-wrap: wrap; overflow: visible; gap: 4px; }   /* メニューが5つでも切れないよう2段に */
  .header-nav a { flex: 1 1 28%; font-size: 13px; }
  body { font-size: 14px; }
  .site-main { padding-top: 14px; }
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .card-thumb { width: 100px; height: 72px; }
  .article-detail, .form-card { padding: 18px; }
  .article-title { font-size: 20px; }
  .brand-name { font-size: 18px; }
  .brand-logo { width: 40px; height: 40px; }
  .rank-badge { width: 36px; font-size: 22px; }
  .rank-badge.rank-1 { font-size: 29px; }
  .rank-badge.rank-2 { font-size: 26px; }
  .rank-badge.rank-3 { font-size: 24px; }
  .btn-readmore { font-size: 17px; padding: 16px; }
  .dlsite-box { padding: 16px; }
  .dlsite-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dlsite-grid-side, .dlsite-grid-inline { grid-template-columns: minmax(0, 1fr); }
}
