/*
Theme Name: YOKOPOOWORK
Theme URI: https://misumiyoko.com/
Description: イラストレーター ミスミヨーコのサイト用テーマ。Twenty Twenty-Five の子テーマです。
Author: ミスミヨーコ
Template: twentytwentyfive
Version: 0.1.9
Requires at least: 6.7
Requires PHP: 7.4
Text Domain: yokopoowork
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* 見た目の調整はこのファイルに書きます（親テーマのファイルは編集しません）。 */

/* 作品画像：透過PNGが多いため、切り抜かず全体を見せる */
.yw-work-image img {
	object-fit: contain;
	background: var(--wp--preset--color--sky-soft);
}

/* 見出しの折り返しを自然に */
h1, h2, h3 {
	text-wrap: balance;
}

/* 日本語の見出しを、語の途中で折り返さない（対応ブラウザのみ） */
h1, h2, h3 {
	word-break: auto-phrase;
}

/* 作品カード */
.yw-card {
	background: var(--wp--preset--color--surface);
	border-radius: 12px;
	padding: 0.8rem 0.9rem 1.1rem;
	height: 100%;
}

.yw-card .wp-block-post-title {
	margin: 0.5rem 0 0;
	line-height: 1.6;
}

.yw-card .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.yw-card .wp-block-post-title a:hover,
.yw-card .wp-block-post-title a:focus {
	text-decoration: underline;
}

/* 仕事の種類はラベル風に、制作年は控えめに */
.yw-card .taxonomy-yw_work_type {
	margin: 0.7rem 0 0;
}

.yw-card .taxonomy-yw_work_type a {
	display: inline-block;
	background: var(--wp--preset--color--sky-soft);
	color: var(--wp--preset--color--sky);
	border-radius: 999px;
	padding: 2px 10px;
	text-decoration: none;
}

.yw-card .taxonomy-yw_work_year {
	margin: 0.4rem 0 0;
	color: var(--wp--preset--color--muted);
}

.yw-card .taxonomy-yw_work_year a {
	color: inherit;
	text-decoration: none;
}

/* フッターのリンク */
.yw-footer-list {
	list-style: none;
	padding-left: 0;
}

.yw-footer-list a {
	color: var(--wp--preset--color--paper);
	text-decoration: none;
	box-shadow: inset 0 -1px 0 rgba(250, 248, 243, 0.4);
}

.yw-footer-list a:hover,
.yw-footer-list a:focus {
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--leaf);
}

/* ヘッダーのサイト名 */
.wp-block-site-title a {
	text-decoration: none;
}

/* お問い合わせ案内とフッターの間にすき間を作らない */
.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* プロフィールの表 */
.yw-profile-table table {
	border-collapse: collapse;
}

.yw-profile-table td {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 0.9rem 0.5rem;
	vertical-align: top;
}

.yw-profile-table td:first-child {
	width: 7.5em;
	font-family: var(--wp--preset--font-family--maru);
	color: var(--wp--preset--color--sky);
	white-space: nowrap;
}

/* お問い合わせフォーム（Contact Form 7） */
.wpcf7-form {
	display: grid;
	gap: 1.1rem;
	max-width: 36rem;
}

.wpcf7-form p {
	margin: 0;
}

.wpcf7-form label {
	display: grid;
	gap: 0.4rem;
	font-size: 0.9rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form select,
.wpcf7-form textarea {
	box-sizing: border-box;
	width: 100%;
	font: inherit;
	font-size: 1rem;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
}

.wpcf7-form textarea {
	min-height: 10rem;
}

.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
	outline: 2px solid var(--wp--preset--color--sky);
	outline-offset: 1px;
}

.wpcf7-form input[type="submit"] {
	justify-self: start;
	font-family: var(--wp--preset--font-family--maru);
	font-size: 1rem;
	padding: 0.8rem 2rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	cursor: pointer;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form input[type="submit"]:focus {
	background: var(--wp--preset--color--sky);
}

.wpcf7-not-valid-tip {
	font-size: 0.8rem;
}

/* 日記の前後リンク */
.yw-post-nav a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.yw-post-nav a:hover,
.yw-post-nav a:focus {
	text-decoration: underline;
}

/* 見出し横の DIARY リンク */
p.has-maru-font-family > a[href="/diary/"] {
	color: inherit;
	text-decoration: none;
}

/* ヘッダー：サイト名と一文の揃え（.yw-header-fix） */
header .wp-block-site-title {
	margin: 0;
}

header .wp-block-site-tagline {
	white-space: nowrap;
}

/* トップのあいさつ：絵の高さを左の文章の高さにそろえる */
.is-layout-constrained > .yw-hero-columns {
	max-width: 1080px;
	margin-inline: auto;
}

.yw-hero-columns {
	align-items: stretch;
}

@media (min-width: 782px) {
	.yw-hero-art {
		position: relative;
	}

	.yw-hero-art .wp-block-image {
		position: absolute;
		inset: 0;
		margin: 0;
	}

	.yw-hero-art .wp-block-image img {
		width: 100%;
		height: 100%;
		object-fit: contain;
		object-position: center;
	}
}

/* トップのイラスト日記：小さな絵だけを並べる */
.yw-diary-thumbs .wp-block-post-template {
	grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
	gap: 0.75rem;
}

.yw-diary-thumb {
	margin: 0;
}

.yw-diary-thumb img {
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--line);
	transition: transform 0.2s ease;
}

.yw-diary-thumb a:hover img,
.yw-diary-thumb a:focus img {
	transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
	.yw-diary-thumb img {
		transition: none;
	}
}

@media (max-width: 599px) {
	.yw-diary-thumbs .wp-block-post-template {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}
