/*
 * 補助金みっけ Core — 公開画面のスタイル
 *
 * 色は既存の「補助金検索リスト.html」を踏襲しています。
 * テーマの CSS に負けないよう、すべて .hmc 配下に閉じています。
 */

.hmc {
	--hmc-accent: #1f4e79;
	--hmc-accent-dark: #163a5a;
	--hmc-ink: #222;
	--hmc-muted: #6b7280;
	--hmc-line: #e3e3e3;
	--hmc-bg: #f6f7f9;
	--hmc-card-bg: #fff;
	--hmc-official: #833c00;
	--hmc-radius: 10px;

	box-sizing: border-box;
	color: var(--hmc-ink);
	font-size: 15px;
	line-height: 1.7;
}

.hmc *,
.hmc *::before,
.hmc *::after {
	box-sizing: border-box;
}

.hmc a {
	color: var(--hmc-accent);
}

.hmc-wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding: 24px 16px 64px;
}

.hmc-page__title {
	font-size: 24px;
	margin: 0 0 4px;
	line-height: 1.4;
}

.hmc-page__lead {
	color: var(--hmc-muted);
	font-size: 14px;
	margin: 0 0 20px;
}

.hmc-section__title {
	font-size: 20px;
	margin: 0 0 14px;
	padding-left: 10px;
	border-left: 4px solid var(--hmc-accent);
	line-height: 1.4;
}

/* ------------------------------------------------------------------ */
/* ボタン                                                              */
/* ------------------------------------------------------------------ */

.hmc-button {
	display: inline-block;
	padding: 9px 18px;
	border: 1px solid var(--hmc-accent);
	border-radius: 6px;
	background: #fff;
	color: var(--hmc-accent);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.hmc-button:hover {
	background: #eef3f8;
	color: var(--hmc-accent-dark);
}

.hmc-button--primary {
	background: var(--hmc-accent);
	color: #fff;
}

.hmc-button--primary:hover {
	background: var(--hmc-accent-dark);
	color: #fff;
}

.hmc-button--ghost {
	border-color: #c7ccd3;
	color: var(--hmc-muted);
}

.hmc-button--official {
	border-color: var(--hmc-official);
	background: var(--hmc-official);
	color: #fff;
	padding: 13px 26px;
	font-size: 15px;
}

.hmc-button--official:hover {
	background: #6b3100;
	color: #fff;
}

.hmc-button--contact {
	border-color: #0f7b52;
	background: #0f7b52;
	color: #fff;
	padding: 13px 26px;
	font-size: 15px;
}

.hmc-button--contact:hover {
	background: #0b6141;
	color: #fff;
}

/* ------------------------------------------------------------------ */
/* バッジ・ラベル                                                       */
/* ------------------------------------------------------------------ */

.hmc-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	line-height: 1.7;
	white-space: nowrap;
}

.hmc-src--flash { background: #deeaf1; color: #1f4e79; }
.hmc-src--portal { background: #e2efda; color: #375623; }
.hmc-src--pro { background: #e4dfec; color: #4a2f6b; }
.hmc-src--common { background: #fff2cc; color: #7f6000; }
.hmc-src--other { background: #eee; color: #555; }

.hmc-badge--past {
	background: #f1f1f1;
	color: #666;
	border: 1px solid #ddd;
}

.hmc-status {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.7;
	white-space: nowrap;
}

.hmc-status--open { background: #d5f5dd; color: #14562a; }
.hmc-status--anytime { background: #dbeafe; color: #1e3a8a; }
.hmc-status--upcoming { background: #fef3c7; color: #78350f; }
.hmc-status--closed { background: #ededed; color: #666; }

.hmc-na {
	color: #a0a0a0;
}

/* ------------------------------------------------------------------ */
/* 絞り込みフォーム                                                     */
/* ------------------------------------------------------------------ */

.hmc-filters {
	background: var(--hmc-card-bg);
	border: 1px solid var(--hmc-line);
	border-radius: var(--hmc-radius);
	padding: 16px;
	margin-bottom: 20px;
}

.hmc-filters__row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
}

.hmc-filters__row + .hmc-filters__row {
	margin-top: 12px;
}

.hmc-filters__row--main {
	padding-bottom: 12px;
	border-bottom: 1px dashed var(--hmc-line);
}

.hmc-filters__row--toggles {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var(--hmc-line);
	align-items: center;
}

.hmc-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 150px;
}

.hmc-field--grow {
	flex: 1 1 260px;
}

.hmc-field--sort {
	min-width: 170px;
	margin-left: auto;
}

.hmc-field__label {
	font-size: 12px;
	font-weight: 600;
	color: var(--hmc-muted);
}

.hmc-filters input[type="search"],
.hmc-filters input[type="text"],
.hmc-filters select {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #c7ccd3;
	border-radius: 6px;
	background: #fff;
	color: var(--hmc-ink);
	font-size: 14px;
	line-height: 1.4;
	max-width: none;
}

.hmc-filters select:disabled {
	background: #f3f4f6;
	color: #9aa1aa;
}

.hmc-filters__more {
	margin-top: 14px;
	border-top: 1px dashed var(--hmc-line);
	padding-top: 12px;
}

.hmc-filters__more > summary {
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: var(--hmc-accent);
	list-style: revert;
}

.hmc-checkgroup {
	margin-top: 14px;
}

.hmc-checkgroup__title {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--hmc-muted);
}

.hmc-checkgroup__items {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
}

.hmc-check {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	cursor: pointer;
	white-space: nowrap;
}

.hmc-check--strong {
	font-size: 14px;
	font-weight: 600;
	padding: 6px 12px;
	border: 1px solid var(--hmc-line);
	border-radius: 6px;
	background: #fafbfc;
}

.hmc-check input {
	margin: 0;
}

/* ------------------------------------------------------------------ */
/* 件数・カード一覧                                                     */
/* ------------------------------------------------------------------ */

.hmc-count {
	font-size: 14px;
	color: var(--hmc-muted);
	margin: 0 0 14px;
}

.hmc-count strong {
	color: var(--hmc-ink);
	font-size: 17px;
}

.hmc-count__note {
	font-size: 12px;
}

.hmc-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 14px;
}

.hmc-card {
	background: var(--hmc-card-bg);
	border: 1px solid var(--hmc-line);
	border-radius: var(--hmc-radius);
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hmc-card--closed {
	background: #fbfbfb;
}

.hmc-card--closed .hmc-card__title a {
	color: #55606b;
}

.hmc-card__head {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	align-items: center;
}

.hmc-card__title {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	font-weight: 700;
}

.hmc-card__title a {
	text-decoration: none;
}

.hmc-card__title a:hover {
	text-decoration: underline;
}

.hmc-card__meta {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: 13px;
}

.hmc-card__row {
	display: flex;
	gap: 8px;
	align-items: baseline;
}

.hmc-card__row dt {
	flex: 0 0 62px;
	color: var(--hmc-muted);
	font-size: 12px;
}

.hmc-card__row dd {
	margin: 0;
	flex: 1 1 auto;
	word-break: break-word;
}

.hmc-card__amount {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.hmc-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: auto;
	padding-top: 4px;
}

.hmc-tag {
	display: inline-block;
	padding: 1px 8px;
	border: 1px solid #dce3ea;
	border-radius: 10px;
	background: #f7fafc;
	color: #40566b;
	font-size: 11px;
	line-height: 1.8;
	text-decoration: none;
}

.hmc-tag:hover {
	background: #eaf1f7;
}

/* ------------------------------------------------------------------ */
/* 0件・ページ送り                                                      */
/* ------------------------------------------------------------------ */

.hmc-empty {
	background: var(--hmc-card-bg);
	border: 1px solid var(--hmc-line);
	border-radius: var(--hmc-radius);
	padding: 28px 20px;
	text-align: center;
}

.hmc-empty__title {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 8px;
}

.hmc-pagination {
	margin-top: 26px;
}

.hmc-pagination ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
}

.hmc-pagination a,
.hmc-pagination span {
	display: inline-block;
	min-width: 38px;
	padding: 7px 10px;
	border: 1px solid var(--hmc-line);
	border-radius: 6px;
	background: #fff;
	text-align: center;
	text-decoration: none;
	font-size: 14px;
}

.hmc-pagination .current {
	background: var(--hmc-accent);
	border-color: var(--hmc-accent);
	color: #fff;
	font-weight: 700;
}

.hmc-pagination .dots {
	border-color: transparent;
	background: none;
}

/* ------------------------------------------------------------------ */
/* 詳細ページ                                                           */
/* ------------------------------------------------------------------ */

.hmc-single__head {
	background: var(--hmc-card-bg);
	border: 1px solid var(--hmc-line);
	border-radius: var(--hmc-radius);
	padding: 20px;
	margin-bottom: 20px;
}

.hmc-single__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.hmc-single__title {
	font-size: 24px;
	line-height: 1.45;
	margin: 0 0 14px;
	font-weight: 700;
}

.hmc-specs {
	margin: 0;
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0;
	border-top: 1px solid var(--hmc-line);
	font-size: 14px;
}

.hmc-specs > dt,
.hmc-specs > dd {
	border-bottom: 1px solid var(--hmc-line);
	padding: 9px 12px;
	margin: 0;
}

.hmc-specs > dt {
	background: #fafbfc;
	color: var(--hmc-muted);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.hmc-specs > dd {
	word-break: break-word;
}

.hmc-specs .hmc-specs__amount {
	font-size: 17px;
	font-weight: 700;
	color: var(--hmc-accent);
	font-variant-numeric: tabular-nums;
}

.hmc-block {
	background: var(--hmc-card-bg);
	border: 1px solid var(--hmc-line);
	border-radius: var(--hmc-radius);
	padding: 18px 20px;
	margin-bottom: 20px;
}

.hmc-block__title {
	font-size: 17px;
	margin: 0 0 10px;
	padding-left: 9px;
	border-left: 4px solid var(--hmc-accent);
	line-height: 1.4;
}

/* 本文は WordPress 側で改行が <p>／<br> に変換されるため、pre-wrap は使いません。 */
.hmc-body {
	word-break: break-word;
	font-size: 15px;
}

.hmc-body p {
	margin: 0 0 1em;
}

.hmc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin: 18px 0;
}

.hmc-actions__note {
	font-size: 13px;
	color: var(--hmc-muted);
}

.hmc-disclaimer {
	background: #fffaf0;
	border: 1px solid #f0dcb4;
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 13px;
	color: #6b4f16;
	margin-bottom: 20px;
}

.hmc-detail-link {
	font-size: 13px;
	word-break: break-all;
}

/* 過去の公募テーブル */

.hmc-table-wrap {
	overflow-x: auto;
}

.hmc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	background: #fff;
}

.hmc-table th,
.hmc-table td {
	border-bottom: 1px solid var(--hmc-line);
	padding: 9px 10px;
	text-align: left;
	vertical-align: top;
}

.hmc-table th {
	background: #fafbfc;
	color: var(--hmc-muted);
	font-size: 12px;
	white-space: nowrap;
}

.hmc-table td.hmc-table__amount {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.hmc-table tr.is-current td {
	background: #f3f8fc;
	font-weight: 700;
}

/* 都道府県から探す */

.hmc-regions__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 8px;
}

.hmc-regions__list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid var(--hmc-line);
	border-radius: 8px;
	background: #fff;
	text-decoration: none;
	font-size: 14px;
	color: var(--hmc-ink);
}

.hmc-regions__list a:hover {
	border-color: var(--hmc-accent);
	background: #f3f8fc;
}

.hmc-regions__count {
	font-size: 12px;
	color: var(--hmc-muted);
	font-variant-numeric: tabular-nums;
}

.hmc-regions__count::after {
	content: "件";
}

/* 検索窓 */

.hmc-searchbox form {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.hmc-searchbox input[type="search"] {
	flex: 1 1 240px;
	padding: 12px 14px;
	border: 1px solid #c7ccd3;
	border-radius: 6px;
	font-size: 15px;
	max-width: none;
}

.hmc-more {
	margin-top: 18px;
	text-align: center;
}

.hmc-back {
	margin-top: 28px;
	font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* スマートフォン                                                       */
/* ------------------------------------------------------------------ */

@media (max-width: 782px) {
	.hmc-wrap {
		padding: 16px 12px 48px;
	}

	.hmc-cards {
		grid-template-columns: 1fr;
	}

	.hmc-field,
	.hmc-field--grow,
	.hmc-field--sort {
		min-width: 0;
		flex: 1 1 100%;
		margin-left: 0;
	}

	.hmc-filters__row--main .hmc-button {
		flex: 1 1 100%;
	}

	.hmc-page__title {
		font-size: 20px;
	}

	.hmc-single__title {
		font-size: 20px;
	}

	.hmc-specs {
		grid-template-columns: 1fr;
	}

	.hmc-specs > dt {
		border-bottom: 0;
		padding-bottom: 0;
		background: none;
	}

	.hmc-specs > dd {
		padding-top: 2px;
	}

	.hmc-actions .hmc-button {
		flex: 1 1 100%;
		text-align: center;
	}

	.hmc-regions__list {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	}
}

/* ==================================================================== */
/* ボタンの文字色を固定する（v1.1.1）                                    */
/*                                                                      */
/* テーマの `a:link { color: ... }` は `.hmc-button` より詳細度が高く、  */
/* ボタンの文字色が上書きされて読めなくなることがあります。              */
/* ここでは要素・クラス・状態をすべて指定して、テーマより強くしています。 */
/* ==================================================================== */

.hmc a.hmc-button:link,
.hmc a.hmc-button:visited,
.hmc a.hmc-button:hover,
.hmc a.hmc-button:focus,
.hmc a.hmc-button:active {
	color: var(--hmc-accent);
	text-decoration: none;
}

.hmc a.hmc-button:hover,
.hmc a.hmc-button:focus {
	color: var(--hmc-accent-dark);
	background: #eef3f8;
}

.hmc a.hmc-button--primary:link,
.hmc a.hmc-button--primary:visited,
.hmc a.hmc-button--primary:hover,
.hmc a.hmc-button--primary:focus,
.hmc a.hmc-button--primary:active,
.hmc a.hmc-button--official:link,
.hmc a.hmc-button--official:visited,
.hmc a.hmc-button--official:hover,
.hmc a.hmc-button--official:focus,
.hmc a.hmc-button--official:active,
.hmc a.hmc-button--contact:link,
.hmc a.hmc-button--contact:visited,
.hmc a.hmc-button--contact:hover,
.hmc a.hmc-button--contact:focus,
.hmc a.hmc-button--contact:active {
	color: #fff;
	text-decoration: none;
}

.hmc a.hmc-button--official:link,
.hmc a.hmc-button--official:visited {
	background: var(--hmc-official);
	border-color: var(--hmc-official);
}

.hmc a.hmc-button--official:hover,
.hmc a.hmc-button--official:focus {
	background: #6b3100;
	border-color: #6b3100;
}

.hmc a.hmc-button--contact:link,
.hmc a.hmc-button--contact:visited {
	background: #0f7b52;
	border-color: #0f7b52;
}

.hmc a.hmc-button--contact:hover,
.hmc a.hmc-button--contact:focus {
	background: #0b6141;
	border-color: #0b6141;
}

.hmc a.hmc-button--primary:link,
.hmc a.hmc-button--primary:visited {
	background: var(--hmc-accent);
	border-color: var(--hmc-accent);
}

.hmc a.hmc-button--primary:hover,
.hmc a.hmc-button--primary:focus {
	background: var(--hmc-accent-dark);
	border-color: var(--hmc-accent-dark);
}

.hmc a.hmc-button--ghost:link,
.hmc a.hmc-button--ghost:visited {
	color: var(--hmc-muted);
	background: #fff;
	border-color: #c7ccd3;
}

.hmc a.hmc-button--ghost:hover,
.hmc a.hmc-button--ghost:focus {
	color: var(--hmc-ink);
	background: #f3f4f6;
}

/* キーボード操作時に、どこを選んでいるか分かるようにする */
.hmc a.hmc-button:focus-visible,
.hmc button.hmc-button:focus-visible {
	outline: 3px solid #7aa7cc;
	outline-offset: 2px;
}

.hmc-button--wide {
	padding: 14px 40px;
	font-size: 16px;
}

/* ==================================================================== */
/* お問い合わせフォーム（v1.2.0）                                        */
/* ==================================================================== */

.hmc-contact {
	max-width: 760px;
	margin: 0 auto;
}

.hmc-contact__lead {
	font-size: 14px;
	color: var(--hmc-muted);
	margin: 0 0 20px;
}

.hmc-contact__form {
	background: var(--hmc-card-bg);
	border: 1px solid var(--hmc-line);
	border-radius: var(--hmc-radius);
	padding: 20px;
}

/* ハニーポット：人間には見えない欄。自動送信プログラムだけが埋めてしまう。 */
.hmc-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.hmc-formrow {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	padding: 14px 0;
	border-bottom: 1px dashed var(--hmc-line);
}

.hmc-formrow:last-of-type {
	border-bottom: 0;
}

.hmc-formrow__label {
	flex: 0 0 190px;
	font-size: 14px;
	font-weight: 600;
	padding-top: 9px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.hmc-formrow__input {
	flex: 1 1 320px;
	min-width: 0;
}

.hmc-formrow input[type="text"],
.hmc-formrow input[type="email"],
.hmc-formrow input[type="tel"],
.hmc-formrow select,
.hmc-formrow textarea {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid #c7ccd3;
	border-radius: 6px;
	background: #fff;
	color: var(--hmc-ink);
	font-size: 16px; /* 16px 未満だとスマホで拡大されてしまう */
	line-height: 1.6;
	font-family: inherit;
	max-width: none;
}

.hmc-formrow textarea {
	resize: vertical;
}

.hmc-formrow.is-error input,
.hmc-formrow.is-error select,
.hmc-formrow.is-error textarea {
	border-color: #c1392b;
	background: #fff8f7;
}

.hmc-formrow__error {
	margin: 6px 0 0;
	color: #c1392b;
	font-size: 13px;
	font-weight: 600;
}

.hmc-formrow--agree {
	display: block;
	border-bottom: 0;
	padding-top: 18px;
}

.hmc-required,
.hmc-optional {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.7;
}

.hmc-required {
	background: #c1392b;
	color: #fff;
}

.hmc-optional {
	background: #eceff1;
	color: #667;
}

.hmc-contact__submit {
	margin: 22px 0 0;
	text-align: center;
}

.hmc-contact__error-box {
	background: #fff8f7;
	border: 1px solid #e8b4ae;
	border-radius: 8px;
	padding: 12px 16px;
	margin-bottom: 18px;
	color: #97281b;
	font-weight: 600;
}

.hmc-contact__error-box p {
	margin: 0;
}

.hmc-contact__done {
	background: #f2fbf5;
	border: 1px solid #b6e2c4;
	border-radius: var(--hmc-radius);
	padding: 28px 24px;
	text-align: center;
}

.hmc-contact__done-title {
	font-size: 19px;
	font-weight: 700;
	color: #14562a;
	margin: 0 0 10px;
}

/* ==================================================================== */
/* 固定ページ（運営会社・免責事項・プライバシーポリシー）                 */
/* ==================================================================== */

.hmc-page-block {
	max-width: 820px;
	margin: 0 auto;
}

.hmc-table--company th {
	width: 200px;
	white-space: nowrap;
}

.hmc-table--company th,
.hmc-table--company td {
	padding: 13px 14px;
	font-size: 15px;
}

.hmc-legal__title {
	font-size: 18px;
	margin: 30px 0 10px;
	padding-left: 10px;
	border-left: 4px solid var(--hmc-accent);
	line-height: 1.5;
}

.hmc-legal__title:first-child {
	margin-top: 0;
}

.hmc-legal p {
	margin: 0 0 12px;
	line-height: 1.9;
}

.hmc-legal__list {
	margin: 0 0 14px;
	padding-left: 1.4em;
}

.hmc-legal__list li {
	margin-bottom: 5px;
	line-height: 1.8;
}

.hmc-legal__date {
	margin-top: 30px;
	padding-top: 14px;
	border-top: 1px solid var(--hmc-line);
	font-size: 13px;
	color: var(--hmc-muted);
	text-align: right;
}

.hmc-admin-notice {
	background: #fffaf0;
	border: 1px solid #f0dcb4;
	border-radius: 8px;
	padding: 14px 16px;
	color: #6b4f16;
}

/* フッターのリンク */

.hmc-footer-links {
	text-align: center;
	padding: 18px 12px;
	font-size: 14px;
}

.hmc-footer-links__nav a {
	text-decoration: none;
	white-space: nowrap;
}

.hmc-footer-links__nav a:hover {
	text-decoration: underline;
}

.hmc-footer-links__sep {
	color: #ccc;
	margin: 0 4px;
}

.hmc-footer-links__company {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--hmc-muted);
}

@media (max-width: 782px) {
	.hmc-formrow {
		display: block;
	}

	.hmc-formrow__label {
		padding-top: 0;
		margin-bottom: 6px;
	}

	.hmc-contact__form {
		padding: 16px;
	}

	.hmc-table--company th {
		width: auto;
		white-space: normal;
	}

	.hmc-button--wide {
		width: 100%;
	}

	.hmc-footer-links__sep {
		display: none;
	}

	.hmc-footer-links__nav a {
		display: inline-block;
		padding: 6px 10px;
	}
}
