/* ==========================================================
   おとなりの不登校 — blog
   palette:
     --yoi    宵     #3b3f4d  (本文の墨色)
     --hakubo 薄暮   #f2f1f4  (背景・暮れ方の空)
     --akari  灯     #e3a93c  (窓の灯り・アクセント)
     --kage   影     #8b8e9c  (日付・補足)
     --mado   窓     #fdf6e6  (灯りのにじみ)
   ========================================================== */

:root {
  --yoi: #3b3f4d;
  --hakubo: #f2f1f4;
  --akari: #e3a93c;
  --kage: #8b8e9c;
  --mado: #fdf6e6;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; }

body {
  background: var(--hakubo);
  color: var(--yoi);
  font-family: var(--serif);
  line-height: 2;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 1.4rem;
}

/* --- 窓明かりのマーク --- */
.mado-mark {
  display: inline-block;
  width: 22px;
  height: 28px;
  border-radius: 4px 4px 2px 2px;
  background: var(--mado);
  border: 2px solid var(--yoi);
  position: relative;
  box-shadow: 0 0 18px 4px rgba(227, 169, 60, 0.35);
}
.mado-mark::before,
.mado-mark::after {
  content: "";
  position: absolute;
  background: var(--yoi);
}
.mado-mark::before { left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; }
.mado-mark::after  { top: 50%; left: 0; right: 0; height: 2px; margin-top: -1px; }

@media (prefers-reduced-motion: no-preference) {
  .mado-mark { animation: tomoru 6s ease-in-out infinite; }
  @keyframes tomoru {
    0%, 100% { box-shadow: 0 0 18px 4px rgba(227, 169, 60, 0.35); }
    50%      { box-shadow: 0 0 26px 7px rgba(227, 169, 60, 0.55); }
  }
}

/* --- ヘッダー --- */
header.site {
  text-align: center;
  padding: 4.5rem 0 3rem;
}
header.site .site-title {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin-top: 1.4rem;
}
header.site .site-title a { color: inherit; text-decoration: none; }
header.site .byline {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--kage);
  letter-spacing: 0.18em;
  margin-top: 0.6rem;
}

/* --- 紹介文 --- */
.intro {
  border-top: 1px solid #dcdbe2;
  border-bottom: 1px solid #dcdbe2;
  padding: 2.2rem 0;
  font-size: 0.95rem;
}
.intro p + p { margin-top: 1.2em; }
.intro .credo {
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* --- リンクボタン（stand.fm / レター） --- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  padding: 2rem 0 0.5rem;
  font-family: var(--sans);
}
.actions a {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 1.5px solid var(--yoi);
  color: var(--yoi);
  transition: background 0.2s, color 0.2s;
}
.actions a.primary {
  background: var(--yoi);
  color: var(--mado);
  border-color: var(--yoi);
}
.actions a:hover { background: var(--akari); border-color: var(--akari); color: var(--yoi); }

/* --- 記事一覧（日記の目次） --- */
main.list { padding: 2.5rem 0 4rem; }
.list h2 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--kage);
  letter-spacing: 0.3em;
  margin-bottom: 1.8rem;
}
ul.entries { list-style: none; }
ul.entries li { border-bottom: 1px dashed #d5d4dc; }
ul.entries a {
  display: block;
  padding: 1.3rem 0.2rem;
  text-decoration: none;
  color: inherit;
}
ul.entries a:hover .entry-title { color: #a8791f; }
.entry-date {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--kage);
  letter-spacing: 0.12em;
  display: block;
}
.entry-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 0.3rem;
  transition: color 0.2s;
}

/* --- 記事ページ --- */
article.post { padding: 1rem 0 3rem; }
article.post .post-date {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--kage);
  letter-spacing: 0.15em;
}
article.post h1 {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.7;
  margin: 0.6rem 0 2.2rem;
}
article.post h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2.6em 0 1em;
  padding-left: 0.9rem;
  border-left: 3px solid var(--akari);
}
article.post p { margin: 1.4em 0; font-size: 0.98rem; }

/* --- 配信への案内 --- */
.listen {
  margin-top: 3.5rem;
  background: var(--mado);
  border-radius: 10px;
  padding: 1.6rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.9;
}
.listen strong { letter-spacing: 0.06em; }
.listen a { color: #a8791f; font-weight: 600; }

/* --- 記事ページの戻り導線 --- */
.back {
  display: inline-block;
  margin: 2.5rem 0 4rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--kage);
  text-decoration: none;
  letter-spacing: 0.1em;
}
.back:hover { color: var(--yoi); }

/* --- フッター --- */
footer.site {
  text-align: center;
  padding: 2.5rem 0 3.5rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--kage);
  letter-spacing: 0.12em;
}

a:focus-visible {
  outline: 2px solid var(--akari);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 480px) {
  header.site { padding: 3.2rem 0 2.2rem; }
  header.site .site-title { font-size: 1.4rem; }
  article.post h1 { font-size: 1.25rem; }
}
