/* ===== 色・フォント（ここを変えるとサイト全体の雰囲気が変わります） ===== */
:root {
  --bg: #0F131B;
  --bg-deep: #0B0E14;
  --surface: #171C26;
  --line: #2E3644;
  --line-strong: #5F6B7D;
  --text: #E8EBF0;
  --text-sub: #D2D7DF;
  --muted: #A3ACBA;
  --accent: #D9C38E;      /* アクセント色（月光のゴールド） */
  --accent-ink: #1E1A10;  /* アクセント色の上に乗る文字色 */
  --font-body: 'Zen Kaku Gothic New', sans-serif;
  --font-mincho: 'Shippori Mincho B1', serif;
  --font-en: 'Cormorant Garamond', serif;
  --font-hero: 'Italiana', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
}
/* 固定背景：星空と天の川は画面に貼りつけたまま、コンテンツだけが上を滑っていく
   （background-attachment: fixed は iPhone で効かないので、固定した疑似要素に敷く） */
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
body::before { background: url(../img/starfield.svg) 0 0 / 600px 600px repeat; }
/* 天の川は文字の読みやすさを優先して薄めに（濃さは opacity で調整） */
body::after { background: url(../img/milkyway.webp) center / cover no-repeat; opacity: .35; }
/* 下層ページ（Gallery・Story 一覧・Blog・News など）は銀河をはっきり見せる。トップは文字優先で薄いまま */
body:not(.home)::after { opacity: .8; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: #EBDDB5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.milky {
  background-color: #10151F;
  background-image: url(../img/milkyway.webp);
  background-size: cover;
  background-position: center;
}

/* ===== ヘッダー（スクロールに付いてくる） ===== */
html { scroll-padding-top: calc(var(--header-h, 0px) + 16px); }
.site-header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; transition: background-color .3s; }
/* ふだんは背景なし。スクロール中だけ下の文字と重ならないよう薄く敷く */
.site-header.is-scrolled { background: rgba(11, 14, 20, .92); }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mincho); font-size: 24px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: .04em; }
.logo:hover { color: var(--text); }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-links a { padding: 10px 16px; color: var(--text); text-decoration: none; border-radius: 8px; }
.nav-links a:hover { background: rgba(255,255,255,.06); }
.nav-links a[aria-current="page"] { color: var(--accent); font-weight: 700; }

/* ===== ボタン ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 26px; border-radius: 8px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.06); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.nav-links .btn-primary { padding: 10px 18px; color: var(--accent-ink); }

/* ===== トップ：ヒーロー ===== */
.hero { position: relative; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 96px; }
/* 月は画面に固定：スクロールしても同じ場所に留まり、コンテンツがその上を滑っていく
   （横位置はコンテンツ幅 1120px の右端にそろえる。z-index:-1 で文字やカードの後ろへ） */
.hero-moon { position: fixed; top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--header-h, 80px) + 8px); right: max(24px, calc((100% - 1120px) / 2 + 24px)); z-index: -1; pointer-events: none; }
.hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--accent); background: var(--surface); color: var(--accent); border-radius: 8px; font-size: 14px; font-weight: 700; }
.hero h1 { margin: 0; font-family: var(--font-hero); font-size: clamp(36px, 5.4vw, 60px); line-height: 1.2; font-weight: 400; letter-spacing: .02em; text-shadow: 0 0 24px #10151F; }
.hero-lead { margin: 0; color: #C3CAD5; font-size: 17px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visual { flex: 1 1 380px; min-width: 0; position: relative; }
.hero-visual .frame { aspect-ratio: 4 / 5; max-height: 560px; width: 100%; border-radius: 16px; overflow: hidden; background: var(--surface); }
.hero-visual .frame img { width: 100%; height: 100%; object-fit: cover; }
/* 透過イラスト：枠・背景・角丸を外し、絵の形のまま表示する */
.hero-visual .frame.is-cutout { aspect-ratio: auto; max-height: none; border-radius: 0; overflow: visible; background: none; box-shadow: none; }
.hero-visual .frame.is-cutout img { height: auto; object-fit: contain; filter: drop-shadow(0 0 32px rgba(217,195,142,.18)); }
.hero-constellation { position: absolute; left: -40px; bottom: -36px; }

/* ===== 画像がまだないときの枠 ===== */
.placeholder { width: 100%; height: 100%; border: 1px dashed var(--line-strong); border-radius: inherit; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; text-align: center; color: #C3CAD5; font-size: 13px; line-height: 1.6; white-space: pre-line; }
.placeholder strong { color: var(--text); }

/* ===== セクション ===== */
.section { padding-top: 56px; padding-bottom: 48px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.section-title { margin: 0; display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-mincho); font-size: 32px; }
.section-note { margin: -16px 0 24px; color: var(--muted); font-size: 15px; }
.divider { display: flex; justify-content: center; padding: 8px 24px; }
.divider svg { max-width: 100%; }
.page-title { margin: 0; display: inline-flex; align-items: center; gap: 14px; font-family: var(--font-mincho); font-size: 44px; }

/* ===== カード ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; gap: 12px; color: var(--text); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.card:hover { color: var(--text); }
.card .thumb { aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--surface); transition: transform .2s; }
.card:hover .thumb { transform: translateY(-3px); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .excerpt { height: 100%; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 16px; }
.card .excerpt p { margin: 0; font-family: var(--font-mincho); font-size: 18px; line-height: 2; text-shadow: 0 0 12px #10151F; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.card .excerpt > span { font-size: 13px; color: #C3CAD5; }
.card-meta { display: flex; flex-direction: column; gap: 2px; }
.card-cat { font-size: 13px; color: var(--accent); font-weight: 700; }
.card-title { font-weight: 700; }
.card-date { font-size: 13px; color: var(--muted); }

/* Story の一覧 */
.novel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.novel-item { display: flex; gap: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--text); text-decoration: none; }
.novel-item:hover { color: var(--text); border-color: var(--line-strong); }
.novel-item .cover { flex: 0 0 96px; height: 136px; border-radius: 10px; overflow: hidden; }
.novel-item .cover img { width: 100%; height: 100%; object-fit: cover; }
.novel-item .cover .placeholder { font-size: 11px; padding: 8px; }
.novel-item .info { display: flex; flex-direction: column; gap: 6px; min-width: 0; align-items: flex-start; }
.novel-item .title { font-family: var(--font-mincho); font-size: 19px; font-weight: 700; }
.novel-item .sub { font-size: 14px; color: var(--muted); }
.tag { font-size: 12px; padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text-sub); }
.tag.is-accent { border-color: var(--accent); color: var(--accent); }

/* プロフィール */
.profile { border: 1px solid var(--line); border-radius: 24px; padding: 40px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.profile .icon { width: 136px; height: 136px; flex: 0 0 136px; border-radius: 50%; overflow: hidden; }
.profile .icon img { width: 100%; height: 100%; object-fit: cover; }
.profile .body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.profile h2 { margin: 0; font-family: var(--font-mincho); font-size: 28px; }
.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.profile-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid rgba(217,195,142,.45); border-radius: 999px; background: rgba(217,195,142,.1); color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.profile-badge svg { width: 14px; height: 14px; }
.profile p { margin: 0; color: var(--text-sub); white-space: pre-line; line-height: 2; }
.link-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===== ギャラリー ===== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 10px 20px; border-radius: 8px; font: inherit; cursor: pointer; background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.chip-sm { min-height: 44px; padding: 8px 16px; font-size: 14px; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1080px, 94vw); width: 100%; color: var(--text); }
.lightbox::backdrop { background: rgba(6, 8, 12, .85); }
.lightbox-inner { border: 1px solid var(--line); border-radius: 24px; padding: 24px; display: flex; flex-wrap: wrap; gap: 32px; }
.lightbox-img { flex: 1 1 420px; min-width: 0; border-radius: 16px; overflow: hidden; min-height: 300px; }
.lightbox-img img { width: 100%; height: auto; max-height: 76vh; object-fit: contain; }
.lightbox-body { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.lightbox-body h2 { margin: 0; font-family: var(--font-mincho); font-size: 28px; }
.lightbox-body p { margin: 0; color: var(--text-sub); white-space: pre-line; }
/* 複数枚の作品：情報を上に、画像をタイル状に並べる（ダイアログ内でスクロール） */
.lightbox.is-multi { max-width: min(1200px, 96vw); }
.lightbox.is-multi .lightbox-inner { flex-direction: column-reverse; flex-wrap: nowrap; gap: 24px; background-color: rgba(16, 21, 31, .94); }
.lightbox.is-multi .lightbox-body { flex: none; }
.lightbox.is-multi .lightbox-img { flex: none; min-height: 0; overflow: visible; border-radius: 0; columns: 3 240px; column-gap: 12px; }
.lightbox.is-multi .lightbox-img img { display: block; width: 100%; max-height: none; margin-bottom: 12px; border-radius: 12px; break-inside: avoid; }
.lightbox.is-multi .lightbox-img img { cursor: zoom-in; }
/* 複数枚の1枚を押したときの拡大表示 */
.lightbox-zoom { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(6, 8, 12, .96); display: none; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox-zoom[open] { display: flex; animation: fade .3s ease; }
.lightbox-zoom::backdrop { background: transparent; }
.lightbox-zoom img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox-zoom-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: rgba(16, 21, 31, .8); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer; }
.card .thumb { position: relative; }
.thumb-count { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: rgba(11,14,20,.72); color: var(--text); font-size: 12px; font-weight: 700; backdrop-filter: blur(4px); }

/* ===== Story リーダー ===== */
.reader { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 48px; padding-bottom: 96px; }
.reader-settings { flex: 1 1 280px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.reader-settings h2 { margin: 0 0 12px; font-size: 16px; }
.name-fields { display: grid; gap: 12px; margin-bottom: 12px; }
.name-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.name-fields input { min-height: 44px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); font: inherit; font-size: 16px; width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
.reader-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.reader-head { display: flex; flex-direction: column; gap: 8px; }
.reader-head .series { font-size: 14px; color: var(--accent); font-weight: 700; }
.reader-head h1 { margin: 0; font-family: var(--font-mincho); font-size: 40px; line-height: 1.4; }
.reader-head .meta { font-size: 14px; color: var(--muted); }
.reader-cover { aspect-ratio: 16 / 7; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.reader-cover img { width: 100%; height: 100%; object-fit: cover; }
.novel-body { font-family: var(--font-mincho); color: var(--text); font-size: 18px; line-height: 2.1; letter-spacing: .04em; max-width: 36em; }
.novel-body p { margin: 0 0 1em; }
.novel-body.size-s { font-size: 16px; }
.novel-body.size-l { font-size: 21px; }
.novel-body.vertical { writing-mode: vertical-rl; max-width: none; height: 70vh; min-height: 420px; overflow-x: auto; padding: 8px 4px; }
.novel-body.vertical p { margin: 0 0 0 1em; }
.novel-body .name { color: var(--accent); font-weight: 700; }
.novel-body.no-highlight .name { color: inherit; font-weight: inherit; }
.reader-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.reader-nav .is-hidden { visibility: hidden; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-sub); min-height: 44px; }

/* ===== フッター ===== */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); }
.site-footer .container { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }

/* ===== 星のまたたき ===== */
.tw { animation: tw 3.2s ease-in-out infinite; }
.tw2 { animation: tw 4.6s ease-in-out infinite 1.2s; }
@keyframes tw { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .tw, .tw2 { animation: none; }
  .card .thumb { transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== スマホ ===== */
@media (max-width: 600px) {
  /* 複数枚の作品は3列の正方形サムネイルで並べ、押すと拡大 */
  .lightbox.is-multi .lightbox-img { columns: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .lightbox.is-multi .lightbox-img img { aspect-ratio: 1 / 1; height: auto; object-fit: cover; margin: 0; border-radius: 8px; }
  .container { padding: 0 16px; }
  .hero { padding-top: 48px; padding-bottom: 72px; }
  .hero-moon { width: 72px; height: 72px; right: 16px; }
  .hero-constellation { left: 0; }
  .profile { padding: 24px; }
  .page-title { font-size: 34px; }
  .reader-head h1 { font-size: 30px; }
}

/* トップページ：ヘッダーとヒーローを1枚の天の川でつなぐ */

/* ===== WordPress 用の追加 ===== */
[hidden] { display: none !important; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.page-main { padding-top: 56px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 32px; }
.page-head { display: flex; flex-direction: column; gap: 8px; }
.page-lead { margin: 0; color: var(--muted); }
.empty { margin: 0; color: var(--muted); }
.entry-content { max-width: 40em; color: var(--text-sub); }
.entry-content > * { margin: 0 0 1em; }
.novel-body > *:not(p) { margin: 0 0 1em; }
.novel-body.vertical > *:not(p) { margin: 0 0 0 1em; }
/* 本文の画像：width/height を固定値で入れても枠からはみ出さず、比率も崩れないようにする */
.novel-body figure, .novel-body .wp-block-image, .novel-body .wp-caption { max-width: 100%; }
.novel-body img { max-width: 100% !important; height: auto !important; }
.novel-body.vertical figure, .novel-body.vertical .wp-block-image, .novel-body.vertical .wp-caption { max-height: 100%; }
.novel-body.vertical img { max-width: none !important; max-height: 100%; width: auto !important; }
.post-list { display: flex; flex-direction: column; gap: 16px; padding: 0; margin: 0; list-style: none; }
.post-list a { color: var(--text); text-decoration: none; font-weight: 700; }
.post-list a:hover { color: var(--accent); }

/* ===== 英語の見出し（英字を大きく、日本語は小さく添える） ===== */
.section-title, .page-title { align-items: baseline; flex-wrap: wrap; column-gap: 14px; row-gap: 0; }
.section-title > svg, .page-title > svg { align-self: center; }
.title-en { font-family: var(--font-en); font-style: italic; font-weight: 600; letter-spacing: .02em; line-height: 1.1; }
.section-title .title-en { font-size: 44px; }
.page-title .title-en { font-size: 60px; }
.title-ja { font-family: var(--font-body); font-size: 13px; font-weight: 500; letter-spacing: .2em; color: var(--muted); }
.nav-links a:not(.btn) { font-family: var(--font-en); font-style: italic; font-size: 20px; letter-spacing: .04em; padding: 6px 16px; }
.btn { letter-spacing: .04em; }
.card-cat, .badge { letter-spacing: .08em; }
.reader-settings h2 { font-family: var(--font-en); font-style: italic; font-size: 22px; font-weight: 600; letter-spacing: .02em; }
.reader-settings h2 small { margin-left: 8px; font-family: var(--font-body); font-style: normal; font-size: 12px; font-weight: 500; letter-spacing: .15em; color: var(--muted); }
.section-head > a, .reader-nav .btn { font-family: var(--font-en); font-style: italic; font-size: 18px; letter-spacing: .04em; }
@media (max-width: 600px) {
  .section-title .title-en { font-size: 36px; }
  .page-title .title-en { font-size: 46px; }
}

/* ===== パンくずリスト ===== */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "›"; margin: 0 10px; color: var(--line-strong); }
.breadcrumb a { color: var(--text-sub); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: var(--muted); }
.page-main > .breadcrumb { margin-bottom: -16px; }

/* ===== ブログ ===== */
.blog-layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.blog-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.blog-side { flex: 1 1 240px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.blog-side h2 { margin: 0 0 12px; font-family: var(--font-en); font-style: italic; font-size: 22px; font-weight: 600; letter-spacing: .02em; }
.blog-side h2 small { margin-left: 8px; font-family: var(--font-body); font-style: normal; font-size: 12px; font-weight: 500; letter-spacing: .15em; color: var(--muted); }
.month-list { margin: 0; padding: 0; list-style: none; }
.month-list li + li { border-top: 1px solid var(--line); }
.month-list a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 4px; color: var(--text); text-decoration: none; }
.month-list a:hover, .month-list a[aria-current="page"] { color: var(--accent); }
.month-list .count { color: var(--muted); font-size: 13px; }

.blog-list { display: flex; flex-direction: column; gap: 20px; }
.blog-item { display: flex; flex-wrap: wrap; gap: 20px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--text); text-decoration: none; }
.blog-item:hover { color: var(--text); border-color: var(--line-strong); }
.blog-item .thumb { flex: 0 0 240px; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; }
.blog-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-item .thumb .placeholder { font-size: 11px; padding: 8px; }
.blog-item .body { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.blog-item .title { font-family: var(--font-mincho); font-size: 20px; font-weight: 700; line-height: 1.5; }
.blog-item .excerpt { margin: 0; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.blog-article { gap: 28px; }
.blog-article-head { display: flex; flex-direction: column; gap: 8px; }
.blog-article-head a.card-date { text-decoration: none; }
.blog-article-head a.card-date:hover { color: var(--accent); }
.blog-article-head h1 { margin: 0; font-family: var(--font-mincho); font-size: 36px; line-height: 1.4; }
.blog-article-thumb { aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.blog-article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-article .entry-content { max-width: none; }
.blog-article .entry-content h2 { margin-top: 1.6em; font-family: var(--font-mincho); font-size: 26px; color: var(--text); }
.blog-article .entry-content h3 { margin-top: 1.4em; font-family: var(--font-mincho); font-size: 21px; color: var(--text); }
.blog-article .entry-content img { height: auto; border-radius: 12px; }

/* ページ送り（ヘッダーの .nav-links と同じクラス名なので打ち消す） */
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .nav-links .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); text-decoration: none; font-family: var(--font-body); font-style: normal; font-size: 15px; }
.pagination .nav-links a.page-numbers:hover { border-color: var(--accent); background: none; }
.pagination .nav-links .page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pagination .nav-links .page-numbers.dots { border-color: transparent; }

@media (max-width: 600px) {
  .blog-item .thumb { flex-basis: 100%; }
  .blog-article-head h1 { font-size: 28px; }
}

/* =========================================================
 *  アニメーション
 * ========================================================= */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); }

/* ----- 流れ星（JS が canvas を描画。コンテンツの後ろに敷く） ----- */
.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
/* 天の川の帯を少し透かして、後ろの流れ星が見えるようにする */
.milky { background-color: rgba(16, 21, 31, .55); }

/* ----- ボタン：光がすっと走る＋ふわっと浮く ----- */
.btn { position: relative; overflow: hidden; isolation: isolate; transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s, background-color .35s, filter .35s; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); pointer-events: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { animation: btn-shine .8s var(--ease-out); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .1s; }
.btn-primary { box-shadow: 0 0 0 rgba(217,195,142,0); }
.btn-primary:hover { box-shadow: 0 8px 28px -6px rgba(217,195,142,.65), 0 0 0 4px rgba(217,195,142,.12); }
.btn-ghost::after { background: linear-gradient(100deg, transparent, rgba(217,195,142,.25), transparent); }
.btn-ghost:hover { box-shadow: 0 8px 24px -10px rgba(217,195,142,.5), inset 0 0 16px rgba(217,195,142,.08); }
/* キャラぷボタンはときどき自動で光る */
.nav-links .btn-primary::after { animation: btn-shine 1.2s var(--ease-out) 2s, btn-shine-loop 7s var(--ease-out) 4s infinite; }
@keyframes btn-shine { from { left: -60%; } to { left: 130%; } }
@keyframes btn-shine-loop { 0% { left: -60%; } 14%, 100% { left: 130%; } }

/* クリックしたときに散る小さな星（JS が作る） */
.spark { position: fixed; z-index: 9999; width: 8px; height: 8px; margin: -4px 0 0 -4px; pointer-events: none; color: var(--accent); animation: spark .7s var(--ease-out) forwards; }
.spark svg { display: block; width: 100%; height: 100%; }
@keyframes spark {
  0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(160deg); opacity: 0; }
}

/* チップ */
.chip { transition: background-color .3s, border-color .3s, color .3s, transform .3s var(--ease-out), box-shadow .3s; }
.chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.chip[aria-pressed="true"] { box-shadow: 0 6px 20px -8px rgba(217,195,142,.7); }

/* ----- ナビ：下線がすっと伸びる ----- */
.nav-links a:not(.btn) { position: relative; transition: color .3s, background-color .3s; }
.nav-links a:not(.btn)::before {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0); transition: transform .45s var(--ease-out);
}
.nav-links a:not(.btn):hover::before, .nav-links a[aria-current="page"]::before { transform: scaleX(1); }
.logo > span { transition: transform .6s var(--ease-out); }
.logo:hover > span { transform: rotate(-20deg) scale(1.1); }

/* ----- カード・作品 ----- */
.card .thumb { transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.card .thumb img { transition: transform .9s var(--ease-out); }
.card:hover .thumb { transform: translateY(-6px); box-shadow: 0 18px 40px -18px rgba(217,195,142,.45); }
.card:hover .thumb img { transform: scale(1.05); }
.card-title { transition: color .3s; }
.card:hover .card-title { color: var(--accent); }
.novel-item { transition: transform .45s var(--ease-out), border-color .3s, box-shadow .45s var(--ease-out); }
.novel-item:hover { transform: translateY(-4px); box-shadow: 0 16px 36px -20px rgba(217,195,142,.5); }
.novel-item .cover img { transition: transform .9s var(--ease-out); }
.novel-item:hover .cover img { transform: scale(1.06); }
/* 「View all →」はボタンの形に（枠付き・押せる大きさ）。ホバーでゴールドに塗られる */
.section-head { align-items: center; }
.section-head > a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 22px; border: 1px solid var(--accent); border-radius: 999px; background: rgba(217,195,142,.08); color: var(--accent); text-decoration: none; transition: color .3s, background-color .3s, box-shadow .3s, transform .35s var(--ease-out); }
.section-head > a:hover { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -10px rgba(217,195,142,.8); transform: translateY(-1px); }

/* 見出しのきらめきアイコン */
.section-title > svg, .page-title > svg { animation: sparkle-spin 6s ease-in-out infinite; transform-origin: center; }
@keyframes sparkle-spin {
  0%, 70%, 100% { transform: rotate(0) scale(1); }
  80% { transform: rotate(90deg) scale(1.3); filter: drop-shadow(0 0 6px var(--accent)); }
  90% { transform: rotate(180deg) scale(1); }
}

/* ----- ヒーロー：読み込み時にふわっと現れる ----- */
.hero-text > * { animation: rise 1.1s var(--ease-out) both; }
.hero-text > :nth-child(1) { animation-delay: .15s; }
.hero-text > :nth-child(2) { animation-delay: .3s; }
.hero-text > :nth-child(3) { animation-delay: .45s; }
.hero-text > :nth-child(4) { animation-delay: .6s; }
/* 見出しは1行ずつ現れる（.4s 間隔）。ボタンは見出しが出終わってから */
.hero-text > .hero-title { animation: none; }
.hero-title .line { display: block; animation: rise 1s var(--ease-out) both; animation-delay: calc(.15s + var(--i) * .4s); }
.hero-text > .hero-actions { animation-delay: .9s; }
/* 右の絵はアニメーションさせず、最初から表示しておく */
.hero-visual .frame { box-shadow: 0 30px 80px -40px rgba(217,195,142,.45); }
.hero-moon { animation: fade 2s ease .4s both; }
.hero-constellation path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 2.4s var(--ease-out) 1s forwards; }
.hero-constellation circle { animation: pop .6s var(--ease-out) both; }
.hero-constellation circle:nth-of-type(1) { animation-delay: 1s; }
.hero-constellation circle:nth-of-type(2) { animation-delay: 1.3s; }
.hero-constellation circle:nth-of-type(3) { animation-delay: 1.6s; }
.hero-constellation circle:nth-of-type(4) { animation-delay: 1.9s; }
.hero-constellation circle:nth-of-type(5) { animation-delay: 2.2s; }
.hero-constellation circle.tw { animation: pop .6s var(--ease-out) both, tw 3.2s ease-in-out 2.8s infinite; }
.hero-constellation circle.tw2 { animation: pop .6s var(--ease-out) 1.6s both, tw 4.6s ease-in-out 2.8s infinite; }
.hero-constellation circle { transform-box: fill-box; transform-origin: center; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes frame-in { from { opacity: 0; transform: translateY(32px) scale(.96); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }

/* ----- スクロールで現れる（JS が .is-in を付ける） ----- */
.js-motion .reveal { opacity: 0; transform: translateY(28px); filter: blur(4px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), filter 1s var(--ease-out); }
.js-motion .reveal.is-in { opacity: 1; transform: none; filter: none; }
.divider path { stroke-dasharray: 340; stroke-dashoffset: 340; transition: stroke-dashoffset 2.2s var(--ease-out) .2s; }
.divider.is-in path, html:not(.js-motion) .divider path { stroke-dashoffset: 0; }

/* ----- ライトボックス ----- */
.lightbox[open] { animation: frame-in .6s var(--ease-out); }
.lightbox[open]::backdrop { animation: fade .4s ease; }
.lightbox.is-multi[open] .lightbox-img img { animation: rise .8s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + .15s); }

/* ----- 動きを減らす設定の人には止める ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sky { display: none; }
  .hero-constellation path, .divider path { stroke-dashoffset: 0; }
}

/* ===== ハンバーガーボタン・ドロワーメニュー（狭い画面だけ） ===== */
.menu-toggle, .drawer { display: none; }
@media (max-width: 900px) {
  .nav { flex-wrap: nowrap; padding-top: 14px; padding-bottom: 14px; }
  .nav > .nav-links { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: none; color: var(--text); cursor: pointer; }
  .menu-toggle-bar, .menu-toggle-bar::before, .menu-toggle-bar::after { display: block; width: 20px; height: 1.5px; border-radius: 2px; background: currentColor; }
  .menu-toggle-bar { position: relative; }
  .menu-toggle-bar::before, .menu-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .menu-toggle-bar::before { top: -6px; }
  .menu-toggle-bar::after { top: 6px; }
  .menu-toggle:hover { border-color: var(--accent); color: var(--accent); }

  .drawer { display: block; position: fixed; inset: 0; z-index: 100; pointer-events: none; }
  .drawer.is-open { pointer-events: auto; }
  .drawer-backdrop { position: absolute; inset: 0; background: rgba(5, 7, 11, .6); opacity: 0; transition: opacity .35s ease; }
  .drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(82vw, 340px); display: flex; flex-direction: column; gap: 24px; padding: calc(var(--wp-admin--admin-bar--height, 0px) + 20px) 24px 32px; overflow-y: auto; background: var(--bg-deep) url(../img/milkyway.webp) center / cover; border-left: 1px solid var(--line); box-shadow: -24px 0 60px -20px rgba(0, 0, 0, .6); transform: translateX(100%); transition: transform .45s var(--ease-out); }
  .drawer.is-open .drawer-backdrop { opacity: 1; }
  .drawer.is-open .drawer-panel { transform: none; }
  .drawer-close { align-self: flex-end; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: none; color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
  .drawer-close:hover { border-color: var(--accent); color: var(--accent); }
  .drawer-links { display: flex; flex-direction: column; gap: 4px; }
  .drawer-links a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-family: var(--font-en); font-style: italic; font-size: 26px; letter-spacing: .04em; }
  .drawer-links a[aria-current="page"] { color: var(--accent); }
  .drawer-links .btn { margin-top: 20px; justify-content: center; }
  /* 開いた瞬間、リンクが上から順にふわっと出る */
  .drawer-links > * { opacity: 0; transform: translateX(16px); transition: opacity .4s ease, transform .5s var(--ease-out); }
  .drawer.is-open .drawer-links > * { opacity: 1; transform: none; }
  .drawer.is-open .drawer-links > :nth-child(1) { transition-delay: .1s; }
  .drawer.is-open .drawer-links > :nth-child(2) { transition-delay: .15s; }
  .drawer.is-open .drawer-links > :nth-child(3) { transition-delay: .2s; }
  .drawer.is-open .drawer-links > :nth-child(4) { transition-delay: .25s; }
  .drawer.is-open .drawer-links > :nth-child(5) { transition-delay: .3s; }
  body.is-drawer-open { overflow: hidden; }
}

/* ===== Story を読むページ：読書に集中できるよう背景を真っ黒に（星空・天の川・流れ星を消す） ===== */
body.single-novel { background-color: #000; }
body.single-novel::before, body.single-novel::after, body.single-novel .sky { display: none; }
body.single-novel .site-header.is-scrolled { background: rgba(0, 0, 0, .92); }

/* ===== お知らせ：アイキャッチ付きの一覧 ===== */
.news-list { gap: 12px; }
.news-list .news-item { display: flex; align-items: center; gap: 20px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(23, 28, 38, .6); color: var(--text); font-weight: 400; transition: border-color .3s, background-color .3s, transform .35s var(--ease-out); }
.news-list .news-item:hover { color: var(--text); border-color: var(--accent); background: rgba(23, 28, 38, .9); transform: translateY(-2px); }
.news-item .thumb { flex: 0 0 160px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface); }
.news-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-item .thumb-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--accent); opacity: .6; }
.news-item .thumb-fallback svg { width: 28px; height: 28px; }
.news-item .body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.news-item .title { font-weight: 700; line-height: 1.6; }
.news-item:hover .title { color: var(--accent); }
@media (max-width: 600px) {
  .news-list .news-item { gap: 14px; padding: 10px; }
  .news-item .thumb { flex-basis: 112px; }
}

/* ===== トップページの Blog：3列のカード ===== */
.blog-list.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.blog-list.is-grid .blog-item { flex-direction: column; gap: 14px; transition: border-color .3s, transform .35s var(--ease-out); }
.blog-list.is-grid .blog-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.blog-list.is-grid .blog-item .thumb { flex: none; width: 100%; }
.blog-list.is-grid .blog-item .body { flex: none; }

/* ===== 画像の保存対策（JS の右クリック禁止とセット）
   ドラッグで持ち出せない・スマホの長押しメニュー（画像を保存）を出さない・選択できない ===== */
img { -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* ===== 透かし（© merry-badend.com）：画像の上に斜めに敷き詰めて重ねる
   元画像はそのまま。クリックや右クリック禁止の判定は下の画像に通す ===== */
.thumb, .cover, .reader-cover, .lightbox-img, .hero-visual .frame:not(.is-cutout),
.novel-body figure, .entry-content figure { position: relative; }
.thumb::after, .cover::after, .reader-cover::after, .lightbox-img::after, .hero-visual .frame:not(.is-cutout)::after,
.novel-body figure::after, .entry-content figure::after, .lightbox-zoom[open]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url(../img/watermark.svg) 0 0 / 280px 180px repeat;
}
.lightbox-zoom[open]::after { position: fixed; }
.thumb-count { z-index: 2; }
/* 画像が入っていない枠（月のアイコン・案内枠）には透かしを出さない */
.thumb:has(> .thumb-fallback, > .placeholder)::after, .cover:has(> .placeholder)::after, .reader-cover:not(:has(img))::after { display: none; }
