/* Cocoon + スキン「いつものコーヒー」(skin-ganchan03) に寄せたテーマ。
   色はここの変数だけ変えれば別サイトに流用できる。 */
:root {
  --c-brand: #594321;
  --c-brand-pale: #f2e7c7;
  --c-h2-bg: #faf8ef;
  --c-accent: #9be4e8;
  --c-text: #333;
  --c-muted: #777;
  --c-hover: #f5f8fa;
  --font: "游ゴシック体", "Yu Gothic", YuGothic, "Hiragino Kaku Gothic Pro", "Meiryo", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--c-text);
  background: #fff;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; vertical-align: bottom; }
a { color: #1967d2; }
.wrap { width: 1236px; margin: 0 auto; }

/* ---------- ヘッダー ---------- */
.header-in { text-align: center; }
.tagline {
  margin: .6em 0;
  font-size: 14px;
  border-top: solid 6px var(--c-brand);
  padding-top: 4px;
}
.logo { margin: 0; padding: 20px 0 30px; font-size: 1em; font-weight: normal; line-height: 1.5; }
.site-name-text-link { color: var(--c-text); text-decoration: none; }
.site-name-text { font-size: 28px; }
.navi { background: var(--c-brand-pale); min-height: 8px; }

/* ---------- 本文枠 ---------- */
.content { margin: 6px 10px 180px; }
.content-in { display: flex; justify-content: space-between; flex-wrap: wrap; }
.main {
  width: 860px;
  margin-right: 20px;
  padding: 0 29px;
  border: 1px solid transparent;
  border-radius: 4px;
  position: relative;
  min-width: 0;
}
.sidebar { width: 356px; padding: 9px; border: 1px solid transparent; border-radius: 4px; background: #fff; }

/* ---------- 記事カード（一覧） ---------- */
.a-wrap { display: block; color: var(--c-text); text-decoration: none; padding: 10px; margin-bottom: 20px; }
.a-wrap:hover { background-color: var(--c-hover); transition: all .5s ease; color: var(--c-text); }
.e-card { position: relative; display: flow-root; }
.card-thumb { float: left; margin: 3px 0 0; position: relative; }
.card-thumb img { width: 100%; }
.entry-card-thumb { width: 320px; }
.entry-card-content { margin-left: 330px; padding-bottom: 1.2em; }
.e-card-title { font-size: 18px; margin: 0 0 5px; line-height: 1.2; font-weight: bold; }
.e-card-snippet { font-size: .8em; max-height: 7.8em; line-height: 1.3; overflow: hidden; white-space: pre-line; }
.e-card-meta { position: absolute; right: 0; bottom: 0; line-height: 1; text-align: right; }
.post-date { font-size: .7em; padding: 2px; display: inline-flex; align-items: center; gap: 3px; }
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
.cat-label {
  position: absolute; top: .3em; left: .3em;
  border: 1px solid #eee; font-size: 11px; color: #fff; background: rgba(51, 51, 51, .7);
  padding: 1px 5px; max-width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5;
}

/* ---------- 記事ページ ---------- */
.entry-title, .archive-title {
  margin: 38px 0;
  padding: 20px;
  background: var(--c-brand);
  color: #fff;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  border-left: solid 4px var(--c-accent);
}
.archive-title { display: flex; align-items: center; gap: 8px; }
.eye-catch-wrap { display: flex; }
.eye-catch { position: relative; margin: 0 auto .6em; max-width: 100%; }
.eye-catch img { margin: 0 auto; display: block; }
.eye-catch .cat-label { top: .4em; left: .4em; font-size: 14px; padding: 4px 8px; opacity: .9; }
.date-tags { line-height: .8; text-align: right; margin-bottom: 1em; }
.date-tags .post-date { font-size: 1em; padding: 0; }

.entry-content { margin: 1em 0 3em; }
.entry-content > * { line-height: 1.8; margin-top: 1.4em; margin-bottom: 1.4em; }
.article h2, .article h3, .article h4 { line-height: 1.25; font-weight: 500; margin: 2.4em 0 1em; }
.article .entry-content h2 {
  font-size: 22px;
  text-align: center;
  background: var(--c-h2-bg);
  padding: 20px 0;
  border-top: 2px solid var(--c-brand);
  border-bottom: 2px solid var(--c-brand);
}
.article .entry-content h3 { font-size: 20px; color: #fff; padding: 10px 16px; margin: 10px 16px; border-radius: 4px; background: var(--c-brand); }
.article .entry-content h4 { font-size: 18px; border-left: 6px solid var(--c-brand); padding-left: .6em; }

/* 目次 */
.toc { border: 1px solid #ccc; font-size: .9em; line-height: 1.5; padding: 1em; margin: 1em auto; display: table; }
.toc-checkbox { display: none; }
.toc-title { font-size: 1.1em; text-align: center; display: block; padding: 2px 16px; cursor: pointer; }
.toc-title::after { content: "[開く]"; margin-left: .5em; font-size: .8em; }
.toc-checkbox:checked + .toc-title::after { content: "[閉じる]"; }
.toc-content { visibility: hidden; height: 0; opacity: .2; transition: all .5s ease-out; }
.toc-checkbox:checked ~ .toc-content { visibility: visible; padding-top: .6em; height: 100%; opacity: 1; }
.toc ol { padding-left: 20px; margin: .5em 0 0; }
.toc a { color: var(--c-text); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.entry-categories-tags { margin-bottom: 18px; }
.cat-link {
  display: inline-block; color: #fff; background: #333; text-decoration: none;
  margin-right: 5px; padding: 2px 6px; font-size: 12px; border-radius: 2px;
}
.cat-link:hover { opacity: .5; color: #fff; }
.cat-link .icon { margin-right: 3px; vertical-align: -.1em; }

/* 関連記事・前後記事 */
.related-entry-heading { margin: 22px 0; font-size: 24px; }
.related-entry-card-thumb { width: 160px; }
.related-entry-card .entry-card-content { margin-left: 170px; }
.related-entry-card .cat-label { font-size: 9px; }
.pager-post-navi { margin: 38px 0; display: flex; flex-direction: column; }
.pager-post-navi a { padding: 10px; margin: 0; display: flex; align-items: center; line-height: 1.2; font-size: .8em; border: 1px solid #eee; color: var(--c-text); text-decoration: none; }
.pager-post-navi a:hover { background-color: var(--c-hover); }
.pager-post-navi a + a { border-top: 0; }
.pager-post-navi figure { margin: 0; min-width: 120px; max-width: 120px; }
.pager-post-navi .prev-post::before, .pager-post-navi .next-post::before { font-size: 1.8em; color: #ccc; }
.pager-post-navi .prev-post::before { content: "‹"; margin-right: 8px; }
.pager-post-navi .prev-post .pager-title { margin-left: 10px; }
.pager-post-navi .next-post { flex-direction: row-reverse; }
.pager-post-navi .next-post::before { content: "›"; margin-left: 8px; }
.pager-post-navi .next-post .pager-title { margin-right: 10px; margin-left: auto; }

/* パンくず */
.breadcrumb { margin: 20px 0 1em; color: var(--c-muted); font-size: 13px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: inline; }
.breadcrumb li { display: inline; }
.breadcrumb li + li::before { content: "›"; margin: 0 10px; }
.breadcrumb a { color: var(--c-muted); text-decoration: none; }

/* ---------- サイドバー ---------- */
.widget { margin-bottom: 2em; }
.widget h2 { font-size: 20px; margin: 0 0 .4em; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin: .2em 0; line-height: 1.5; }
.widget li a { color: #1967d2; }

/* ---------- 404 ---------- */
.not-found { text-align: center; margin-bottom: 3em; }
.not-found .code { font-size: 64px; color: var(--c-brand); margin: 0; line-height: 1.2; }

/* ---------- フッター ---------- */
.footer { background: var(--c-brand-pale); border-bottom: solid 6px var(--c-brand); }
.footer-bottom { display: flex; justify-content: space-between; align-items: flex-end; padding: 32px 8px 8px; font-size: 14px; }
.footer .site-name-text { font-size: 18px; color: #666; padding-left: 18px; }
.copyright { margin: 8px 18px 0 0; color: #666; }

/* ---------- レスポンシブ（Cocoon と同じ区切り） ---------- */
@media screen and (max-width: 1242px) {
  .wrap { width: auto; }
  .header-in { padding: 0 10px; }
  .main, .sidebar { margin: 0 .5%; }
  .main { width: 67%; }
  .sidebar { padding: 0 10px; width: 30%; }
  .entry-card-thumb { width: 38%; }
  .entry-card-content { margin-left: 40%; }
}
@media screen and (max-width: 1023px) {
  .content-in { display: block; }
  .main, .sidebar { display: block; margin: 10px; width: auto; }
  .footer-bottom { display: block; text-align: center; }
  .footer .site-name-text { padding-left: 0; }
  .copyright { margin-right: 0; }
}
@media screen and (max-width: 768px) {
  .content { margin: 10px 0 60px; }
  .main { padding: 10px; margin: 10px 0; border-width: 0; }
  .sidebar { display: none; }
  .entry-title { margin: 0 0 4px; }
  .a-wrap { padding: 7px; }
  .e-card-title { font-size: 17px; }
  .e-card-snippet { font-size: 14px; }
  .site-name-text { font-size: 22px; }
  .eye-catch .cat-label { font-size: 10px; padding: 2px 4px; }
}
@media screen and (max-width: 480px) {
  body { font-size: 16px; }
  .site-name-text { font-size: 18px; }
  .tagline { font-size: 12px; }
  .entry-title { font-size: 18px; padding: .6em .8em; margin: 0 0 6px; }
  .article .entry-content h2 { font-size: 16px; padding: 14px 0; margin: 1.2em 0 .8em; }
  .article .entry-content h3, .article .entry-content h4 { font-size: 16px; }
  .related-entry-heading { margin: 1.2em 0 1em; font-size: 20px; }
  .e-card-title { font-size: 16px; line-height: 1.1; }
  .e-card-snippet { font-size: 13px; }
  .cat-label { font-size: 10px; padding: 1px 3px; }
  .entry-card-wrap.a-wrap { padding: .5%; }
  .card-thumb { margin: 0 8px 6px 0; }
  .entry-card-content { margin-left: 0; }
  .e-card-snippet { display: none; }
  .related-entry-card-thumb { width: 38%; }
  .related-entry-card .entry-card-content { margin-left: 40%; font-size: .9em; }
  .pager-post-navi figure { min-width: 30%; max-width: 30%; }
}
