/*
Theme Name: 月と羅針盤 (Moon & Compass)
Theme URI: https://example.com/moon-compass
Author: Kanata Kirihara
Description: ファンタジー小説と創作日記のための、文学的・クラシックなWordPressテーマ。カスタム投稿タイプ「小説(novel)」「各話(chapter)」に対応。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: moon-compass
*/

/* ============ base ============ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #f4eede;
  color: #2b2620;
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: #d9c39a; color: #2b2620; }
img { max-width: 100%; height: auto; }
.mc-serif { font-family: 'Shippori Mincho B1', serif; }
.mc-roman { font-family: 'Cormorant Garamond', serif; }
.mc-wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.mc-narrow { max-width: 820px; margin: 0 auto; padding: 0 32px; }
.mc-reader { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ============ header ============ */
.mc-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,238,222,0.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid #ded2b6;
}
.mc-header-inner { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.mc-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.mc-logo { width: 40px; height: 40px; border: 1.5px solid #8a6d3f; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; flex: none; }
.mc-logo::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: #a8895f; }
.mc-logo::after { content: ""; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #8a6d3f; top: 6px; right: 8px; }
.mc-brand-name { font-family: 'Shippori Mincho B1', serif; font-weight: 700; font-size: 22px; letter-spacing: 0.14em; line-height: 1; }
.mc-brand-sub { font-family: 'Cormorant Garamond', serif; font-size: 11px; letter-spacing: 0.32em; color: #9a8c72; text-transform: uppercase; margin-top: 4px; }
.mc-nav { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.mc-nav a { padding: 9px 16px; font-size: 15px; letter-spacing: 0.06em; text-decoration: none; color: #6f6656; border-radius: 2px; }
.mc-nav .current-menu-item a, .mc-nav a:hover { color: #2b2620; background: #e8dcc0; }

/* ============ buttons / badges ============ */
.mc-btn { display: inline-block; background: #2b2620; color: #f4eede; padding: 14px 30px; font-size: 15px; letter-spacing: 0.1em; border-radius: 2px; text-decoration: none; border: none; cursor: pointer; font-family: 'Noto Serif JP', serif; }
.mc-btn-ghost { display: inline-block; border: 1px solid #b7a482; color: #5a5140; padding: 13px 28px; font-size: 15px; letter-spacing: 0.1em; border-radius: 2px; text-decoration: none; }
.mc-badge { display: inline-block; font-size: 11px; letter-spacing: 0.12em; padding: 3px 10px; border-radius: 2px; }
.mc-badge.on { background: #e8dcc0; color: #8a6d3f; }
.mc-badge.done { background: #e2e2dc; color: #7a7266; }
.mc-cat { display: inline-block; font-size: 11px; letter-spacing: 0.14em; color: #8a6d3f; border: 1px solid #d8c9a6; padding: 3px 10px; border-radius: 2px; }
.mc-muted { color: #9a8c72; font-size: 13px; }
.mc-dot { color: #b7a482; }

/* ============ hero ============ */
.mc-hero { text-align: center; padding: 88px 32px 64px; max-width: 1120px; margin: 0 auto; }
.mc-hero-eyebrow { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 20px; color: #a8895f; letter-spacing: 0.06em; margin-bottom: 22px; }
.mc-hero h1 { font-family: 'Shippori Mincho B1', serif; font-weight: 800; font-size: 56px; line-height: 1.5; letter-spacing: 0.06em; margin: 0 auto; max-width: 760px; }
.mc-hero p { max-width: 560px; margin: 28px auto 0; color: #6f6656; font-size: 17px; }
.mc-hero-actions { display: flex; gap: 16px; justify-content: center; margin-top: 40px; }

/* ============ section head ============ */
.mc-sec-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid #ded2b6; padding-bottom: 16px; margin-bottom: 40px; }
.mc-sec-head h2 { font-family: 'Shippori Mincho B1', serif; font-weight: 700; font-size: 26px; letter-spacing: 0.1em; margin: 0; }
.mc-sec-head .label { font-family: 'Cormorant Garamond', serif; letter-spacing: 0.24em; color: #9a8c72; font-size: 13px; text-transform: uppercase; }

/* ============ works grid ============ */
.mc-works { display: grid; grid-template-columns: repeat(3,1fr); gap: 36px 32px; }
.mc-work-card { text-decoration: none; color: inherit; display: block; }
.mc-cover { border-radius: 3px; padding: 24px 20px 28px; text-align: center; aspect-ratio: 3/4; display: flex; flex-direction: column; align-items: center; box-shadow: 0 14px 30px -18px rgba(43,38,32,0.7); color: #f0e9d8; overflow: hidden; }
.mc-cover .roman { font-family: 'Cormorant Garamond', serif; font-size: 12px; letter-spacing: 0.3em; opacity: 0.7; text-transform: uppercase; flex: none; }
.mc-cover .vtitle {
	font-family: 'Shippori Mincho B1', serif;
	font-weight: 700;
	font-size: 27px;
	line-height: 1.6;
	letter-spacing: 0.08em;
	writing-mode: vertical-rl;
	text-orientation: mixed;
	white-space: nowrap;
	word-break: keep-all;
	overflow-wrap: normal;
	margin: 16px auto 0;
	flex: 1;
	min-height: 0;
	max-height: 100%;
	display: flex;
	align-items: center;
}
/* 長いタイトルはやや小さめのフォントに自動調整 */
.mc-cover .vtitle[data-len="long"] { font-size: 21px; }
.mc-cover .vtitle[data-len="verylong"] { font-size: 16px; }
.mc-cover-1 { background: linear-gradient(160deg,#3a4a42,#26332d); }
.mc-cover-2 { background: linear-gradient(160deg,#5a3f3a,#3a2622); }
.mc-cover-3 { background: linear-gradient(160deg,#3f4258,#282a3a); }
.mc-cover-4 { background: linear-gradient(160deg,#5a4d34,#38301f); }
.mc-cover-5 { background: linear-gradient(160deg,#2f4750,#1f3138); }
.mc-cover-0 { background: linear-gradient(160deg,#4a3a52,#2e2436); }
.mc-work-meta { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.mc-work-card h3 { font-family: 'Shippori Mincho B1', serif; font-weight: 700; font-size: 20px; letter-spacing: 0.06em; margin: 8px 0 6px; }
.mc-work-card p { color: #6f6656; font-size: 14.5px; line-height: 1.85; margin: 0; }

/* ============ single novel ============ */
.mc-work-hero { background: linear-gradient(180deg,#efe7d3,#f4eede); border-bottom: 1px solid #e2d7bd; }
.mc-work-hero-inner { padding: 56px 32px 60px; display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; max-width: 1120px; margin: 0 auto; }
.mc-back { color: #9a8c72; font-size: 13px; letter-spacing: 0.08em; text-decoration: none; }
.mc-work-hero h1 { font-family: 'Shippori Mincho B1', serif; font-weight: 800; font-size: 42px; letter-spacing: 0.06em; margin: 0 0 8px; }
.mc-work-hero .roman { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 19px; color: #a8895f; margin-bottom: 24px; }
.mc-work-hero .synopsis { color: #5a5140; font-size: 16px; line-height: 2; max-width: 600px; margin: 0 0 28px; }
.mc-toc a { display: flex; align-items: center; gap: 22px; padding: 20px 8px; border-bottom: 1px solid #e6dcc4; text-decoration: none; color: inherit; }
.mc-toc .num { font-family: 'Cormorant Garamond', serif; font-size: 26px; color: #c0ad89; width: 44px; flex: none; }
.mc-toc .ct { font-family: 'Shippori Mincho B1', serif; font-weight: 600; font-size: 18px; letter-spacing: 0.04em; }
.mc-toc .arrow { color: #b7a482; font-size: 18px; }

/* ============ reader ============ */
.mc-reader-body { background: #f7f2e6; }
.mc-reader-bar { position: sticky; top: 78px; z-index: 40; background: rgba(247,242,230,0.9); backdrop-filter: blur(8px); border-bottom: 1px solid #e2d7bd; }
.mc-reader-bar-inner { max-width: 760px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mc-reader-bar .wt { font-family: 'Shippori Mincho B1', serif; font-size: 14px; color: #5a5140; letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-fbtn { width: 32px; height: 32px; border: 1px solid #cbbfa6; background: #fffdf8; border-radius: 4px; cursor: pointer; color: #5a5140; }
.mc-article { max-width: 760px; margin: 0 auto; padding: 64px 24px 40px; }
.mc-article-head { text-align: center; margin-bottom: 56px; }
.mc-article-head .cnum { font-family: 'Cormorant Garamond', serif; font-size: 15px; color: #a8895f; letter-spacing: 0.18em; }
.mc-article-head h1 { font-family: 'Shippori Mincho B1', serif; font-weight: 700; font-size: 32px; letter-spacing: 0.08em; margin: 14px 0 0; }
.mc-rule { width: 44px; height: 1px; background: #c0ad89; margin: 28px auto 0; }
.mc-prose { font-size: 18px; line-height: 2.15; color: #332e26; letter-spacing: 0.02em; }
.mc-prose p { margin: 0 0 1.6em; text-indent: 1em; }
.mc-chapter-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 72px; padding-top: 32px; border-top: 1px solid #e2d7bd; }

/* ============ blog ============ */
.mc-blog-head { text-align: center; margin-bottom: 56px; }
.mc-blog-head .it { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 19px; color: #a8895f; }
.mc-blog-head h1 { font-family: 'Shippori Mincho B1', serif; font-weight: 800; font-size: 40px; letter-spacing: 0.08em; margin: 14px 0 0; }
.mc-post { display: grid; grid-template-columns: 120px 1fr; gap: 32px; padding: 36px 0; border-bottom: 1px solid #ded2b6; }
.mc-post-date { text-align: right; }
.mc-post-date .d { font-family: 'Cormorant Garamond', serif; font-size: 40px; line-height: 1; color: #2b2620; }
.mc-post-date .m { font-family: 'Cormorant Garamond', serif; letter-spacing: 0.2em; color: #9a8c72; font-size: 13px; text-transform: uppercase; margin-top: 4px; }
.mc-post h2 { font-family: 'Shippori Mincho B1', serif; font-weight: 700; font-size: 23px; letter-spacing: 0.04em; margin: 12px 0 10px; }
.mc-post h2 a { text-decoration: none; }
.mc-post p { color: #6f6656; font-size: 15px; line-height: 1.95; margin: 0 0 14px; }
.mc-readmore { color: #8a6d3f; font-size: 14px; letter-spacing: 0.06em; text-decoration: none; }

/* ============ profile ============ */
.mc-prof-head { display: grid; grid-template-columns: 180px 1fr; gap: 48px; align-items: center; margin-bottom: 56px; }
.mc-avatar { width: 180px; height: 180px; border-radius: 50%; background: repeating-linear-gradient(45deg,#e7dcc2,#e7dcc2 8px,#ede4cd 8px,#ede4cd 16px); border: 1px solid #d8c9a6; display: flex; align-items: center; justify-content: center; font-family: 'Cormorant Garamond', monospace; font-size: 12px; color: #a89873; letter-spacing: 0.1em; overflow: hidden; }
.mc-prof-head h1 { font-family: 'Shippori Mincho B1', serif; font-weight: 800; font-size: 38px; letter-spacing: 0.1em; margin: 8px 0 6px; }
.mc-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin: 48px 0; }
.mc-stat { text-align: center; padding: 28px 16px; background: #fffdf8; border: 1px solid #e6dcc4; border-radius: 3px; }
.mc-stat .n { font-family: 'Cormorant Garamond', serif; font-size: 38px; color: #8a6d3f; }
.mc-stat .l { color: #9a8c72; font-size: 13px; letter-spacing: 0.08em; margin-top: 4px; }
.mc-timeline-row { display: flex; gap: 20px; padding: 10px 0; }
.mc-timeline-row .y { font-family: 'Cormorant Garamond', serif; color: #a8895f; font-size: 16px; width: 56px; flex: none; }

/* ============ contact / forms ============ */
.mc-form { background: #fffdf8; border: 1px solid #e6dcc4; border-radius: 4px; padding: 40px; }
.mc-field { margin-bottom: 24px; }
.mc-field label { display: block; font-size: 13px; letter-spacing: 0.08em; color: #7a7061; margin-bottom: 8px; }
.mc-field input, .mc-field textarea { width: 100%; padding: 12px 14px; border: 1px solid #d8c9a6; background: #faf6ec; border-radius: 3px; font-family: 'Noto Serif JP', serif; font-size: 15px; color: #2b2620; }
.mc-field textarea { resize: vertical; }
.mc-form .mc-btn { width: 100%; padding: 15px; letter-spacing: 0.14em; }

/* ============ footer ============ */
.mc-footer { background: #2b2620; color: #cfc4ad; margin-top: 40px; }
.mc-footer-inner { padding: 56px 32px 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; max-width: 1120px; margin: 0 auto; }
.mc-footer-name { font-family: 'Shippori Mincho B1', serif; font-weight: 700; font-size: 20px; letter-spacing: 0.14em; color: #f4eede; }
.mc-footer-sub { font-family: 'Cormorant Garamond', serif; font-size: 12px; letter-spacing: 0.3em; color: #a8895f; margin-top: 6px; text-transform: uppercase; }
.mc-footer p { font-size: 13px; color: #8f8672; margin-top: 16px; max-width: 280px; line-height: 1.8; }
.mc-footer-col-title { font-size: 12px; letter-spacing: 0.16em; color: #8f8672; text-transform: uppercase; margin-bottom: 14px; }
.mc-footer-menu { list-style: none; margin: 0; padding: 0; }
.mc-footer-menu a { display: block; color: #cfc4ad; font-size: 14px; padding: 5px 0; text-decoration: none; }
.mc-footer-bottom { border-top: 1px solid #3d372e; }
.mc-footer-bottom div { max-width: 1120px; margin: 0 auto; padding: 20px 32px; font-family: 'Cormorant Garamond', serif; font-size: 12px; letter-spacing: 0.16em; color: #7a7261; }

/* ============ responsive ============ */
@media (max-width: 900px) {
  .mc-works { grid-template-columns: repeat(2,1fr); }
  .mc-work-hero-inner { grid-template-columns: 1fr; }
  .mc-prof-head { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .mc-hero h1 { font-size: 40px; }
}
@media (max-width: 600px) {
  .mc-works { grid-template-columns: 1fr; }
  .mc-nav { gap: 0; }
  .mc-nav a { padding: 8px 10px; font-size: 13px; }
  .mc-post { grid-template-columns: 1fr; }
  .mc-post-date { text-align: left; }
  .mc-stats { grid-template-columns: 1fr; }
}
