@charset "utf-8";
/*
 * blog.kenji00.com 用スタイル（MT4 の静的 HTML に当てる 1 枚の CSS）
 * 白地・文章中心。960px 以上は本文と右サイドバーの 2 カラム、それ未満は 1 カラム。
 * HTML は tools/modernize_blog.py で変換済みのものを前提にする。
 */

:root {
  --text: #222;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --link: #1d5fa8;
  --link-visited: #5a4a8a;
  --bg-soft: #f6f6f4;
  --measure: 42em;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

a { color: var(--link); text-underline-offset: .2em; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; border: 0; }

/* ---------------------------------------------------------------- 骨格 */

#container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

#header { border-bottom: 1px solid var(--line); padding: 28px 0 20px; margin-bottom: 32px; }
#header-content { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; }
#header-name { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.4; }
#header-name a { color: var(--text); text-decoration: none; }
#header-description { margin: 0; font-size: .875rem; font-weight: 400; color: var(--muted); }
#header-menu ul { display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; font-size: .875rem; }
.header-search { margin-left: auto; }

@media (min-width: 960px) {
  #content-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    grid-template-rows: auto 1fr;
    column-gap: 64px;
  }
  #alpha { grid-column: 1; grid-row: 1 / span 2; }
  #beta { grid-column: 2; grid-row: 1; }
  #gamma { grid-column: 2; grid-row: 2; align-self: start; }
}

#alpha-inner { max-width: var(--measure); }

#footer {
  margin-top: 56px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8125rem;
  text-align: center;
}
#footer .widget { margin: 0 0 4px; }

/* ---------------------------------------------------------------- 記事 */

.entry-asset, .page-asset { margin-bottom: 56px; }
.entry-asset > .clr { display: none; }

.titledateblock {
  display: flex;
  gap: .4em;
  color: var(--muted);
  font-size: .875rem;
  letter-spacing: .02em;
}
.titledateblock .titleday { order: -1; }
.titledateblock .titleday::after { content: ""; }

.asset-name, #page-title, .archive-title {
  margin: .2em 0 .4em;
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.45;
}
.asset-name a { color: var(--text); text-decoration: none; }
.asset-name a:hover { text-decoration: underline; }
h2.asset-name { font-size: 1.375rem; }

.asset-meta, .asset-footer, .entry-categories, .entry-tags {
  color: var(--muted);
  font-size: .8125rem;
}
.asset-meta a, .asset-footer a { color: var(--muted); }
.asset-meta .separator { margin: 0 .3em; }
.asset-meta .byline .separator { display: none; }
.user-pic { float: left; margin: 0 10px 0 0; }
.user-pic img { width: 40px; height: 40px; border-radius: 50%; }

.asset-content { margin-top: 1.2em; }
.asset-body p, .asset-more p { margin: 0 0 1.4em; }
.asset-body h2, .asset-body h3, .asset-body h4,
.asset-more h2, .asset-more h3, .asset-more h4 { margin: 1.8em 0 .6em; line-height: 1.5; }

.asset-body img, .asset-more img, .comment-content img { height: auto; }
.asset-body iframe, .asset-more iframe,
.asset-body table, .asset-more table,
.asset-body div, .asset-more div { max-width: 100%; }
iframe.video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }

.asset-body blockquote, .asset-more blockquote, .comment-content blockquote {
  margin: 1.4em 0;
  padding: .2em 0 .2em 1.2em;
  border-left: 3px solid var(--line);
  color: #444;
}
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875em; }
pre { overflow-x: auto; padding: 12px 14px; background: var(--bg-soft); border-radius: 4px; }
table { border-collapse: collapse; }
td, th { padding: 4px 8px; border: 1px solid var(--line); }

.asset-more-link { margin: 0; }
.asset-more-link a { font-size: .9375rem; }

.asset-footer { margin-top: 1.6em; padding-top: 12px; border-top: 1px solid var(--line); clear: both; }
.asset-footer:empty, .content-nav:not(:has(*)) { display: none; }
.entry-categories h4, .entry-tags h4 { display: inline; margin: 0 .4em 0 0; font-size: inherit; font-weight: 400; }
.entry-categories ul, .entry-tags ul { display: inline; margin: 0; padding: 0; list-style: none; }
.entry-categories li, .entry-tags li { display: inline; }

/* 前後の記事・ページ送り */
.content-nav { margin: 0 0 40px; font-size: .875rem; }
.content-nav ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.content-nav li { display: contents; }
.content-nav a, .content-nav .current_page {
  display: inline-block;
  min-width: 2.2em;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
}
.content-nav .current_page { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------------------------------------------------------------- コメント */

#comments, .comments { margin-top: 48px; }
.comments-header, .trackbacks-header {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 1.125rem;
}
.comment { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-header, .comment-footer { color: var(--muted); font-size: .8125rem; }
.comment-content { font-size: .9375rem; }
.comment-content p { margin: .4em 0; }

/* ---------------------------------------------------------------- サイドバー */

#beta, #gamma { font-size: .875rem; }
@media (max-width: 959px) {
  #beta { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
}

.widget { margin-bottom: 32px; }
.widget-header {
  margin: 0 0 8px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
}
.widget-header a { font-weight: 400; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: 3px 0; line-height: 1.6; }
.widget a { color: var(--text); text-decoration: none; }
.widget a:hover { color: var(--link); text-decoration: underline; }
.widget li ul { padding-left: 1em; }
.widget-archive-category li li { padding: 1px 0; }
.widget select { width: 100%; padding: 6px 8px; font: inherit; }
.widget-recent-action li { color: var(--muted); }
img[src$="rss-icon-64.png"] { width: 24px; height: 24px; vertical-align: middle; }

/* 検索（Google のサイト内検索へ送る） */
form[role="search"] { display: flex; gap: 6px; }
form[role="search"] input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
  font-size: .875rem;
}
form[role="search"] input[type="submit"] {
  padding: 6px 12px;
  border: 1px solid var(--text);
  border-radius: 4px;
  background: var(--text);
  color: #fff;
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}

/* ---------------------------------------------------------------- 小さい画面 */

@media (max-width: 600px) {
  body { font-size: 16px; }
  #container { padding: 0 16px; }
  #header { padding: 20px 0 14px; margin-bottom: 24px; }
  #header-name { font-size: 1.25rem; }
  .header-search { margin-left: 0; width: 100%; }
  .asset-name, #page-title, .archive-title { font-size: 1.375rem; }
  h2.asset-name { font-size: 1.25rem; }
}
