:root {
  /* 旧サイト（2004〜）の配色を引き継ぐ：黄緑のヘッダー、オリーブグレーのメニュー帯、クリーム色の背景 */
  --brand: #8eb647;
  --brand-2: #81ae32;
  --nav: #e7ebde;
  --nav-line: #b9bfae;
  --hot: #f66;
  --page: #eceee6;
  --bg: #ffffff;
  --fg: #333333;
  --muted: #6b6b60;
  --line: #dcdccf;
  --accent: #4a7314;
  --card: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root { --brand: #6f9a2c; --brand-2: #648c26; --nav: #2a3024; --nav-line: #3d4535; --hot: #e85a5a; --page: #141611; --bg: #1c1f18; --fg: #e8ecdf; --muted: #a7ad9b; --line: #3a4033; --accent: #a9d46b; --card: #22261d; }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--page); color: var(--fg);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  line-height: 1.85; font-size: 16px;
}
a { color: var(--accent); }
.wrap { max-width: 800px; margin: 0 auto; padding: 0 16px; }
main.wrap { background: var(--bg); border: 1px solid var(--line); border-radius: 4px; margin-top: 20px; margin-bottom: 32px; padding-top: 20px; padding-bottom: 40px; }

/* ヘッダー：旧サイトと同じ黄緑のストライプに、白い明朝のロゴ */
.masthead { background: repeating-linear-gradient(90deg, var(--brand) 0 12px, var(--brand-2) 12px 23px); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; white-space: nowrap; }
.logo-main { font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif; font-weight: 700; font-size: 2rem; letter-spacing: .06em; line-height: 1; text-shadow: 0 1px 0 rgba(0,0,0,.15); }
.logo-sub { display: flex; flex-direction: column; border-left: 1px solid rgba(255,255,255,.8); padding-left: 10px; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: .72rem; line-height: 1.35; }
.header-search { display: flex; flex-shrink: 1; min-width: 0; }
.header-search input { font: inherit; font-size: .9rem; padding: 4px 8px; border: 1px solid #6f8f38; border-right: 0; border-radius: 3px 0 0 3px; background: #fff; color: #333; width: 11em; min-width: 0; }
.header-search button { font: inherit; font-size: .85rem; padding: 4px 10px; border: 1px solid #6f8f38; border-radius: 0 3px 3px 0; background: #f5f5ef; color: #333; cursor: pointer; white-space: nowrap; }
.header-search button:hover { background: var(--hot); color: #fff; }

/* メニュー帯：旧サイトの #E7EBDE、ホバーで #F66 */
.global-nav { background: var(--nav); border-top: 1px solid rgba(255,255,255,.5); border-bottom: 1px solid var(--nav-line); }
.global-nav .wrap { display: flex; overflow-x: auto; scrollbar-width: none; padding: 0; }
.global-nav .wrap::-webkit-scrollbar { display: none; }
.global-nav a { flex-shrink: 0; color: var(--fg); text-decoration: none; font-size: .88rem; padding: 6px 14px; border-right: 1px solid var(--nav-line); white-space: nowrap; }
.global-nav a:first-child { border-left: 1px solid var(--nav-line); }
.global-nav a:hover { background: var(--hot); color: #fff; }
.breadcrumb { font-size: .85rem; color: var(--muted); }
.profile { display: flex; gap: 20px; align-items: flex-start; margin: 16px 0 24px; }
.profile img { border-radius: 4px; flex-shrink: 0; height: auto; }
.profile h1 { margin: 0; font-size: 1.7rem; line-height: 1.3; }
.profile p { margin: 2px 0; }
.reading, .alpha { color: var(--muted); font-size: .9rem; }
.dates .age { color: var(--muted); }
.tags a { display: inline-block; font-size: .8rem; border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; margin-right: 6px; text-decoration: none; }
h2 { font-size: 1.25rem; border-bottom: 3px double var(--nav-line); padding-bottom: 4px; margin-top: 40px; }
h3 { font-size: 1.05rem; margin-top: 28px; }
.commentary ul { padding-left: 1.2em; }
.commentary li { margin: 4px 0; }
.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.related li span { display: block; font-size: .8rem; color: var(--muted); }
.sources { font-size: .85rem; color: var(--muted); }
.ad { margin: 32px 0; min-height: 100px; }
.site-footer { border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); padding: 24px 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
@media (max-width: 480px) {
  .profile { flex-direction: column; }
  .profile h1 { font-size: 1.45rem; }
}
@media (max-width: 560px) {
  .logo-sub { display: none; }
  .logo-main { font-size: 1.6rem; }
  .header-search input { width: 8em; }
  main.wrap { margin-top: 12px; border-left: 0; border-right: 0; border-radius: 0; }
}
/* メニュー帯：狭い画面では右端をぼかし、横スクロールで続きがあると分かるようにする */
.global-nav { position: relative; }
@media (max-width: 800px) {
  .global-nav::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 36px; pointer-events: none; background: linear-gradient(to right, transparent, var(--nav)); }
}
