/**
 * トップページ専用スタイル
 * 各 parts/*.php に直書きされていた <style> ブロックをここに集約。
 * functions.php から is_front_page() 時のみ enqueue される。
 */

/* === front-page.php === */
.home .l-content {
	margin: 0;
	padding: 0;
	max-width: 100%;
}
.banner-area {
	display: flex;
	flex-wrap: wrap;
	padding: 3rem;
	margin: auto;
	width: 100%;
	justify-content: center;
	align-items: center;
	align-content: center;
}
.banner-area.area1 img {
	width: 740px;
}
/* [placement_blocks] / [adsense-square] の並び（area1・area2 以外）は
   アップロードされる画像の実サイズがまちまちなため、表示幅を統一する */
.banner-area:not(.area1):not(.area2) .placement-blocks img,
.banner-area:not(.area1):not(.area2) > .card-hover {
	width: 300px;
	height: auto;
}
@media (max-width: 768px) {
	.banner-area {
		flex-wrap: wrap;
		padding: 3rem 0;
	}
	.banner-area.area1 img {
		width: 100%;
	}
	/* 2カラムで画面いっぱいに敷き詰める */
	.placement-blocks,
	.banner-area:not(.area1):not(.area2) > .card-hover {
		width: 50%;
	}
	.banner-area:not(.area1):not(.area2) .placement-blocks img {
		width: 100%;
		height: auto;
	}
}
.banner-area.area2 {
	display: flex;
	gap: 1rem;
	padding-top: 0;
	flex-wrap: wrap;
	padding-bottom: 6rem;
}
@media (max-width: 768px) {
	.banner-area.area2 {
		gap: 0rem;
		justify-content: space-between;
	}
}
.banner-area.area2 img {
	width: 300px;
}
@media (max-width: 768px) {
	.banner-area.area2 div {
		width: 50%;
	}
	.banner-area.area2 img {
		width: 100%;
		height: 100%;
	}
}

/* === parts/fv.php === */
.fv-scroll {
	position: relative;
}
.splide__slide {
	width: 28%;
	border-top: 2px solid #272936;
	border-bottom: 2px solid #272936;
	border-left: 2px solid #272936;
}
@media (max-width: 767px) {
	.splide__slide {
		width: 85%;
		min-height: 23rem;
	}
}
.slide-caption {
	padding: .5rem 1rem;
}
span.post-tag {
	font-size: .675rem;
	font-weight: bold;
	color: #d94440;
	border: 1px solid #d94440;
	border-radius: 2rem;
	padding: .1em .5em;
}
.slide-caption h3 {
	color: #272936;
	font-size: 1.25vw;
	line-height: 1.3;
}
@media (max-width: 767px) {
	.slide-caption h3 {
		font-size: 1.2rem;
	}
}
p.caption-text, .slide-caption time {
	color: #d94440;
	font-size: .75em;
	font-weight: bold;
}
/* ページネーション */
.fv-pagination {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	font-size: 14px;
	font-weight: bold;
	position: absolute;
	right: 0;
	bottom: 0;
}
.nav-btn {
	background-color: #272936;
	color: #fffdf6;
	padding: 4px 10px;
	font-size: 14px;
	cursor: pointer;
}
.page-count {
	background: #fffdf6;
	font-family: monospace;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 1rem
}
.nav-btn,.page-count {
	border: 2px solid #272936;
	height: 2.5rem;
}
.play-toggle {
	background: #fffdf6;
	color: #272936;
	border-left: none;
	border-right: none;
}

/* === parts/dento-category.php === */
/* ← ここにだけ効くようにクラス名スコープ化 */
.category-slider .splide__slide {
	text-align: center;
	margin-right: 0!important;
	min-height: auto;
	border-bottom: none;
	transition: .3s;
}
.category-slider li:hover {
	background: #eac546;
}
@media (min-width: 1024px) {
	#categorySplide .splide__slide {
		width: calc(100% / 15) !important;
		flex: 0 0 calc(100% / 15) !important;
	}
}
.category-slider .splide__slide a {
	text-decoration: none;
	color: #333;
	font-size: 0.8rem;
	font-weight: bold;
	line-height: 1.2;
	padding: .5rem;
	display: flex;
	flex-direction: column;
	align-items: center;
}
@media (max-width: 768px) {
	.category-slider .splide__slide a {
		font-size: 0.7rem;
	}
}
.category-slider .splide__slide img {
	width: 48px;
	height: 30px;
	margin-bottom: 0.3rem;
	transition: .3s;
}
@media (min-width: 768px) {
	.category-slider .splide__slide img {
		width: 54px;
		height: 36px;
	}
}
.category-slider .splide__slide:hover img {
	transform: rotatez(15deg);
}
/* 矢印ボタンの調整 */
#categorySplide .splide__arrow {
	background: #d94340;
	border: 1px solid #ccc;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	opacity: 1;
}
.splide__arrow svg {
	fill: #fffdf6;
	height: 1.2em;
	width: 1.2em;
}
#categorySplide .splide__arrow--prev {
	left: -0.5rem;
}
#categorySplide .splide__arrow--next {
	right: -0.5rem;
}
/* PC時は矢印非表示 */
@media (min-width: 1024px) {
	#categorySplide .splide__arrow {
		display: none !important;
	}
}

/* === parts/news-ticker.php === */
.main .swiper-slide {
	border: .5px solid #272936;
	border-top: 2px solid #272936;
	border-bottom: 2px solid #272936;
}
.news-wrapper {
	display: flex;
	overflow: hidden;
	white-space: nowrap;
	width: 100%;
	color: #fff;
	background: #d94440;
	border-top: 2px solid #000;
	font-weight: bold;
}
.news-wrapper div {
	padding: 0 2rem;
	animation: ticker 50s linear infinite;
}
@media (max-width: 767px) {
	.news-wrapper div {
		padding: .2rem 2rem;
	}
}
@keyframes ticker {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(-300%); }
}

/* parts/kaeru-logo-slider.php のスタイルは assets/css/global.css に移動
   (ドロワーメニュー内でも共用されるため、トップページ限定にできない) */

/* === parts/main-lists.php === */
@media (min-width: 768px) {
	.category-description {
		width: 50%;
	}
}
.splide.post-slider .splide__slide {
	width: 23%;
}
@media (max-width: 767px) {
	.splide.post-slider .splide__slide {
		width: 85%;
	}
}
.last-slide-right-space {
	margin-right:14vw!important;
}
.view-all-button-slide {
	display: block;
	text-decoration: none;
	color: inherit;
}
.view-all-button-slide .button {
	display: inline-block;
	padding: 1rem 2rem;
	background: #f4c542;
	border-radius: 6px;
	text-align: center;
}
.dummy-slide {
	border: none;
	width: 33vw;
	flex-shrink: 0;
	pointer-events: none;
	background: transparent;
}
@media (max-width: 768px) {
	.dummy-slide {
		width: 15vw;
	}
}

/* === parts/japan-map.php === */
#japan-map-wrapper {
	display: flex;
}
@media (max-width: 767px) {
	#japan-map-wrapper {
		transform: translateX(0%);
		flex-direction: column;
		padding-right: 0rem;
	}
}
.map-image-icon {
	display: flex;
	align-items: center;
	gap: 0.5rem; /* 吹き出しとの間隔 */
	position: absolute;
	top: 0;
	left: 0;
	z-index: 10;
}
@media (max-width: 767px) {
	.map-image-icon img {
		width: 20%;
	}
}
div#japan-map {
	flex-basis: 40%;
	position: relative;
	border: 2px solid #000;
	padding: 1rem;
}
@media (min-width: 768px) {
	div#japan-map {
		border-right: none;
	}
}
@media (max-width: 768px) {
	div#japan-map {
		border-bottom: none;
	}
}
#map-preview {
	flex-basis: 24%;
	border: 2px solid #272936;
	transition: .3s;
}
.swaying-object {
	transform-origin: center center;
	animation: sway 2s infinite ease-in-out;
}
@keyframes sway {
	0%   { transform: rotate(10deg); }
	50%  { transform: rotate(-10deg); }
	100% { transform: rotate(10deg); }
}
.speech-bubble {
	flex-shrink: 0; /* 親が狭くても縮まないようにする */
	position: relative;
	background: #f5c94b;
	color: #333;
	font-weight: bold;
	border-radius: .5em;
	padding: 0.8em 1em;
	max-width: 180px;
	font-size: 13px;
	line-height: 1.4;
	margin-left: 14px; /* 矢印の分だけ右にずらす */
}
.speech-bubble::after {
	content: "";
	position: absolute;
	left: -16px;
	top: 20px;
	border-width: 10px;
	border-style: solid;
	border-color: transparent #f5c94b transparent transparent;
}
#tooltip {
	position: absolute;
	top: 0;
	left: 0;
	padding: 8px;
	background: white;
	border: 1px solid #ccc;
	display: none;
	z-index: 1000;
}
#tooltip.hidden {
	display: none;
}
svg#japan {
	width: 100%;
}
#japan [id]:hover, #japan g:hover path {
	cursor: pointer;
	fill: #ff6600;
}
#map-tooltip {
	position: absolute;
	background: rgba(0, 0, 0, 0.75);
	color: white;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 14px;
	pointer-events: none;
	z-index: 1000;
}
.hidden {
	display: none;
}
.map-preview-area {
	width: 24%;
	border: 2px solid #000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 7%;
}
@media (max-width: 768px) {
	.map-preview-area {
		width: 100%;
		padding: 7% 33%;
	}
}
#map-preview:not(.hidden) + .map-preview-area {
	display: none;
}
.map-preview-item {
	display: block;
	font-size: .875rem;
	font-weight: bold;
	border-bottom: 2px solid #272936;
}
.map-preview-item span {
	color: #fffdf6;
	background: #d94440;
	font-size: .875em;
	display: block;
	padding-left: .5rem;
	border-bottom: 2px solid #272936;
}
#map-preview-hinmoku.map-preview-item {
	border: none;
}
#map-preview-name p {
	display: block;
	padding: .5em;
}
.map-preview-item ul {
	padding: .5em;
}
.hover-image {
	display: block;
	position: absolute;
	pointer-events: none;
	z-index: 9999;
}
.hover-image-wrapper {
	position: relative;
	width: 100px;
	height: 100px;
}
.hover-image-main {
	position: absolute;
	top: 10%;
	left: 10%;
	width: 132px;
	max-width: initial;
	height: auto;
	transform: translate(-50%, -50%);
}
.rotating-bg {
	position: absolute;
	top: 10%;
	left: 10%;
	width: 150px; /* 少し大きく */
	max-width: initial;
	height: auto;
	transform: translate(-50%, -50%);
	animation: spin 4s linear infinite;
}
@keyframes spin {
	0% { transform: translate(-50%, -50%) rotate(0deg); }
	100% { transform: translate(-50%, -50%) rotate(360deg); }
}
#map-preview-name a,
#map-preview-hinmoku a,
.drawer-menu li a {
	position: relative;
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}
#map-preview-name a::after,
#map-preview-hinmoku a::after,
.drawer-menu li a::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	height: 2px;
	width: 0%;
	background-color: #d94340;
	transition: width 0.4s ease;
}
#map-preview-name a:hover,
#map-preview-hinmoku a:hover,
.drawer-menu li a:hover {
	color: #d94340;
}
#map-preview-name a:hover::after,
#map-preview-hinmoku a:hover::after,
.drawer-menu li a:hover::after {
	width: 100%;
}
@media (max-width: 768px) {
	.map-preview-item p.two-column ul {
		column-count: 2;
		column-gap: 1rem;
		column-rule: 1px solid #ddd;
		margin: 0;
		padding-left: 1rem; /* リストマーカー用の余白 */
	}
	.map-preview-item p.two-column ul li {
		break-inside: avoid; /* リスト項目が列の境界で分割されないように */
		margin-bottom: 0.2rem;
	}
}

/* トップページ内のみ、4番目のカテゴリブロックの見出しを非表示にする */
.main-section > .category-block:nth-child(4) .contents-lists-title {
	display: none;
}

/* === parts/map-japan-svg.php (SVG内 defs > style) === */
.map0  { fill: #dc5310; }
.map2  { fill: #bfc0c0; }
.map1  { fill: #a480b8; }
.map3  { fill: #f6ab00; }
.map4  { fill: #52bcae; }
.map5  { fill: #f18f69; }
.map6  { fill: #9dc814; }
.map7  { fill: #008cd6; }
.map8  { fill: #bc7f46; }
.map9  { fill: #c94e97; }
.map10 { fill: #e796b3; }

/* === parts/circle-text-decoration.php === */
@keyframes poyoyon2 {
	0%   { transform: scale(1.0, 1.0) translate(0, 0); opacity: 0;  }
	15%  { transform: scale(0.98, 0.9) translate(0, 5px); opacity: 0; }
	30%  { transform: scale(1.5, 2) translate(0, 8px); opacity: 0; }
	50%  { transform: scale(0.98, 1.05) translate(0, -8px); opacity: 1; }
	70%  { transform: scale(1.0, 0.9) translate(0, 5px);  opacity: 1; }
	100% { transform: scale(1.0, 1.0) translate(0, 0); opacity: 1;}
}
@keyframes poyocolor {
	0%   { color: #d94340; }
	15%  { color: #272936; }
	30%  { color: #f5c94b; }
	45%  { color: #64b95d; }
	60%  { color: #d94440; }
	75%  { color: #f5c94b; }
	90%  { color: #d94340; }
	100% { color: #272936; }
}
.contents-lists-title span {
	display: inline-block;
	opacity: 0;
	color: #fffdf6;
}

/* === parts/side-lists.php === */
.sidebar-section {
	width: 26vw;
	position: fixed;
	bottom: -12rem;
	right: 2%;
	transition: bottom 0.5s cubic-bezier(0.94, 0.06, 0.36, 0.98);
	z-index: 10;
}
@media (max-width: 767px) {
	.sidebar-section {
		width: 12rem;
		bottom: -12rem;
		right: auto;
		left: -3%;
	}
}
.sidebar-section.show {
	bottom: -10rem;
}
@media (max-width: 767px) {
	.sidebar-section.show {
		bottom: -9rem;
	}
}
.sidebar-section.hide {
	bottom: -50rem;
}
#kaeru-pop-svg .color-target {
	transition: fill 0.5s ease;
}
div#kaeruBalloon {
	width: 80%;
	height: 6rem;
	display: flex;
	margin: auto;
	background: #f5c94b;
	border-radius: .5rem;
	padding: 1rem;
	transform: translate(0rem, -2rem);
	position: relative;
	justify-content: center;
	align-items: center;
}
div#kaeruBalloon:before {
	content: "";
	position: absolute;
	bottom: -24px;
	left: 50%;
	margin-left: -15px;
	border: 12px solid transparent;
	border-top: 12px solid #f5c94b;
	z-index: 2;
}
div#kaeruBalloon span {
	font-size: 14px;
	font-weight: bold;
}
@media (max-width: 767px) {
	div#kaeruBalloon {
		width: 100%;
		height: 5rem;
		padding: .5rem;
		transform: translate(12rem, 6rem);
	}
	div#kaeruBalloon:before {
		bottom: 22px;
		left: -5%;
		transform: rotateZ(90deg);
	}
	div#kaeruBalloon span {
		margin-left: .35em;
	}
}

/* === parts/image-kaeru-pop.php === */
#kaeru-pop-svg {
	transform-origin: bottom center;
	transition: transform 0.2s ease-out;
	animation: breathing 5s ease-in-out infinite;
}
#pupil-left-group, #pupil-right-group {
	transition: transform 0.1s ease-out;
}
#pupil-left, #pupil-right {
	transition: transform 0.2s ease-in-out;
	transform-origin: 188px 59px; /* ←後述の注意点あり */
}
#pupil-right {
	transform-origin: 332px 38px;
}
@keyframes breathing {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.015); }
}
