/* ミニゲームHP 共通スタイル（スマホ優先） */
/* フォント：丸ゴシック（Zen Maru Gothic）で、やわらかく親しみやすい雰囲気に */
@import url("https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;500;700&display=swap");

:root {
  --font-body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #222;
  --muted: #666;
  --line: #e4e2da;
  --accent: #2f6f4f;
  --accent-soft: #e6f2ea;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17191a;
    --surface: #202324;
    --text: #eee;
    --muted: #a5aaa8;
    --line: #34393a;
    --accent: #6cc496;
    --accent-soft: #1f2e26;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.8;
}
a { color: var(--accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー・フッター */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
.site-title { font-size: 1.25rem; font-weight: 500; letter-spacing: .02em; text-decoration: none; color: var(--text); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--accent); }
.site-nav a.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; color: var(--accent); }
.glossary { overflow-x: auto; }
.site-footer { margin-top: 48px; padding: 24px 0; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-bottom: 8px; }

/* 本文 */
main { padding: 24px 0; }
/* すべて本文と同じ字体・同じ太さ。見出しの区別は大きさと左線で付ける */
h1, h2, h3, strong, th { font-family: inherit; font-weight: 500; }
button, input, select, textarea { font-family: inherit; }
h1 { font-size: 1.7rem; line-height: 1.4; margin: 0 0 8px; letter-spacing: .02em; }
h2 { font-size: 1.3rem; margin: 40px 0 12px; padding-left: 10px; border-left: 5px solid var(--accent); border-radius: 3px; }
h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.lead { color: var(--muted); margin: 0 0 24px; }
.breadcrumb { font-size: .8rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }

/* ゲーム一覧カード */
.cat-title { display: flex; align-items: baseline; gap: 8px; }
.cat-title small { color: var(--muted); font-weight: 400; font-size: .8rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--text); transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.card p { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.6; }
.badge { display: inline-block; font-size: .7rem; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.badge.soon { background: var(--line); color: var(--muted); }
.empty { color: var(--muted); font-size: .9rem; }

/* ゲームページ */
.game-frame { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.game-frame iframe { display: block; width: 100%; height: clamp(600px, 94vh, 780px); border: 0; }
/* 「全画面で遊ぶ」：埋め込みのまま画面いっぱいに広げる（ページ移動なし） */
.game-frame.is-fs { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100dvh; z-index: 2147483000; border: 0; border-radius: 0; background: var(--bg); }
.game-frame.is-fs iframe, .game-frame:fullscreen iframe { width: 100%; height: 100%; }
html.fs-lock { overflow: hidden; }
.fs-close { position: absolute; left: 8px; bottom: 8px; z-index: 2; padding: 6px 12px; font: 600 12px/1.2 sans-serif; color: #fff; background: rgba(0,0,0,.6); border: 0; border-radius: 999px; opacity: .85; cursor: pointer; }
.game-placeholder { padding: 48px 16px; text-align: center; color: var(--muted); }
.game-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
.ad-slot { margin: 24px 0; min-height: 0; } /* 広告コードを入れる場所（審査通過後） */

/* 汎用 */
ul.plain, ol.plain { padding-left: 1.4em; }
ul.plain li, ol.plain li { margin-bottom: 6px; }
table.info { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.info th, table.info td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.info th { width: 8em; color: var(--muted); }
.note { background: var(--accent-soft); border-radius: var(--radius); padding: 12px 16px; font-size: .9rem; }

/* ブログ */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.cat-tabs[hidden] { display: none; }
.cat-tabs button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 4px 14px; font-size: .85rem; cursor: pointer; }
.cat-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.post-card time { display: block; margin-top: 8px; font-size: .75rem; color: var(--muted); }
.post-meta { font-size: .85rem; color: var(--muted); margin: 0 0 24px; }
.article h2 { margin-top: 36px; }
.article p { margin: 0 0 1em; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 24px; font-size: .9rem; }
.toc p { margin: 0 0 4px; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.4em; }
.post-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; font-size: .9rem; }
.post-nav a { max-width: 48%; }
.post-nav .next { text-align: right; margin-left: auto; }
[hidden] { display: none !important; }

/* カテゴリ見出し・アイコン */
.cat-heading { font-size: 1.05rem; margin: 28px 0 10px; color: var(--muted); }
.card .ic { display: block; font-size: 1.9rem; line-height: 1.2; margin-bottom: 6px; }
