/* はこにわ大海戦 — 関連ページ共通スタイル（ゲーム本体の styles.css とは別。落ち着いた読み物向け） */
:root { color-scheme: dark;
  --font-ui: "Inter", "Noto Sans JP", -apple-system, "Hiragino Sans", "Yu Gothic UI", system-ui, sans-serif;
  --bg: #0b1622; --panel: #0f1e30; --panel2: #12243a; --line: #21374f; --line2: #2c4a6e;
  --tx: #e8eef5; --tx2: #9fb2c6; --tx3: #7f97ac; --accent: #4a8bff; --gold: #e7c765; }
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-ui); font-size: 15.5px; line-height: 1.8;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  background: var(--bg); color: var(--tx); }
img { max-width: 100%; }
a { color: #7db4ff; }

/* ヘッダーナビ（全関連ページ共通） */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px 14px;
  flex-wrap: wrap; padding: 10px 18px; background: rgba(9,18,30,.86); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.nav .brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16px;
  color: #eef4fb; text-decoration: none; margin-right: 6px; }
.nav .brand img { width: 26px; height: 26px; border-radius: 7px; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.nav .links { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.nav .links a { color: #cfe0f5; text-decoration: none; font-size: 13.5px; font-weight: 600;
  padding: 6px 11px; border-radius: 8px; white-space: nowrap; }
.nav .links a:hover { background: #16304e; }
.nav .links a.on { background: linear-gradient(90deg, rgba(74,139,255,.28), rgba(74,139,255,.05));
  border: 1px solid var(--line2); color: #fff; }
.nav .cta { margin-left: auto; }
.nav .cta a { display: inline-block; background: #2f6df0; color: #fff; font-weight: 700; font-size: 13.5px;
  padding: 7px 14px; border-radius: 9px; text-decoration: none; }
.nav .cta a:hover { background: #3f7dff; }

/* コンテンツ枠 */
.wrap { max-width: 960px; margin: 0 auto; padding: 22px 16px 40px; }
.wrap.narrow { max-width: 760px; }
h1 { font-size: 26px; font-weight: 800; margin: 6px 0 4px; letter-spacing: .01em; }
.lead { color: var(--tx2); font-size: 15px; margin: 0 0 20px; }
h2 { font-size: 19px; font-weight: 800; margin: 30px 0 12px; color: #f2f7fc;
  display: flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(74,139,255,.24), rgba(74,139,255,.03));
  border: 1px solid #305b8c; box-shadow: inset 3px 0 0 var(--accent); scroll-margin-top: 64px; }
h3 { font-size: 16.5px; font-weight: 700; color: #dbe8f5; margin: 22px 0 6px; }
p { margin: 8px 0; }
code { background: #0b1a2c; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 18px 18px; margin: 12px 0; }
.note { background: #10233a; border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 6px;
  font-size: 14.5px; margin: 14px 0; color: #cfe2f5; }
.muted { color: var(--tx3); }

/* 目次チップ */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.toc a { display: inline-block; font-size: 13.5px; padding: 6px 12px; border-radius: 999px;
  background: #16293f; border: 1px solid var(--line2); color: #cfe2f5; text-decoration: none; }
.toc a:hover { background: #234069; }

/* テーブル */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 10px 0;
  font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid #1d334b; vertical-align: top; }
th { color: #a9c0d8; font-weight: 700; background: #10233a; }
td.num { text-align: right; }

/* タグ／バッジ */
.tag { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: #26456a; color: #cfe2f5; border: 1px solid #3a6396; margin: 0 2px 2px 0; }
.tag.gold { background: #4a3a10; color: #ffe6a8; border-color: #6d5720; }
.tag.red { background: #4a1c1c; color: #ffcaca; border-color: #7a3030; }
.tag.green { background: #133a24; color: #b8f0c8; border-color: #2c6a45; }
.tag.blue { background: #123458; color: #bfe0ff; border-color: #2c527c; }

/* ヒーロー（ガイド/ニュース等の導入） */
.hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(120deg, #10314f, #0c1f34); border: 1px solid var(--line2);
  border-radius: 16px; padding: 20px 22px; margin: 10px 0 22px; }
.hero img { width: 92px; height: 92px; border-radius: 20px; box-shadow: 0 6px 20px rgba(0,0,0,.5); flex: 0 0 auto; }
.hero .htxt { min-width: 0; }
.hero h1 { margin: 0 0 4px; }

/* ステップ（遊び方） */
.step { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid #16283e; }
.step:last-child { border-bottom: 0; }
.step .no { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center; color: #06101c;
  background: linear-gradient(160deg, #ffd15c, #ff9d3c); box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.step .sbody { min-width: 0; }
.step .sbody h3 { margin: 4px 0 4px; }
.step .sbody p { margin: 4px 0; color: #cddced; }

/* 図鑑グリッド */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 12px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 8px; }
.card .top { display: flex; align-items: center; gap: 12px; }
.card .pic { width: 60px; height: 60px; flex: 0 0 auto; image-rendering: pixelated;
  background: #06101c; border: 1px solid var(--line); border-radius: 10px; padding: 4px; object-fit: contain; }
.card .nm { font-weight: 800; font-size: 15px; color: #eaf3fb; line-height: 1.3; }
.card .roles { margin-top: 3px; }
.card .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; font-size: 13px; color: #cddced; }
.card .stats b { color: #fff; font-weight: 700; }
.card .desc { font-size: 13px; color: var(--tx2); }
.catbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.catbar button { background: #14304e; color: #cfe6ff; border: 1px solid var(--line2); border-radius: 8px;
  padding: 6px 12px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.catbar button.on { background: #2f6df0; border-color: #2f6df0; color: #fff; }

/* FAQ（details） */
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 2px 14px; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 15.5px; color: #eaf3fb; padding: 12px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q "; color: var(--gold); font-weight: 800; }
.faq details[open] summary { border-bottom: 1px solid #16283e; }
.faq .a { color: #cddced; padding: 10px 0 12px; }

/* お知らせ */
.news-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 12px 0; }
.news-item .date { color: var(--tx3); font-size: 13px; font-variant-numeric: tabular-nums; }
.news-item .ttl { font-weight: 800; font-size: 17px; color: #eaf3fb; margin: 2px 0 8px; }
.news-item ul { margin: 6px 0; padding-left: 1.2em; }
.news-item .badge { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-right: 8px; }
.badge.new { background: #133a24; color: #b8f0c8; border: 1px solid #2c6a45; }
.badge.fix { background: #123458; color: #bfe0ff; border: 1px solid #2c527c; }

/* フッター */
.sitefoot { border-top: 1px solid var(--line); margin-top: 30px; }
.sitefoot .inner { max-width: 960px; margin: 0 auto; padding: 22px 16px 30px;
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-size: 13.5px; color: var(--tx2); }
.sitefoot .fb { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #cfe0f5; }
.sitefoot .fb img { width: 22px; height: 22px; border-radius: 6px; }
.sitefoot a { color: #7db4ff; text-decoration: none; }
.sitefoot a:hover { text-decoration: underline; }
.sitefoot .credit { margin-left: auto; color: var(--tx3); }

@media (max-width: 560px) {
  .nav .cta { margin-left: 0; }
  .hero img { width: 72px; height: 72px; }
  h1 { font-size: 22px; }
}
