/*
Theme Name: Market Voices
Theme URI: https://market-voices.com/
Description: 「米国株・世界経済そんなん知らんがなニュース」専用テーマ。要人の発言をふきだしで、筆者の創作「心の声」を点線のもくもくで見分けられるようにしています。
Version: 1.5.10
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: market-voices
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ---------- 共通 ---------- */
:root {
	--mv-radius: 16px;
	--mv-border: 2px solid var(--wp--preset--color--ink);
}

.mv-chip {
	display: inline-block;
	background: var(--wp--preset--color--navy);
	color: #fff;
	padding: 4px 14px;
	border-radius: 8px;
}

/* ---------- ヘッダー ---------- */
.mv-header .wp-block-site-title a { color: #fff; text-decoration: none; }
.mv-header .wp-block-navigation a,
.mv-header .wp-block-navigation a:link,
.mv-header .wp-block-navigation a:visited {
	display: inline-block;
	color: var(--wp--preset--color--ink) !important;
	padding: 8px 16px;
	background: #fff;
	color: var(--wp--preset--color--ink);
	border: 2px solid var(--wp--preset--color--navy);
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
}
.mv-header .wp-block-navigation .mv-nav-x a {
	background: var(--wp--preset--color--navy);
	color: #fff !important;
	border-color: #fff;
}
.mv-header .wp-block-navigation a:hover { background: var(--wp--preset--color--pale); }
.mv-header .wp-block-navigation .mv-nav-x a:hover { background: var(--wp--preset--color--ink); }
.mv-header .wp-block-navigation__responsive-container-open,
.mv-header .wp-block-navigation__responsive-container-close { color: #fff; }
.mv-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--primary); }

/* ---------- 大きいふきだし（トップの今週いちばん） ---------- */
.mv-hero-bubble {
	background: #fff;
	border: 3px solid var(--wp--preset--color--ink);
	border-radius: 18px;
	box-shadow: 6px 6px 0 var(--wp--preset--color--primary);
	position: relative;
}
.mv-hero-bubble .wp-block-post-excerpt__excerpt {
	font-size: clamp(20px, 2.6vw, 30px);
	font-weight: 900;
	line-height: 1.55;
	margin: 0;
}
.mv-hero-bubble .wp-block-post-excerpt__more-text { margin-top: 1em; }

/* 今週のひとこと：見出しと話者の名前はふきだしの外、ふきだしの中は発言だけ */
.mv-hero .mv-hero-topic { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--wp--preset--color--navy); }
.mv-hero .mv-hero-name { margin: 0 0 16px; font-size: 18px; font-weight: 900; }
.mv-hero-says { padding: 24px 32px; }
.mv-hero-says::before {
	content: "";
	position: absolute;
	left: 28px; top: -12px;
	width: 18px; height: 18px;
	background: #fff;
	border-left: 3px solid var(--wp--preset--color--ink);
	border-top: 3px solid var(--wp--preset--color--ink);
	transform: rotate(45deg);
}

/* ---------- カード（過去の週） ---------- */
.mv-card {
	background: #fff;
	border: var(--mv-border);
	border-radius: var(--mv-radius);
	height: 100%;
	box-sizing: border-box;
}
.mv-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.mv-card:hover { box-shadow: 3px 3px 0 var(--wp--preset--color--primary); }

/* ---------- トピック別（創作）カード ---------- */
.mv-sosaku-label { color: var(--wp--preset--color--muted); margin: 0; }
/* 枠は他のカードと同じ実線（点線は記事の中の創作のひとことだけに使う） */
.mv-card-sosaku {
	border-radius: 12px;
}
.mv-sosaku-badge {
	display: inline-block;
	margin: 0;
	padding: 0 10px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.9;
	color: var(--wp--preset--color--muted);
	background: #fff;
	border: 1.5px dashed var(--wp--preset--color--muted);
	border-radius: 999px;
}

/* カード全体をリンクにする（タイトルのリンクを枠いっぱいに広げる） */
.mv-card { position: relative; cursor: pointer; }
.mv-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.mv-hero-bubble { cursor: pointer; }
.mv-hero-bubble .wp-block-post-excerpt__more-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

/* ---------- 人物で読む（写真を横長で大きく） ---------- */
.mv-people .wp-block-post-template { gap: 16px; }
.mv-person {
	background: #fff;
	border: var(--mv-border);
	border-radius: var(--mv-radius);
	overflow: hidden;
	height: 100%;
	box-sizing: border-box;
}
.mv-person:hover { box-shadow: 4px 4px 0 var(--wp--preset--color--primary); }
.mv-person .wp-block-post-featured-image { margin: 0; }
.mv-person .wp-block-post-featured-image img {
	display: block; width: 100%; height: auto; object-fit: cover;
	border-bottom: var(--mv-border);
}
.mv-person .wp-block-post-title { font-size: 15px; line-height: 1.5; margin: 0; }
.mv-person .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }

/* ---------- 人物記事：アイキャッチを大きく ---------- */
.mv-hero-image { display: none; }
.mv-cat-people .mv-hero-image {
	display: block;
	border: 3px solid var(--wp--preset--color--ink);
	border-radius: 24px;
	box-shadow: 6px 6px 0 var(--wp--preset--color--primary);
	overflow: hidden;
}
.mv-cat-people .mv-hero-image img { display: block; width: 100%; height: auto; }
.mv-cat-people .mv-avatar { display: none; }

/* ---------- 人物一覧ページ ---------- */
.mv-pindex [hidden] { display: none !important; }
.mv-pindex-search { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mv-pindex-search label { font-size: 13px; font-weight: 700; }
.mv-pindex-search input {
	flex: 1 1 240px; max-width: 360px; padding: 10px 16px;
	border: 2px solid var(--wp--preset--color--ink); border-radius: 999px;
	font: inherit; font-size: 14px;
}
.mv-pindex-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mv-pindex-chips a {
	padding: 8px 16px; background: var(--wp--preset--color--pale);
	border: 2px solid var(--wp--preset--color--primary); border-radius: 999px;
	color: var(--wp--preset--color--navy); font-weight: 700; font-size: 13px; text-decoration: none;
}
.mv-pindex-chips a:hover { background: var(--wp--preset--color--light); }
.mv-pindex-group { margin-top: 40px; scroll-margin-top: 80px; }
.mv-pindex-group h2 {
	font-size: 22px; color: var(--wp--preset--color--navy); margin: 0;
	border-bottom: 3px solid var(--wp--preset--color--light); padding-bottom: 6px;
}
.mv-pindex-group h2 span { font-size: 13px; font-weight: 500; color: var(--wp--preset--color--muted); margin-left: 8px; }
.mv-pindex-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 12px; margin-top: 14px;
}
.mv-pindex-card {
	display: block; background: #fff; border: var(--mv-border); border-radius: 14px;
	overflow: hidden; color: var(--wp--preset--color--ink); text-decoration: none;
}
.mv-pindex-card:hover { box-shadow: 3px 3px 0 var(--wp--preset--color--primary); }
.mv-pindex-photo { display: block; aspect-ratio: 4 / 3; background: var(--wp--preset--color--light); border-bottom: var(--mv-border); }
.mv-pindex-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mv-pindex-name { display: block; padding: 8px 10px 10px; font-weight: 700; font-size: 14px; line-height: 1.5; }
.mv-pindex-none { margin-top: 24px; color: var(--wp--preset--color--muted); }

/* ---------- 読み方ボックス ---------- */
.mv-guide { border-radius: var(--mv-radius); }

/* ---------- 記事本文（自動で付くクラス・ブロックスタイル共通） ---------- */
.entry-content { line-height: 1.9; }

/* Bloggerから移した記事の空行（中身のない段落）で隙間が空かないようにする */
.entry-content div:empty,
.entry-content p:empty { display: none; }

/* ■見出し */
.entry-content .mv-section {
	font-weight: 900;
	font-size: 1.1em;
	color: var(--wp--preset--color--navy);
	border-bottom: 3px solid var(--wp--preset--color--light);
	padding-bottom: 4px;
	margin-top: 2em;
}

/* 第○週（○/○〜○） */
.entry-content .mv-empty { display: none; }

.entry-content .mv-week {
	display: table;
	margin-left: 0 !important;
	margin-right: auto !important;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-weight: 700;
	padding: 2px 14px;
	border-radius: 999px;
	margin-top: 2em;
}
.entry-content .mv-month {
	font-weight: 900;
	font-size: 1.3em;
	border-left: 0;
	margin-top: 1.5em;
}

/* 発言ふきだし */
.entry-content .mv-quote,
.entry-content .is-style-mv-quote {
	background: #fff;
	border: var(--mv-border);
	border-radius: var(--mv-radius);
	padding: 12px 18px;
	margin: 10px 0;
	position: relative;
}
.entry-content .mv-quote::before,
.entry-content .is-style-mv-quote::before {
	content: "";
	position: absolute;
	left: 22px; top: -10px;
	width: 16px; height: 16px;
	background: #fff;
	border-left: var(--mv-border);
	border-top: var(--mv-border);
	transform: rotate(45deg);
}
/* 名前「発言」の名前（ふきだしの外・上） */
.entry-content .mv-speaker { margin: 18px 0 0; font-size: 15px; font-weight: 900; color: var(--wp--preset--color--navy); }
.entry-content .mv-quote b:first-child,
.entry-content .mv-quote strong:first-child { color: var(--wp--preset--color--navy); }

/* 創作のふきだし（形は発言と同じ・点線）：本文の div に class="mv-quote-sosaku" を付ける */
.entry-content .mv-quote.mv-quote-sosaku {
	background: var(--wp--preset--color--mist);
	border: 2px dashed var(--wp--preset--color--muted);
}
.entry-content .mv-quote.mv-quote-sosaku::before {
	background: var(--wp--preset--color--mist);
	border-left: 2px dashed var(--wp--preset--color--muted);
	border-top: 2px dashed var(--wp--preset--color--muted);
}

/* 心の声（創作） */
/* 形は発言のふきだしと同じ、枠だけ点線 */
.entry-content .mv-kokoro,
.entry-content .is-style-mv-kokoro {
	background: var(--wp--preset--color--mist);
	border: 2px dashed var(--wp--preset--color--muted);
	border-radius: var(--mv-radius);
	padding: 12px 18px;
	margin: 10px 0;
	position: relative;
}
.entry-content .mv-kokoro::before,
.entry-content .is-style-mv-kokoro::before {
	content: "";
	position: absolute;
	left: 22px; top: -10px;
	width: 16px; height: 16px;
	background: var(--wp--preset--color--mist);
	border-left: 2px dashed var(--wp--preset--color--muted);
	border-top: 2px dashed var(--wp--preset--color--muted);
	transform: rotate(45deg);
}

/* 出典リンク */
.entry-content a.mv-source {
	display: inline-block;
	margin-left: 8px;
	padding: 0 10px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.9;
	border: 1.5px solid var(--wp--preset--color--primary);
	border-radius: 999px;
	text-decoration: none;
	vertical-align: 2px;
}
.entry-content a.mv-source::after { content: " ↗"; }
.entry-content a.mv-source:hover { background: var(--wp--preset--color--pale); }
.entry-content .mv-source-line { margin: 4px 0 10px; }
.entry-content .mv-source-line a.mv-source { margin-left: 0; }

/* → この週のまとめ */
.entry-content .mv-backlink {
	font-size: 14px;
	background: var(--wp--preset--color--pale);
	border-radius: 10px;
	padding: 6px 14px;
	display: inline-block;
}

/* ---------- スマホ ---------- */
@media (max-width: 600px) {
	.mv-header .wp-block-navigation a { padding: 6px 12px; font-size: 13px; }
}

/* ---------- トップのリスト（過去のひとこと・相場の声・トピック） ---------- */
.mv-list { list-style: none; margin: 8px 0 0 !important; padding: 0; }
.mv-list > li { margin: 0 !important; padding: 6px 2px; }
.mv-list .wp-block-post-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.5; }
.mv-list .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.mv-list .wp-block-post-title a:hover { color: var(--wp--preset--color--primary); text-decoration: underline; }
.mv-markets-top .mv-mindex { display: block; margin-top: 8px; }
.mv-markets-top .mv-mindex-card {
	display: flex; gap: 12px; align-items: baseline;
	height: auto; padding: 6px 2px; margin: 0;
	background: none; border: 0; border-radius: 0;
	box-shadow: none !important; color: var(--wp--preset--color--ink); text-decoration: none;
}
.mv-markets-top .mv-mindex-name { flex: 0 0 auto; font-size: 16px; font-weight: 700; }
.mv-markets-top .mv-mindex-line { min-width: 0; font-size: 14px; color: var(--wp--preset--color--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-markets-top .mv-mindex-card:hover .mv-mindex-name { color: var(--wp--preset--color--primary); text-decoration: underline; }


/* 記事タイトル左の丸いアイキャッチ：スマホで横に縮んで楕円にならないよう幅を固定 */
.mv-avatar.wp-block-post-featured-image { flex: 0 0 88px; width: 88px; height: 88px; }
.mv-avatar.wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }


/* スマホのメニュー：ヘッダーを残し、その下に青いパネルで開く */
.mv-header { position: relative; }
@media (max-width: 599px) {
	.mv-header .wp-block-navigation { position: static; }
	.mv-header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open {
		position: absolute; top: 100%; left: 0; right: 0; bottom: auto; height: auto; min-height: 0;
		padding: 12px 20px 24px; background-color: var(--wp--preset--color--primary) !important; color: #fff !important;
		border-bottom: 3px solid var(--wp--preset--color--navy); box-shadow: 0 8px 16px rgba(15, 42, 77, .25); z-index: 1000;
	}
	.mv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close,
	.mv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog { margin: 0; padding: 0; max-width: none; }
	.mv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { top: 0; right: 0; }
	.mv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 36px; align-items: stretch; }
	.mv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 10px; align-items: stretch; width: 100%; }
	.mv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; }
	.mv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
		display: block; width: 100%; box-sizing: border-box; padding: 12px 18px; font-size: 16px; line-height: 1.4;
		background: #fff; color: var(--wp--preset--color--ink); border: 2px solid var(--wp--preset--color--navy); border-radius: 999px;
	}
	.mv-header .wp-block-navigation__responsive-container.is-menu-open .mv-nav-x a { background: var(--wp--preset--color--navy); color: #fff; }
}
