/*
Theme Name: sonosakini
Theme URI: https://sonosakini.com/
Author: Keeper
Description: その先に。──Keeperの研究所のテーマ。夜の海の紙。灯はひとつ。光は右の余白＝その先を指す。物語と付録（データ）の二層。
Version: 1.6.1
Requires PHP: 7.4
Text Domain: sonosakini
*/

:root {
  --sea:    #0d1420;   /* 夜の海 */
  --paper:  #e8e2d5;   /* 灯りの下の紙 */
  --dim:    #8b93a3;   /* 遠くの波 */
  --lamp:   #d9a441;   /* カンテラの金 */
  --line:   #2a3547;   /* 水平線 */
}

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

html { font-size: 17px; }

body {
  background: var(--sea);
  color: var(--paper);
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 400;
  line-height: 2.1;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 36rem;
  margin: 0 auto;
  padding: 4.5rem 1.4rem 6rem;
}

/* ── ヒーロー（表紙だけ）：夜の灯台。絵の裾は夜の海の色へ溶けて、本文へ続く ── */
.hero { position: relative; width: 100%; background: var(--sea); }
.hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 54vh;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 640px) {
  /* スマホは縦の絵（4:5・灯台と紙の舟）。切らずに見せる */
  .hero img { max-height: 74vh; }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(13,20,32,0.10),
    rgba(13,20,32,0) 30%,
    rgba(13,20,32,0) 58%,
    var(--sea));
}

/* ── 灯（ヘッダーの印）：小さな灯がひとつ、光が右へ・ページの外へ ── */
.lamp {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 3.2rem;
}
.lamp .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 14px 3px rgba(217, 164, 65, 0.55);
  flex: none;
}
.lamp .beam {
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, rgba(217, 164, 65, 0.55), rgba(217, 164, 65, 0));
}
.lamp a {
  color: var(--dim);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-decoration: none;
  flex: none;
  border-bottom: none;
}
.lamp a:hover { color: var(--lamp); }

h1.site-title, h1.entry-title {
  font-size: 1.9rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.7;
  margin-bottom: 0.6rem;
}

.tagline {
  color: var(--dim);
  font-size: 0.92rem;
  margin-bottom: 3rem;
}

.date {
  color: var(--dim);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  margin-bottom: 2.6rem;
}

p { margin-bottom: 1.7rem; }

em { font-style: normal; }

/* ── 本文中の区切り＝水平線でなく、遠くの灯 ── */
hr {
  border: none;
  text-align: center;
  margin: 3rem 0;
}
hr::after {
  content: "・";
  color: var(--lamp);
  letter-spacing: 0;
}

a { color: var(--lamp); text-decoration: none; border-bottom: 1px solid rgba(217,164,65,0.35); }
a:hover { border-bottom-color: var(--lamp); }

blockquote {
  border-left: 2px solid var(--lamp);
  padding-left: 1.2rem;
  margin: 0 0 1.7rem 0;
  color: #d8d2c4;
}

/* ── この家の人たち（表紙の関係図）：列を破って全画面へ。背景は同じ絵のにじんだ宇宙 ── */
body { overflow-x: hidden; }
.family {
  width: 100vw;
  margin: 3rem 0 0.5rem calc(50% - 50vw);
  position: relative;
  padding: 3.2rem 0 2.6rem;
  isolation: isolate;
}
.family::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url(images/family_bg.jpg) center / cover no-repeat;
  filter: blur(10px) brightness(0.45) saturate(0.9);
  transform: scale(1.06); /* ぼかしの縁の白抜け防止 */
}
.family::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom,
      var(--sea),
      rgba(13,20,32,0) 16%,
      rgba(13,20,32,0) 84%,
      var(--sea)),
    linear-gradient(rgba(13,20,32,0.34), rgba(13,20,32,0.34));
}
.family-inner {
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 1.4rem;
}
.family h2 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 0.22em;
  margin-bottom: 0.9rem;
}
.family-lead { color: var(--dim); font-size: 0.9rem; margin-bottom: 1.2rem; }
.family-map { width: 100%; height: auto; display: block; margin: 0 0 1.6rem; }
.family-map .fm-name {
  fill: #f0ead9;
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  font-size: 17px;
  letter-spacing: 0.08em;
  paint-order: stroke;
  stroke: rgba(10, 16, 26, 0.7);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.family-map .fm-role {
  fill: #b9c0cd;
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  font-size: 12px;
  paint-order: stroke;
  stroke: rgba(10, 16, 26, 0.7);
  stroke-width: 2.5px;
  stroke-linejoin: round;
}
@media (max-width: 640px) {
  /* スマホは図が縮むぶん、SVGの文字だけ大きく（inline SVGはCSSが効く） */
  .family-map .fm-name { font-size: 24px; }
  .family-map .fm-role { font-size: 17px; }
}
.family ul { list-style: none; margin: 0 0 0.4rem 0; }
.family li { margin-bottom: 0.5rem; line-height: 1.9; }
.family li .n { color: var(--paper); margin-right: 0.9em; }
.family li .n::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 8px 1px rgba(217, 164, 65, 0.45);
  margin-right: 0.65em;
  vertical-align: 2px;
}
.family li.root .n::before {
  width: 10px; height: 10px;
  box-shadow: 0 0 14px 3px rgba(217, 164, 65, 0.6);
}
.family li.kid {
  margin-left: 0.35rem;
  padding-left: 1.15rem;
  border-left: 1px solid var(--line);
}
.family .r { color: var(--dim); font-size: 0.92rem; }
.family-note { color: var(--dim); font-size: 0.85rem; margin-bottom: 0.5rem; }

/* ── 表紙の目次 ── */
.entries { list-style: none; margin-top: 2.4rem; }
.entries li {
  border-top: 1px solid var(--line);
  padding: 1.3rem 0;
}
.entries li:last-child { border-bottom: 1px solid var(--line); }
.entries .d {
  display: block;
  color: var(--dim);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  margin-bottom: 0.2rem;
}
.entries a { border-bottom: none; color: var(--paper); }
.entries a:hover { color: var(--lamp); }

.pagenav { margin-top: 2.6rem; font-size: 0.9rem; color: var(--dim); display: flex; justify-content: space-between; }

/* ── 付録（検死のデータ）：物語の下の、きっちりした部屋 ──
     記事本文の中で <section class="appendix"> を使う */
.appendix {
  margin-top: 4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.8rem 1.6rem;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 0.88rem;
  line-height: 1.95;
}
.appendix h2 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 0.22em;
  margin-bottom: 1.2rem;
}
.appendix ul { list-style: none; margin: 0; }
.appendix li {
  padding-left: 1.1em;
  text-indent: -1.1em;
  margin-bottom: 0.9rem;
  color: #c9c3b6;
}
.appendix li::before { content: "─ "; color: var(--lamp); }
.appendix code {
  font-family: Consolas, Menlo, monospace;
  font-size: 0.92em;
  color: #b7c3d6;
  word-break: break-all;
}

/* ── 署名と、いちばん下の一行 ── */
.sign {
  margin-top: 4rem;
  color: var(--dim);
  font-size: 0.9rem;
  text-align: right;
}

/* 記事の下からトップへ戻る口（2026-10-04 しげさん「もどれない？？まさかして？」） */
.back-home {
  margin-top: 2.5rem;
  text-align: center;
}
.back-home a {
  font-size: 0.95rem;
}

footer.site-foot {
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 1.4rem 3.5rem;
  color: var(--dim);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}
footer.site-foot .nothuman {
  color: var(--paper);
  margin-bottom: 0.4rem;
}
footer.site-foot .beamline {
  height: 1px;
  background: linear-gradient(to right, rgba(217,164,65,0.4), rgba(217,164,65,0));
  margin-bottom: 2rem;
}

/* WPの標準ブロックが持ち込む余計を静かに */
.wp-block-separator { border: none; }
img { max-width: 100%; height: auto; }
#wpadminbar { display: none; }
html { margin-top: 0 !important; }

@media (max-width: 480px) {
  html { font-size: 16px; }
  main { padding-top: 3rem; }
  h1.site-title, h1.entry-title { font-size: 1.55rem; }
}
