/* =========================================================
   ファイナルファンタジーX 攻略Wiki  共通スタイル
   テーマ：海（深海〜浅瀬の青）と召喚獣（金の装飾・幻光虫）
   ========================================================= */

/* ---------- カラーパレット ---------- */
:root {
  --sea-deep:    #061a33;   /* 深海：ヘッダー・フッター */
  --sea-dark:    #0b2a4f;   /* ナビ・見出し */
  --sea-main:    #135d9b;   /* リンク・主要ボタン */
  --sea-light:   #3aa0d8;   /* ホバー・アクセント */
  --sea-foam:    #cfe8f5;   /* 罫線・淡い背景 */
  --sea-mist:    #eef6fb;   /* ページ背景 */
  --sand:        #fbf8f1;   /* コンテンツ背景 */
  --gold:        #d4b45a;   /* 召喚獣の装飾色 */
  --gold-dark:   #a98a2f;
  --pyrefly:     #8fe3ff;   /* 幻光虫の光 */
  --text:        #1e2a38;
  --text-sub:    #5a6b7d;
  --white:       #ffffff;

  --radius: 6px;
  --shadow: 0 2px 8px rgba(6, 26, 51, 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: 17px;   /* 中高年の読者が多い。15px では小さい（2026-09-17） */
  line-height: 1.8;
  color: var(--text);
  background:
    radial-gradient(ellipse at top, rgba(58, 160, 216, 0.10), transparent 60%),
    var(--sea-mist);
}
a { color: var(--sea-main); text-decoration: none; }
a:hover { color: var(--sea-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(143, 227, 255, 0.18), transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(143, 227, 255, 0.12), transparent 30%),
    linear-gradient(180deg, var(--sea-deep) 0%, var(--sea-dark) 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(--pyrefly); }
.logo-mark {
  font-size: 30px;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(212, 180, 90, 0.8);
}
.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(--sea-deep);
  font-weight: bold;
  cursor: pointer;
}
.site-search button:hover { background: #e6c86e; }
.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(--sea-dark);
  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 16px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  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(--white);
  text-align: center;
  padding: 72px 20px 110px;
  overflow: hidden;
  /* 水面直下の明るい青 → 深海の紺へ */
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(120, 210, 255, 0.45), transparent 70%),
    linear-gradient(180deg, #1c7fc4 0%, #135d9b 30%, #0b3a6a 65%, #061a33 100%);
}
/* Canvas で描く海（js/ocean.js） */
.ocean-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.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;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55), 0 0 40px rgba(143, 227, 255, 0.35);
}
.hero-lead {
  font-size: 15px;
  margin: 0 0 28px;
  opacity: 0.94;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.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(--sea-deep);
  box-shadow: 0 4px 14px rgba(212, 180, 90, 0.45);
}
.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--white);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }
/* ---------- 多層アニメーション波（ヒーロー下端・フッター上端で共用） ---------- */
.waves {
  position: absolute;
  left: 0; right: 0;
  height: 70px;
  overflow: hidden;
  pointer-events: none;
}
.waves .wave {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  display: block;
  animation: wave-move linear infinite;
  will-change: transform;
}
.waves .wave-1 { height: 100%; animation-duration: 16s; }
.waves .wave-2 { height: 82%;  animation-duration: 10s; animation-direction: reverse; }
.waves .wave-3 { height: 64%;  animation-duration: 7s; }
@keyframes wave-move {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.hero-wave { bottom: -1px; z-index: 1; }
.hero-wave .wave-1 { fill: rgba(207, 232, 245, 0.35); }
.hero-wave .wave-2 { fill: rgba(238, 246, 251, 0.6); }
.hero-wave .wave-3 { fill: var(--sea-mist); }

/* =========================================================
   メインレイアウト（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(--sea-foam);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.side-title {
  margin: 0;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: bold;
  color: var(--white);
  background: linear-gradient(90deg, var(--sea-dark), var(--sea-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(--sea-light);
  font-weight: bold;
}
.side-menu li a:hover {
  background: var(--sea-mist);
  color: var(--sea-main);
  text-decoration: none;
}
.aeon-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(--sea-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: 14px; }
.info-table th, .info-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--sea-foam);
  text-align: left;
  vertical-align: top;
}
.info-table th {
  width: 34%;
  background: var(--sea-mist);
  color: var(--sea-dark);
  font-weight: bold;
  white-space: nowrap;
}

/* =========================================================
   メインコンテンツ（Wiki記事風）
   ========================================================= */
.content {
  background: var(--white);
  border: 1px solid var(--sea-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: 22px;
  margin: 8px 0 16px;
  padding: 6px 12px;
  color: var(--white);
  background: linear-gradient(90deg, var(--sea-dark) 0%, var(--sea-main) 70%, var(--sea-light) 100%);
  border-left: 5px solid var(--gold);
  border-radius: 3px;
  position: relative;
}
.content h3 {
  font-size: 19px;
  margin: 28px 0 12px;
  padding: 4px 10px;
  color: var(--sea-dark);
  background: var(--sea-mist);
  border-left: 4px solid var(--sea-light);
  border-bottom: 1px solid var(--sea-foam);
}
.content h4 {
  font-size: 17px;
  margin: 20px 0 8px;
  padding-bottom: 3px;
  color: var(--sea-dark);
  border-bottom: 2px dotted var(--sea-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(--sea-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(--sea-deep);
}
.article-meta { font-size: 12px; color: var(--text-sub); }
.article-meta span + span::before { content: "｜"; margin: 0 6px; }

/* 目次 */
.toc {
  display: inline-block;
  min-width: 260px;
  max-width: 100%;
  margin: 0 0 24px;
  padding: 12px 20px 12px 16px;
  background: var(--sea-mist);
  border: 1px solid var(--sea-foam);
  border-radius: var(--radius);
  font-size: 13.5px;
}
.toc:empty { display: none; }
.toc-title {
  font-weight: bold;
  color: var(--sea-dark);
  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(--sea-foam);
  border-radius: var(--radius);
  background: var(--sand);
  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(--sea-dark), var(--sea-main));
  border-bottom: 2px solid var(--gold);
}
.infobox-image {
  display: block;
  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(143, 227, 255, 0.4), transparent 45%),
    linear-gradient(180deg, var(--sea-main), var(--sea-deep));
}
.infobox table { width: 100%; }
.infobox th, .infobox td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--sea-foam);
  text-align: left;
  vertical-align: top;
}
.infobox th { width: 36%; background: var(--sea-mist); color: var(--sea-dark); 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: 15px;   /* 本命。中高年に辛いのは本文より表（2026-09-17） */
  border: 1px solid var(--sea-foam);
}
.wiki-table th, .wiki-table td {
  padding: 8px 12px;
  border: 1px solid var(--sea-foam);
  text-align: left;
  vertical-align: top;
}
.wiki-table thead th {
  background: linear-gradient(180deg, var(--sea-main), var(--sea-dark));
  color: var(--white);
  font-weight: bold;
  white-space: nowrap;
}
.wiki-table tbody th {
  background: var(--sea-mist);
  color: var(--sea-dark);
  white-space: nowrap;
}
.wiki-table tbody tr:nth-child(even) { background: #f7fbfe; }
.wiki-table tbody tr:hover { background: #e9f4fb; }
.table-scroll { overflow-x: auto; margin-bottom: 20px; }
.table-scroll .wiki-table { margin-bottom: 0; }
.table-scroll-wide .wiki-table { min-width: 560px; } /* 列が多い表。狭い画面では横に流す */
.table-scroll .wiki-table td { min-width: 8em; } /* 列が1文字ずつ折れるのを防ぐ。足りなければ箱の中で横に流れる */

/* 表のヘッダーを画面上端に追従させる（2026-09-17）。
   `battle/index.php` や `aeons.php` には th が 35〜37 個の表があり、下のほうで
   「この値はどの列か」が分からなくなっていた。

   **邪魔をしているのは `.table-scroll { overflow-x: auto }` だけ。** 枠がスクロール領域に
   なるので、素の sticky が画面に対して効かない。2段構えで避ける。
   - 表が枠に収まるとき（PC のほぼ全部）… `main.js` が `is-fit` を付け、枠の overflow を
     外して素の sticky に任せる。表の終わりで押し出され、次の表のヘッダーに替わるのは
     ブラウザ標準の挙動
   - 収まらないとき（主にスマホの横スクロール）… `main.js` が thead の写し
     （`.sticky-thead`）を `position: fixed` で置き、列幅と `scrollLeft` を本物に合わせる

   **`overflow-x: auto` を外さないこと。** 外すとスマホで表が切れる。外すのは
   `is-fit` が付いているときだけ。 */
.table-scroll.is-fit { overflow: visible; }
/* 枠に収まる表だけ、列の最低幅をゆるめる。
   8em は表の文字サイズに連動するので、13.5px → 15px で 108px → 120px に広がり、
   短い列（HP・MP・順番）が幅を食って長文列が細り、行が伸びた（/extra/aeon-battles の
   表で +58%）。**収まらない表（横スクロール）は 8em のまま**で、そちらは幅が広いほど
   行が短くなる（/monsters/ は 6.5em にすると逆に +20% 伸びた。2026-09-17 実測） */
.table-scroll.is-fit .wiki-table td { min-width: 6.5em; }
.table-scroll .wiki-table thead th {
  position: sticky;
  top: 0;   /* .site-header は position: relative で追従しない。sticky にするならその高さぶん下げる */
  z-index: 2;
  /* border-collapse: collapse だと罫線が貼り付いてこないので、下辺だけ影で補う */
  box-shadow: 0 1px 0 var(--sea-foam);
}
.sticky-thead {
  position: fixed;
  top: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  display: none;
}
.sticky-thead table { table-layout: fixed; margin: 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(--sea-foam);
  border-top: 3px solid var(--sea-light);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--white), var(--sea-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(19, 93, 155, 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(--sea-dark);
  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(--sea-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);
}

/* 注意・補足ボックス */
.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: #eef6fb; border-color: #b9dcee; }
.note::before { content: "💡"; }
.tip     { background: #f2f9ee; border-color: #c3e2b6; }
.tip::before { content: "✅"; }
.warning { background: #fff5ec; border-color: #f2cfae; }
.warning::before { content: "⚠️"; }

/* ネタバレ注意（考察記事に app/spoiler.php が自動で出す）。
   考察は全記事に出るので、大きな警告枠だと本文より先に目を取る。薄い地と細い左罫の
   1行の注記にして、本文の邪魔をしない（chrotri-wiki の意匠を写した。配色はこのサイトのもの）。
   **上の .note / .warning / .tip とは別の1クラス。** あちらは30ページ超で使われている */
.spoiler-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin: 0 0 20px;
  padding: 8px 14px;
  border: 1px solid var(--sea-foam);
  border-left: 3px solid var(--gold-dark);
  border-radius: var(--radius);
  /* 地は青寄り。リード文（.article-lead）が「砂色の地＋金の左罫」なので、
     同じ地にすると真下に並んだとき同じ箱が2つ続いて見える */
  background: var(--sea-mist);
  /* 本文 17px の1段下。表（15px）と同じ刻みに合わせる */
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-sub);
}
.spoiler-notice-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold-dark);
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}
.spoiler-notice-title svg { fill: currentColor; }
/* 狭い幅では題の下へ折り返す。20em を切ったら1行では収まらない */
.spoiler-notice-body { flex: 1 1 20em; }
.spoiler-notice-body p { margin: 0; }

/* 召喚獣セクションの装飾 */
.aeon-section {
  margin-top: 32px;
  padding-top: 8px;
  clear: both;
}
.aeon-name-en {
  font-family: var(--font-title);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-left: 10px;
  font-weight: normal;
}
.stat-bar {
  display: inline-block;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--sea-light), var(--sea-main));
  vertical-align: middle;
  margin-right: 6px;
}

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

/* =========================================================
   フッター
   ========================================================= */
.site-footer {
  position: relative;
  margin-top: 40px;
  background: linear-gradient(180deg, var(--sea-dark), var(--sea-deep));
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  font-size: 12.5px;
}
.footer-wave { top: -69px; }
.footer-wave .wave-1 { fill: rgba(11, 42, 79, 0.35); }
.footer-wave .wave-2 { fill: rgba(11, 42, 79, 0.6); }
.footer-wave .wave-3 { fill: var(--sea-dark); }
.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; }
/* Amazon.co.jp Product Advertising API ライセンス契約 (q) が求める表示。
   文言は規約の指定どおりで、変えない。小さくしてよいが、消さないこと。 */
.footer-amazon-notice {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.8;
  opacity: 0.55;
}

/* トップへ戻る */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--sea-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(--sea-light); text-decoration: none; color: var(--white); }

/* =========================================================
   解説・考察（独自記事）
   ========================================================= */
/* ナビ・サイドバーの見出しは金色系で他カテゴリと区別 */
.global-nav .nav-column a { color: var(--gold); }
.global-nav .nav-column a:hover,
.global-nav .nav-column a.current { color: #f0d98a; }
.side-title-column {
  background: linear-gradient(90deg, #4a3a10, var(--gold-dark));
  border-left-color: #f0d98a;
}
.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(--sea-main); }
.tag-kousatsu { background: var(--gold-dark); }
.tag-sub { background: var(--white); color: var(--sea-dark); border: 1px solid var(--sea-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(--sea-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(--sea-foam);
  background: var(--white);
  color: var(--sea-dark);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tag-filter button:hover { background: var(--sea-mist); }
.tag-filter button.active {
  background: var(--sea-main);
  border-color: var(--sea-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(--sea-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(143, 227, 255, 0.45), transparent 50%),
    linear-gradient(180deg, var(--sea-main), var(--sea-deep));
}
/* 考察の記事は、種別の色（金）にそろえる */
.column-item[data-kind="kousatsu"] .column-thumb {
  background:
    radial-gradient(circle at 50% 30%, rgba(212, 180, 90, 0.45), transparent 50%),
    linear-gradient(180deg, var(--gold-dark), #3a2d0c);
}
.column-item h2,
.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(--sand);
  color: var(--text);
}
.disclaimer {
  margin: 0 0 20px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text-sub);
  background: var(--sea-mist);
  border: 1px dashed var(--sea-foam);
  border-radius: var(--radius);
}
.quote-box {
  margin: 0 0 18px;
  padding: 12px 18px;
  border-left: 4px solid var(--sea-light);
  background: var(--sea-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(--sea-foam);
  border-radius: var(--radius);
  background: var(--sand);
  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(--sea-main), var(--sea-deep));
  border: 2px solid var(--gold);
}
.author-box strong { display: block; color: var(--sea-dark); }
.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(--sea-foam);
  border-radius: var(--radius);
  background: var(--white);
}
.post-nav a:hover { background: var(--sea-mist); text-decoration: none; }
.post-nav .next { text-align: right; }
.post-nav small { display: block; color: var(--text-sub); font-size: 11.5px; }

@media (max-width: 768px) {
  .column-item { grid-template-columns: 1fr; }
  .column-thumb { height: 56px; }
  .post-nav { flex-direction: column; }
}

/* =========================================================
   検索・404
   ========================================================= */
.search-inline {
  display: flex;
  gap: 8px;
  margin: 0 0 24px;
}
.search-inline input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--sea-foam);
  border-radius: var(--radius);
  font-size: 14px;
}
.search-inline input:focus { outline: 2px solid var(--sea-light); border-color: var(--sea-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(--sea-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; }

/* 動きを抑える設定のユーザーにはアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  .waves .wave { 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 70px; }
  .hero h1 { font-size: 26px; }

  .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; }

  /* 画面が狭いぶんだけ落とす。PC の 17px / 15px のままだと1行が短くなりすぎる */
  body { font-size: 16px; }
  .wiki-table { font-size: 14px; }
  .info-table { font-size: 14px; }
  .spoiler-notice { font-size: 14px; }
  .spoiler-notice-title { font-size: 13px; }
}

/* ===== データ表の補助 ===== */
.wiki-table-compact th, .wiki-table-compact td { padding: 4px 8px; font-size: 0.9em; white-space: nowrap; }
.wiki-table ul.plain { margin: 0; padding-left: 1.1em; }
.wiki-table ul.plain li { margin: 2px 0; }

/* ===== お問い合わせフォーム ===== */
.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; }
.form-msg-ng { background: #fff3f3; border-color: #edc0c0; color: #8a2b2b; }

.contact-form { margin: 22px 0 8px; }
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--sea-dark);
}
.form-row .req {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--sea-main);
  color: var(--white);
  font-size: 11px;
  font-weight: normal;
  vertical-align: 2px;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--sea-foam);
  border-radius: var(--radius);
  background: var(--white);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}
.form-row textarea { resize: vertical; min-height: 180px; }
.form-row input:focus, .form-row textarea:focus {
  outline: 2px solid var(--sea-light);
  border-color: var(--sea-light);
}
.form-row small { display: block; margin-top: 5px; color: var(--text-sub); font-size: 12.5px; }

/* ハニーポット：画面の外に出す。display:none にはしない */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-privacy { font-size: 13px; color: var(--text-sub); }
.form-actions { margin: 22px 0 6px; }
.form-actions .btn { border: none; cursor: pointer; font-family: inherit; }

/* 送信内容の控え */
.copy-box {
  border: 1px solid var(--sea-foam);
  border-radius: var(--radius);
  background: var(--white);
  padding: 16px 18px;
  margin-bottom: 24px;
}
.copy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.btn-copy {
  padding: 6px 18px;
  border: 1px solid var(--sea-main);
  border-radius: 999px;
  background: var(--white);
  color: var(--sea-main);
  font-size: 13px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
}
.btn-copy:hover { background: var(--sea-mist); }
/* pre を使うと記事本文のコードブロック装飾を拾うので div + pre-wrap にする */
.copy-body {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--sea-mist);
  border: 1px solid var(--sea-foam);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.8;
}
.copy-note { margin: 10px 0 0; font-size: 12.5px; color: var(--text-sub); }

/* =========================================================
   記事下のAmazonリンク（疑似ポチップ）
   ---------------------------------------------------------
   鍋ログぶろぐの商品ボックスと同じ組み方。当サイトはAmazonだけなので
   ボタンは1つ。価格は扱わない。
   ステマ規制の表示は必ず箱のいちばん上に出す。
   ========================================================= */
.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(--sea-foam);
  border-radius: var(--radius);
  background: var(--white);
}
/* PA-APIから画像が取れなかったとき。画像の枠を空けたまま残さない */
.p-box.-noimage {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "pr"
    "body"
    "btns";
}

.p-box__pr {
  grid-area: pr;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--sea-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;
}
/* Amazonだけを塗って主導線にする（サイトの .btn-primary と同じ金色） */
.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(--sea-deep);
  box-shadow: 0 4px 14px rgba(212, 180, 90, 0.45);
}
.p-box__btn.-amazon:hover {
  text-decoration: none;
  transform: translateY(-2px);
  color: var(--sea-deep);
}

@media (max-width: 600px) {
  .p-box {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "pr" "image" "body" "btns";
    padding: 16px;
  }
  .p-box__image img { max-height: 140px; }
  .p-box__body { text-align: center; }
  .p-box__btns { grid-template-columns: minmax(0, 1fr); }
}
