/* =========================================================
   聖剣伝説 Legend of Mana 攻略Wiki  共通スタイル
   テーマ：絵本と水彩（生成りの紙・深緑の森・朱の差し色）
   ========================================================= */

/* ---------- カラーパレット ---------- */
:root {
  --ink-deep:   #1f3d2b;   /* 森の深緑：ヘッダー・フッター */
  --ink:        #2b5238;   /* ナビ・見出し */
  --main:       #2f6b45;   /* リンク・主要ボタン */
  --light:      #5a9a6c;   /* ホバー・アクセント */
  --foam:       #dfe4d5;   /* 罫線・淡い背景 */
  --mist:       #f1ecdf;   /* 生成り：ページ背景 */
  --parchment:  #fbf8f0;   /* 紙：コンテンツ背景 */
  --gold:       #d9553a;   /* 朱：差し色・ボタン */
  --gold-dark:  #a83c25;
  --glow:       #cfe3c0;   /* 水彩の淡い緑 */
  --crimson:    #c9a227;   /* 水彩の黄土 */
  --text:       #2a2d24;
  --text-sub:   #6b7061;
  --white:      #ffffff;

  --radius: 6px;
  --shadow: 0 2px 8px rgba(31, 61, 43, 0.12);
  --font-body: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
  --font-title: "Times New Roman", "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
}

/* ---------- リセット ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  background:
    radial-gradient(ellipse at top, rgba(127, 176, 105, 0.14), transparent 60%),
    var(--mist);
}
a { color: var(--main); text-decoration: none; }
a:hover { color: var(--light); text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul, ol { padding-left: 1.4em; }
table { border-collapse: collapse; }

/* =========================================================
   ヘッダー
   ========================================================= */
.site-header {
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(207, 227, 192, 0.18), transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(207, 227, 192, 0.10), transparent 30%),
    linear-gradient(180deg, var(--ink-deep) 0%, var(--ink) 100%);
  color: var(--white);
  border-bottom: 2px solid var(--gold);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo:hover { text-decoration: none; color: var(--glow); }
.logo-mark {
  font-size: 30px;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(217, 85, 58, 0.5);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-title {
  font-family: var(--font-title);
  font-size: 22px;
  letter-spacing: 0.12em;
  font-weight: bold;
}
.logo-sub {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--gold);
}
.site-search {
  flex: 1;
  display: flex;
  max-width: 520px;
  margin-left: auto;
}
.site-search input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  background: rgba(255, 255, 255, 0.10);
  color: var(--white);
  font-size: 14px;
}
.site-search input::placeholder { color: rgba(255, 255, 255, 0.55); }
.site-search input:focus { outline: none; background: rgba(255, 255, 255, 0.18); }
.site-search button {
  padding: 8px 16px;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--gold);
  color: var(--white);
  font-weight: bold;
  cursor: pointer;
}
.site-search button:hover { background: #e8694e; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
  font-size: 20px;
  padding: 4px 10px;
  border-radius: var(--radius);
  cursor: pointer;
}

/* =========================================================
   グローバルナビ
   ========================================================= */
.global-nav {
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.global-nav ul {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}
.global-nav a {
  display: block;
  padding: 10px 13px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13.5px;
  border-bottom: 3px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}
.global-nav a:hover,
.global-nav a.current {
  background: rgba(255, 255, 255, 0.06);
  border-bottom-color: var(--gold);
  color: var(--white);
  text-decoration: none;
}

/* =========================================================
   ヒーロー（トップページ）：生成りの紙に水彩のにじみ
   ========================================================= */
.hero {
  position: relative;
  color: var(--ink-deep);
  text-align: center;
  padding: 72px 20px 84px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #f7f3e8 0%, #efe9d8 100%);
  border-bottom: 1px solid var(--foam);
}
/* 紙の縁：左右にうっすら緑のにじみ */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  background: linear-gradient(90deg, rgba(127, 176, 105, 0.28), rgba(127, 176, 105, 0));
  pointer-events: none;
}
.hero::before { left: 0; }
.hero::after { right: 0; transform: scaleX(-1); }
/* 水彩のにじみ：ぼかした色の斑をゆっくり揺らす */
.wash {
  position: absolute;
  left: -20%;
  width: 140%;
  height: 60%;
  bottom: -15%;
  background: radial-gradient(ellipse 28% 55% at 28% 50%, rgba(169, 209, 142, 0.55), transparent 70%),
              radial-gradient(ellipse 22% 50% at 62% 40%, rgba(201, 162, 39, 0.28), transparent 70%),
              radial-gradient(ellipse 18% 45% at 80% 65%, rgba(217, 85, 58, 0.22), transparent 70%);
  filter: blur(22px);
  animation: wash-drift 30s ease-in-out infinite alternate;
  pointer-events: none;
}
.wash-2 { top: -20%; bottom: auto; height: 55%; animation-duration: 42s; animation-direction: alternate-reverse; opacity: 0.8;
  background: radial-gradient(ellipse 30% 55% at 70% 50%, rgba(169, 209, 142, 0.45), transparent 70%),
              radial-gradient(ellipse 20% 50% at 25% 55%, rgba(201, 162, 39, 0.22), transparent 70%); }
@keyframes wash-drift {
  from { transform: translateX(-5%); }
  to   { transform: translateX(5%); }
}
.hero-inner { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero-catch {
  font-family: var(--font-title);
  font-size: 18px;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin: 0 0 8px;
}
.hero h1 {
  font-family: var(--font-title);
  font-size: 36px;
  margin: 0 0 16px;
  letter-spacing: 0.05em;
  color: var(--ink-deep);
}
.hero-lead {
  font-size: 15px;
  margin: 0 0 28px;
  color: var(--text);
}
.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 10px 26px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 14px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(217, 85, 58, 0.35);
}
.btn-primary:hover { color: var(--white); background: #e8694e; }
.btn-ghost {
  border: 1px solid var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: rgba(43, 82, 56, 0.08); color: var(--ink); }

/* =========================================================
   メインレイアウト（3カラム）
   ========================================================= */
.layout {
  max-width: 1200px;
  margin: 24px auto 40px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}
.layout.layout-2col { grid-template-columns: 220px minmax(0, 1fr); }

/* ---------- サイドバー ---------- */
.side-box {
  background: var(--white);
  border: 1px solid var(--foam);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.side-title {
  margin: 0;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--white);
  background: linear-gradient(90deg, var(--ink), var(--main));
  border-left: 4px solid var(--gold);
}
.side-menu {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}
.side-menu li a {
  display: block;
  padding: 6px 14px 6px 26px;
  font-size: 13.5px;
  position: relative;
  color: var(--text);
}
.side-menu li a::before {
  content: "›";
  position: absolute;
  left: 13px;
  color: var(--light);
  font-weight: bold;
}
.side-menu li a:hover {
  background: var(--mist);
  color: var(--main);
  text-decoration: none;
}
.char-list li a::before { content: "✦"; color: var(--gold); font-size: 10px; top: 9px; }

.update-list, .rank-list {
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
}
.update-list { list-style: none; }
.update-list li { padding: 4px 0; border-bottom: 1px dashed var(--foam); }
.update-list li:last-child { border-bottom: none; }
.update-list time {
  display: block;
  font-size: 11px;
  color: var(--text-sub);
}
.rank-list { padding-left: 32px; }
.rank-list li { padding: 3px 0; }
.rank-list li::marker { color: var(--gold-dark); font-weight: bold; }

.info-table { width: 100%; font-size: 12.5px; }
.info-table th, .info-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--foam);
  text-align: left;
  vertical-align: top;
}
.info-table th {
  width: 34%;
  background: var(--mist);
  color: var(--ink);
  font-weight: bold;
  white-space: nowrap;
}

/* =========================================================
   メインコンテンツ（Wiki記事風）
   ========================================================= */
.content {
  background: var(--white);
  border: 1px solid var(--foam);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 28px 32px;
  min-width: 0;
}
.wiki-section { margin-bottom: 36px; }
.wiki-section:last-child { margin-bottom: 0; }

/* 見出し */
.section-title,
.content h2 {
  font-size: 20px;
  margin: 8px 0 16px;
  padding: 6px 12px;
  color: var(--white);
  background: linear-gradient(90deg, var(--ink) 0%, var(--main) 70%, var(--light) 100%);
  border-left: 5px solid var(--gold);
  border-radius: 3px;
  position: relative;
}
.content h3 {
  font-size: 17px;
  margin: 28px 0 12px;
  padding: 4px 10px;
  color: var(--ink);
  background: var(--mist);
  border-left: 4px solid var(--light);
  border-bottom: 1px solid var(--foam);
}
.content h4 {
  font-size: 15px;
  margin: 20px 0 8px;
  padding-bottom: 3px;
  color: var(--ink);
  border-bottom: 2px dotted var(--light);
}
.content p { margin: 0 0 14px; }

/* パンくず */
.breadcrumb {
  max-width: 1200px;
  margin: 14px auto 0;
  padding: 0 20px;
  font-size: 12.5px;
  color: var(--text-sub);
}
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li + li::before { content: "›"; margin: 0 6px; color: var(--light); }

/* 記事ヘッダー */
.article-header {
  border-bottom: 2px solid var(--gold);
  margin-bottom: 18px;
  padding-bottom: 10px;
}
.article-header h1 {
  font-family: var(--font-title);
  font-size: 28px;
  margin: 0 0 4px;
  color: var(--ink-deep);
}
.article-meta { font-size: 12px; color: var(--text-sub); }
.article-meta span + span::before { content: "｜"; margin: 0 6px; }
.name-en {
  font-family: var(--font-title);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--gold-dark);
  margin-left: 10px;
  font-weight: normal;
}

/* 目次 */
.toc {
  display: inline-block;
  min-width: 260px;
  max-width: 100%;
  margin: 0 0 24px;
  padding: 12px 20px 12px 16px;
  background: var(--mist);
  border: 1px solid var(--foam);
  border-radius: var(--radius);
  font-size: 13.5px;
}
.toc:empty { display: none; }
.toc-title {
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 6px;
}
.toc ol { margin: 0; padding-left: 1.6em; }
.toc ol ol { margin-top: 2px; }
.toc li { padding: 1px 0; }

/* インフォボックス（記事右上） */
.infobox {
  float: right;
  width: 280px;
  margin: 0 0 18px 24px;
  border: 1px solid var(--foam);
  border-radius: var(--radius);
  background: var(--parchment);
  font-size: 12.5px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.infobox-title {
  padding: 8px 12px;
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  color: var(--white);
  background: linear-gradient(90deg, var(--ink), var(--main));
  border-bottom: 2px solid var(--gold);
}
.infobox-image {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 56px;
  background:
    radial-gradient(circle at 50% 40%, rgba(169, 209, 142, 0.5), transparent 45%),
    linear-gradient(180deg, var(--main), var(--ink-deep));
}
.infobox table { width: 100%; }
.infobox th, .infobox td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--foam);
  text-align: left;
  vertical-align: top;
}
.infobox th { width: 36%; background: var(--mist); color: var(--ink); white-space: nowrap; }
.infobox tr:last-child th, .infobox tr:last-child td { border-bottom: none; }

/* テーブル */
.wiki-table {
  width: 100%;
  margin: 0 0 20px;
  font-size: 13.5px;
  border: 1px solid var(--foam);
}
.wiki-table th, .wiki-table td {
  padding: 8px 12px;
  border: 1px solid var(--foam);
  text-align: left;
  vertical-align: top;
}
.wiki-table thead th {
  background: linear-gradient(180deg, var(--main), var(--ink));
  color: var(--white);
  font-weight: bold;
  white-space: nowrap;
}
.wiki-table tbody th {
  background: var(--mist);
  color: var(--ink);
  white-space: nowrap;
}
.wiki-table tbody tr:nth-child(even) { background: #f7f6ef; }
.wiki-table tbody tr:hover { background: #edf1e6; }
.wiki-table td.num, .wiki-table th.num { text-align: right; white-space: nowrap; }
.table-scroll { overflow-x: auto; margin-bottom: 20px; }
.table-scroll .wiki-table { margin-bottom: 0; min-width: 560px; }
.wiki-table-compact th, .wiki-table-compact td { padding: 4px 8px; font-size: 0.9em; white-space: nowrap; }
.wiki-table-compact th.wrap, .wiki-table-compact td.wrap { white-space: normal; }
.wiki-table ul.plain { margin: 0; padding-left: 1.1em; }
.wiki-table ul.plain li { margin: 2px 0; }

/* カード（トップページ） */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.card {
  display: block;
  padding: 18px 16px;
  border: 1px solid var(--foam);
  border-top: 3px solid var(--light);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--white), var(--mist));
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(47, 107, 69, 0.18);
  border-top-color: var(--gold);
  text-decoration: none;
}
.card-icon { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.card h3 {
  margin: 0 0 6px;
  padding: 0;
  font-size: 15px;
  color: var(--ink);
  background: none;
  border: none;
}
.card p { margin: 0; font-size: 12.5px; color: var(--text-sub); }

/* チャートリスト */
.chart-list {
  counter-reset: chart;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px 16px;
}
.chart-list li {
  counter-increment: chart;
  position: relative;
  padding: 6px 8px 6px 40px;
  border-bottom: 1px dashed var(--foam);
}
.chart-list li::before {
  content: counter(chart, decimal-leading-zero);
  position: absolute;
  left: 4px;
  top: 6px;
  width: 28px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  color: var(--gold-dark);
  border-right: 2px solid var(--gold);
}
.chart-disc {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
  letter-spacing: 0.1em;
}

/* 注意・補足ボックス */
.note, .warning, .tip {
  margin: 0 0 18px;
  padding: 12px 16px 12px 44px;
  border-radius: var(--radius);
  border: 1px solid;
  position: relative;
  font-size: 13.5px;
}
.note::before, .warning::before, .tip::before {
  position: absolute;
  left: 14px;
  top: 10px;
  font-size: 18px;
}
.note    { background: #f1ecdf; border-color: #d9d2bd; }
.note::before { content: "💡"; }
.tip     { background: #f2f9ee; border-color: #c3e2b6; }
.tip::before { content: "✅"; }
.warning { background: #fff5ec; border-color: #f2cfae; }
.warning::before { content: "⚠️"; }

/* キャラクター一覧のグリッド */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.char-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--foam);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s;
}
.char-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.char-card-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  color: var(--white);
  background: linear-gradient(180deg, var(--main), var(--ink-deep));
  border: 2px solid var(--gold);
}
.char-card strong { display: block; font-size: 15px; color: var(--ink); }
.char-card span { font-size: 12px; color: var(--text-sub); }

/* 能力値の棒 */
.stat-bar {
  display: inline-block;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--light), var(--main));
  vertical-align: middle;
  margin-right: 6px;
}

/* 関連ページ */
.related {
  margin-top: 36px;
  padding: 14px 18px;
  border-top: 2px solid var(--gold);
  background: var(--parchment);
  border-radius: 0 0 var(--radius) var(--radius);
}
.related h2 {
  background: none;
  border: none;
  color: var(--ink);
  padding: 0;
  margin: 0 0 8px;
  font-size: 15px;
}
.related ul { margin: 0; columns: 2; font-size: 13.5px; }

/* 前後のページ */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  font-size: 13.5px;
}
.post-nav a {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--foam);
  border-radius: var(--radius);
  background: var(--white);
}
.post-nav a:hover { background: var(--mist); text-decoration: none; }
.post-nav .next { text-align: right; }
.post-nav small { display: block; color: var(--text-sub); font-size: 11.5px; }

/* =========================================================
   フッター
   ========================================================= */
.site-footer {
  position: relative;
  margin-top: 40px;
  background: linear-gradient(180deg, var(--ink), var(--ink-deep));
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  font-size: 12.5px;
  border-top: 2px solid var(--gold);
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 28px 20px 24px; }
.footer-links { margin: 0 0 12px; }
.footer-links a {
  color: var(--white);
  margin: 0 12px;
}
.footer-links a:hover { color: var(--gold); }
.footer-copy { margin: 0; opacity: 0.75; line-height: 1.7; }

/* トップへ戻る */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--main);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 50;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--light); text-decoration: none; color: var(--white); }

/* =========================================================
   解説（独自記事）
   ========================================================= */
.global-nav .nav-column a { color: #f2a48f; }
.global-nav .nav-column a:hover,
.global-nav .nav-column a.current { color: #ffd0c2; }
.side-title-column {
  background: linear-gradient(90deg, #5c2416, var(--gold-dark));
  border-left-color: #ffb59f;
}
.column-list li a::before { content: "✎"; color: var(--gold-dark); font-size: 11px; }

.tag {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: bold;
  line-height: 1.6;
  color: var(--white);
  background: var(--text-sub);
  vertical-align: middle;
  white-space: nowrap;
}
.tag-kaisetsu { background: var(--main); }
.tag-sub { background: var(--white); color: var(--ink); border: 1px solid var(--foam); font-weight: normal; }

.column-feed { list-style: none; margin: 0 0 8px; padding: 0; }
.column-feed li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px dashed var(--foam);
  font-size: 14px;
}
.column-feed li a { flex: 1; min-width: 0; }
.column-feed time { font-size: 12px; color: var(--text-sub); white-space: nowrap; }
.more-link { text-align: right; font-size: 13px; margin: 0; }

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}
.tag-filter button {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--foam);
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tag-filter button:hover { background: var(--mist); }
.tag-filter button.active {
  background: var(--main);
  border-color: var(--main);
  color: var(--white);
}
.column-list-items { list-style: none; margin: 0; padding: 0; }
.column-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--foam);
}
.column-item.is-hidden { display: none; }
.column-thumb {
  height: 72px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--white);
  background:
    radial-gradient(circle at 50% 30%, rgba(169, 209, 142, 0.5), transparent 50%),
    linear-gradient(180deg, var(--main), var(--ink-deep));
}
.column-item h3 {
  margin: 0 0 4px;
  padding: 0;
  font-size: 16px;
  background: none;
  border: none;
}
.column-item .tags { margin-bottom: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.column-item p { margin: 0 0 6px; font-size: 13.5px; color: var(--text-sub); }
.column-item .meta { font-size: 12px; color: var(--text-sub); }
.column-item .meta span + span::before { content: "｜"; margin: 0 6px; }
.column-empty { display: none; padding: 24px; text-align: center; color: var(--text-sub); }
.column-empty.is-visible { display: block; }

.article-header .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.article-lead {
  font-size: 15.5px;
  padding: 14px 18px;
  margin: 0 0 20px;
  border-left: 4px solid var(--gold);
  background: var(--parchment);
  color: var(--text);
}
.quote-box {
  margin: 0 0 18px;
  padding: 12px 18px;
  border-left: 4px solid var(--light);
  background: var(--mist);
  font-style: normal;
  font-size: 14px;
}
.quote-box cite { display: block; margin-top: 4px; font-size: 12px; color: var(--text-sub); }
.author-box {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
  padding: 14px 18px;
  border: 1px solid var(--foam);
  border-radius: var(--radius);
  background: var(--parchment);
  font-size: 13px;
}
.author-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--white);
  background: linear-gradient(180deg, var(--main), var(--ink-deep));
  border: 2px solid var(--gold);
}
.author-box strong { display: block; color: var(--ink); }

/* =========================================================
   検索・404・お問い合わせ
   ========================================================= */
.search-inline {
  display: flex;
  gap: 8px;
  margin: 0 0 24px;
}
.search-inline input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--foam);
  border-radius: var(--radius);
  font-size: 14px;
}
.search-inline input:focus { outline: 2px solid var(--light); border-color: var(--light); }
.search-inline .btn { border: none; cursor: pointer; padding: 9px 22px; }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-results li { padding: 14px 4px; border-bottom: 1px solid var(--foam); }
.search-title { font-size: 16px; font-weight: bold; }
.search-url { display: block; font-size: 12px; color: var(--text-sub); margin: 2px 0 4px; }
.search-results p { margin: 0; font-size: 13.5px; color: var(--text); }
.search-results mark { background: #fff2b3; color: inherit; padding: 0 2px; }
.search-status { color: var(--text-sub); font-size: 13.5px; }

/* お問い合わせフォームの埋め込み。高さは3サイトで同じ値にそろえてある。
   質問が増えたら測り直す */
.form-msg {
  border: 1px solid;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 22px;
  line-height: 1.7;
}
.form-msg-ok { background: #eef8f1; border-color: #b6ddc3; color: #1d5b34; }

/* =========================================================
   記事下の Amazon リンク（疑似ポチップ）
   ステマ規制の表示は必ず箱のいちばん上に出す。
   ========================================================= */
.p-box {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  grid-template-areas:
    "pr    pr"
    "image body"
    "btns  btns";
  gap: 14px 20px;
  padding: 18px 20px;
  margin: 40px 0 8px;
  border: 1px solid var(--foam);
  border-radius: var(--radius);
  background: var(--white);
}
.p-box__pr {
  grid-area: pr;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--foam);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-sub);
}
.p-box__pr-tag {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 3px;
  background: var(--text-sub);
  color: var(--white);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: .08em;
}
.p-box__pr a { color: var(--text-sub); text-decoration: underline; }
.p-box__image { grid-area: image; display: grid; place-items: center; }
.p-box__image img { width: auto; max-width: 100%; max-height: 160px; object-fit: contain; }
.p-box__body { grid-area: body; align-self: center; }
.p-box__title { margin: 0; font-size: 14.5px; font-weight: bold; line-height: 1.7; }
.p-box__title a { color: var(--text); text-decoration: none; }
.p-box__title a:hover { text-decoration: underline; }
.p-box__btns { grid-area: btns; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.p-box__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: .04em;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.p-box__btn.-amazon {
  background: var(--gold);
  color: var(--ink-deep);
  box-shadow: 0 4px 14px rgba(217, 85, 58, 0.35);
}
.p-box__btn.-amazon:hover { text-decoration: none; transform: translateY(-2px); color: var(--ink-deep); }

/* 動きを抑える設定のユーザーにはアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  .wash { animation: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   レスポンシブ
   ========================================================= */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 200px minmax(0, 1fr); }
  .layout.layout-2col { grid-template-columns: 200px minmax(0, 1fr); }
  .sidebar-right { grid-column: 1 / -1; }
  .sidebar-right .side-box { display: inline-block; width: calc(50% - 10px); vertical-align: top; margin-right: 16px; }
  .sidebar-right .side-box:nth-child(2n) { margin-right: 0; }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .site-search { order: 3; width: 100%; max-width: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .global-nav { display: none; }
  .global-nav.open { display: block; }
  .global-nav ul { flex-direction: column; padding: 0; }
  .global-nav a { border-bottom: 1px solid rgba(255, 255, 255, 0.08); border-left: 3px solid transparent; }
  .global-nav a:hover, .global-nav a.current { border-left-color: var(--gold); border-bottom-color: rgba(255, 255, 255, 0.08); }
  .hero { padding: 44px 16px 56px; }
  .hero h1 { font-size: 26px; }
  .hero::before, .hero::after { width: 8%; }
  .layout, .layout.layout-2col { grid-template-columns: 1fr; gap: 16px; margin-top: 16px; padding: 0 12px; }
  .sidebar-left { order: 2; }
  .content { order: 1; padding: 16px 16px 24px; }
  .sidebar-right { order: 3; }
  .sidebar-right .side-box { display: block; width: auto; margin-right: 0; }
  .infobox { float: none; width: 100%; margin: 0 0 18px; }
  .related ul { columns: 1; }
  .column-item { grid-template-columns: 1fr; }
  .column-thumb { height: 56px; }
  .post-nav { flex-direction: column; }
  .p-box {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "pr" "image" "body" "btns";
    padding: 16px;
  }
  .p-box__body { text-align: center; }
}

/* ===== アビリティ・データ表 ===== */
.ability-table td.wrap { white-space: normal; min-width: 14em; }
.ability-table th { white-space: nowrap; }

/* ===== モンスター図鑑 ===== */
.tag-boss { background: var(--crimson); margin-left: 10px; vertical-align: middle; }
.monster { margin-bottom: 28px; }
.monster h2, .monster h3 { font-size: 17px; }
.monster-detail th { width: 6em; }
.monster-detail td { white-space: normal; }
.monster-nav { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.monster-nav li a { display: inline-block; padding: 4px 12px; border: 1px solid var(--foam); border-radius: 999px; background: var(--white); font-size: 13px; }
.monster-nav li a:hover { background: var(--mist); text-decoration: none; }

/* 入口ページの並びリンク */
.link-grid { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.link-grid li a { display: block; padding: 8px 12px; background: var(--white); border: 1px solid var(--foam); border-left: 3px solid var(--main); border-radius: var(--radius); }
.link-grid li a:hover { background: var(--glow); text-decoration: none; }

/* ===== 果実の一覧 ===== */
/* 特徴の欄が細くなると行だけが高くなるので、下限を決めて横に伸ばす */
.fruit-table td.facts { min-width: 16em; }

/* ===== ゴーレム：ロジックブロック ===== */
/* 形状の図。■と・を行ごとに並べて形を見せる */
.shape-grid { margin: 0; font-family: var(--font-body); font-size: 13px; line-height: 1.15; }

/* 全種リスト。作成組み合わせと内容の欄が細くなると行だけが高くなるので、下限を決めて横に伸ばす */
.block-table td.materials { min-width: 13em; }
.block-table td.facts { min-width: 17em; }

/* 作成早見表は大きいので、字を詰めて左端の系統名を横スクロールしても残す */
.chart-table th, .chart-table td { padding: 2px 5px; font-size: 11px; line-height: 1.35; }
.chart-table thead th, .chart-table tbody td { white-space: normal; }
.chart-table thead th, .chart-table td { min-width: 5.2em; }
.chart-table tbody th { position: sticky; left: 0; z-index: 1; background: var(--mist); }
.chart-table thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--ink); }
/* 罫線の帯は下の文字が透けるので、左右へはみ出す下敷きでふたをする */
.chart-table th:first-child::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -3px; right: -4px; z-index: -1;
  background: inherit; border-right: 1px solid var(--foam);
}
/* 横に送ると、固定した系統名の右で中身が切れる。そこが境目だと分かるように影を落とす */
.chart-table th:first-child::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: 4px; z-index: 3;
  background: inherit; box-shadow: 3px 0 4px -2px rgb(0 0 0 / 28%);
}
.chart-table td.none { text-align: center; color: var(--text-sub); }
