/* 士道館 体験予約カレンダー
   配色は「藍・朱・生成り・墨」の4色に限定する。
   藍＝見出しと選択、朱＝行動（申込ボタン）だけ、生成り＝地、墨＝本文。
   すべて .stb- 接頭辞に閉じ、要素セレクタは .stb-wrap 配下に限定してテーマとの干渉を避ける。 */

.stb-wrap {
	--stb-ai: #22354e;          /* 藍：見出し・選択 */
	--stb-ai-deep: #172538;
	--stb-ai-tint: #eef1f5;
	--stb-shu: #b4472f;         /* 朱：行動のみ */
	--stb-shu-deep: #973a25;
	--stb-sumi: #1f1e1c;        /* 墨：本文 */
	--stb-sumi-soft: #55524c;
	--stb-gray: #8c877e;
	--stb-kinari: #faf7f1;      /* 生成り：地 */
	--stb-line: #e3ddd2;
	--stb-line-soft: #efeae1;
	--stb-kin: #9a7b33;         /* 金茶：特別な日 */
	--stb-error: #a8362a;
	--stb-error-bg: #fbf0ee;
	--stb-ok: #2e6b46;
	--stb-ok-bg: #eef5f0;

	max-width: 640px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.8;
	color: var(--stb-sumi);
	-webkit-text-size-adjust: 100%;
}
.stb-wrap *,
.stb-wrap *::before,
.stb-wrap *::after {
	box-sizing: border-box;
}
.stb-wrap [hidden] {
	display: none !important;
}

/* 読み上げ専用 */
.stb-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.stb-wrap button:focus-visible,
.stb-wrap input:focus-visible,
.stb-wrap textarea:focus-visible,
.stb-wrap select:focus-visible,
.stb-wrap [tabindex]:focus-visible {
	outline: 2px solid var(--stb-ai);
	outline-offset: 2px;
}

/* --- 進み方 --- */
.stb-wrap .stb-steps {
	display: flex;
	list-style: none !important;
	margin: 0 0 1.8em !important;
	padding: 0 !important;
	border: 0;
	background: none;
}
.stb-wrap .stb-steps > li {
	flex: 1;
	position: relative;
	text-align: center;
	font-size: 0.72em;
	letter-spacing: 0.06em;
	color: var(--stb-gray);
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	background: none;
	border: 0;
}
.stb-wrap .stb-steps > li::marker {
	content: "";
	color: transparent;
	font-size: 0;
}
.stb-steps-item::before {
	content: "";
	position: absolute;
	top: 13px;
	left: 0;
	right: 50%;
	height: 1px;
	background: var(--stb-line);
}
.stb-steps-item:first-child::before {
	display: none;
}
.stb-steps-num {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin: 0 auto 5px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid var(--stb-line);
	font-weight: 700;
	font-size: 12px;
	line-height: 1;
	color: var(--stb-gray);
}
.stb-steps-label {
	display: block;
}
.stb-steps-item.is-current {
	color: var(--stb-ai);
	font-weight: 700;
}
.stb-steps-item.is-current .stb-steps-num {
	background: var(--stb-ai);
	border-color: var(--stb-ai);
	color: #fff;
}
.stb-steps-item.is-done {
	color: var(--stb-ai);
}
.stb-steps-item.is-done .stb-steps-num {
	background: #fff;
	border-color: var(--stb-ai);
	color: var(--stb-ai);
}
.stb-steps-item.is-done::before,
.stb-steps-item.is-current::before {
	background: var(--stb-ai);
}

/* --- パネル --- */
.stb-panel-title {
	font-size: 1.32em;
	font-weight: 700;
	line-height: 1.55;
	letter-spacing: 0.01em;
	margin: 0 0 0.4em;
	color: var(--stb-ai);
}
.stb-panel-title:focus {
	outline: none;
}
.stb-panel-lead {
	margin: 0 0 1.4em;
	font-size: 0.86em;
	color: var(--stb-sumi-soft);
	line-height: 1.85;
}

/* --- カレンダー --- */
.stb-calendar {
	border: 1px solid var(--stb-line);
	border-radius: 4px;
	padding: 18px 16px 16px;
	background: #fff;
}
.stb-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}
.stb-cal-month {
	font-weight: 700;
	font-size: 1.12em;
	letter-spacing: 0.06em;
	color: var(--stb-ai);
}
.stb-cal-nav {
	min-width: 44px;
	min-height: 44px;
	border: none;
	background: transparent;
	border-radius: 50%;
	cursor: pointer;
	font-size: 0.8em;
	line-height: 1;
	color: var(--stb-ai);
}
.stb-cal-nav:hover:not(:disabled) {
	background: var(--stb-ai-tint);
}
.stb-cal-nav:disabled {
	opacity: 0.22;
	cursor: default;
}
.stb-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 5px;
}
.stb-cal-weekday {
	text-align: center;
	font-size: 0.68em;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--stb-gray);
	padding: 0 0 6px;
}
.stb-cal-weekday.stb-sun { color: #a8564a; }
.stb-cal-weekday.stb-sat { color: #4a6a86; }

.stb-cal-cell {
	aspect-ratio: 1 / 1;
	min-height: 44px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	border: 1px solid transparent;
	border-radius: 3px;
	background: transparent;
	font-family: inherit;
	font-size: 0.95em;
	font-weight: 400;
	color: #bdb8ae;              /* 休みの日：地に沈める */
	padding: 0;
	margin: 0;
	transition: background-color .15s, border-color .15s;
}
.stb-cal-num {
	line-height: 1.1;
}
/* 選べる日は「枠」で示す。塗りではなく線にすると、月が変わっても地の白が保たれる */
.stb-cal-cell.stb-open {
	background: #fff;
	border-color: var(--stb-ai);
	color: var(--stb-ai);
	font-weight: 700;
	cursor: pointer;
}
.stb-cal-cell.stb-open:hover {
	background: var(--stb-ai-tint);
}
.stb-cal-cell.stb-selected {
	background: var(--stb-ai);
	border-color: var(--stb-ai);
	color: #fff;
}
/* ○は情報を足していないので出さない。★（時間がちがう日）だけ残す */
.stb-cal-mark {
	display: none;
	font-size: 0.6em;
	line-height: 1;
}
.stb-cal-cell.stb-special .stb-cal-mark {
	display: block;
	color: var(--stb-kin);
}
.stb-cal-cell.stb-special {
	border-color: var(--stb-kin);
	color: var(--stb-kin);
	background: #fdfaf3;
}
.stb-cal-cell.stb-special:hover {
	background: #faf3e4;
}
.stb-cal-cell.stb-special.stb-selected {
	background: var(--stb-kin);
	border-color: var(--stb-kin);
	color: #fff;
}
.stb-cal-cell.stb-special.stb-selected .stb-cal-mark {
	color: #fff;
}
.stb-cal-legend {
	margin: 14px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--stb-line-soft);
	font-size: 0.74em;
	color: var(--stb-gray);
	line-height: 1.9;
	letter-spacing: 0.02em;
}
.stb-legend-open {
	display: inline-block;
	width: 15px;
	height: 15px;
	border: 1px solid var(--stb-ai);
	border-radius: 2px;
	vertical-align: -3px;
	margin-right: 3px;
}
.stb-legend-special {
	color: var(--stb-kin);
	font-weight: 700;
}

/* --- 選んだ日の表示 --- */
.stb-selected-date,
.stb-confirm-date {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px 12px;
	background: var(--stb-ai);
	color: #fff;
	border-radius: 4px;
	padding: 14px 16px;
	margin-bottom: 1.5em;
	font-size: 1.05em;
	letter-spacing: 0.02em;
}
.stb-confirm-date {
	display: block;
}
.stb-confirm-date-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px 12px;
}
.stb-confirm-class {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid rgba(255, 255, 255, 0.22);
	font-size: 0.85em;
	letter-spacing: 0.03em;
}
.stb-selected-date-label {
	font-size: 0.7em;
	background: rgba(255, 255, 255, 0.16);
	border-radius: 2px;
	padding: 3px 9px;
	letter-spacing: 0.14em;
}
.stb-link-btn {
	margin-left: auto;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.55);
	color: #fff;
	border-radius: 3px;
	padding: 6px 13px;
	font-family: inherit;
	font-size: 0.74em;
	letter-spacing: 0.06em;
	cursor: pointer;
	min-height: 36px;
}
.stb-link-btn:hover {
	background: rgba(255, 255, 255, 0.14);
}
.stb-link-btn-block {
	display: block;
	width: 100%;
	margin: 12px 0 0;
	background: #fff;
	border: 1px solid var(--stb-line);
	color: var(--stb-ai);
	min-height: 48px;
	font-size: 0.88em;
}
.stb-link-btn-block:hover {
	background: var(--stb-kinari);
}
.stb-link-btn:disabled {
	opacity: 0.45;
	cursor: default;
}

/* --- フォーム --- */
.stb-field {
	margin-bottom: 1.3em;
}
.stb-field-half {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 16px;
}
@media (max-width: 480px) {
	.stb-field-half {
		grid-template-columns: 1fr;
	}
}
.stb-label {
	display: block;
	font-weight: 700;
	font-size: 0.87em;
	letter-spacing: 0.03em;
	margin-bottom: 7px;
	color: var(--stb-sumi);
}
.stb-required,
.stb-optional {
	display: inline-block;
	font-size: 0.68em;
	font-weight: 700;
	letter-spacing: 0.08em;
	border-radius: 2px;
	padding: 2px 7px;
	margin-left: 7px;
	vertical-align: 2px;
}
.stb-required {
	background: var(--stb-shu);
	color: #fff;
}
.stb-optional {
	background: var(--stb-kinari);
	border: 1px solid var(--stb-line);
	color: var(--stb-gray);
}
.stb-wrap input[type="text"],
.stb-wrap input[type="tel"],
.stb-wrap input[type="email"],
.stb-wrap textarea,
.stb-manage-select {
	width: 100%;
	border: 1px solid #c8c2b7;
	border-radius: 3px;
	padding: 13px 14px;
	font-family: inherit;
	font-size: 16px; /* iOSで自動ズームさせない */
	line-height: 1.6;
	color: var(--stb-sumi);
	background: #fff;
}
.stb-wrap input:hover,
.stb-wrap textarea:hover {
	border-color: var(--stb-ai);
}
.stb-wrap input.stb-invalid,
.stb-wrap textarea.stb-invalid {
	border-color: var(--stb-error);
	border-width: 2px;
	background: #fffcfb;
}
.stb-field-hint {
	margin: 6px 0 0;
	font-size: 0.76em;
	color: var(--stb-gray);
	line-height: 1.75;
}
.stb-field-error {
	margin: 7px 0 0;
	font-size: 0.8em;
	font-weight: 700;
	color: var(--stb-error);
	line-height: 1.7;
}
.stb-field-error::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--stb-error);
	vertical-align: 3px;
	margin-right: 7px;
}

.stb-radio-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.stb-radio {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #c8c2b7;
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 0.88em;
	cursor: pointer;
	background: #fff;
	min-height: 44px;
}
.stb-radio:has(input:checked) {
	border-color: var(--stb-ai);
	background: var(--stb-ai-tint);
	font-weight: 700;
	color: var(--stb-ai);
}
.stb-class-option {
	display: flex;
	align-items: center;
	gap: 11px;
	border: 1px solid #c8c2b7;
	border-radius: 3px;
	padding: 15px;
	margin-bottom: 8px;
	cursor: pointer;
	background: #fff;
	min-height: 52px;
}
.stb-class-option:hover {
	background: var(--stb-kinari);
}
.stb-class-option:has(input:checked) {
	border-color: var(--stb-ai);
	border-width: 2px;
	background: var(--stb-ai-tint);
	font-weight: 700;
	color: var(--stb-ai);
	padding: 14px;
}
.stb-class-option input {
	width: 19px;
	height: 19px;
	flex-shrink: 0;
	accent-color: var(--stb-ai);
}
.stb-class-single {
	display: flex;
	align-items: center;
	gap: 9px;
	border: 1px solid var(--stb-line);
	background: var(--stb-kinari);
	border-radius: 3px;
	padding: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--stb-ai);
}
.stb-class-single::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--stb-shu);
	flex-shrink: 0;
}
.stb-class-single-special {
	background: #fdfaf3;
	border-color: #e4d3a8;
	color: #7a6120;
}
.stb-special-notice {
	margin: 0 0 9px;
	padding: 11px 14px;
	background: #fdfaf3;
	border: 1px solid #e4d3a8;
	border-radius: 3px;
	font-size: 0.82em;
	font-weight: 700;
	color: #7a6120;
	line-height: 1.7;
}
.stb-special-notice::before {
	content: "★ ";
}

/* ボット対策の入力欄（位置ではなく切り抜きで隠す） */
.stb-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- 確認画面 --- */
.stb-confirm-list {
	margin: 0 0 1.4em;
	padding: 0;
	display: grid;
	grid-template-columns: 8em 1fr;
	border: 1px solid var(--stb-line);
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
}
.stb-confirm-list dt,
.stb-confirm-list dd {
	margin: 0;
	padding: 13px 15px;
	font-size: 0.9em;
	border-top: 1px solid var(--stb-line-soft);
	line-height: 1.75;
}
.stb-confirm-list dt:first-of-type,
.stb-confirm-list dt:first-of-type + dd {
	border-top: none;
}
.stb-confirm-list dt {
	background: var(--stb-kinari);
	font-weight: 700;
	color: var(--stb-sumi-soft);
	font-size: 0.8em;
	letter-spacing: 0.04em;
}
.stb-confirm-list dd {
	word-break: break-word;
}
@media (max-width: 420px) {
	.stb-confirm-list {
		grid-template-columns: 7.2em 1fr;
	}
	.stb-confirm-list dt,
	.stb-confirm-list dd {
		padding: 12px 10px;
	}
}

/* --- 当日のご案内 --- */
.stb-notice-box {
	background: var(--stb-kinari);
	border: 1px solid var(--stb-line);
	border-radius: 4px;
	padding: 16px 18px;
	margin-bottom: 1.4em;
}
.stb-notice-box-done {
	margin: 1.6em 0 0;
	text-align: left;
}
.stb-notice-title {
	font-weight: 700;
	font-size: 0.8em;
	letter-spacing: 0.12em;
	margin-bottom: 8px;
	color: var(--stb-ai);
}
.stb-notice-text {
	font-size: 0.85em;
	line-height: 1.95;
	color: var(--stb-sumi-soft);
}

/* --- エラー --- */
.stb-error {
	background: var(--stb-error-bg);
	color: var(--stb-error);
	border: 1px solid #e8c4be;
	border-radius: 3px;
	padding: 13px 15px;
	margin: 0 0 1.2em;
	white-space: pre-line;
	font-size: 0.86em;
	font-weight: 700;
	line-height: 1.8;
}

/* --- 送信ボタン --- */
.stb-submit {
	display: block;
	width: 100%;
	background: var(--stb-shu);
	color: #fff;
	font-family: inherit;
	font-size: 1.05em;
	font-weight: 700;
	letter-spacing: 0.06em;
	border: none;
	border-radius: 3px;
	padding: 17px;
	min-height: 56px;
	cursor: pointer;
	line-height: 1.4;
	transition: background-color .15s;
}
.stb-submit:hover:not(:disabled) {
	background: var(--stb-shu-deep);
}
.stb-submit:disabled {
	opacity: 0.55;
	cursor: default;
}
.stb-submit.is-loading {
	background: var(--stb-gray);
}
.stb-note-text {
	font-size: 0.78em;
	color: var(--stb-gray);
	margin: 1.1em 0 0;
	line-height: 1.85;
}

/* --- 完了画面 --- */
.stb-done {
	text-align: center;
	padding: 2.4em 1.4em;
	border: 1px solid var(--stb-line);
	border-radius: 4px;
	background: #fff;
}
.stb-done-icon {
	width: 54px;
	height: 54px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--stb-ok);
	color: #fff;
	font-size: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}
.stb-done-title {
	font-size: 1.25em;
	font-weight: 700;
	letter-spacing: 0.03em;
	margin: 0 0 0.5em;
	color: var(--stb-ai);
}
.stb-done-title:focus {
	outline: none;
}
.stb-done-date {
	font-weight: 700;
	margin: 0 0 1em;
	font-size: 1.02em;
	color: var(--stb-sumi);
}
.stb-done > p:not(.stb-done-date) {
	text-align: left;
	font-size: 0.88em;
	color: var(--stb-sumi-soft);
	margin: 0;
	line-height: 1.9;
}

/* --- 予約の確認・変更・キャンセル --- */
.stb-step-title {
	font-size: 1.15em;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin: 1.8em 0 0.9em;
	color: var(--stb-ai);
}
.stb-manage-notice {
	border-radius: 3px;
	padding: 13px 16px;
	margin-bottom: 1.2em;
	font-weight: 700;
	font-size: 0.9em;
}
.stb-manage-ok {
	background: var(--stb-ok-bg);
	color: var(--stb-ok);
	border: 1px solid #bcd8c6;
}
.stb-manage-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid var(--stb-line);
	border-radius: 4px;
	overflow: hidden;
}
.stb-manage-table th,
.stb-manage-table td {
	text-align: left;
	padding: 13px 15px;
	border-bottom: 1px solid var(--stb-line-soft);
	font-size: 0.9em;
}
.stb-manage-table tr:last-child th,
.stb-manage-table tr:last-child td {
	border-bottom: none;
}
.stb-manage-table th {
	width: 6em;
	background: var(--stb-kinari);
	font-weight: 700;
	color: var(--stb-sumi-soft);
	font-size: 0.82em;
	letter-spacing: 0.04em;
}
.stb-manage-select {
	min-height: 48px;
}
.stb-submit-secondary {
	background: var(--stb-ai);
}
.stb-submit-secondary:hover:not(:disabled) {
	background: var(--stb-ai-deep);
}
.stb-submit-cancel {
	background: #fff;
	color: var(--stb-shu);
	border: 1px solid var(--stb-shu);
}
.stb-submit-cancel:hover:not(:disabled) {
	background: var(--stb-error-bg);
}

@media (prefers-reduced-motion: reduce) {
	.stb-wrap * {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
