/* =========================================================
   NoL Renewal D — base（全テンプレート共通シェル）
   モック: tools/site-design/outputs/nol-renewal/*-d.html が正
   ========================================================= */
:root {
  --bg: #12151c;
  --panel: #191f2a;
  --panel-2: #202836;
  --text: #e6e9ef;
  --muted: #8b93a3;
  --gold: #c9a75e;
  --line: #2a3242;
  --radius: 6px;
  --font-en: 'Archivo', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
html { scroll-behavior: smooth; }
body.nol {
  margin: 0; padding: 0; box-sizing: border-box;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
body.nol *, body.nol *::before, body.nol *::after { box-sizing: border-box; }
/* リセットは:where()で詳細度0にする（body.nolを付けると(0,1,2)になり
   .thumb > img 等のコンポーネント指定(0,1,1)に勝ってしまうため） */
:where(body.nol) a { color: inherit; text-decoration: none; }
:where(body.nol) img { max-width: 100%; height: auto; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.1rem, 3.5vw, 2.2rem); }

/* ---------- header ---------- */
body.nol > header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(18, 21, 28, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1.8rem; height: 60px; }
.nav .logo img { height: 24px; width: auto; display: block; }
.nav ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav ul a {
  font-weight: 700; font-size: 0.82rem;
  color: var(--muted); white-space: nowrap;
  padding: 4px 0; position: relative;
  transition: color 0.3s var(--ease);
}
.nav ul a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--gold); border-radius: 2px;
  transition: width 0.35s var(--ease);
}
.nav ul a:hover { color: var(--text); }
.nav ul a:hover::after { width: 100%; }
.nav ul a.now { color: var(--text); }
.nav ul a.now::after { width: 100%; }
.nav-side { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
/* form.でスコープ必須：WPが検索結果ページのbodyに.searchを付けるため、
   素の.searchだとbody自体がflex化してページ全体が横並びに崩壊する */
form.search {
  display: flex; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel);
  padding: 0.35rem 0.75rem;
  transition: border-color 0.3s var(--ease);
}
form.search:focus-within { border-color: var(--gold); }
form.search input {
  background: none; border: none; outline: none;
  color: var(--text);
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em;
  width: 110px; padding: 0; margin: 0;
}
form.search input::placeholder { color: var(--muted); }
.sns { display: flex; gap: 0.8rem; }
.sns a { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); transition: color 0.3s var(--ease); }
.sns a:hover { color: var(--gold); }
.menu-btn {
  display: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em;
  padding: 0.45rem 0.9rem; cursor: pointer;
}
.m-nav {
  display: none;
  position: fixed; inset: 60px 0 0 0; z-index: 19;
  background: rgba(18, 21, 28, 0.98);
  padding: 1.6rem clamp(1.1rem, 3.5vw, 2.2rem);
}
body.menu-open .m-nav { display: block; }
.m-nav a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1.15rem 0.2rem;
  border-bottom: 1px solid var(--line);
  font-weight: 900; font-size: 1.2rem;
}
.m-nav a span { font-family: var(--font-mono); font-weight: 400; font-size: 0.65rem; letter-spacing: 0.12em; color: var(--gold); }
.m-search { display: block; margin-top: 1.5rem; }
.m-search input {
  width: 100%; background: var(--panel); outline: none;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
  font-family: var(--font-mono); font-size: 0.8rem;
  padding: 0.75rem 1rem;
}

/* ---------- HUD計器バー ---------- */
.meters { border-bottom: 1px solid var(--line); background: var(--panel); }
.meters .wrap {
  display: flex; justify-content: space-between; gap: 1.5rem;
  padding-top: 0.5rem; padding-bottom: 0.5rem;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em;
  color: var(--muted); white-space: nowrap; overflow-x: auto; scrollbar-width: none;
}
.meters .wrap::-webkit-scrollbar { display: none; }
.meters b { color: var(--gold); font-weight: 400; }
.meters .rec { color: #d34a4a; animation: rec-blink 1.4s ease-in-out infinite; }
@keyframes rec-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------- 広告ウェル（高さ固定・CLS防止） ---------- */
.ad-well {
  background: #f4f4f2;
  border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  overflow: hidden;
}
.ad-well .ad-label { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.2em; color: #8a8a86; }
.ad-well .ad-size { font-family: var(--font-mono); font-size: 0.72rem; color: #b9b9b4; letter-spacing: 0.1em; }
.ad-leader { height: 106px; margin: clamp(1.4rem, 3vw, 2rem) auto; max-width: 728px; }
.ad-infeed { height: 132px; margin: 0.8rem 0; }
.ad-inart { height: 296px; margin: clamp(1.8rem, 3.5vw, 2.6rem) 0; }
.ad-rect { height: 296px; max-width: 336px; margin: 0 auto; }
.ad-tower { height: 616px; max-width: 300px; margin: 0 auto; }

/* AdSense実ユニットのサイズ固定（レスポンシブユニットをCSS指定サイズで配信させる） */
.ad-well ins.adsbygoogle { display: inline-block; }
.ad-leader ins.adsbygoogle, .ad-infeed ins.adsbygoogle { width: 728px; height: 90px; }
.ad-inart ins.adsbygoogle, .ad-rect ins.adsbygoogle { width: 336px; height: 280px; }
.ad-tower ins.adsbygoogle { width: 300px; height: 600px; }

/* ---------- 本文グリッド ---------- */
.body-grid { display: grid; grid-template-columns: 1fr 320px; gap: clamp(1.8rem, 3.5vw, 2.8rem); }
.body-grid > * { min-width: 0; }

/* ---------- 共通パーツ ---------- */
.crumb {
  display: flex; gap: 0.7rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em;
  color: var(--muted);
}
.crumb a { color: var(--muted); transition: color 0.3s var(--ease); }
.crumb a:hover { color: var(--gold); }
.crumb b { color: var(--gold); font-weight: 400; }
/* span.でスコープ必須：タグアーカイブのbodyにWPが.tagを付けるため */
span.tag {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em;
  color: var(--gold); border: 1px solid rgba(201, 167, 94, 0.35); border-radius: 3px;
  padding: 0.14rem 0.55rem; white-space: nowrap;
}
.sec-head { display: flex; align-items: baseline; gap: 0.9rem; margin-bottom: 1.1rem; }
.sec-head::before { content: ''; width: 4px; height: 1.15em; background: var(--gold); border-radius: 2px; align-self: center; }
.sec-head h2 { font-weight: 900; font-size: clamp(1.15rem, 2.4vw, 1.5rem); letter-spacing: 0.01em; margin: 0; }
.sec-head .en { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.sec-head .aux { margin-left: auto; font-family: var(--font-mono); font-size: 0.65rem; color: var(--muted); }
a.aux:hover { color: var(--gold); }

/* ---------- カード（サムネ付き記事カードの共通コア） ---------- */
.card {
  display: block; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover { border-color: var(--gold); transform: translateY(-2px); }
.thumb {
  display: block;
  position: relative; aspect-ratio: 40 / 21; /* NoL標準アイキャッチ(768×403)の実比率。16/9だと左右crop */
  background: linear-gradient(135deg, #242e42 0%, #161b26 70%);
  overflow: hidden;
}
.thumb > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
  opacity: 0.9;
}
.card:hover .thumb > img { transform: scale(1.04); opacity: 1; }
.thumb::after {
  content: attr(data-mark);
  position: absolute; right: -0.06em; bottom: -0.32em;
  font-family: var(--font-en); font-style: italic; font-weight: 800;
  font-size: 2.4rem; line-height: 1;
  letter-spacing: -0.02em; text-transform: uppercase;
  color: rgba(201, 167, 94, 0.13);
  transition: color 0.4s var(--ease);
}
.card:hover .thumb::after { color: rgba(201, 167, 94, 0.28); }
.thumb .t-tag {
  position: absolute; left: 0.9rem; top: 0.9rem; z-index: 2;
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em;
  color: var(--bg); background: var(--gold); border-radius: 3px;
  padding: 0.15rem 0.6rem;
}
.card-body { display: block; padding: 0.85rem 1rem 1rem; }
.card-title { display: block; font-weight: 700; font-size: 0.88rem; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; transition: color 0.3s var(--ease); }
.card:hover .card-title { color: var(--gold); }
.card-meta { display: block; font-family: var(--font-mono); font-size: 0.64rem; color: var(--muted); letter-spacing: 0.1em; margin-top: 0.6rem; }
.card-meta i { font-style: italic; font-family: var(--font-en); font-weight: 800; color: var(--gold); margin-right: 0.6em; }

/* ---------- リストパネル ---------- */
.list-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.more-link {
  display: flex; justify-content: center; gap: 0.7rem; align-items: baseline;
  margin-top: 0.9rem; padding: 0.85rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--muted);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.more-link b { color: var(--gold); font-weight: 400; }
.more-link:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- sidebar ---------- */
.side-col > * + * { margin-top: 1.6rem; }
.side-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.side-head {
  display: flex; align-items: baseline; gap: 0.7rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.side-head b { font-weight: 900; font-size: 0.9rem; }
.side-head span { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.ci-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}
.ci-row:last-child { border-bottom: none; }
.ci-row:hover { background: var(--panel-2); }
.ci-row:hover .ci-name { color: var(--gold); }
.ci-row.now .ci-name { color: var(--gold); }
.ci-name { font-weight: 700; font-size: 0.85rem; transition: color 0.3s var(--ease); }
.ci-count { font-family: var(--font-mono); font-size: 0.64rem; color: var(--gold); }
.side-rank {
  display: grid; grid-template-columns: 44px 1fr; gap: 0.9rem; align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}
.side-rank:last-child { border-bottom: none; }
.side-rank:hover { background: var(--panel-2); }
.side-rank:hover .side-rank-title { color: var(--gold); }
.side-rank-num {
  font-family: var(--font-en); font-style: italic; font-weight: 800;
  font-size: 1.5rem; line-height: 1; letter-spacing: -0.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(201, 167, 94, 0.6);
  transition: color 0.3s var(--ease);
}
.side-rank:hover .side-rank-num { color: var(--gold); }
.side-rank-title { font-weight: 700; font-size: 0.82rem; line-height: 1.55; transition: color 0.3s var(--ease); }
.follow-panel { padding: 1.3rem 1.2rem; background: linear-gradient(160deg, rgba(201, 167, 94, 0.14), rgba(201, 167, 94, 0.03)), var(--panel); border: 1px solid rgba(201, 167, 94, 0.3); border-radius: var(--radius); }
.follow-panel b { font-weight: 900; font-size: 0.95rem; }
.follow-panel p { font-size: 0.8rem; color: var(--muted); margin: 0.3rem 0 1rem; }
.follow-btn {
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em;
  padding: 0.65rem 1rem; margin-top: 0.55rem;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.follow-btn:hover { border-color: var(--gold); color: var(--gold); }
.side-sticky { position: sticky; top: 76px; }

/* ---------- footer（切れる巨大文字） ---------- */
body.nol > footer { margin-top: clamp(3rem, 6vw, 5rem); border-top: 2px solid var(--gold); background: var(--panel); overflow: hidden; }
.foot { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2rem; padding: 2.4rem 0 0; }
.foot img { height: 26px; width: auto; display: block; }
.foot small { display: block; margin-top: 1rem; font-family: var(--font-mono); font-size: 0.62rem; color: var(--muted); letter-spacing: 0.06em; line-height: 1.9; }
.foot-nav { display: flex; gap: 1.8rem; list-style: none; flex-wrap: wrap; margin: 0; padding: 0; }
.foot-nav a { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--muted); transition: color 0.3s var(--ease); }
.foot-nav a:hover { color: var(--gold); }
.giant {
  font-family: var(--font-en); font-style: italic; font-weight: 800;
  font-size: clamp(7.5rem, 23vw, 22rem);
  line-height: 0.82;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--gold);
  opacity: 0.9;
  margin: 2rem 0 -0.18em -0.03em;
  user-select: none;
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .meters .rec { animation: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  form.search { display: none; }
  .nav ul { gap: 1.2rem; }
  .body-grid { grid-template-columns: 1fr; }
  .side-sticky { position: static; }
  .side-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: start; }
  .side-col > * + * { margin-top: 0; }
}

/* ---------- mobile ---------- */
@media (max-width: 768px) {
  .nav ul, .sns { display: none; }
  .menu-btn { display: block; }
  .ad-leader { height: 100px; max-width: 320px; }
  .ad-infeed { height: 116px; }
  .ad-inart, .ad-rect { height: 266px; max-width: 300px; }
  .ad-leader ins.adsbygoogle, .ad-infeed ins.adsbygoogle { width: 320px; height: 100px; }
  .ad-inart ins.adsbygoogle, .ad-rect ins.adsbygoogle { width: 300px; height: 250px; }
  .side-col { grid-template-columns: 1fr; }
}
