/* KAERUボタン */
.kaeru_icon {
	position: fixed !important;
	top: unset !important;
	bottom: 18vw !important;
	/*bottom: 4vw !important;*/
	right: 31vw !important;
	z-index: 2147483645;
}

.kaeru_icon .kaeru_icon_background {
	position: absolute;
	bottom: 0;
	object-fit: cover;
	width: 29vw;
	height: 11vw;
	border-radius: 2vw;
	padding: 1vw;
	background-color: rgba(255, 255, 255, 0.9);
	box-shadow: 0px 0px 3px 3px rgba(0, 0, 0, 0.2);
	display: flex;
	justify-content: center;
	align-items: center;
	border: none;
}

/* 画像のサイズとテキストとの余白 */
.kaeru_icon .kaeru_icon_background img {
	height: 77%;
	margin-right: 0.5vw;
	padding-left: 1vw;
	width: auto;
}

.kaeru_icon .kaeru_icon_background span {
	font-size: 4.8vw;
	margin-top: 0.4vw;
	padding-right: 1vw;
	font-family: "Noto Sans JP", sans-serif;
	font-optical-sizing: auto;
	font-weight: 900;
	font-style: normal;
	color: #424242;
}

body.modal-open {
	overflow: hidden;
	height: 100vh;
	position: fixed;
	width: 100%;
}

/* モーダル全体 (デフォルトは非表示) */
.modal {
    display: none; /* ← 常に非表示に */
    margin: 0;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    z-index: 2147483646;
    position: fixed;
}

/* .activeクラスでモーダルを表示 */
.modal.active {
    display: flex; /* ← .activeが付いた時だけ表示 */
}

/* モーダルウィンドー部分 */
.modal_window {
	background-color: white;
	width: 60%;
	max-width: 75vw;
	border-radius: 5vw;
	box-shadow: 0 1vw 2vw rgba(0, 0, 0, 0.2);
	text-align: center;
	padding: 5vw 0 0;
	max-height: 90vh;
	/* ← 念のため全体の高さ制限 */
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

/* ボタン群を囲う部分：通常は高さ自動、7個以上でスクロール切り替え */
.modal_button_list {
	max-height: calc(12vw * 6.5 + 1px);
	/* 7個目の半分が見える高さ */
	overflow-y: auto;
	scroll-behavior: smooth;
	/* ← スムーススクロールを有効化 */
	-webkit-overflow-scrolling: touch;
	/* ← iOS対応（慣性スクロール） */
}

.modal_window h2 {
	font-size: 1.2em;
	display: block;
	margin: 0 0 2vw;
	padding: 0;
	color: #666;
	letter-spacing: 0.1em;
	background: transparent;
}

.modal_window button {
	display: block;
	width: 100%;
	padding: 3vw;
	border: none;
	border-top: 1px solid #ccc;
	color: #007aff;
	text-decoration: none;
	font-size: 3.7vw;
}

.modal_window button:last-child {
	color: #666;
}

.modal_window p {
	margin: 0 2vw 2vw;
	color: #666;
	font-size: 2.8vw;
}

.modal_window .modal_button_list > button:last-of-type {
	font-weight: normal !important;
}

/* ボタン内のラベルエリアを横並びに */
.modal_window button.not_used .label_area {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	color: #aaa;
}

/* 店名テキスト（左寄せ） */
.modal_window button.not_used .shop_name {
	text-align: left;
	font-size: 3.7vw;
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 星（右寄せ・初期は灰色） */
.modal_window button.not_used .star {
	margin-left: 1vw;
	font-size: 4.5vw;
	transition: color 0.3s;
}

/* タップ後の星を黄色に */
.modal_window button.not_used:active .star {
	color: #FFD700;
}
.modal_window button.not_used.star-highlight .star {
	color: #FFD700;
}

/* 使用しないの選択肢 */
button.not_used {
	color: #666;
}

/* 背景の透過グレー */
.sorry {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.5);
	/* 初期状態は非表示 */
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 2147483647;
	text-align: center;
}

/* activeクラスが付与されたら表示する */
.sorry.active {
	display: flex;
}

/* 中央の案内カード */
.sorry .loading_inner {
	background-color: white;
	border-radius: 3vw;
	padding: 5vw 4vw;
	box-shadow: 0 1vw 2vw rgba(0, 0, 0, 0.25);
	max-width: 60vw;
	width: auto;
}

/* テキスト */
.sorry p {
	font-size: 3.4vw;
	color: #424242;
	margin-bottom: 4vw;
	line-height: 1.7;
	padding: 0;
}

/* ロゴ画像 */
.sorry .loading_image {
	width: 50%;
	height: auto;
	margin: 0 auto;
}

/* sorry内の閉じるボタン */
.close_sorry_button {
        width: 40vw;
        margin-top: 4vw;
        padding: 2vw 4vw;
        font-size: 4vw;
        background-color: #007aff;
        color: white;
        border: none;
        border-radius: 2vw;
        cursor: pointer;
        box-shadow: 0 0.5vw 1vw rgba(0, 0, 0, 0.2);
}

/* ローディング背景 */
.loading {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background-color: rgba(255, 255, 255, 0.9);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 2147483647;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

/* フェードイン用クラス */
.loading.show {
	opacity: 1;
	pointer-events: all;
}

/* 中央コンテンツ */
.loading_inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 80%;
}

/* メイン画像 */
.loading_image {
	width: 100%;
	height: auto;
	margin-bottom: 2vw;
}

/* デフォルトでは非表示 */
.kaeru_icon {
	display: none;
}

/* show-kaeru-iconクラスが付与されている場合のみ表示 */
html.show-kaeru-icon .kaeru_icon {
	display: block;
}

/* 候補店0店舗の場合 */
.no_store_notice {
	font-size: 3.5vw;
	color: #666;
	margin: 4vw 2vw;
	line-height: 1.6;
	text-align: center;
}
