/* your styles here */

/* =========================
   occultalk / styles.css
   ========================= */

/* テーマ色（控えめダーク＋紫アクセント） */
:root{
  --bg: #0b0f14;
  --bg-elev: #121826;
  --accent: #5e4b8b;
  --accent-2: #39405a;
  --text: #e8e9f1;
  --text-dim: #b8bdd0;
  --pill-bg: #1b2133;
  --shadow: 0 6px 20px rgba(0,0,0,.35);
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
body{
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Serif JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", serif;
  line-height: 1.6;
}

/* アクセシビリティ（画面外に隠す） */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ===== Header 全体 ===== */
.site-header{
  position: sticky; top: 0; z-index: 1000;
  background: linear-gradient(180deg, #0b0f14 0%, #0b0f14cc 100%);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* 上段：ロゴ＋ユーティリティ */
.header-inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}

/* 左：ブランド */
.brand{
  display: flex; align-items: center; gap: 12px;
  color: inherit; text-decoration: none;
}
.brand__logo{
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--pill-bg); object-fit: cover;
  box-shadow: var(--shadow);
}
.brand__text{ display:flex; flex-direction: column; }
.site-title{
  font-size: clamp(20px, 3.2vw, 28px);
  margin:0; letter-spacing:.04em; font-weight:700;
}
.site-tagline{
  margin:2px 0 0; font-size:13px; color: var(--text-dim);
}

/* 右：ユーティリティ */
.utilities{ display:flex; align-items:center; gap:10px; }
.util-btn, .util-link{
  display:inline-flex; align-items:center; justify-content:center;
  height:36px; padding:0 12px; border-radius:999px;
  background: var(--pill-bg); color: var(--text);
  border:1px solid rgba(255,255,255,.06);
  text-decoration:none; font-size:14px;
  transition: background .2s ease, border-color .2s ease, transform .05s ease;
}
.util-btn:active, .util-link:active{ transform: translateY(1px); }
.util-btn:hover, .util-link:hover{
  background: var(--accent-2); border-color: rgba(255,255,255,.14);
}

/* ===== 下段ナビ ===== */
.global-nav{
  border-top: 1px solid rgba(255,255,255,.06);
  background: var(--bg-elev);
}
.nav-list{
  max-width: 1120px;
  margin: 0 auto; padding: 0 8px;
  display:flex; align-items:center; gap:6px;
  list-style:none; overflow-x:auto;
}
.nav-list > li{ position:relative; }

/* a と button を共通デザインに */
.nav-list > li > a,
.dropdown-toggle{
  display:inline-flex; align-items:center; justify-content:center;
  height:42px; padding:0 14px; margin:6px 0;
  border-radius:10px;
  color: var(--text); text-decoration:none; white-space:nowrap;
  border:1px solid rgba(255,255,255,.06);
  background:#161c2c;
  transition: background .2s ease, border-color .2s ease;
  font-size:15px;
}
.nav-list > li > a:hover,
.dropdown-toggle:hover{
  background:#1c2336; border-color: rgba(255,255,255,.14);
}

/* button の既定の四角い見た目を消す（これが“その他”の枠の原因） */
.dropdown-toggle{
  appearance:none; -webkit-appearance:none;
  border:0; background:transparent; padding:0; font:inherit; color:inherit;
  cursor:pointer;
  /* すぐ上の共通デザインが効くように、ここでは何も描画しない */
}

/* ===== ドロップダウン（その他） ===== */
.menu-has-dropdown{ position:relative; }

.dropdown{
  position:absolute; left:0; top:calc(100% + 6px);
  min-width:220px;
  background:#121826;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  box-shadow: var(--shadow);
  padding:6px; margin:0; list-style:none;
}
.dropdown[hidden]{ display:none !important; } /* 初期非表示を確実に */

.dropdown li a{
  display:block; padding:10px 12px; border-radius:8px;
  color:var(--text); text-decoration:none; font-size:14px;
}
.dropdown li a:hover{ background:#1b2336; }

/* スマホ調整 */
@media (max-width: 720px){
  .brand__logo{ width:44px; height:44px; }
  .site-title{ font-size:20px; }
  .site-tagline{ display:none; }
  .utilities{ gap:6px; }
}

/* ===== タイトル右横にキャッチコピー ===== */
.brand__text-inline{
  display: flex;
  align-items: baseline; /* タイトルの下線にそろえる */
  gap: 10px; /* タイトルとキャッチコピーの間隔 */
  flex-wrap: wrap; /* 狭い画面では折り返し */
}

.site-title{
  font-size: clamp(22px, 3.5vw, 32px); /* 少し大きめ */
  margin: 0;
  font-weight: 700;
}

.site-tagline-inline{
  font-size: clamp(14px, 2vw, 18px); /* 少し大きめ */
  color: var(--text-dim);
  white-space: nowrap; /* 折り返さず1行で表示 */
}
  
/* 検索ボタンのテキスト調整 */
.util-btn {
  gap: 4px; /* アイコンと文字の間隔 */
}

.util-text {
  font-size: 14px;
  line-height: 1;
}

/* ===== その他ドロップダウン全項目表示仕様 ===== */
.global-nav { position: relative; z-index: 5; overflow: visible; }
.nav-list   { overflow-x: auto; overflow-y: visible; }
.menu-has-dropdown { position: relative; overflow: visible; }

.dropdown{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  max-height: none;       /* 高さ制限を解除 */
  overflow: visible;      /* 内部スクロールを出さない */
  background:#121826;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  padding: 8px;
  z-index: 10;
}
.dropdown[hidden]{ display:none !important; }

.dropdown li a{
  display:block;
  padding: 12px 14px;
  border-radius:8px;
  font-size: 15px;
  line-height: 1.35;
}
.dropdown li a:hover{ background:#1b2336; }


/* === ドロップダウンが切れないようにする最終パッチ === */
.site-header{ overflow: visible !important; }
.header-inner{ overflow: visible !important; }
.global-nav{ position: relative; z-index: 50; overflow: visible !important; }

/* 横スクロールはやめて完全に可視化（スマホ横スクロールが必要なら後で調整） */
.nav-list{
  overflow: visible !important;
}

/* “その他”の親も隠さない */
.menu-has-dropdown{ position: relative; overflow: visible !important; }

/* ドロップダウン本体：絶対配置で重ねる（高さ制限/内側スクロールなし） */
.dropdown{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;                 /* 右に寄せたいなら left を消して right:0; */
  min-width: 280px;
  max-height: none !important;
  overflow: visible !important;
  background:#121826;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  padding: 8px;
  z-index: 100;            /* ヘッダーより前に出す */
}

/* 初期非表示を強制 */
.dropdown[hidden]{ display:none !important; }

/* 項目の読みやすさ */
.dropdown li a{
  display:block; padding:12px 14px; border-radius:8px;
  font-size:15px; line-height:1.35; text-decoration:none; color:var(--text);
}
.dropdown li a:hover{ background:#1b2336; }

/* ナビ項目ホバー時に文字を赤くする */
.nav-list > li > a:hover,
.nav-list > li > .dropdown-toggle:hover {
  color:#ff4d4d; /* 暗赤 */
  background: #1c2336; /* 背景は今の落ち着いた色のまま */
  border-color: rgba(255,255,255,.14);
}

/* ドロップダウン開閉アニメーション */
.dropdown {
  opacity: 0;
  transform: translateY(4px); /* 少し下から */
  transition: opacity 0.14s ease, transform 0.14s ease;
  pointer-events: none; /* 非表示時にクリックできないように */
}

.menu-has-dropdown .dropdown:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* PC表示時：ナビ同士の間隔を広めに */
.nav-list {
  gap: 14px; /* 以前の6pxから広げる */
}

/* スマホ表示時も少し広めに */
@media (max-width: 720px) {
  .nav-list {
    gap: 8px; /* PCより狭めだけど広すぎない */
  }
}

/* ここからメインとサイドバー */
:root{
  --bg:#0f0f10;
  --panel:#151517;
  --text:#ddd;
  --muted:#aaa;
  --accent:#ff4d4d; /* 暗赤 */
  --max: 1280px;    /* ページ最大幅 */
  --gutter: 24px;   /* 余白 */
}

/* 共通 */
.ad-slot img{ display:block; width:100%; height:auto; }
h1,h2,h3{ font-weight:700; }
a{ color:inherit; text-decoration:none; }

/* 上部リーダーボード */
.ad-728x90{
  max-width: var(--max);
  margin: 12px auto;
  padding: 0 var(--gutter);
}

/* メイン3レーン */
.layout{
  background: var(--bg);
  color: var(--text);
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--gutter) 40px;
  display: grid;
  grid-template-columns:
    minmax(0, 120px)  /* 左レール（広告） */
    1fr               /* 中央コンテンツ */
    320px             /* 右サイドバー */
    minmax(0, 120px); /* 右レール（広告） */
  gap: 20px;
}

/* レール（左右の縦長広告） */
.rail{
  display: block;
}
.rail .ad-slot{ position: sticky; top: 90px; }

/* コンテンツ */
.content{
  background: transparent;
}

/* ヒーロー */
.hero{
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
.hero img{
  width:100%; height: clamp(220px, 40vw, 420px); object-fit: cover;
  filter: brightness(0.85);
}
.hero-text{
  position:absolute; inset:auto 0 0 0;
  padding: 18px 20px 22px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.85) 100%);
}
.hero h1{ color:#fff; font-size: clamp(1.2rem, 2.6vw, 1.8rem); margin-bottom:6px; }
.hero p{ color: var(--muted); }

/* 記事グリッド */
.articles{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
.card{
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.card .thumb{ aspect-ratio: 16/9; overflow: hidden; }
.card img{ width:100%; height:100%; object-fit: cover; display:block; }
.card h2{ font-size: 1rem; margin: 10px 12px 6px; color: var(--accent); }
.card p{ font-size: .9rem; margin: 0 12px 14px; color: var(--text); opacity:.9; }
.card:hover{ transform: translateY(-4px); box-shadow: 0 6px 16px rgba(255,77,77,.25); }

/* 記事内広告（フィード途中差し込み） */
.in-feed{
  margin: 14px 0 10px;
  max-width: 320px;
}

/* サイドバー */
.sidebar{
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar .ad-slot{ background: transparent; }
.sticky-ad{ position: sticky; top: 90px; }

/* ウィジェット */
.widget{
  background: var(--panel);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.widget h3{
  font-size: 1rem;
  color:#fff;
  border-left: 4px solid var(--accent);
  padding-left: 8px;
  margin-bottom: 10px;
}
.widget ol{ margin:0; padding-left: 18px; }
.widget li{ margin: 6px 0; }
.widget a:hover{ color: var(--accent); }

/* 広告のダミーサイズ（画像がない時の枠） */
.ad-160x600{ width:160px; }
.ad-300x250{ width:300px; }
.ad-300x600{ width:300px; }

/* レスポンシブ */
@media (max-width: 1200px){
  .layout{
    grid-template-columns:
      0px       /* 左レールを隠す */
      1fr       /* 中央 */
      320px     /* 右サイドバー */
      0px;      /* 右レールを隠す */
  }
  .rail{ display:none; }
}
@media (max-width: 980px){
  .layout{
    grid-template-columns: 1fr; /* 1カラム */
  }
  .sidebar{ order: 2; }
  .content{ order: 1; }
  .articles{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ad-728x90{ padding: 0 12px; }
}
@media (max-width: 600px){
  .articles{ grid-template-columns: 1fr; }
  .hero img{ height: 220px; }
  .ad-300x250, .ad-300x600{ width:100%; }
  .in-feed{ max-width: 100%; }
}


/* =========================
   カテゴリ別リスト（7カテゴリ対応）
   ========================= */
.category-section{
  margin: 28px 0 40px;
}
.cat-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin: 6px 0 14px;
}
.cat-head h2{
  font-size:1.08rem; line-height:1.2;
  color:#fff;
  border-left: 4px solid var(--accent);
  padding-left: 10px;
}
.cat-head .see-more{
  font-size:.9rem; opacity:.85;
  padding:6px 10px; border-radius:8px;
  background: transparent; border:1px solid rgba(255,255,255,.08);
  transition: transform .15s ease, border-color .15s ease, opacity .15s ease;
}
.cat-head .see-more:hover{ transform: translateY(-1px); border-color: rgba(255,255,255,.18); opacity:1; }

/* カードグリッド */
.article-list.grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

/* カード */
.article-card{
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
  transition: transform .18s ease, box-shadow .18s ease, outline-color .18s ease;
  outline: 1px solid rgba(255,255,255,.04);
}
.article-card a{ display:block; height:100%; }
.article-card .thumb{
  aspect-ratio: 16/9; overflow:hidden; background:#0c0c0c;
}
.article-card img{
  width:100%; height:100%; object-fit:cover; display:block;
  transform: scale(1.02);
  transition: transform .3s ease;
}
.article-card h3{
  font-size:.98rem; margin: 10px 12px 6px; color: var(--accent);
}
.article-card p{
  font-size:.9rem; margin: 0 12px 14px; color: var(--text); opacity:.9;
}
.article-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(255,77,77,.22);
}
.article-card:hover img{ transform: scale(1.06); }

/* 「もっと読む」 */
.load-more{
  margin: 14px auto 0;
  display:block;
  padding:.65rem 1.1rem;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,77,77,.16), rgba(255,77,77,.06));
  border:1px solid rgba(255,77,77,.35);
  color:#fff;
  font-size:.95rem;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.load-more:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(255,77,77,.25);
}
.load-more:disabled{ opacity:.6; cursor:not-allowed; }

/* in-feed広告（任意） */
.in-feed{ margin: 16px auto 8px; max-width: 320px; }

/* レスポンシブ */
@media (max-width: 1200px){
  .article-list.grid{
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}
@media (max-width: 980px){
  .article-list.grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .cat-head h2{ font-size:1.02rem; }
}
@media (max-width: 600px){
  .article-list.grid{
    grid-template-columns: 1fr;
  }
  .cat-head{ gap:8px; }
  .cat-head .see-more{ padding:6px 10px; }
}

/* アクセシビリティ補助（キーボード操作時のフォーカス） */
.article-card a:focus-visible,
.cat-head .see-more:focus-visible,
.load-more:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 画像がない場合のプレースホルダー例（任意） */
.article-card .thumb:has(img[alt=""]){
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255,77,77,.12) 0 12px,
      rgba(255,77,77,.06) 12px 24px
    );
}


/* セクション間の余白を少し広げて区切り感UP */
.category-section{ margin: 36px 0 44px; }

/* 見出し行を高さそろえ＆ボタンのズレ解消 */
.cat-head{ min-height: 38px; }
.cat-head h2{ display:flex; align-items:center; }
.cat-head .see-more{ margin-left:auto; }


/* 2〜3行で省略、行そろえ */
.article-card h3{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  min-height: calc(1.2em * 2 + 4px);
}
.article-card p{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  min-height: calc(1.2em * 2 + 4px);
}

.article-card .thumb img{
  filter: brightness(0.96);          /* 少しだけ明るく */
}
@media (min-width:981px){
  .article-list.grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }
}

/* ヘッダーの高さに合わせて調整（例：72px）*/
.rail .ad-slot, .sticky-ad{ top: 72px; }

.hero-text{
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.9) 100%);
}
.hero-text > *{ max-width: 70ch; }

:root{
  --accent:#e03a3a; /* #ff4d4d より落ち着いた暗赤 */
}

/* 人気タグ */
.popular-tags{ margin: 26px 0 30px; background: rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.06); border-radius:14px; padding:14px; }
.tags-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.tags-head h2{ font-size:1.02rem; border-left:4px solid var(--accent); padding-left:10px; }
.tag-cloud{ display:flex; flex-wrap:wrap; gap:10px; }

.tag{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:999px;
  background: rgba(255,77,77,.12);
  border:1px solid rgba(255,77,77,.35);
  color:#fff; font-size:.92rem; line-height:1;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.tag .count{ font-size:.82rem; opacity:.9; }
.tag:hover{ transform: translateY(-1px); box-shadow:0 6px 12px rgba(255,77,77,.18); }
.tag:active{ transform: translateY(0); }


/* === 人気タグ（チップ） === */
.popular-tags{
  margin: 26px 0 30px;
  background: rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.06);
  border-radius:14px; padding:14px;
}
.tags-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.tags-head h2{ font-size:1.02rem; border-left:4px solid var(--accent); padding-left:10px; }

.tag-cloud{ display:flex; flex-wrap:wrap; gap:10px; }
.tag{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:999px;
  background: rgba(255,77,77,.12);
  border:1px solid rgba(255,77,77,.35);
  color:#fff; font-size:.92rem; line-height:1;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.tag .count{ font-size:.82rem; opacity:.9; }
.tag:hover{ transform: translateY(-1px); box-shadow:0 6px 12px rgba(255,77,77,.18); }


:root{
  --bg-900:#0b0b0c;
  --bg-800:#121214;
  --line:#1e1e22;
  --text-100:#e9e9ee;
  --text-400:#b3b3bd;
  --accent:#b31b1b;      /* 暗赤：好みに調整OK (#8b0000 / #a1121a など) */
  --accent-2:#6b0f12;    /* さらに深い赤 */
  --ring: rgba(179,27,27,.4);
}

.site-footer{
  background:
    radial-gradient(1200px 400px at 70% -10%, rgba(179,27,27,.08), transparent 60%),
    linear-gradient(180deg, var(--bg-800), var(--bg-900));
  color: var(--text-100);
  border-top: 1px solid var(--line);
  margin-top: 64px;
}

.site-footer a{ color: var(--text-100); text-decoration: none; }
.site-footer a:hover{ color: var(--accent); }

.footer-inner{
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 20px 8px;
}

.footer-brand{
  margin-bottom: 24px;
}
.footer-brand .brand{
  display: inline-flex; align-items: baseline; gap: .6rem;
  font-weight: 700; letter-spacing: .02em; line-height: 1;
}
.brand-mark{
  display:inline-block; transform: translateY(2px) rotate(0.5turn);
  font-size: 1.4rem; color: var(--accent);
  filter: drop-shadow(0 0 4px rgba(179,27,27,.25));
}
.brand-text{
  font-size: clamp(1.1rem, 3.2vw, 1.4rem);
}
.brand-tag{
  margin:.5rem 0 0; color: var(--text-400); font-size:.95rem;
}

.footer-grid{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding-top: 8px; padding-bottom: 24px;
  border-top: 1px solid var(--line);
}
.footer-col{
  grid-column: span 12;
  padding-top: 16px;
}
@media (min-width: 720px){
  .footer-col:nth-child(1){ grid-column: span 4; }
  .footer-col:nth-child(2){ grid-column: span 4; }
  .footer-col:nth-child(3){ grid-column: span 4; }
}

.footer-title{
  font-size: 1rem; font-weight: 700; margin: 0 0 10px;
  color: var(--text-100);
}
.footer-links{ list-style: none; margin:0; padding:0; }
.footer-links li{ margin: .35rem 0; }
.footer-links a{
  display:inline-block; padding:.12rem 0; border-bottom: 1px dashed transparent;
  transition: border-color .18s ease, transform .18s ease;
}
.footer-links a:hover{
  border-color: rgba(179,27,27,.35); transform: translateX(2px);
}

/* ニュースレター */
.footer-note{ color: var(--text-400); margin:.25rem 0 .6rem; font-size:.95rem; }
.newsletter{ display:flex; gap:.5rem; }
.newsletter input{
  flex:1; padding:.7rem .9rem; border-radius: 10px; border:1px solid var(--line);
  background: #0f0f11; color: var(--text-100);
  outline: none;
}
.newsletter input:focus{ border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.newsletter button{
  padding:.7rem 1rem; border-radius: 12px; border:1px solid transparent;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color:#fff; font-weight:700; cursor:pointer;
  transition: transform .12s ease, filter .12s ease;
}
.newsletter button:hover{ transform: translateY(-1px); filter: brightness(1.05); }

/* ソーシャル */
.footer-social{ list-style:none; display:flex; gap:12px; margin:12px 0 0; padding:0; }
.footer-social a{
  display:inline-grid; place-items:center; width:38px; height:38px; border-radius:10px;
  border:1px solid var(--line); background:#0f0f11;
}
.footer-social a:hover{ border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }

/* 下部バー */
.footer-bottom{
  display:flex; align-items:center; justify-content:space-between;
  gap: 12px;
  max-width:1080px; margin:0 auto; padding: 14px 20px 20px;
  border-top: 1px solid var(--line);
  color: var(--text-400);
  font-size: .92rem;
}
.footer-bottom .back-to-top{
  border:1px solid var(--line); border-radius: 999px; padding:.4rem .8rem;
  background:#0f0f11; font-weight:700;
}
.footer-bottom .back-to-top:hover{ border-color: var(--accent); color:#fff; }

/* アクセシビリティ用スクリーンリーダーラベル */
.sr-only{
  position:absolute !important; height:1px; width:1px; overflow:hidden;
  clip:rect(1px,1px,1px,1px); white-space:nowrap;
}

.brand__logo-svg { width: 56px; height: 56px; }

/* 全体ゆらぎ */
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(1.5px)} }
.brand__logo-svg #mascot { animation: bob 3s ease-in-out infinite; }

/* 瞳の鼓動 */
@keyframes dilate { 0%,100%{transform:scale(1)} 40%{transform:scale(1.12)} 60%{transform:scale(0.92)} }
.brand__logo-svg #pupil { transform-origin:256px 216px; animation:dilate 2.6s ease-in-out infinite; }

/* 瞬き（まぶたを閉じる） */
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  94%, 96% { transform: scaleY(0.05); }
}
.brand__logo-svg #eyelid {
  transform-origin: 256px 216px; /* 目の中心を基点 */
  animation: blink 6s ease-in-out infinite;
}


/* 放射光のチラつき */
@keyframes rayPulse { 0%,100%{opacity:.35;transform:translateY(0)} 50%{opacity:1;transform:translateY(-1px)} }
.brand__logo-svg #rays .ray { animation: rayPulse 1.2s ease-in-out infinite; animation-delay: calc(var(--i) * .08s); }

/* 腕のスイング */
@keyframes swingL { 0%,100%{transform:rotate(0)} 50%{transform:rotate(3deg)} }
@keyframes swingR { 0%,100%{transform:rotate(0)} 50%{transform:rotate(-3deg)} }
.brand__logo-svg #armL { transform-origin:196px 304px; animation:swingL 2.8s ease-in-out infinite; }
.brand__logo-svg #armR { transform-origin:316px 304px; animation:swingR 2.8s ease-in-out infinite; }

/* 動きが苦手な環境配慮 */
@media (prefers-reduced-motion: reduce){
  .brand__logo-svg *{ animation: none !important; }
}

/* ===== グローバルナビのドロップダウン ===== */
.global-nav { position: relative; }
.nav-list { display:flex; gap:18px; list-style:none; margin:0; padding:0; align-items:center; }
.nav-list > li { position:relative; }
.nav-list a { text-decoration:none; display:block; padding:.6rem .8rem; }

/* サブメニューの初期状態（非表示） */
.nav-list .sub-menu {
  position:absolute; top:100%; left:0;
  min-width:220px;
  background:#0e1218; border:1px solid #222; border-radius:10px;
  padding:.4rem 0; margin:.4rem 0 0 0; list-style:none;
  box-shadow:0 8px 24px rgba(0,0,0,.3);
  opacity:0; visibility:hidden; transform: translateY(6px);
  transition:opacity .15s ease, transform .15s ease, visibility .15s;
  z-index:50;
}
.nav-list .sub-menu li a { padding:.55rem .9rem; white-space:nowrap; }
.nav-list .sub-menu li a:hover { background:rgba(255,255,255,.05); }

/* ホバー or フォーカスで開く（PC） */
.nav-list li.menu-item-has-children:hover > .sub-menu,
.nav-list li.menu-item-has-children:focus-within > .sub-menu,
.nav-list li.is-open > .sub-menu {
  opacity:1; visibility:visible; transform: translateY(0);
}

/* 親の見た目（▼） */
.nav-list li.menu-item-has-children > a::after {
  content:"▾"; margin-left:.35rem; font-size:.8em; opacity:.8;
}

/* モバイル想定の簡易縦並び（必要なら調整） */
@media (max-width: 980px) {
  .nav-list { flex-wrap:wrap; gap:8px; }
  .nav-list .sub-menu {
    position:absolute; left:0; right:auto;
  }
}

/* ===== PC：ナビを均等配置（左右の余白も均等） ===== */
@media (min-width: 901px){
  .nav-list{
    width: 100%;
    max-width: 1120px;      /* サイト幅のまま中央 */
    margin: 0 auto;
    padding: 0 12px;
    justify-content: space-evenly;  /* ← ココがポイント：均等配置 */
    gap: 0;                           /* 均等配置と併用するので gap は 0 */
    flex-wrap: nowrap;                /* 1行に収める */
  }
  /* 各ボタンの最小幅を少し確保（文字が短い項目が極端に寄らないように） */
  .nav-list > li > a,
  .nav-list > li > .dropdown-toggle{
    min-width: 112px;
    text-align: center;
  }
}

/* ===== スマホ：これまで通り（押しやすい間隔 + 横スクロール） ===== */
@media (max-width: 900px){
  .nav-list{
    justify-content: flex-start;  /* 左寄せでOK */
    gap: 8px;                     /* 押しやすい間隔 */
    overflow-x: auto;
  }
}

/* ===== ナビゲーション文字の太さ調整 ===== */
.nav-list > li > a,
.nav-list > li > .dropdown-toggle {
  font-weight: 600; /* 太さをやや太めに */
  letter-spacing: 0.5px; /* 少し間隔を空けて視認性UP */
}

/* ==== スマホ最適化（～414px） ==== */
@media (max-width: 414px) {
  /* ヘッダー圧縮 */
  .header-inner { padding: 6px 8px; gap: 8px; }
  .site-title { font-size: 1.2rem; line-height: 1.1; }
  .site-tagline-inline { display:none; } /* サブタイトル隠す */

  /* ユーティリティ：テキスト隠してアイコンだけ */
  .utilities { display:flex; gap: 6px; align-items:center; }
  .utilities .util-text { display:none; }
  .util-btn, .util-link { padding: .35rem .5rem; }

  /* グローバルナビ：詰める＋横スクロール許可 */
  .global-nav .nav-list { gap: 8px; padding: 6px 6px; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .global-nav .nav-list a { padding: .45rem .6rem; font-size: .92rem; white-space: nowrap; }
  .global-nav .nav-list::-webkit-scrollbar { display:none; }

  /* ドロップダウンの位置安全マージン */
  .nav-list .sub-menu { transform: translateY(4px); }
}

/* ==== 900px以下（サイドバー落とす・1カラム） ==== */
@media (max-width: 900px) {
  .layout { display:block; }
  .sidebar { margin-top: 16px; }
  .articles { display:grid; grid-template-columns: 1fr; gap: 16px; }
}

/* ヘッダーを固定（任意：使いたければ有効化） */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(120%) blur(2px);
}
.admin-bar .site-header { top: 32px; } /* ログイン中は管理バー分下げる */

/* --- ナビの横スクロールを確実に有効化（切れ防止） --- */
.global-nav{
  width:100%;
  overflow-x:auto;           /* 横だけスクロール */
  overflow-y:visible;        /* ドロップダウンが下に出ても切れない */
  -webkit-overflow-scrolling: touch;
}

.global-nav .nav-list{
  display:inline-flex;       /* コンテンツ幅ぶんだけ横に伸ばす */
  flex-wrap:nowrap;          /* 折り返さない */
  gap:12px;
  padding:6px 10px;          /* 右端が切れないよう少し余白 */
  min-width:max-content;     /* 子要素の合計幅をそのまま確保 */
}

.nav-list > li{ flex:0 0 auto; } /* ボタン1個ずつ固定幅として扱う */

/* サブメニューが親のoverflowで切れないように */
.nav-list .sub-menu{
  /* 既存のposition:absolute; top:100% のままでOK */
  z-index: 100;              /* 念のため前面に */
}

/* 幅が狭いときは文字サイズとパディングをさらに詰める */
@media (max-width: 780px){
  .global-nav .nav-list a{
    padding:.45rem .6rem;
    font-size:.95rem;
    white-space:nowrap;
  }
}

/* カテゴリーヒーロー */
.cat-hero{ position:relative; border-radius:14px; overflow:hidden; margin:12px 0 20px; }
.cat-hero-img{ display:block; width:100%; height: clamp(180px, 28vw, 360px); object-fit: cover; filter: brightness(.85); }
.cat-hero__inner{
  position:absolute; inset:auto 0 0 0; padding: clamp(12px, 3vw, 24px);
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 65%, rgba(0,0,0,.75) 100%);
  color:#fff;
}
.cat-hero__title{ font-size: clamp(1.25rem, 3vw, 1.8rem); margin: 0 0 .25rem; }
.cat-hero__desc{ margin:0; opacity:.9; font-size:.95rem; }

/* 900px以下で上下の余白調整 */
@media (max-width: 900px){ .cat-hero{ margin:8px 0 16px; } }

/* 共通ラッパー（中央寄せ＆余白） */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* カテゴリーヒーローをどーんと中央に */
.cat-hero      { position: relative; border-radius: 16px; overflow: hidden; margin: 22px 0; }
.cat-hero-img  { display:block; width:100%; height: clamp(220px, 36vw, 440px); object-fit: cover; }
.cat-hero::after { /* 下にかけるグラデーションで文字を読みやすく */
  content:""; position:absolute; inset:0; 
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.55) 80%);
  pointer-events:none;
}
.cat-hero__inner { position:absolute; inset:auto 0 0 0; padding: clamp(14px, 3vw, 24px); color:#fff; }
.cat-hero__title { font-size: clamp(1.4rem, 3.2vw, 2.2rem); margin:0 0 .25rem; font-weight:700; }
.cat-hero__desc  { margin:0; opacity:.92; font-size: clamp(.95rem, 2.2vw, 1.05rem); }

/* パンくず */
.breadcrumbs { font-size:.92rem; color:#9aa3b2; margin: 10px 0 6px; }
.breadcrumbs a { color:inherit; text-decoration:none; }
.breadcrumbs a:hover { text-decoration:underline; }

/* 記事が無い時の空状態 */
.empty-state {
  padding: 24px; border:1px dashed #2b2f36; border-radius:14px; color:#bfc7d5; 
  background: rgba(255,255,255,0.02);
}
.empty-state .actions { margin-top: 12px; display:flex; gap:10px; flex-wrap:wrap; }
.button-link {
  display:inline-block; padding:.55rem .9rem; border:1px solid #2b2f36; border-radius:999px;
  text-decoration:none; color:#e6e9ef;
}
.button-link:hover { background:#18202a; }

/* カードの少しだけリッチなホバー */
.articles .card { transition: transform .12s ease, box-shadow .12s ease; }
.articles .card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* レスポンシブ微調整 */
@media (max-width: 900px){
  .wrap { padding: 0 12px; }
  .cat-hero { margin: 14px 0; border-radius:14px; }
}

/* 中央寄せラッパー */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* パンくず */
.breadcrumbs { font-size:.92rem; color:#9aa3b2; margin: 10px 0 6px; }
.breadcrumbs a { color:inherit; text-decoration:none; }
.breadcrumbs a:hover { text-decoration:underline; }

/* カテゴリーヒーロー（既存と競合しないユニーク指定） */
.cat-hero      { position:relative; border-radius:16px; overflow:hidden; margin:22px 0; }
.cat-hero-img  { display:block; width:100%; height: clamp(220px, 36vw, 440px); object-fit: cover; }
.cat-hero::after { content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.55) 85%); pointer-events:none; }
.cat-hero__inner { position:absolute; inset:auto 0 0 0; padding: clamp(14px, 3vw, 24px); color:#fff; }
.cat-hero__title { font-size: clamp(1.4rem, 3.2vw, 2.2rem); margin:0 0 .25rem; font-weight:700; }
.cat-hero__desc  { margin:0; opacity:.92; font-size: clamp(.95rem, 2.2vw, 1.05rem); }

/* 空状態（記事0件） */
.empty-state {
  padding: 24px; border:1px dashed #2b2f36; border-radius:14px; color:#bfc7d5;
  background: rgba(255,255,255,0.02);
}
.empty-state .actions { margin-top:12px; display:flex; gap:10px; flex-wrap:wrap; }
.button-link {
  display:inline-block; padding:.55rem .9rem; border:1px solid #2b2f36; border-radius:999px;
  text-decoration:none; color:#e6e9ef;
}
.button-link:hover { background:#18202a; }

/* カード軽いホバー */
.articles .card { transition: transform .12s ease, box-shadow .12s ease; }
.articles .card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* モバイル微調整 */
@media (max-width: 900px){
  .wrap { padding: 0 12px; }
  .cat-hero { margin: 14px 0; border-radius:14px; }
}

/* ===== Header Search ===== */
.header-search{
  display:flex;
  justify-content:flex-end;  /* PCで右寄せ */
  padding:10px 0 0;
}
.site-search-form{ display:flex; gap:10px; width:100%; max-width:460px; }
.search-input{
  flex:1;
  padding:.75rem 1rem;
  border-radius:12px;
  border:1px solid #263041;
  background:#0b1017;
  color:#e6e9ef;
}
.search-input::placeholder{ color:#7f8a99; }
.search-input:focus{ outline:none; border-color:#3a8bfd; box-shadow:0 0 0 3px rgba(58,139,253,.18); }
.search-submit{
  padding:.75rem 1rem;
  border-radius:12px;
  border:1px solid #2b3648;
  background:#18202a;
  color:#e6e9ef;
  cursor:pointer;
}
.search-submit:hover{ background:#212b36; }

/* 視覚的に隠すラベル */
.sr-only{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* スマホ：デフォ非表示。さがすボタンで開閉して全幅表示 */
@media (max-width: 780px){
  .header-search{ display:none; padding:8px 0 0; }
  .header-search.is-open{ display:block; }
  .site-search-form{ max-width:none; }
  .search-input, .search-submit{ font-size:1rem; }
}
