/* =========================================================
   ぼっちゲーマー村 スタイルシート（オリジナル）
   色や文字サイズは :root の変数を変えるだけで全体に反映されます
   ========================================================= */
:root {
  --c-bg: #f4f5f7;
  --c-surface: #ffffff;
  --c-text: #2b2f36;
  --c-muted: #6b7280;
  --c-line: #e3e6eb;
  --c-primary: #2f5fb3;      /* 見出し・リンクのメイン色 */
  --c-primary-soft: #eaf0fb;
  --c-accent: #f08a24;       /* バッジ・強調 */
  --c-header: #1f2a44;       /* ヘッダー背景 */
  --c-header-text: #ffffff;

  /* 本文の装飾 */
  --mk1: #fff08a;            /* マーカー1（旧 marker） */
  --mk2: #ffd0dc;            /* マーカー2（旧 marker2） */
  --tc1: #d93636;            /* 文字色1 */
  --tc2: #2f5fb3;            /* 文字色2 */
  --box-color: #7a95c9;      /* ボックスの枠色（記事ごとに上書きされることがあります） */

  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 30, 50, .08);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--c-primary); }
a:hover { text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.visually-hidden, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 10; background: #fff; padding: 8px 12px; }

/* ---------- ヘッダー ---------- */
.site-header { background: var(--c-header); color: var(--c-header-text); }
.site-header__inner { padding-top: 22px; padding-bottom: 14px; }
.site-logo {
  color: inherit; text-decoration: none; font-weight: 800; font-size: clamp(1.25rem, 3.5vw, 1.7rem); letter-spacing: .02em;
}
.site-tagline { margin: 2px 0 0; font-size: .82rem; opacity: .75; }
.site-nav { background: rgba(255, 255, 255, .06); border-top: 1px solid rgba(255, 255, 255, .08); }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.site-nav a {
  display: block; padding: 10px 14px; color: var(--c-header-text); text-decoration: none; font-size: .9rem; white-space: nowrap;
}
.site-nav a:hover { background: rgba(255, 255, 255, .1); }

/* ---------- レイアウト ---------- */
.layout { display: grid; gap: 28px; padding-top: 24px; padding-bottom: 48px; }
@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
.main { min-width: 0; }

/* ---------- パンくず ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 12px; padding: 0; font-size: .8rem; color: var(--c-muted); }
.crumbs li + li::before { content: "›"; margin: 0 6px; }
.crumbs a { color: var(--c-muted); }

/* ---------- 記事一覧 ---------- */
.section-title {
  font-size: 1.1rem; margin: 0 0 14px; padding-left: 12px; border-left: 5px solid var(--c-accent); line-height: 1.4;
}
.pickup { margin-bottom: 32px; }
.post-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.post-card { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.post-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.post-card__link:hover .post-card__title { color: var(--c-primary); }
.post-card__thumb { aspect-ratio: 16 / 9; background: var(--c-primary-soft); display: grid; place-items: center; overflow: hidden; }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card__link:hover img { transform: scale(1.04); }
.noimg { color: var(--c-muted); font-size: .8rem; }
.post-card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.post-card__title { font-weight: 700; font-size: .95rem; line-height: 1.55; }
.post-card__date { margin-top: auto; font-size: .78rem; color: var(--c-muted); }
.badge {
  align-self: flex-start; display: inline-block; background: var(--c-accent); color: #fff; font-size: .72rem; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; text-decoration: none; line-height: 1.6;
}
.archive-header { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; margin-bottom: 20px; }
.archive-header__label { margin: 0; font-size: .78rem; color: var(--c-muted); }
.archive-header__title { margin: 0; font-size: 1.5rem; line-height: 1.4; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 12px 0 0; padding: 0; }
.subcats a { display: block; padding: 3px 12px; border: 1px solid var(--c-line); border-radius: 999px; font-size: .85rem; text-decoration: none; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.pager a, .pager span {
  min-width: 40px; padding: 7px 12px; border-radius: 8px; text-align: center; background: var(--c-surface); box-shadow: var(--shadow);
  text-decoration: none; font-size: .9rem;
}
.pager [aria-current] { background: var(--c-primary); color: #fff; }
.pager .pager__gap { background: none; box-shadow: none; }

/* ---------- 記事ページ ---------- */
.entry { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px clamp(16px, 4vw, 40px) 36px; }
.entry__title { font-size: clamp(1.35rem, 3.6vw, 1.75rem); line-height: 1.5; margin: 10px 0 6px; }
.entry__meta { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 16px; color: var(--c-muted); font-size: .82rem; }
.entry__eyecatch { display: block; width: 100%; border-radius: 8px; margin-bottom: 8px; }

.toc { margin: 24px 0; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fafbfc; padding: 4px 18px; }
.toc summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.toc ol { margin: 0 0 12px; padding-left: 1.3em; font-size: .92rem; }
.toc .toc__l3 { list-style: none; margin-left: 1em; font-size: .88rem; }
.toc .toc__l3::before { content: "– "; color: var(--c-muted); }
.toc a { color: var(--c-text); text-decoration: none; }
.toc a:hover { color: var(--c-primary); text-decoration: underline; }

/* 本文 */
.entry__body > * { margin-top: 0; margin-bottom: 1.4em; }
.entry__body p { margin: 0 0 1.4em; }
.entry__body h2, .entry__body h3, .entry__body h4, .entry__body h5 { line-height: 1.5; scroll-margin-top: 16px; }
.entry__body h2 {
  font-size: 1.35rem; margin: 2.4em 0 1em; padding: 12px 16px; color: #fff; background: var(--c-primary); border-radius: 8px;
}
.entry__body h3 {
  font-size: 1.18rem; margin: 2em 0 .9em; padding: 4px 0 8px 14px; border-left: 6px solid var(--c-primary);
  border-bottom: 1px solid var(--c-line);
}
.entry__body h4 { font-size: 1.05rem; margin: 1.8em 0 .8em; padding-bottom: 4px; border-bottom: 2px dotted var(--c-primary); display: inline-block; }
.entry__body h5 { font-size: 1rem; margin: 1.6em 0 .6em; }
.entry__body ul, .entry__body ol { padding-left: 1.4em; }
.entry__body li + li { margin-top: .25em; }
.entry__body figure { margin: 0 0 1.4em; }
.entry__body figcaption { font-size: .82rem; color: var(--c-muted); text-align: center; margin-top: 4px; }
.entry__body blockquote { margin: 0 0 1.4em; padding: 12px 18px; background: #f6f7f9; border-left: 4px solid var(--c-line); }

/* 本文の文字装飾 */
.mk1 { background: linear-gradient(transparent 55%, var(--mk1) 55%); }
.mk2 { background: linear-gradient(transparent 55%, var(--mk2) 55%); }
.tc1 { color: var(--tc1); }
.tc2 { color: var(--tc2); }
.fw-b { font-weight: 700; }
mark { background: none; color: inherit; }
mark.bg { background: var(--mark-bg); padding: 0 2px; }
.has-vivid-red-color { color: #cf2e2e; }
.has-vivid-cyan-blue-color { color: #0b72c4; }
.has-vivid-green-cyan-color { color: #0a9a6a; }
.has-luminous-vivid-orange-color { color: #e06100; }
.has-luminous-vivid-amber-color { color: #c98a00; }
.has-vivid-purple-color { color: #8a3fd1; }
.has-pale-pink-color { color: #e35d8c; }
.has-pale-cyan-blue-color { color: #4a90c2; }
.has-text-align-center { text-align: center; }
.has-text-align-left { text-align: left; }
.has-text-align-right { text-align: right; }
.has-small-font-size { font-size: .85em; }
.has-medium-font-size { font-size: 1.15em; }
.has-subtle-pale-blue-background-color { background: #eef4fb; }
.has-background { padding: 1em 1.2em; border-radius: 8px; }

/* 画像 */
.wp-block-image img { border-radius: 4px; }
.wp-block-image.aligncenter, .aligncenter { text-align: center; margin-left: auto; margin-right: auto; }
.wp-block-image.is-resized img { width: auto; }
.img-in-text { display: inline-block; vertical-align: middle; margin: 0 2px; }

/* 段組み（WordPressのカラムブロック） */
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 1.2em; margin-bottom: 1.4em; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
.wp-block-column > *:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .wp-block-columns { flex-direction: column; }
  .wp-block-column { flex-basis: auto !important; }
}

/* 表 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.4em; }
.wp-block-table { margin-bottom: 1.4em; }
.wp-block-table .table-scroll { margin-bottom: 0; }
.entry__body table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.6; }
.entry__body th, .entry__body td { border: 1px solid var(--c-line); padding: 8px 10px; vertical-align: middle; }
.entry__body th { background: var(--c-primary-soft); font-weight: 700; }
.entry__body table img { max-width: 100%; }
.has-fixed-layout table, table.has-fixed-layout { table-layout: fixed; }
.is-style-stripes tbody tr:nth-child(odd) { background: #f7f8fa; }
@media (max-width: 640px) {
  /* 列が4つ以上ある表は、スマホでは横スクロールにする */
  .entry__body table:has(tr > :nth-child(4)) { min-width: 600px; table-layout: auto; }
  .entry__body th, .entry__body td { padding: 6px 8px; }
}

/* ボックス（旧 シンプルボックス／解説ボックス） */
.box {
  --_c: var(--box-color);
  position: relative; margin: 0 0 1.6em; padding: 16px 20px; border: 2px solid var(--_c); border-radius: 8px; background: #fff;
}
.box > *:last-child, .box__body > *:last-child, .box__wrap > *:last-child { margin-bottom: 0; }
.box--soft { border: none; background: var(--c-primary-soft); }
.box--titled { padding-top: 0; }
.box__title {
  margin: 0 -20px 14px; padding: 6px 20px; background: var(--_c); color: #fff; font-weight: 700; border-radius: 5px 5px 0 0;
}
.box--titled .box__wrap > .box__title { margin-bottom: 14px; }
.box--titled:not(:has(.box__title)) { padding-top: 16px; }
.box--links { --_c: #3f9a6b; }
.box ul, .box ol { margin-top: 0; }

/* お知らせボックス（旧 アイコンボックス） */
.note {
  --_c: #2f80c9; --_i: "i";
  display: flex; gap: 14px; margin: 0 0 1.6em; padding: 14px 18px; border-radius: 8px; background: color-mix(in srgb, var(--_c) 9%, #fff);
  border-left: 5px solid var(--_c);
}
.note::before {
  content: var(--_i); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--_c); color: #fff;
  font-weight: 800; font-size: .85rem; display: grid; place-items: center; margin-top: 2px;
}
.note__body { min-width: 0; flex: 1; }
.note__body > *:last-child, .note__body > div > *:last-child { margin-bottom: 0; }
.note--caution { --_c: #e0702b; --_i: "!"; }
.note--information { --_c: #2f80c9; --_i: "i"; }
.note--checkcircle { --_c: #2e9d62; --_i: "✓"; }
.note--like { --_c: #e0507a; --_i: "♥"; }
.note--bulb { --_c: #d6a400; --_i: "★"; }
.note--star { --_c: #d6a400; --_i: "★"; }

.spacer { display: block; }

/* 吹き出し */
.chat { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 1.6em; }
.chat--right { flex-direction: row-reverse; }
.chat__face { flex: none; width: 72px; margin: 0; text-align: center; }
.chat__face img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--_c, #ccc); background: #fff; }
.chat__face figcaption { font-size: .72rem; color: var(--c-muted); line-height: 1.4; margin-top: 2px; }
.chat--red { --_c: #e8838a; }
.chat--blue { --_c: #7ea7dd; }
.chat__text {
  position: relative; max-width: calc(100% - 86px); padding: 12px 16px; border: 2px solid var(--_c, #ccc); border-radius: 12px; background: #fff;
}
.chat__text::before {
  content: ""; position: absolute; top: 20px; width: 12px; height: 12px; background: #fff;
  border: 2px solid var(--_c, #ccc); border-width: 0 0 2px 2px;
}
.chat--left .chat__text::before { left: -8px; transform: rotate(45deg); }
.chat--right .chat__text::before { right: -8px; transform: rotate(-135deg); }

/* ブログカード */
.card {
  display: flex; gap: 14px; align-items: center; margin: 0 0 1.6em; padding: 12px; border: 1px solid var(--c-line); border-radius: var(--radius);
  background: #fff; color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 4px 14px rgba(20, 30, 50, .12); transform: translateY(-1px); }
.card__thumb { flex: none; width: 150px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--c-primary-soft); }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card__title { font-weight: 700; line-height: 1.5; }
.card__more { font-size: .78rem; color: var(--c-primary); }
.card__more::after { content: " →"; }
@media (max-width: 480px) { .card__thumb { width: 104px; } .card__title { font-size: .9rem; } }

/* YouTube */
.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.6em; background: #000; border-radius: 8px; overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* タグ・前後の記事・関連記事 */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.tags a { display: block; padding: 3px 12px; background: var(--c-primary-soft); border-radius: 999px; font-size: .82rem; text-decoration: none; }
.prevnext { display: grid; gap: 12px; margin: 24px 0; }
@media (min-width: 640px) { .prevnext { grid-template-columns: 1fr 1fr; } }
.prevnext a {
  display: block; padding: 14px 16px; background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow);
  color: inherit; text-decoration: none; font-size: .9rem; line-height: 1.5;
}
.prevnext a span { display: block; font-size: .75rem; color: var(--c-muted); margin-bottom: 2px; }
.prevnext__newer { text-align: right; grid-column: 2; }
@media (max-width: 639px) { .prevnext__newer { grid-column: auto; } }
.related { margin-top: 32px; }

/* ---------- サイドバー ---------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.widget__title { font-size: 1rem; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--c-primary); }
.widget p { margin: 0 0 10px; font-size: .9rem; }
.profile-name { font-weight: 700; }
.more { display: inline-block; font-size: .85rem; font-weight: 700; }
.rank { list-style: none; counter-reset: r; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rank li { counter-increment: r; }
.rank a { position: relative; display: flex; gap: 10px; align-items: flex-start; color: inherit; text-decoration: none; font-size: .86rem; line-height: 1.5; }
.rank a::before {
  content: counter(r); position: absolute; top: -6px; left: -6px; z-index: 1; width: 22px; height: 22px; border-radius: 50%;
  background: var(--c-accent); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center;
}
.rank--plain a::before { content: none; }
.rank img { flex: none; width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }
.rank a:hover span { color: var(--c-primary); }
.cat-tree, .cat-tree ul { list-style: none; margin: 0; padding: 0; }
.cat-tree ul { padding-left: 14px; }
.cat-tree a { display: flex; justify-content: space-between; padding: 6px 2px; border-bottom: 1px dashed var(--c-line); color: inherit; text-decoration: none; font-size: .9rem; }
.cat-tree a:hover { color: var(--c-primary); }
.count { color: var(--c-muted); font-size: .8rem; }

/* ---------- フッター ---------- */
.site-footer { background: var(--c-header); color: rgba(255, 255, 255, .8); padding: 28px 0; font-size: .85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0 0 12px; padding: 0; }
.footer-links a { color: inherit; }
.copyright { margin: 0; opacity: .7; }

.notfound { text-align: center; padding: 48px 20px; }
