@charset "UTF-8";
/* ==========================================================================
   ゲーム攻略サイト 共通スタイル（ひな型）
   GameWith / Game8 / AppMedia の記事型レイアウトを参考にした汎用テンプレート。
   - 1ファイルで完結（ビルド不要）
   - 新しいゲーム・新しい記事を追加する場合もこのCSSをそのまま流用する
   目次:
     01. デザイントークン
     02. ベース
     03. レイアウト骨格
     04. ヘッダー / グローバルナビ / ドロワー
     05. パンくず
     06. 記事本文（見出し・表・リスト・囲み）
     07. 目次ボックス
     08. 画像プレースホルダ（差し替え前提の枠）
     09. カード / リンクリスト
     10. ティア表（最強ランキング）
     11. サイドバー
     12. フッター / ページトップ
     13. ユーティリティ
   ========================================================================== */

/* ---------- 01. デザイントークン ---------- */
:root {
  /* ブランドカラー：別ゲームに流用する場合はここだけ差し替える */
  --c-primary: #2b3a55;
  --c-primary-dark: #1d2739;
  --c-accent: #ff5f8d;
  --c-accent-dark: #e8446f;
  --c-accent-sub: #ffc93c;

  --c-bg: #f2f4f7;
  --c-card: #ffffff;
  --c-border: #e2e6ec;
  --c-border-strong: #cfd6e0;

  --c-text: #23272f;
  --c-text-sub: #6b7280;
  --c-link: #1a6bd4;
  --c-link-visited: #7a4fbf;

  --c-th: #eef1f6;
  --c-zebra: #fafbfd;

  /* ティア色（元ティア表の配色に合わせる） */
  --t-sss: #ff6b6b;
  --t-ss: #ff9f4d;
  --t-s: #f4c04d;
  --t-a: #c6e04f;
  --t-b: #93df6b;
  --t-c: #5fd6a0;
  --t-d: #5ad2e0;
  --t-e: #62aaf0;
  --t-f: #9a8bf0;
  --t-out: #b8c0ca;
  --t-black: #737b86;

  --radius: 10px;
  --radius-s: 6px;
  --shadow: 0 1px 3px rgba(20, 30, 50, .08);
  --shadow-lg: 0 6px 20px rgba(20, 30, 50, .12);

  --wrap: 1180px;
  --side-w: 336px;
  --gap: 24px;
  --header-h: 56px;

  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo,
          system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- 02. ベース ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.8;
  overflow-wrap: break-word;
  word-break: normal;
}

img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--c-link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
summary:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

h1, h2, h3, h4 { line-height: 1.45; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.5em; }
li { margin-bottom: .35em; }

/* ---------- 03. レイアウト骨格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 16px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side-w);
  gap: var(--gap);
  align-items: start;
  padding-block: 20px 48px;
}

.main { min-width: 0; }

/* ---------- 04. ヘッダー / グローバルナビ ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .02em;
  white-space: nowrap;
  text-decoration: none;
}
.logo:hover { text-decoration: none; opacity: .85; }
.logo .logo-mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--c-accent);
  font-size: .95rem;
}
.logo .logo-sub {
  font-size: .7rem;
  font-weight: 600;
  opacity: .75;
  border-left: 1px solid rgba(255,255,255,.35);
  padding-left: 8px;
}

.hsearch {
  margin-left: auto;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 4px 6px 4px 12px;
  min-width: 220px;
}
.hsearch input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: .85rem;
  padding: 2px 0;
}
.hsearch input::placeholder { color: rgba(255,255,255,.7); }
.hsearch input:focus { outline: none; }
.hsearch button {
  border: 0;
  background: var(--c-accent);
  color: #fff;
  border-radius: 999px;
  width: 26px; height: 26px;
  cursor: pointer;
  font-size: .8rem;
  line-height: 1;
}

/* サイト内検索の結果ドロップダウン */
.hsearch-wrap { margin-left: auto; position: relative; }
.hsearch-wrap .hsearch { margin-left: 0; }
.hsearch-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(92vw, 360px);
  max-height: 60vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-lg);
  list-style: none;
  margin: 0;
  padding: 4px;
  display: none;
  z-index: 150;
}
.hsearch-results[data-open="true"] { display: block; }
.hsearch-results li { margin: 0; }
.hsearch-results a {
  display: block;
  padding: 9px 10px;
  border-radius: 4px;
  color: var(--c-text);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.5;
}
.hsearch-results a:hover,
.hsearch-results a:focus { background: var(--c-th); text-decoration: none; }
.hsearch-results .hit-sub {
  display: block;
  font-size: .72rem;
  font-weight: 400;
  color: var(--c-text-sub);
}
.hsearch-results .empty {
  padding: 12px 10px;
  font-size: .82rem;
  color: var(--c-text-sub);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}

/* グローバルナビ（横スクロールタブ） */
.gnav {
  background: var(--c-primary-dark);
  border-bottom: 3px solid var(--c-accent);
}
.gnav-list {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gnav-list::-webkit-scrollbar { display: none; }
.gnav-list a {
  display: block;
  padding: 11px 16px;
  color: rgba(255,255,255,.85);
  font-size: .86rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}
.gnav-list a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.gnav-list a[aria-current="page"] {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-bottom-color: var(--c-accent-sub);
}

/* モバイル用ドロワー */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
.drawer[data-open="true"] { display: block; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 30, .55);
}
.drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(82vw, 320px);
  background: #fff;
  padding: 16px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.drawer-panel h2 {
  margin: 0 0 12px;
  font-size: .8rem;
  color: var(--c-text-sub);
  letter-spacing: .08em;
}
.drawer-panel ul { list-style: none; padding: 0; margin: 0 0 20px; }
.drawer-panel li { margin: 0; border-bottom: 1px solid var(--c-border); }
.drawer-panel a {
  display: block;
  padding: 12px 4px;
  color: var(--c-text);
  font-weight: 700;
  font-size: .92rem;
}
.drawer-close {
  border: 0; background: var(--c-bg); color: var(--c-text);
  border-radius: var(--radius-s);
  padding: 8px 14px; font: inherit; cursor: pointer; width: 100%;
}

/* ---------- 05. パンくず ---------- */
.breadcrumb { padding-block: 10px 0; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  list-style: none;
  margin: 0; padding: 0;
  font-size: .78rem;
  color: var(--c-text-sub);
}
.breadcrumb li { margin: 0; display: flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "›"; color: var(--c-border-strong); }
.breadcrumb a { color: var(--c-text-sub); }

/* ---------- 06. 記事本文 ---------- */
.article {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.article-title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 1.05rem + 1.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -.01em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-border);
  font-size: .78rem;
  color: var(--c-text-sub);
}
.article-meta .tag {
  background: var(--c-th);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 700;
  color: var(--c-primary);
}

.article h2 {
  position: relative;
  margin: 40px 0 16px;
  padding: 10px 14px 10px 16px;
  font-size: clamp(1.12rem, 1rem + .5vw, 1.35rem);
  font-weight: 800;
  background: linear-gradient(90deg, var(--c-th), transparent);
  border-left: 6px solid var(--c-accent);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
.article h2:first-child { margin-top: 0; }

.article h3 {
  margin: 28px 0 12px;
  padding-bottom: 6px;
  font-size: 1.05rem;
  font-weight: 800;
  border-bottom: 2px solid var(--c-border-strong);
}

.article h4 {
  margin: 20px 0 8px;
  font-size: .98rem;
  font-weight: 800;
  color: var(--c-primary);
}

.lead {
  font-size: .95rem;
  background: #fff8fa;
  border: 1px solid #ffdbe5;
  border-radius: var(--radius-s);
  padding: 14px 16px;
}
.lead p:last-child { margin-bottom: 0; }

/* 表 */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 18px;
  border-radius: var(--radius-s);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: #fff;
  min-width: 100%;
}
th, td {
  border: 1px solid var(--c-border);
  padding: 9px 12px;
  text-align: left;
  vertical-align: middle;
}
thead th {
  background: var(--c-th);
  font-weight: 800;
  white-space: nowrap;
  color: var(--c-primary);
}
tbody tr:nth-child(even) { background: var(--c-zebra); }
td.num, th.num { text-align: center; white-space: nowrap; }

/* 囲み（ポイント / 注意） */
.note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: var(--radius-s);
  border: 1px solid var(--c-border);
  background: #f7f9fc;
  font-size: .92rem;
}
.note > :last-child { margin-bottom: 0; }
.note-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-weight: 800;
  font-size: .95rem;
}
.note--point { background: #f4f1ff; border-color: #ddd5ff; }
.note--point .note-title { color: #6244d0; }
.note--warn { background: #fff5f5; border-color: #ffd4d4; }
.note--warn .note-title { color: #d93a3a; }
.note--info { background: #f0f8ff; border-color: #cfe6ff; }
.note--info .note-title { color: #1a6bd4; }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li {
  position: relative;
  padding-left: 1.6em;
}
.checklist li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--c-accent);
  font-weight: 800;
}

/* ---------- 07. 目次ボックス ---------- */
.toc {
  background: #f7f9fc;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
  padding: 14px 18px;
  margin: 0 0 28px;
}
.toc > .toc-title {
  margin: 0 0 8px;
  font-weight: 800;
  font-size: .95rem;
  color: var(--c-primary);
}
.toc ol { margin: 0; padding-left: 1.3em; font-size: .92rem; }
.toc ol ol { margin-top: .3em; padding-left: 1.1em; font-size: .95em; }
.toc li { margin-bottom: .3em; }

/* ---------- 08. 画像プレースホルダ ---------- */
/* 画像が未設定 / 読み込み失敗でもレイアウトが崩れない枠。
   使い方:
     <figure class="ph" data-label="人魚ちいかわ" style="--ph-ratio:1/1">
       <img src="assets/img/chara/xxx.png" alt="人魚ちいかわ">
       <figcaption>キャプション</figcaption>
     </figure>
   画像が無い場合は <img> を省くだけでよい。 */
.ph {
  --ph-ratio: 16 / 9;
  position: relative;
  margin: 0 0 8px;
  border-radius: var(--radius-s);
  overflow: hidden;
  background:
    repeating-linear-gradient(45deg, #eef1f6 0 10px, #e6eaf1 10px 20px);
  border: 1px dashed var(--c-border-strong);
}
.ph::before {
  content: "";
  display: block;
  aspect-ratio: var(--ph-ratio);
}
.ph::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 6px;
  font-size: clamp(.62rem, .5rem + .35vw, .8rem);
  font-weight: 700;
  line-height: 1.35;
  color: #93a0b3;
  pointer-events: none;
}
.ph > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  /* 読み込み前・失敗時に白い箱で枠を覆わないよう、背景は is-loaded 後に付ける
     （lazy 読み込みの画像が画面外にある間もプレースホルダが見えたままになる） */
  background: transparent;
}
.ph--contain > img { object-fit: contain; }
/* 画像が正常に表示されている間はラベルを隠す */
.ph.is-loaded { border-style: solid; border-color: var(--c-border); background: #fff; }
.ph.is-loaded > img { background: #fff; }
.ph.is-loaded::after { content: none; }

.ph figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  background: rgba(20, 26, 38, .72);
  color: #fff;
  font-size: .72rem;
  padding: 4px 8px;
  text-align: center;
}

/* 記事の中で単体表示する図版（枠外にキャプションを出す） */
.figure { margin: 0 0 22px; }
.figure .ph { margin-bottom: 6px; }
.figure figcaption {
  font-size: .78rem;
  color: var(--c-text-sub);
  text-align: center;
}
.figure--wide .ph { --ph-ratio: 16 / 9; }

/* 差し替え可能な素材であることを示すバッジ */
.ph[data-slot]::before { }
.ph[data-slot] {
  border-color: #c9d3e2;
}

/* キャラアイコン（表・リスト内で使う小さめの枠） */
.chara {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.chara .ph {
  --ph-ratio: 1 / 1;
  flex: 0 0 auto;
  width: 52px;
  margin: 0;
  border-radius: 10px;
}
.chara .ph::after { font-size: .5rem; }
.chara-name { font-weight: 700; font-size: .9rem; line-height: 1.35; }
.chara-role { display: block; font-weight: 400; font-size: .74rem; color: var(--c-text-sub); }

/* キャラをグリッドで並べる（バフ別の使用キャラ例など） */
.chara-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.chara-grid > li { margin: 0; }
.chara-card {
  display: block;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
  padding: 8px;
  text-align: center;
  color: inherit;
  height: 100%;
}
a.chara-card:hover { text-decoration: none; border-color: var(--c-accent); box-shadow: var(--shadow); }
.chara-card .ph { --ph-ratio: 1 / 1; margin-bottom: 6px; }
.chara-card .name { font-size: .78rem; font-weight: 700; line-height: 1.35; display: block; }
.chara-card .sub { font-size: .68rem; color: var(--c-text-sub); display: block; }

/* ---------- 09. カード / リンクリスト ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.card-grid > li { margin: 0; }
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
  overflow: hidden;
  color: inherit;
}
a.card:hover { text-decoration: none; border-color: var(--c-accent); box-shadow: var(--shadow); }
.card .ph { margin: 0; border-radius: 0; border-width: 0 0 1px 0; }
.card-body { padding: 10px 12px; flex: 1; }
.card-title { font-size: .9rem; font-weight: 800; line-height: 1.5; margin: 0 0 4px; }
.card-desc { font-size: .78rem; color: var(--c-text-sub); margin: 0; }
.card-label {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  color: #fff;
  background: var(--c-accent);
  border-radius: 4px;
  padding: 1px 8px;
  margin-bottom: 6px;
}

/* 大きなボタン導線 */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 22px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 220px;
  padding: 14px 18px;
  border-radius: var(--radius-s);
  font-weight: 800;
  font-size: .95rem;
  text-align: center;
  background: var(--c-accent);
  color: #fff;
  border: 0;
}
.btn:hover { background: var(--c-accent-dark); text-decoration: none; color: #fff; }
.btn--sub { background: var(--c-primary); }
.btn--sub:hover { background: var(--c-primary-dark); }
.btn--ghost {
  background: #fff;
  color: var(--c-primary);
  border: 2px solid var(--c-border-strong);
}
.btn--ghost:hover { background: var(--c-th); color: var(--c-primary); }

/* 関連記事リンク一覧 */
.linklist { list-style: none; padding: 0; margin: 0 0 18px; }
.linklist li { margin: 0; border-bottom: 1px dotted var(--c-border-strong); }
.linklist li:last-child { border-bottom: 0; }
.linklist a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 4px;
  font-size: .9rem;
  font-weight: 700;
}
.linklist a::before {
  content: "▶";
  font-size: .6rem;
  color: var(--c-accent);
  flex: 0 0 auto;
}

/* 準備中（リンク先がまだ無い項目）。リンクにせず明示する */
.is-soon {
  cursor: default;
  color: var(--c-text-sub) !important;
  background: #fbfcfd;
}
.card.is-soon { border-style: dashed; }
.card.is-soon .card-label { background: var(--c-border-strong); color: #55606f; }
.badge-soon {
  display: inline-block;
  font-size: .66rem;
  font-weight: 800;
  color: #6b7280;
  background: var(--c-th);
  border: 1px solid var(--c-border-strong);
  border-radius: 4px;
  padding: 0 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.linklist li.is-soon { background: transparent; }
.linklist li.is-soon > span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 4px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--c-text-sub);
}
.linklist li.is-soon > span::before { content: "▶"; font-size: .6rem; color: var(--c-border-strong); }

/* リンクを2列に並べる箱（GameWith風の関連リンク表） */
.linkbox {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
  overflow: hidden;
  margin: 0 0 22px;
}
.linkbox-head {
  background: var(--c-primary);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  padding: 9px 14px;
}
.linkbox-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  background: var(--c-border);
}
.linkbox-body a {
  background: #fff;
  padding: 12px 14px;
  font-size: .86rem;
  font-weight: 700;
}
.linkbox-body a:hover { background: #fff6f9; text-decoration: none; }

/* ---------- 10. ティア表 ---------- */
.tier-table {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
  overflow: hidden;
  margin: 0 0 22px;
  background: #fff;
}
.tier-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  border-bottom: 1px solid var(--c-border);
}
.tier-row:last-child { border-bottom: 0; }
.tier-rank {
  display: grid;
  place-content: center;
  text-align: center;
  padding: 12px 6px;
  font-weight: 800;
  color: #3a2f22;
  line-height: 1.3;
}
.tier-rank .rank { display: block; font-size: 1.15rem; letter-spacing: .02em; }
.tier-rank .label { display: block; font-size: .68rem; font-weight: 700; opacity: .85; }
.tier-body { padding: 12px; min-width: 0; }
.tier-body > :last-child { margin-bottom: 0; }
.tier-body .chara-grid { margin-bottom: 0; }
.tier-note { font-size: .82rem; color: var(--c-text-sub); margin: 8px 0 0; }

.tier-sss .tier-rank { background: var(--t-sss); }
.tier-ss  .tier-rank { background: var(--t-ss); }
.tier-s   .tier-rank { background: var(--t-s); }
.tier-a   .tier-rank { background: var(--t-a); }
.tier-b   .tier-rank { background: var(--t-b); }
.tier-c   .tier-rank { background: var(--t-c); }
.tier-d   .tier-rank { background: var(--t-d); }
.tier-e   .tier-rank { background: var(--t-e); }
.tier-f   .tier-rank { background: var(--t-f); }
.tier-out .tier-rank { background: var(--t-out); }
.tier-black .tier-rank { background: var(--t-black); color: #fff; }

/* 順位バッジ */
.rank-badge {
  display: inline-grid;
  place-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  background: var(--c-text-sub);
}
.rank-badge.r1 { background: linear-gradient(140deg, #ffd76a, #e0a516); color: #4a3607; }
.rank-badge.r2 { background: linear-gradient(140deg, #dfe6ee, #a8b4c2); color: #38404a; }
.rank-badge.r3 { background: linear-gradient(140deg, #e6ab7c, #b9743f); color: #fff; }

/* ---------- 11. サイドバー ---------- */
.side { min-width: 0; }
.side-box {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.side-box > h2 {
  margin: 0;
  padding: 11px 14px;
  font-size: .88rem;
  font-weight: 800;
  color: #fff;
  background: var(--c-primary);
}
.side-box .side-inner { padding: 12px 14px; }
.side-box .linklist { margin: 0; }
.side-box .linklist a { font-size: .84rem; padding: 10px 2px; }

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border);
  margin: 0;
}
.rank-list li:last-child { border-bottom: 0; }
.rank-list .no {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  display: grid; place-content: center;
  border-radius: 4px;
  background: var(--c-th);
  color: var(--c-primary);
  font-size: .74rem; font-weight: 800;
}
.rank-list li:nth-child(1) .no { background: var(--c-accent); color: #fff; }
.rank-list li:nth-child(2) .no { background: #ffa7c0; color: #fff; }
.rank-list li:nth-child(3) .no { background: #ffd0de; color: #a03354; }
.rank-list a { font-size: .84rem; font-weight: 700; }

/* ---------- 12. フッター / ページトップ ---------- */
.site-footer {
  background: var(--c-primary-dark);
  color: rgba(255,255,255,.8);
  padding: 32px 0 24px;
  font-size: .84rem;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.footer-cols h2 {
  margin: 0 0 10px;
  font-size: .82rem;
  font-weight: 800;
  color: #fff;
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 7px; }
.footer-cols a { color: rgba(255,255,255,.8); font-size: .82rem; }
.footer-cols a:hover { color: #fff; }
.footer-bottom {
  padding-top: 18px;
  font-size: .74rem;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  width: 44px; height: 44px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
}
.to-top.is-visible { opacity: .92; visibility: visible; }
.to-top:hover { text-decoration: none; color: #fff; opacity: 1; }

/* ---------- 13. ユーティリティ ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.mb-0 { margin-bottom: 0 !important; }
.text-sub { color: var(--c-text-sub); }
.text-sm { font-size: .84rem; }
.text-center { text-align: center; }
.updated { font-size: .78rem; color: var(--c-text-sub); }

/* ==========================================================================
   レスポンシブ
   ========================================================================== */

/* タブレット：サイドバーを畳む */
@media (max-width: 1024px) {
  :root { --side-w: 300px; --gap: 18px; }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 14px 36px;
  }
  .side { margin-top: 8px; }
}

/* スマートフォン */
@media (max-width: 720px) {
  html { font-size: 15px; }
  body { line-height: 1.75; }

  .wrap { padding-inline: 12px; }

  .header-inner { gap: 8px; }
  .hsearch { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .logo .logo-sub { display: none; }

  .gnav-list a { padding: 10px 13px; font-size: .8rem; }

  .article {
    padding: 16px 14px;
    border-radius: 8px;
  }
  .article h2 { margin: 30px 0 14px; padding: 9px 10px 9px 12px; }
  .article h3 { margin: 22px 0 10px; }

  table { font-size: .84rem; }
  th, td { padding: 8px 10px; }
  /* 横長の表はスワイプで見せる */
  .scroll-x table { min-width: 560px; }
  .scroll-x--wide table { min-width: 720px; }

  .tier-row { grid-template-columns: 62px minmax(0, 1fr); }
  .tier-rank { padding: 10px 4px; }
  .tier-rank .rank { font-size: 1rem; }
  .tier-rank .label { font-size: .6rem; }
  .tier-body { padding: 10px 8px; }

  .chara-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
  .chara-card { padding: 6px; }
  .chara-card .name { font-size: .7rem; }
  .chara-card .sub { font-size: .62rem; }

  .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .card-title { font-size: .82rem; }
  .card-desc { font-size: .72rem; }

  .btn { flex-basis: 100%; padding: 13px 14px; font-size: .9rem; }

  .linkbox-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .linkbox-body a { font-size: .8rem; padding: 11px 10px; }

  .to-top { right: 12px; bottom: 12px; width: 40px; height: 40px; }
}

@media (max-width: 380px) {
  .linkbox-body { grid-template-columns: minmax(0, 1fr); }
  .chara-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
}

/* 印刷 */
@media print {
  .site-header, .gnav, .side, .to-top, .site-footer, .drawer { display: none !important; }
  .article { border: 0; box-shadow: none; padding: 0; }
  .layout { grid-template-columns: 1fr; }
}

/* モーション低減 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
