/* ========================================
   hgkid Lesson 03-04 — パッチム（したの音グループ）
   PC: default / SP: max-width 767px
   ======================================== */

/* このCSSは本ページのみ読込。本文コンテナ幅を拡張 */
.site-body-container.container {
	max-width: 1315px;
}

.hgkid_lesson--03-04 {
	--hgkid-orange: #ffa101;
	--hgkid-orange-soft: #febb48;
	--hgkid-blue-soft: #80b5dd;
	--hgkid-text: #292929;
	--hgkid-pager: #002757;
	--hgkid-white: #ffffff;
	--hgkid-play: 85px;
	--hgkid-radius-card: 20px;

	box-sizing: border-box;
	clear: both;
	width: 100%;
	margin: 1.5rem 0 0;
	padding: 0 0 2rem;
	color: var(--hgkid-text);
	font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
	background: var(--hgkid-white);
}

.hgkid_lesson--03-04 *,
.hgkid_lesson--03-04 *::before,
.hgkid_lesson--03-04 *::after {
	box-sizing: border-box;
}

.hgkid_lesson--03-04 .hgkid_intro {
	margin: 0 0 5rem;
}

.hgkid_lesson--03-04 .hgkid_intro__title {
	margin: 0 0 1.8rem;
	padding: 0;
	font-size: 36px;
	font-weight: 700;
	line-height: 48px;
	color: var(--hgkid-blue-soft);
	border: 0;
	margin-inline-start: 31px;
}

.hgkid_lesson--03-04 .hgkid_intro__lead {
	margin: 0;
	font-size: 36px;
	font-weight: 700;
	line-height: 48px;
	color: var(--hgkid-text);
	margin-inline-start: 31px;
}

.hgkid_lesson--03-04 .hgkid_section--words {
	margin-bottom: var(--hgkid-section-mb, 97px);
}

.hgkid_lesson--03-04 .hgkid_group-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 0 50px;
	padding:
		var(--hgkid-badge-pad-t, 29px)
		var(--hgkid-badge-pad-r, 84px)
		var(--hgkid-badge-pad-b, 18px)
		var(--hgkid-badge-pad-l, 81px);
	background: var(--hgkid-blue-soft);
}

.hgkid_lesson--03-04 .hgkid_group-label__text {
	margin: 0;
	font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
	font-size: 40px;
	font-weight: 700;
	line-height: 0.9;
	color: var(--hgkid-text);
	text-align: center;
	white-space: nowrap;
}

/* 各行の総幅は同じ。4枚行は4分割、3枚行は3分割（カード単体幅は行によって変わる） */
.hgkid_lesson--03-04 .hgkid_grid--words {
	display: grid;
	gap: 39px;
	width: 100%;
}

.hgkid_lesson--03-04 .hgkid_grid--words + .hgkid_grid--words {
	margin-top: 31px;
}

.hgkid_lesson--03-04 .hgkid_grid--cols-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hgkid_lesson--03-04 .hgkid_grid--cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hgkid_lesson--03-04 .hgkid_word-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 639px;
	padding: 36px 23px 27px 16px;
	background: var(--hgkid-orange-soft);
	border-radius: var(--hgkid-radius-card);
}

.hgkid_lesson--03-04 .hgkid_word-card__ja {
	margin: 0 0 12px;
	font-size: 36px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--hgkid-white);
	text-align: center;
	transform: translate(
		var(--hgkid-ja-x, 0px),
		var(--hgkid-ja-y, 0px)
	);
}

.hgkid_lesson--03-04 .hgkid_word-card__illust {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 216px;
	margin-bottom: 16px;
	overflow: hidden;
}

.hgkid_lesson--03-04 .hgkid_word-card__illust img {
	display: block;
	width: var(--hgkid-illust-w, auto);
	height: var(--hgkid-illust-h, auto);
	max-width: var(--hgkid-illust-w, 100%);
	max-height: var(--hgkid-illust-h, 100%);
	object-fit: contain;
	transform: translate(
		var(--hgkid-illust-x, 0px),
		var(--hgkid-illust-y, 0px)
	);
}

.hgkid_lesson--03-04 .hgkid_word-card__panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	flex: 1 1 auto;
	min-height: 200px;
	padding: 10px 12px 10px;
	background: var(--hgkid-white);
	border-radius: 12px;
}

.hgkid_lesson--03-04 .hgkid_word-card__ko {
	margin: 0 0 16px;
	font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans JP", sans-serif;
	font-size: var(--hgkid-ko-size, 106px);
	font-weight: 700;
	line-height: 1.1;
	color: var(--hgkid-orange);
	text-align: center;
	word-break: keep-all;
	transform: translate(
		var(--hgkid-ko-x, 0px),
		var(--hgkid-ko-y, 0px)
	);
}

/* 3文字（돋보기 など）専用。未指定時は 80px。ko_size で上書き可 */
.hgkid_lesson--03-04 .hgkid_word-card__ko--chars-3 {
	font-size: var(--hgkid-ko-size, 80px);
	margin-block-end: 6px;
	margin-block-start: -7px;
}

/* 993〜1280px: 3文字韓国語を幅に合わせて徐々に縮小（ko_size / ko_x を無効化） */
@media screen and (min-width: 993px) and (max-width: 1280px) {
	.hgkid_lesson--03-04 .hgkid_word-card__ko--chars-3 {
		/* 3列: 1280≈100px → 993≈74px */
		font-size: clamp(74px, 9vw - 16px, 100px);
		margin-block-start: 0;
		margin-block-end: 10px;
		width: 100%;
		max-width: 100%;
		text-align: center;
		transform: none;
	}

	/* 4列行はカードが狭い: 1280≈76px → 993≈54px */
	.hgkid_lesson--03-04 .hgkid_grid--cols-4 .hgkid_word-card__ko--chars-3 {
		font-size: clamp(54px, 7.5vw - 20px, 76px);
	}
}

.hgkid_lesson--03-04 .hgkid_play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--hgkid-play);
	height: var(--hgkid-play);
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	transform: translate(
		var(--hgkid-play-x, 0px),
		var(--hgkid-play-y, 0px)
	);
}

.hgkid_lesson--03-04 .hgkid_play__icon {
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.hgkid_lesson--03-04 .hgkid_pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 30px;
}

.hgkid_lesson--03-04 .hgkid_pager__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 200px;
	padding: 18px 40px;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--hgkid-pager);
	text-decoration: none;
	background: var(--hgkid-white);
	border: 2px solid var(--hgkid-pager);
	border-radius: 4px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.hgkid_lesson--03-04 .hgkid_pager__link:hover,
.hgkid_lesson--03-04 .hgkid_pager__link:focus-visible {
	color: var(--hgkid-white);
	background: var(--hgkid-pager);
	outline: none;
}

/* ----------------------------------------
   カード個別の ja_x/ja_y・ko_x/ko_y・play_x/play_y はデスクトップ専用。
   タブレット・SP では他カードと同じ標準位置に戻す。
   ---------------------------------------- */
@media screen and (max-width: 992px) {
	.hgkid_lesson--03-04 .hgkid_word-card__ja,
	.hgkid_lesson--03-04 .hgkid_word-card__ko,
	.hgkid_lesson--03-04 .hgkid_play {
		transform: none;
	}
}

/* ----------------------------------------
   Tablet（768px〜992px）
   ---------------------------------------- */
@media screen and (min-width: 768px) and (max-width: 992px) {
	.hgkid_lesson--03-04 .hgkid_section--words {
		margin-bottom: var(--hgkid-section-mb, 48px);
	}

	.hgkid_lesson--03-04 .hgkid_group-label {
		margin-bottom: 20px;
		margin-inline-start: 12px;
		padding: 12px 28px;
	}

	.hgkid_lesson--03-04 .hgkid_word-card__ja {
		margin: 0 0 10px;
		font-size: 22px;
		line-height: 1.35;
	}

	.hgkid_lesson--03-04 .hgkid_intro {
		margin-bottom: 2.5rem;
	}

	.hgkid_lesson--03-04 .hgkid_intro__title,
	.hgkid_lesson--03-04 .hgkid_intro__lead {
		font-size: 28px;
		line-height: 1.45;
		margin-inline-start: 16px;
	}

	.hgkid_lesson--03-04 .hgkid_pager__link {
		min-width: 160px;
		padding: 14px 24px;
		font-size: 18px;
	}

	.hgkid_lesson--03-04 .hgkid_grid--cols-4,
	.hgkid_lesson--03-04 .hgkid_grid--cols-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
	}

	.hgkid_lesson--03-04 .hgkid_grid--words + .hgkid_grid--words {
		margin-top: 16px;
	}

	.hgkid_lesson--03-04 .hgkid_word-card {
		min-height: 0;
		padding: 20px 14px 16px;
		overflow: hidden;
	}

	.hgkid_lesson--03-04 .hgkid_word-card__illust {
		height: 120px;
		margin-bottom: 12px;
	}

	.hgkid_lesson--03-04 .hgkid_word-card__illust img {
		width: auto;
		height: auto;
		max-width: 100%;
		max-height: 100%;
		transform: none;
	}

	.hgkid_lesson--03-04 .hgkid_word-card__panel {
		min-height: 180px;
		padding: 16px 8px 14px;
	}

	.hgkid_lesson--03-04 .hgkid_word-card__ko {
		font-size: 40px;
	}

	.hgkid_lesson--03-04 .hgkid_word-card__ko--chars-3 {
		font-size: 32px;
	}

	.hgkid_lesson--03-04 .hgkid_word-card .hgkid_play {
		width: 56px;
		height: 56px;
	}

	.hgkid_lesson--03-04 .hgkid_group-label__text {
		font-size: 22px;
	}
}

/* ----------------------------------------
   SP
   ---------------------------------------- */
@media screen and (max-width: 767px) {
	.hgkid_lesson--03-04 .hgkid_word-card__ja {
		margin: 0 0 8px;
		font-size: 16px;
		line-height: 1.4;
	}

	.hgkid_lesson--03-04 {
		--hgkid-play: 40px;
		margin-top: 1rem;
		padding-bottom: 1.5rem;
	}

	.hgkid_lesson--03-04 .hgkid_intro {
		margin-bottom: 1.5rem;
	}

	.hgkid_lesson--03-04 .hgkid_intro__title {
		margin-bottom: 1rem;
		margin-inline-start: 0;
		font-size: 24px;
		line-height: 1.5;
	}

	.hgkid_lesson--03-04 .hgkid_intro__lead {
		margin-inline-start: 0;
		font-size: 16px;
		font-weight: 700;
		line-height: 1.7;
	}

	.hgkid_lesson--03-04 .hgkid_section--words {
		margin-bottom: var(--hgkid-section-mb, 40px);
	}

	.hgkid_lesson--03-04 .hgkid_group-label {
		margin-bottom: 16px;
		margin-inline-start: 0;
		padding: 8px 12px;
	}

	.hgkid_lesson--03-04 .hgkid_group-label__text {
		font-size: 18px;
		white-space: normal;
	}

	.hgkid_lesson--03-04 .hgkid_grid--cols-4,
	.hgkid_lesson--03-04 .hgkid_grid--cols-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.hgkid_lesson--03-04 .hgkid_grid--words + .hgkid_grid--words {
		margin-top: 16px;
	}

	.hgkid_lesson--03-04 .hgkid_word-card {
		min-height: 0;
		padding: 16px 12px 14px;
	}

	.hgkid_lesson--03-04 .hgkid_word-card__illust {
		height: 110px;
		margin-bottom: 10px;
	}

	.hgkid_lesson--03-04 .hgkid_word-card__illust img {
		width: auto;
		height: auto;
		max-width: 110px;
		max-height: 110px;
		transform: none;
	}

	.hgkid_lesson--03-04 .hgkid_word-card__panel {
		min-height: 140px;
		padding: 16px 8px 14px;
	}

	.hgkid_lesson--03-04 .hgkid_word-card__ko {
		margin-bottom: 10px;
		font-size: 32px;
	}

	.hgkid_lesson--03-04 .hgkid_word-card__ko--chars-3 {
		font-size: 26px;
	}

	.hgkid_lesson--03-04 .hgkid_pager {
		flex-direction: column;
		gap: 30px;
	}

	.hgkid_lesson--03-04 .hgkid_pager__link {
		width: 100%;
		min-width: 0;
		padding: 14px 20px;
		font-size: 16px;
	}

}
