/* ==============================
   フォーム全体
============================== */

.commission-form {
	box-sizing: border-box;
	max-width: 760px;
	margin: 40px auto;
	padding-bottom: 96px;
	color: #f7f8fb;
}

.commission-form-guide {
	margin: 0 0 22px;
	padding: 14px 16px;
	background: rgba(156, 183, 220, 0.08);
	border-left: 3px solid #9cb7dc;
	font-size: 13px;
	line-height: 1.8;
	color: #bfcadc;
}

.commission-form-guide span {
	color: #ffffff;
	font-weight: bold;
}

.commission-required {
	margin-left: 3px;
	color: #FFCA86;
	font-size: 14px;
}


/* ==============================
   イラスト1件分
============================== */

.commission-item {
	margin-bottom: 24px;
	padding: 28px;
	background: #1e2a3d;
	border: 1px solid rgba(190, 203, 224, 0.3);
}

.commission-item-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 28px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(190, 203, 224, 0.18);
}

.commission-item-header h2 {
	margin: 0;
	font-size: 15px;
	letter-spacing: 0.08em;
	color: #9cb7dc;
}

.commission-delete-item {
	padding: 6px 10px;
	border: 1px solid rgba(242, 162, 92, 0.55);
	background: rgba(242, 162, 92, 0.08);
	color: #f2a25c;
	font-size: 12px;
	font-weight: bold;
	cursor: pointer;
}

.commission-delete-item:hover {
	border-color: #f2a25c;
	background: rgba(242, 162, 92, 0.18);
	color: #ffd0a6;
}


/* ==============================
   イラストの種類
============================== */

.commission-type-fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}

.commission-type-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.commission-type-item {
	position: relative;
}

.commission-type-item input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.commission-type-item label {
	display: flex;
	flex-direction: column;
	min-height: 120px;
	padding: 20px 18px;
	border: 1px solid #65748d;
	background: #263247;
	cursor: pointer;
	transition:
		border-color 0.15s ease,
		background 0.15s ease,
		transform 0.15s ease;
}

.commission-type-item label:hover {
	background: #2d3a51;
	border-color: #a9bddd;
	transform: translateY(-2px);
}

.commission-type-item input:checked + label {
	background: #344465;
	border-color: #9fc7ff;
	box-shadow: inset 0 0 0 1px #9fc7ff;
}

.commission-type-item input:focus-visible + label {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

.commission-type-name {
	margin-bottom: 8px;
	font-size: 19px;
	font-weight: bold;
	color: #ffffff;
}


.commission-type-note {
	margin-top: auto;
	font-size: 12px;
	line-height: 1.6;
	color: #bdc7d7;
}


/* ==============================
   質問・補助テキスト
============================== */

.commission-question {
	margin-top: 30px;
}

.commission-question:first-of-type {
	margin-top: 0;
}

.commission-question > h3 {
	margin: 0 0 8px;
	font-size: 17px;
	color: #ffffff;
}

.commission-question-note,
.commission-small-note {
	margin: 0 0 16px;
	color: #aebbd0;
	font-size: 12px;
	line-height: 1.7;
}


/* ==============================
   金額表示
============================== */

.commission-price,

.commission-unit-price {
	margin: 12px 0 0;
	font-size: 13px;
	color: #b8c3d4;
}

.commission-unit-price strong {
	margin-left: 6px;
	font-size: 15px;
}

.commission-unit-prices {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin-top: 12px;
	font-size: 12px;
	line-height: 1.6;
	color: #b8c3d4;
}

.commission-unit-prices strong {
	margin-left: 4px;
	font-size: 13px;
}


/* ==============================
   汎用選択肢
============================== */

.commission-option-grid {
	display: grid;
	gap: 10px;
	margin-top: 14px;
}

.commission-option-grid-2 {
	grid-template-columns: repeat(2, 1fr);
	max-width: 320px;
}

.commission-option-grid-3 {
	grid-template-columns: repeat(3, 1fr);
}

.commission-option-grid-4 {
	grid-template-columns: repeat(4, 1fr);
}

.commission-option-grid-5 {
	grid-template-columns: repeat(5, 1fr);
}

.commission-option-grid-usage {
	grid-template-columns: repeat(3, 1fr);
}

.commission-option {
	position: relative;
	cursor: pointer;
}

.commission-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.commission-option > span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 10px;
	border: 1px solid #65748d;
	background: #263247;
	color: #dce4f0;
	font-size: 13px;
	text-align: center;
	transition:
		background 0.15s ease,
		border-color 0.15s ease;
}

.commission-option:hover > span {
	background: #2d3a51;
	border-color: #a9bddd;
}

.commission-option input:checked + span {
	background: #344465;
	border-color: #9fc7ff;
	box-shadow: inset 0 0 0 1px #9fc7ff;
}

.commission-option-with-meta {
	flex-direction: column;
	gap: 3px;
	min-height: 58px !important;
}

.commission-option-with-meta strong {
	font-size: 13px;
	font-weight: normal;
	color: inherit;
}

.commission-option-with-meta small {
	font-size: 11px;
	line-height: 1.35;
}

.commission-rate {
	color: #aebbd0;
}

.commission-option input:checked + .commission-option-with-meta .commission-rate {
	color: #d7e7ff;
}


/* ==============================
   カウンター
============================== */

.commission-counter {
	display: inline-flex;
	align-items: stretch;
	margin-top: 8px;
	border: 1px solid #65748d;
}

.commission-counter button {
	width: 46px;
	border: 0;
	background: #263247;
	color: #ffffff;
	font-size: 20px;
	cursor: pointer;
}

.commission-counter button:hover:not(:disabled) {
	background: #344465;
}

.commission-counter button:disabled {
	opacity: 0.3;
	cursor: default;
}

.commission-counter-value {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 4px;
	min-width: 80px;
	padding: 9px 14px;
	background: #172234;
	color: #ffffff;
}

.commission-counter-value strong {
	font-size: 20px;
}

.commission-counter-value span {
	font-size: 12px;
	color: #aebbd0;
}


/* ==============================
   その他
============================== */

.commission-other-message {
	margin-top: 16px;
	padding: 12px 16px;
	border-left: 2px solid #9cb7dc;
	background: rgba(156, 183, 220, 0.05);
}

.commission-other-message .commission-note-label {
	margin: 0 0 5px;
	color: #9cb7dc;
	font-size: 12px;
	font-weight: bold;
}

.commission-other-message p {
	margin: 0;
	font-size: 12px;
	line-height: 1.8;
	color: #bfcadc;
}


/* ==============================
   詳細指定
============================== */

.commission-detail {
	margin-top: 28px;
	border-top: 1px solid rgba(190, 203, 224, 0.18);
	border-bottom: 1px solid rgba(190, 203, 224, 0.18);
}

.commission-detail summary {
	padding: 14px 2px;
	color: #a9cfff;
	font-size: 13px;
	font-weight: bold;
	cursor: pointer;
	list-style: none;
}

.commission-detail summary::-webkit-details-marker {
	display: none;
}

.commission-detail summary:hover {
	color: #ffffff;
}

.commission-detail[open] summary {
	border-bottom: 1px solid rgba(190, 203, 224, 0.14);
}

.commission-detail-inner {
	padding: 20px 0;
}

.commission-detail-section + .commission-detail-section {
	margin-top: 24px;
}

.commission-detail-section h4 {
	margin: 0 0 10px;
	font-size: 14px;
	color: #ffffff;
}

.commission-detail-checks {
	display: grid;
	gap: 8px;
}

.commission-check {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 9px 12px;
	background: rgba(255, 255, 255, 0.025);
	cursor: pointer;
}

.commission-check input {
	accent-color: #9fc7ff;
}

.commission-check-label {
	flex: 1;
	font-size: 13px;
	color: #cbd5e3;
}

.commission-detail-meta {
	flex-shrink: 0;
	font-size: 12px;
	font-weight: bold;
	white-space: nowrap;
}


/* ==============================
   イラスト追加
============================== */

.commission-add-area {
	margin: 18px 0 36px;
	text-align: center;
}

.commission-add-item {
	width: 100%;
	padding: 14px 20px;
	border: 1px dashed #65748d;
	background: transparent;
	color: #b9cbe4;
	font-size: 14px;
	cursor: pointer;
}

.commission-add-item:hover:not(:disabled) {
	border-color: #a9cfff;
	background: rgba(169, 207, 255, 0.06);
	color: #ffffff;
}

.commission-add-item:disabled {
	opacity: 0.5;
	cursor: default;
}

.commission-add-note {
	margin: 8px 0 0;
	color: #8290a6;
	font-size: 11px;
}


/* ==============================
   Step切り替え・相談フォーム
============================== */

.commission-step-actions {
	margin: 8px 0 36px;
}

.commission-primary-button {
	width: 100%;
	padding: 15px 20px;
	border: 1px solid #9fc7ff;
	background: #344465;
	color: #ffffff;
	font-size: 14px;
	font-weight: bold;
	cursor: pointer;
	transition:
		background 0.15s ease,
		border-color 0.15s ease;
}

.commission-primary-button:hover {
	background: #405379;
	border-color: #c7ddff;
}


.commission-primary-button:disabled {
	opacity: 0.55;
	cursor: wait;
}


.commission-back-button {
	margin: 0 0 18px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #a9cfff;
	font-size: 13px;
	font-weight: bold;
	cursor: pointer;
}

.commission-back-button:hover {
	color: #ffffff;
}

.commission-consultation-card {
	padding: 28px;
	background: #1e2a3d;
	border: 1px solid rgba(190, 203, 224, 0.3);
}

.commission-field {
	display: block;
	margin: 0;
}

.commission-field + .commission-field {
	margin-top: 28px;
}

.commission-field-label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: bold;
	color: #ffffff;
}

.commission-field-note {
	display: block;
	margin: -2px 0 10px;
	font-size: 11px;
	line-height: 1.7;
	color: #8f9db2;
}

.commission-field input[type="text"],
.commission-field input[type="email"],
.commission-field input[type="date"],
.commission-field textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 11px 12px;
	border: 1px solid #65748d;
	background: #172234;
	color: #f7f8fb;
	font: inherit;
	font-size: 14px;
	line-height: 1.6;
	outline: none;
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

.commission-field input[type="date"] {
	color-scheme: dark;
}

.commission-field textarea {
	resize: vertical;
}

.commission-field input:focus,
.commission-field textarea:focus {
	border-color: #9fc7ff;
	box-shadow: 0 0 0 1px #9fc7ff;
}

.commission-field textarea::placeholder {
	color: #738198;
}

.commission-fieldset {
	padding: 0;
	border: 0;
}

.commission-fieldset .commission-option-grid {
	margin-top: 12px;
}

.commission-consultation-summary {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	margin-top: 20px;
	padding: 16px 18px;
	border: 1px solid rgba(159, 199, 255, 0.35);
	background: rgba(156, 183, 220, 0.08);
}

.commission-consultation-summary-label {
	display: block;
	margin-bottom: 3px;
	font-size: 13px;
	font-weight: bold;
	color: #ffffff;
}

.commission-consultation-summary p {
	margin: 0;
	font-size: 11px;
	line-height: 1.6;
	color: #8f9db2;
}

.commission-consultation-summary > strong {
	flex-shrink: 0;
	margin: 0;
	font-size: 18px;
	white-space: nowrap;
}

/* ==============================
   相談フォーム送信
============================== */

.commission-submit-area {
	margin-top: 28px;
}

.commission-submit-note {
	margin: 0 0 14px;
	font-size: 12px;
	line-height: 1.8;
	color: #aebbd0;
}

/* ==============================
   入力エラー
============================== */

.commission-form-error {
	margin: 12px 0 0;
	padding: 10px 12px;
	border-left: 3px solid #f2a25c;
	background: rgba(242, 162, 92, 0.08);
	color: #ffd0a6;
	font-size: 12px;
	line-height: 1.7;
}

.commission-step-error {
	margin: 0 0 12px;
}

.commission-field-error {
	display: block;
	margin-top: 7px;
	color: #ffbf8b;
	font-size: 11px;
	line-height: 1.6;
}

.commission-field.has-error input[type="text"],
.commission-field.has-error input[type="email"],
.commission-field.has-error input[type="date"],
.commission-field.has-error textarea {
	border-color: #f2a25c;
	box-shadow: 0 0 0 1px rgba(242, 162, 92, 0.35);
}


/* ==============================
   送信完了
============================== */

.commission-complete-card {
	padding: 34px 28px;
	border: 1px solid rgba(159, 199, 255, 0.35);
	background: #1e2a3d;
	text-align: center;
}

.commission-complete-card h2 {
	margin: 0 0 16px;
	color: #ffffff;
	font-size: 22px;
}

.commission-complete-card > p:not(.commission-receipt) {
	margin: 0;
	color: #bfcadc;
	font-size: 13px;
	line-height: 1.9;
}

.commission-receipt {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	margin: 20px 0 0 !important;
	padding: 12px 16px;
	background: #172234;
	color: #aebbd0;
	font-size: 12px;
}

.commission-receipt strong {
	color: #a9cfff;
	font-size: 19px;
}



/* ==============================
   概算内訳
============================== */

.commission-estimate-copy {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.commission-estimate-breakdown {
	max-width: 500px;
	overflow: hidden;
	color: #8f9db2;
	font-size: 11px;
	line-height: 1.45;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.commission-consultation-summary-main {
	flex: 1;
	min-width: 0;
}

.commission-step2-breakdown {
	display: grid;
	gap: 6px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid rgba(190, 203, 224, 0.14);
}

.commission-step2-breakdown-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 18px;
	font-size: 12px;
	line-height: 1.6;
	color: #cbd5e3;
}

.commission-step2-breakdown-row strong {
	flex-shrink: 0;
	font-size: 12px;
	white-space: nowrap;
}


/* ==============================
   固定の概算金額
============================== */

.commission-estimate-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000;
	box-sizing: border-box;
	width: 100%;
	border-top: 1px solid rgba(159, 199, 255, 0.7);
	background: #172234;
	--box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.22);
}

.commission-estimate-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	box-sizing: border-box;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding: 12px 20px;
}

.commission-estimate-label {
	flex-shrink: 0;
	font-size: 13px;
	font-weight: bold;
	color: #dce4f0;
}

.commission-estimate-total {
	font-size: 22px;
	line-height: 1.2;
	text-align: right;
	white-space: nowrap;
}

/* 概算バー表示中もTOPボタンが重ならないよう上へ逃がす */
#totop {
	bottom: 65px !important;
}


/* ==============================
   非表示
============================== */

.commission-form [hidden] {
	display: none !important;
}


/* ==============================
   スマホ
============================== */

@media (max-width: 700px) {

	.commission-form {
		margin: 24px auto;
		padding-bottom: 88px;
	}

	.commission-item {
		padding: 20px;
	}

	.commission-type-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.commission-type-item label {
		min-height: 0;
	}

	.commission-option-grid-3,
	.commission-option-grid-4,
	.commission-option-grid-5,
	.commission-option-grid-usage {
		grid-template-columns: repeat(2, 1fr);
	}

	.commission-unit-prices {
		gap: 4px 12px;
	}

	.commission-consultation-card {
		padding: 20px;
	}

	.commission-complete-card {
		padding: 28px 20px;
	}


	.commission-consultation-summary {
		align-items: flex-start;
		padding: 14px;
	}

	.commission-consultation-summary > strong {
		font-size: 16px;
	}

	.commission-step2-breakdown-row {
		display: grid;
		gap: 2px;
	}

	.commission-estimate-breakdown {
		max-width: 58vw;
	}

	.commission-estimate-inner {
		gap: 12px;
		padding: 11px 14px;
	}

	.commission-estimate-total {
		font-size: 19px;
	}

	#totop {
		bottom: 68px !important;
	}

}

@media (max-width: 380px) {

	.commission-consultation-summary {
		flex-direction: column;
		gap: 8px;
	}

	.commission-estimate-inner {
		gap: 8px;
		padding: 10px 12px;
	}

	.commission-estimate-label {
		font-size: 12px;
	}

	.commission-estimate-total {
		font-size: 17px;
	}

}
