/* 記事・年別ページ・固定ページの見た目 */
:root {
  --bg: #0b0f1c;
  --panel: #121829;
  --ink: #efe9da;
  --body: #d9d4c7;
  --muted: #8f95a8;
  --faint: #5d6377;
  --line: rgba(239, 233, 218, 0.12);
  --gold: #e9d39b;
  --serif: "Shippori Mincho", "Yu Mincho", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; }
body {
  min-height: 100vh;
  background: radial-gradient(ellipse 90% 40% at 50% 0%, #1a2240 0%, transparent 70%), var(--bg);
  color: var(--body);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ヘッダー */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 760px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 16px) 20px 16px;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand-moon { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fffaf0, #d8caa4); box-shadow: 0 0 10px rgba(243, 230, 194, 0.4); }
.site-head nav { display: flex; gap: 16px; font-size: 13px; }
.site-head nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.site-head nav a:hover { color: var(--ink); }

/* 本文 */
.page { max-width: 760px; margin: 0 auto; padding: 8px 20px 48px; }
.crumbs { font-size: 12px; color: var(--faint); margin-bottom: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs i { font-style: normal; margin: 0 6px; }

.article { font-size: 16px; line-height: 1.95; letter-spacing: 0.02em; }
.article h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(25px, 6.4vw, 34px); line-height: 1.45; color: var(--ink); letter-spacing: 0.01em; }
.article h1 small { display: block; font-size: 0.5em; font-weight: 500; color: var(--muted); margin-top: 4px; }
.article .meta { font-size: 12px; color: var(--faint); margin-top: 8px; }
.article .lead { margin-top: 24px; font-size: 17px; color: var(--ink); }
.article h2 {
  font-family: var(--serif); font-weight: 700; font-size: 21px; line-height: 1.5; color: var(--ink);
  margin: 48px 0 14px; padding-left: 14px; border-left: 3px solid var(--gold);
}
.article p { margin: 14px 0; }
.article strong { color: var(--ink); font-weight: 700; }
.article ul { margin: 14px 0; padding-left: 1.3em; }
.article li { margin: 6px 0; }
.article .src { font-size: 12px; line-height: 1.7; color: var(--muted); }

/* 表 */
.table-wrap { overflow-x: auto; margin: 18px -20px; padding: 0 20px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
table.data { white-space: nowrap; }
table:not(.data) th { white-space: nowrap; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { font-size: 12px; font-weight: 500; color: var(--muted); border-bottom-color: rgba(233, 211, 155, 0.35); }
tbody th { color: var(--ink); font-weight: 500; }
td.num, .num { font-variant-numeric: tabular-nums; }
tr.hl td { color: var(--gold); }
.pill { display: block; width: fit-content; margin-top: 4px; padding: 0 8px; font-size: 11px; border: 1px solid rgba(233, 211, 155, 0.5); border-radius: 999px; color: var(--gold); }
table.phases td { font-size: 13px; }
table.data td:last-child:not(.num) { white-space: normal; min-width: 9em; }
table.phases td:last-child { white-space: nowrap; min-width: 0; }

/* 一覧 */
.cards { list-style: none; padding: 0 !important; margin-top: 28px !important; }
.cards li { margin: 0 0 12px; }
.cards a { display: block; padding: 18px 20px; background: var(--panel); border-radius: 14px; text-decoration: none; border: 1px solid transparent; }
.cards a:hover { border-color: var(--line); }
.cards strong { display: block; font-family: var(--serif); font-size: 18px; line-height: 1.5; color: var(--ink); }
.cards span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.years { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 10px; }
.years a { display: block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px; }

.year-nav { display: flex; justify-content: space-between; margin-top: 40px; font-size: 14px; }
.year-nav a { text-decoration: none; }

.related, .sources { margin-top: 48px; padding-top: 4px; }
.sources h2, .related h2 { font-size: 16px; }
.sources { font-size: 13px; line-height: 1.8; color: var(--muted); }

.info { margin-top: 12px; }
.info div { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.info dt { width: 8em; flex: none; color: var(--muted); font-size: 14px; }
.contact-box { padding: 20px; background: var(--panel); border-radius: 14px; text-align: center; color: var(--ink); }

/* 次の満月の小窓 */
.next-box {
  margin-top: 56px; padding: 24px; text-align: center;
  background: var(--panel); border-radius: 16px;
}
.nb-label { font-size: 12px; letter-spacing: 0.3em; color: var(--gold); }
.nb-date { margin-top: 8px; font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.nb-date small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.nb-link {
  display: inline-block; margin-top: 16px; padding: 12px 22px;
  background: var(--gold); color: var(--bg); border-radius: 12px;
  font-size: 14px; font-weight: 700; text-decoration: none;
}

/* フッター */
.site-foot {
  max-width: 760px; margin: 0 auto;
  padding: 32px 20px calc(env(safe-area-inset-bottom) + 40px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  font-size: 13px;
}
.site-foot nav { display: flex; flex-direction: column; gap: 8px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }
.ft-h { font-size: 11px; letter-spacing: 0.15em; color: var(--faint); }
.copy { grid-column: 1 / -1; font-size: 11px; color: var(--faint); }

@media (max-width: 420px) {
  .site-head nav { gap: 12px; font-size: 12px; }
  .site-head nav a:first-child { display: none; }
}

/* 年別ページの月齢カレンダー */
.months { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 20px; }
.month { background: var(--panel); border-radius: 16px; padding: 14px 10px 12px; }
.month h3 { font-family: var(--serif); font-size: 20px; color: var(--ink); padding: 0 6px 8px; }
.month h3 small { font-size: 12px; color: var(--muted); margin-left: 8px; font-weight: 500; }
.mgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; line-height: 1.2; }
.mw { text-align: center; font-size: 10px; color: var(--faint); padding-bottom: 4px; }
.mw.sun { color: #e59a8f; } .mw.sat { color: #93acd8; }
.md { display: flex; flex-direction: column; align-items: center; padding: 5px 0 4px; min-height: 66px; border-radius: 8px; background: rgba(255, 255, 255, 0.025); }
.md .mn { font-size: 11px; color: var(--ink); font-variant-numeric: tabular-nums; }
.md.sun .mn { color: #e59a8f; } .md.sat .mn { color: #93acd8; }
.md svg { width: 22px; height: 22px; margin-top: 4px; }
.md .ma { font-size: 9px; color: var(--faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
.md .me { font-size: 8.5px; color: var(--muted); margin-top: 1px; text-align: center; font-variant-numeric: tabular-nums; }
.md .me i { display: block; font-style: normal; }
.md.full { background: radial-gradient(circle at 50% 35%, rgba(243, 230, 194, 0.2), rgba(233, 211, 155, 0.05) 70%); box-shadow: inset 0 0 0 1px rgba(233, 211, 155, 0.35); }
.md.full svg { filter: drop-shadow(0 0 4px rgba(243, 230, 194, 0.7)); }
.md.full .me, .md.full .ma { color: var(--gold); }
@media (min-width: 700px) { .months { grid-template-columns: 1fr 1fr; } }
@media print {
  body { background: #fff; color: #000; }
  .site-head, .site-foot, .next-box, .crumbs { display: none; }
}
.month h3 a { color: inherit; text-decoration: none; }
.month h3 a::after { content: " ›"; color: var(--gold); font-size: 16px; }
.month.big { margin-top: 24px; padding: 14px 8px 12px; }
.month.big .md { min-height: 84px; }
.month.big .md .mn { font-size: 13px; }
.month.big .md svg { width: 30px; height: 30px; }
.month.big .md .ma { font-size: 10px; }
.month.big .md .me { font-size: 9.5px; }
.month.big .mw { font-size: 11px; }
table.days tr.sun td:first-child { color: #e59a8f; }
table.days tr.sat td:first-child { color: #93acd8; }
@media (min-width: 700px) {
  .month.big .md { min-height: 104px; }
  .month.big .md svg { width: 40px; height: 40px; }
  .month.big .md .me i { display: inline; margin-left: 3px; }
}

/* WordPress のブロックで書かれた本文 */
.entry > * + * { margin-top: 14px; }
.article .sub { margin-top: 4px; font-family: var(--serif); font-size: 15px; color: var(--muted); }
.has-small-font-size { font-size: 12px !important; line-height: 1.7; color: var(--muted); }
figure.wp-block-table { margin: 18px -20px; padding: 0 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
figure.wp-block-table table { white-space: normal; }
.entry img { max-width: 100%; height: auto; border-radius: 12px; }
.entry ul.wp-block-list { padding-left: 1.3em; }
.nav-links { display: flex; gap: 12px; margin-top: 24px; }
