
/* ========================================
   Suggest Modal (using <dialog> for top-layer)
   ======================================== */
dialog#suggestModal {
	border: none;
	padding: 0;
	background: transparent;
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100vh;
	overflow-y: auto;
	margin: 0;
}
dialog#suggestModal::backdrop {
	background: rgba(0, 0, 0, 0.6);
}
.select-modal {
	background: #fff;
	border-radius: 16px;
	width: calc(100% - 40px);
	max-width: 400px;
	margin: 80px auto;
	box-shadow: 0 8px 40px rgba(0,0,0,0.3);
	animation: slideUp 0.3s ease;
}
body:has(dialog[open]) {
	overflow: hidden;
}
@keyframes slideUp {
	from { transform: translateY(30px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}
dialog[open] .select-modal {
	display: block;
	max-width: 400px;
	width: calc(100% - 40px);
}
.select-modal {
	background: #fff; border-radius: 16px; max-width: 400px;
	width: 100%; overflow: hidden;
	box-shadow: 0 8px 40px rgba(0,0,0,0.3); animation: slideUp 0.3s ease;
}
.select-modal-header {
	background: linear-gradient(135deg, #173e8c 0%, #1a4fa0 100%);
	padding: 24px; text-align: center;
}
.select-modal-header .icon {
	width: 52px; height: 52px;
	background: rgba(255,255,255,0.15); border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	margin-bottom: 12px;
}
.select-modal-header .icon img { width: 28px; height: 28px; }
.select-modal-header h2 {
	color: #fff; font-size: 16px; font-weight: 700; line-height: 1.6;
}
.select-modal-body { padding: 24px; text-align: center; }
.select-modal-body .preview-item {
	margin-bottom: 16px;
}
.select-modal-body .design-preview {
	display: inline-block; margin-bottom: 8px; position: relative;
}
.select-modal-body .design-preview img {
	width: 220px; border-radius: 10px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.select-modal-body .design-preview .new-badge {
	position: absolute; top: 8px; left: 8px;
	background: #e53935; color: #fff;
	font-size: 10px; font-weight: 700;
	padding: 3px 10px; border-radius: 10px;
}
.select-modal-body .message {
	font-size: 14px; color: #555; line-height: 1.8; margin-bottom: 4px;
}
.select-modal-body .message strong { color: #173e8c; }
.modal-actions {
	display: flex; flex-direction: column; gap: 10px;
	padding: 0 24px 24px;
}
.modal-actions .btn-modal {
	display: block; width: 100%; padding: 14px; border: none;
	border-radius: 8px; font-family: 'Noto Sans JP', sans-serif;
	font-size: 15px; font-weight: 700; cursor: pointer;
	transition: opacity 0.2s; text-align: center; text-decoration: none;
}
.modal-actions .btn-modal:hover { opacity: 0.85; }
.modal-actions .btn-primary { background: #173e8c; color: #fff; }
.modal-actions .btn-secondary {
	background: transparent; color: #999;
	font-weight: 400; font-size: 13px; padding: 8px;
}


/* ========================================
   Current Design Indicator
   ======================================== */
.current-indicator {
	max-width: 1000px; margin: 30px auto 0;
	padding: 0 20px 0;
	display: flex; align-items: center; gap: 16px;
}
.current-indicator .current-thumb {
	width: 80px; border-radius: 6px; flex-shrink: 0;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.current-indicator .current-info {
	font-size: 13px; color: #555;
}
.current-indicator .current-info .label {
	font-size: 11px; color: #999; margin-bottom: 2px;
}
.current-indicator .current-info .name {
	font-size: 14px; font-weight: 700; color: #173e8c;
}

/* ========================================
   Design Selection Grid
   ======================================== */
.design-section {
	max-width: 1000px; margin: 0 auto;
	padding: 24px 20px;
}
.design-section-header {
	display: flex; align-items: center; gap: 10px;
	margin-bottom: 16px;
}
.design-section-header .section-title {
	font-size: 15px; font-weight: 700; color: #333;
}
.design-section-header .badge-count {
	background: #173e8c; color: #fff;
	font-size: 11px; font-weight: 700;
	padding: 2px 8px; border-radius: 10px;
}

.design-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}
@media screen and (min-width: 768px) {
	.design-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

.design-card {
	background: #fff; border-radius: 12px; overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
	position: relative; border: 3px solid transparent;
}
.design-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.design-card.active { border-color: #173e8c; }
.design-card.active .card-thumb::after {
	content: '';
	position: absolute; top: 8px; right: 8px;
	width: 28px; height: 28px;
	background: #173e8c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center;
	background-size: 14px; border-radius: 50%;
}
.design-card.current-design { border-color: #ffe612; }
.design-card.current-design .card-thumb::after {
	content: '設定中';
	position: absolute; bottom: 6px; left: 6px;
	background: #ffe612; color: #173e8c;
	font-size: 10px; font-weight: 700;
	padding: 2px 8px; border-radius: 4px;
}
.design-card.unavailable {
	opacity: 0.45; cursor: not-allowed; filter: grayscale(60%);
}
.design-card.unavailable:hover {
	transform: none; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.design-card .card-thumb {
	position: relative; aspect-ratio: 1.586; overflow: hidden;
}
.design-card .card-thumb img {
	width: 100%; height: 100%; object-fit: cover;
}
.design-card .card-thumb .unavailable-overlay {
	position: absolute; inset: 0;
	display: flex; flex-direction: column;
	align-items: center; justify-content: center;
	background: rgba(0,0,0,0.3);
}
.design-card .card-thumb .unavailable-overlay .lock-icon {
	width: 36px; height: 36px;
	background: rgba(0,0,0,0.5); border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 18px; color: #fff; margin-bottom: 4px;
}
.design-card .card-thumb .unavailable-overlay .lock-text {
	font-size: 11px; color: #fff;
	background: rgba(0,0,0,0.5); padding: 2px 10px; border-radius: 4px;
}

.design-card .card-info { padding: 10px 12px; }
.design-card .card-info .design-name {
	font-size: 12px; font-weight: 700; color: #333; line-height: 1.4;
}
.design-card .card-info .design-type {
	font-size: 10px; color: #999; margin-top: 2px;
}
.design-card .card-info .design-status {
	margin-top: 6px; font-size: 10px; font-weight: 700;
	padding: 2px 8px; border-radius: 4px; display: inline-block;
}
.status-available { background: #e8f5e9; color: #2e7d32; }
.status-unavailable { background: #fce4ec; color: #c62828; }
.status-current { background: #fff8e1; color: #f57f17; }

/* ========================================
   Preview & Confirm Panel (bottom)
   ======================================== */
.preview-panel {
	max-width: 1000px; margin: 0 auto;
	padding: 0 20px 0;
	display: none;
}
.preview-panel.show {
	display: block;
	margin-top: -80px;
	padding-top: 80px;
}

.preview-panel .divider {
	border: none; border-top: 1px solid #e0e0e0;
	margin: 8px 0 24px;
}

.preview-panel .preview-title {
	font-size: 15px; font-weight: 700; color: #333;
	margin-bottom: 16px;
}

.preview-content {
	display: flex; gap: 24px; align-items: flex-start;
}
@media screen and (max-width: 767px) {
	.preview-content { flex-direction: column; align-items: center; }
}

.preview-card-area {
	flex-shrink: 0; text-align: center;
}
.preview-card-area .preview-card-img {
	width: 300px; max-width: 80vw;
	border-radius: 12px;
	box-shadow: 0 6px 24px rgba(0,0,0,0.15);
	transition: all 0.3s ease;
}
.preview-card-area .preview-design-name {
	margin-top: 12px;
	font-size: 15px; font-weight: 700; color: #173e8c;
}
.preview-card-area .preview-design-type {
	font-size: 12px; color: #999; margin-top: 2px;
}

.preview-info-area {
	flex: 1;
}
.preview-info-area .change-summary {
	background: #f5f7fa; border-radius: 12px; padding: 20px;
	margin-bottom: 20px;
}
.preview-info-area .change-summary .change-row {
	display: flex; align-items: center; gap: 12px;
	font-size: 13px; color: #555;
}
.preview-info-area .change-summary .change-row + .change-row {
	margin-top: 12px;
}
.preview-info-area .change-summary .change-label {
	font-size: 11px; color: #999; flex-shrink: 0; width: 50px;
}
.preview-info-area .change-summary .change-thumb {
	width: 48px; border-radius: 4px; flex-shrink: 0;
}
.preview-info-area .change-summary .change-name {
	font-weight: 600; color: #333;
}
.preview-info-area .change-summary .arrow-icon {
	font-size: 18px; color: #173e8c; text-align: center;
	margin: 8px 0;
}

.preview-info-area .btn-apply {
	display: block; width: 100%;
	background: #173e8c; color: #fff; border: none;
	padding: 16px; border-radius: 10px;
	font-family: 'Noto Sans JP', sans-serif;
	font-size: 16px; font-weight: 700;
	cursor: pointer; transition: opacity 0.2s;
	text-align: center;
}
.preview-info-area .btn-apply:hover { opacity: 0.85; }
.preview-info-area .btn-cancel {
	display: block; width: 100%;
	background: transparent; color: #999; border: none;
	padding: 10px; font-family: 'Noto Sans JP', sans-serif;
	font-size: 13px; cursor: pointer; text-align: center;
	margin-top: 8px;
}

/* Toast */
.toast {
	position: fixed; top: 80px; left: 50%;
	transform: translateX(-50%) translateY(-20px);
	background: #2e7d32; color: #fff;
	padding: 12px 24px; border-radius: 8px;
	font-size: 14px; font-weight: 500;
	box-shadow: 0 4px 16px rgba(0,0,0,0.2);
	z-index: 300; opacity: 0;
	transition: opacity 0.3s, transform 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* MOCK annotation */
.mock-annotation {
	position: fixed; bottom: 0; left: 0; right: 0;
	background: #ffe612; color: #173e8c;
	text-align: center; padding: 8px 16px;
	font-size: 12px; font-weight: 700; z-index: 2000;
}