/* 通信教育 Web申込フォーム（申込ページでのみ読み込み）
   すべてのセレクタは .tsushin-form 配下。base.css は変更しない。
   スマホ(〜640px)を基準に作り、641px以上で表形式・横並びにする。 */

.tsushin-form {
	--tf-line: #ede8de;      /* サイト共通の枠線色（.kakomi1 と同じ） */
	--tf-dark: #9a7b00;      /* 通信講座の文字・強調色 */
	--tf-accent: #e6b800;    /* 通信講座の見出し線・帯 */
	--tf-mid: #fff7b3;
	--tf-light: #ffffe0;
	--tf-error: #c0392b;
	margin: 0 0 40px;
}

/* ---- セクション（1〜6）---- */
.tsushin-form .tsushin-section {
	border: 1px solid var(--tf-line);
	border-radius: 3px;
	margin: 0 0 24px;
	background: #fff;
}
.tsushin-form .tsushin-section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 12px 14px;
	font-size: 112%;
	line-height: 1.4;
	background: var(--tf-mid);
	border-bottom: 3px solid var(--tf-accent);
}
.tsushin-form .tsushin-section-title .tsushin-num {
	flex: 0 0 auto;
	display: inline-block;
	width: 1.8em;
	height: 1.8em;
	line-height: 1.8em;
	text-align: center;
	border-radius: 50%;
	background: var(--tf-accent);
	color: #fff;
	font-size: 90%;
}
.tsushin-form .tsushin-section-body {
	padding: 14px;
}

/* ---- 入力欄 ---- */
.tsushin-form .tsushin-field {
	margin: 0 0 16px;
}
.tsushin-form .tsushin-field > label,
.tsushin-form .tsushin-field > .tsushin-label {
	display: block;
	font-weight: bold;
	margin: 0 0 4px;
}
.tsushin-form .tsushin-req,
.tsushin-form .tsushin-opt {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 2px;
	font-size: 75%;
	font-weight: normal;
	vertical-align: 2px;
	color: #fff;
}
.tsushin-form .tsushin-req { background: var(--tf-error); }
.tsushin-form .tsushin-opt { background: #999; }
.tsushin-form .tsushin-hint {
	display: block;
	font-size: 85%;
	font-weight: normal;
	margin: 2px 0 0;
}
.tsushin-form input[type="text"],
.tsushin-form input[type="email"],
.tsushin-form input[type="tel"],
.tsushin-form input[type="date"],
.tsushin-form input[type="number"] {
	display: block;
	width: 100%;
	box-sizing: border-box;
	min-height: 44px;           /* スマホで押しやすい高さ */
	padding: 8px 10px;
	margin: 0;
	font-size: 16px;            /* iOS Safari の自動ズーム防止 */
}
.tsushin-form .wpcf7-form-control-wrap {
	display: block;
}

/* ---- 生年月日（年・月・日のプルダウン）---- */
.tsushin-form .tsushin-birthdate {
	display: flex;
	gap: 8px;
}
.tsushin-form .tsushin-birthdate select {
	flex: 1 1 0;
	min-width: 0;
	box-sizing: border-box;
	min-height: 44px;           /* スマホで押しやすい高さ */
	padding: 8px 6px;
	margin: 0;
	font-size: 16px;            /* iOS Safari の自動ズーム防止 */
}
.tsushin-form .tsushin-birthdate select[data-birth="y"] {
	flex: 1.4 1 0;
}
.tsushin-form .wpcf7-not-valid {
	border-color: var(--tf-error);
}
.tsushin-form .wpcf7-not-valid-tip {
	display: block;
	margin-top: 4px;
	color: var(--tf-error);
	font-size: 90%;
}

/* ---- ラジオ・チェック（タップしやすい行）---- */
.tsushin-form .wpcf7-radio .wpcf7-list-item,
.tsushin-form .wpcf7-acceptance .wpcf7-list-item {
	display: block;
	margin: 0 0 6px;
}
.tsushin-form .wpcf7-radio .wpcf7-list-item > label,
.tsushin-form .wpcf7-acceptance .wpcf7-list-item > label {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	min-height: 44px;
	padding: 6px 8px;
	border: 1px solid var(--tf-line);
	border-radius: 3px;
	cursor: pointer;
}
.tsushin-form .wpcf7-radio input[type="radio"],
.tsushin-form .wpcf7-acceptance input[type="checkbox"] {
	flex: 0 0 26px;
	width: 26px;
	margin: 4px 4px 0 0;
	vertical-align: baseline;
}
.tsushin-form .wpcf7-list-item-label {
	flex: 1 1 auto;
	line-height: 1.5;
	padding-top: 4px;
}
.tsushin-form .wpcf7-acceptance .wpcf7-list-item {
	margin-left: 0;
}

/* 職業「その他」の自由入力（JSで表示切替。JS無効時は常に表示） */
.tsushin-form .tsushin-job-other {
	margin-top: 8px;
}
.tsushin-form.is-ready .tsushin-job-other[hidden] {
	display: none;
}

/* ---- 経験（スマホ：科目ごとのカード / PC：表）---- */
.tsushin-form .tsushin-exp-row {
	border: 1px solid var(--tf-line);
	border-radius: 3px;
	margin: 0 0 12px;
	padding: 10px;
}
.tsushin-form .tsushin-exp-subject {
	margin: 0 0 8px;
	font-weight: bold;
	color: var(--tf-dark);
}
.tsushin-form .tsushin-exp-group {
	margin: 0 0 8px;
}
.tsushin-form .tsushin-exp-group-label {
	display: block;
	font-size: 90%;
	margin: 0 0 2px;
}
.tsushin-form .tsushin-ym {
	display: flex;
	align-items: center;
	gap: 6px;
}
.tsushin-form .tsushin-ym .wpcf7-form-control-wrap {
	flex: 1 1 0;
	min-width: 0;
}
.tsushin-form .tsushin-ym-unit {
	flex: 0 0 auto;
}

/* ---- 受講料 ---- */
.tsushin-form .tsushin-plan-detail {
	display: block;
	margin: 2px 0 0 40px;
	font-size: 85%;
}
.tsushin-form .tsushin-note {
	margin: 10px 0 0;
	padding: 8px 10px;
	background: var(--tf-light);
	border-left: 4px solid var(--tf-accent);
	font-size: 92%;
}

/* ---- 教材（スマホ：1商品=1カード / PC：表）---- */
.tsushin-form .tsushin-materials {
	display: block;
}
.tsushin-form .tsushin-mat-head {
	display: none;
}
.tsushin-form .tsushin-mat-row {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas:
		"name  price"
		"desc  desc"
		"qty   amount"
		"note  note";
	gap: 4px 12px;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid var(--tf-line);
}
.tsushin-form .tsushin-mat-no { display: none; }
.tsushin-form .tsushin-mat-name {
	grid-area: name;
	font-weight: bold;
	margin: 0;
}
.tsushin-form .tsushin-mat-price { grid-area: price; text-align: right; }
.tsushin-form .tsushin-mat-qty {
	grid-area: qty;
	display: flex;
	align-items: center;
	gap: 6px;
}
.tsushin-form .tsushin-mat-qty input[type="number"] {
	width: 5.5em;
	text-align: right;
}
.tsushin-form .tsushin-mat-amount {
	grid-area: amount;
	text-align: right;
	font-weight: bold;
	color: var(--tf-dark);
}
.tsushin-form .tsushin-mat-desc {
	grid-area: desc;
	font-size: 85%;
	line-height: 1.7;
	color: #555;
}
.tsushin-form .tsushin-mat-note {
	grid-area: note;
	font-size: 85%;
	color: var(--tf-error);
}
.tsushin-form .tsushin-mat-foot {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 12px 10px;
	margin-top: 4px;
	background: var(--tf-light);
	border-top: 3px solid var(--tf-accent);
	font-size: 112%;
}
.tsushin-form .tsushin-mat-foot-value { color: var(--tf-dark); }

/* ---- 送信前のサマリー ---- */
.tsushin-form .tsushin-summary {
	margin: 0 0 16px;
	padding: 12px 14px;
	background: var(--tf-light);
	border: 1px solid var(--tf-accent);
	border-radius: 3px;
}
.tsushin-form .tsushin-summary dl { margin: 0; }
.tsushin-form .tsushin-summary dt { font-weight: bold; margin-top: 6px; }
.tsushin-form .tsushin-summary dt:first-child { margin-top: 0; }
.tsushin-form .tsushin-summary dd { margin: 0; }

/* ---- 送信ボタン ---- */
.tsushin-form .wpcf7-submit {
	width: 100%;
	max-width: 420px;
	min-height: 56px;
	box-sizing: border-box;
	background-color: var(--tf-accent);
	cursor: pointer;
}
.tsushin-form .tsushin-submit {
	text-align: center;
}
.tsushin-form .tsushin-submit .tsushin-hint {
	margin: 0 0 8px;
}

/* ---- PC・タブレット（641px以上）---- */
@media only screen and (min-width: 641px) {
	.tsushin-form .tsushin-section-body {
		padding: 18px 20px;
	}
	.tsushin-form .tsushin-field-row {
		display: flex;
		gap: 16px;
	}
	.tsushin-form .tsushin-field-row > .tsushin-field {
		flex: 1 1 0;
		min-width: 0;
	}
	.tsushin-form .tsushin-field-zip {
		max-width: 220px;
	}

	/* 経験：表形式 */
	.tsushin-form .tsushin-exp-row {
		display: flex;
		align-items: center;
		gap: 16px;
	}
	.tsushin-form .tsushin-exp-subject {
		flex: 0 0 5em;
		margin: 0;
	}
	.tsushin-form .tsushin-exp-group {
		flex: 1 1 0;
		margin: 0;
	}

	/* 教材：表形式 */
	.tsushin-form .tsushin-mat-head,
	.tsushin-form .tsushin-mat-row {
		display: grid;
		grid-template-columns: 3em minmax(0, 1fr) 7em 8em 7em;
		grid-template-areas: none;
		gap: 0 10px;
		align-items: center;
	}
	.tsushin-form .tsushin-mat-head {
		padding: 8px 0;
		font-weight: bold;
		background: var(--tf-mid);
		border-bottom: 2px solid var(--tf-accent);
	}
	.tsushin-form .tsushin-mat-head span:nth-child(1) { text-align: center; }
	.tsushin-form .tsushin-mat-head span:nth-child(3),
	.tsushin-form .tsushin-mat-head span:nth-child(5) { text-align: right; }
	.tsushin-form .tsushin-mat-head span:nth-child(4) { text-align: center; }
	.tsushin-form .tsushin-mat-no { display: block; text-align: center; }
	.tsushin-form .tsushin-mat-label { display: none; }
	.tsushin-form .tsushin-mat-name,
	.tsushin-form .tsushin-mat-price,
	.tsushin-form .tsushin-mat-qty,
	.tsushin-form .tsushin-mat-amount,
	.tsushin-form .tsushin-mat-desc,
	.tsushin-form .tsushin-mat-note { grid-area: auto; }
	.tsushin-form .tsushin-mat-qty { justify-content: center; }
	.tsushin-form .tsushin-mat-desc { grid-column: 2 / 4; }
	.tsushin-form .tsushin-mat-note { grid-column: 2 / -1; }
}

/* ---- 学用品の写真 ---- */
.tsushin-form .tsushin-catalog {
	margin: 0 0 16px;
	border: 1px solid var(--tf-line);
	border-radius: 3px;
}
.tsushin-form .tsushin-catalog > summary {
	padding: 12px 14px;
	font-weight: bold;
	cursor: pointer;
	background: var(--tf-light);
}
.tsushin-form .tsushin-catalog-images {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	padding: 12px;
}
.tsushin-form .tsushin-catalog-images img {
	display: block;
	width: 100%;
	height: auto;
}
.tsushin-form .tsushin-catalog-links {
	margin: 0;
	padding: 0 12px 12px;
	font-size: 90%;
}
@media only screen and (min-width: 641px) {
	.tsushin-form .tsushin-catalog-images {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}
}
