/* Hardonize RSVP (hnzrsvp) スタイル */
.hnzrsvp-box {
	--avatar-size: 44px;
	background: #ffffff;
	border: 1px solid #e1e8ed;
	border-radius: 12px;
	padding: 24px;
	max-width: 600px;
	margin: 24px auto;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #14171a;
	box-sizing: border-box;
}
.hnzrsvp-box * {
	box-sizing: border-box;
}
.hnzrsvp-header {
	border-bottom: 2px solid #f5f8fa;
	padding-bottom: 14px;
	margin-bottom: 20px;
}
.hnzrsvp-title {
	font-size: 20px;
	margin: 0;
	font-weight: 700;
	color: #1da1f2;
	line-height: 1.3;
}
.hnzrsvp-meta-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
}
.hnzrsvp-meta-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	line-height: 1.2;
	color: #536471;
	background: #f7f9fa;
	padding: 4px 10px;
	border-radius: 12px;
	border: 1px solid #e1e8ed;
}
.hnzrsvp-badge-event {
	font-weight: 700;
	color: #0f1419;
	background: #f0f3f4;
}
.hnzrsvp-badge-date strong {
	color: #0f1419;
}
.hnzrsvp-meta-icon {
	font-size: 13px;
	line-height: 1;
}
.hnzrsvp-actions {
	display: flex;
	gap: 12px;
	margin-bottom: 24px;
}
.hnzrsvp-btn {
	flex: 1;
	padding: 12px 18px;
	border: none;
	border-radius: 24px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #ffffff;
	line-height: 1.2;
}
.hnzrsvp-btn-yes {
	background: #1da1f2;
}
.hnzrsvp-btn-yes:hover {
	background: #0c85d0;
	transform: translateY(-1px);
}
.hnzrsvp-btn-maybe {
	background: #657786;
}
.hnzrsvp-btn-maybe:hover {
	background: #4a5c6a;
	transform: translateY(-1px);
}
.hnzrsvp-section {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #f5f8fa;
}
/* 見出しと折り畳みボタンの完全な垂直中央揃え */
.hnzrsvp-collapse-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	min-height: 32px;
}
.hnzrsvp-section-title {
	font-size: 14px;
	font-weight: 600;
	color: #657786;
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	line-height: 1;
}
.hnzrsvp-count-text {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}
.badge-yes {
	background: #e8f5fe;
	color: #1da1f2;
	padding: 4px 8px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	display: inline-flex;
	align-items: center;
}
.badge-maybe {
	background: #f5f8fa;
	color: #657786;
	padding: 4px 8px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	display: inline-flex;
	align-items: center;
}
.hnzrsvp-toggle-btn {
	background: #f0f3f4;
	border: none;
	padding: 5px 12px;
	border-radius: 14px;
	font-size: 12px;
	color: #536471;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	font-weight: 600;
	line-height: 1;
	transition: all 0.2s ease;
	flex-shrink: 0;
	margin: 0;
}
.hnzrsvp-toggle-btn:hover {
	background: #e1e8ed;
	color: #0f1419;
}
.hnzrsvp-toggle-icon {
	font-size: 9px;
	line-height: 1;
	transition: transform 0.2s ease;
	display: inline-block;
}
.hnzrsvp-toggle-btn.is-active .hnzrsvp-toggle-icon {
	transform: rotate(180deg);
}
.hnzrsvp-collapse-body {
	margin-top: 10px;
}
.hnzrsvp-avatar-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.hnzrsvp-avatar-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	width: calc(var(--avatar-size, 44px) + 16px);
}
.hnzrsvp-avatar-item img {
	width: var(--avatar-size, 44px);
	height: var(--avatar-size, 44px);
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid transparent;
	transition: border-color 0.2s, transform 0.2s;
}
.hnzrsvp-avatar-item:hover img {
	border-color: #1da1f2;
	transform: scale(1.05);
}
.avatar-placeholder {
	width: var(--avatar-size, 44px);
	height: var(--avatar-size, 44px);
	border-radius: 50%;
	background: #e1e8ed;
	color: #657786;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
}
.hnzrsvp-user-label {
	font-size: 10px;
	color: #657786;
	margin-top: 4px;
	max-width: calc(var(--avatar-size, 44px) + 16px);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-align: center;
}
.hnzrsvp-empty {
	font-size: 13px;
	color: #aab8c2;
	font-style: italic;
	margin: 0;
}
/* サイドバー用スリムレイアウト */
.hnzrsvp-box.hnzrsvp-is-sidebar {
	--avatar-size: 36px;
	padding: 16px;
	margin: 0 0 20px 0;
	border-radius: 10px;
	max-width: 100%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.hnzrsvp-box.hnzrsvp-is-sidebar .hnzrsvp-header {
	margin-bottom: 14px;
	padding-bottom: 12px;
}
.hnzrsvp-box.hnzrsvp-is-sidebar .hnzrsvp-title {
	font-size: 17px;
}
.hnzrsvp-box.hnzrsvp-is-sidebar .hnzrsvp-meta-badges {
	gap: 6px;
	margin-top: 8px;
}
.hnzrsvp-box.hnzrsvp-is-sidebar .hnzrsvp-meta-badge {
	font-size: 11px;
	padding: 3px 8px;
}
.hnzrsvp-box.hnzrsvp-is-sidebar .hnzrsvp-actions {
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}
.hnzrsvp-box.hnzrsvp-is-sidebar .hnzrsvp-btn {
	padding: 10px 14px;
	font-size: 13px;
	width: 100%;
}
.hnzrsvp-box.hnzrsvp-is-sidebar .hnzrsvp-collapse-header {
	min-height: 28px;
	margin-bottom: 8px;
}
.hnzrsvp-box.hnzrsvp-is-sidebar .hnzrsvp-section-title {
	font-size: 13px;
	gap: 6px;
}
.hnzrsvp-box.hnzrsvp-is-sidebar .badge-yes,
.hnzrsvp-box.hnzrsvp-is-sidebar .badge-maybe {
	padding: 2px 6px;
	font-size: 11px;
}
.hnzrsvp-box.hnzrsvp-is-sidebar .hnzrsvp-toggle-btn {
	padding: 4px 8px;
	font-size: 11px;
	border-radius: 12px;
}
.hnzrsvp-box.hnzrsvp-is-sidebar .hnzrsvp-avatar-grid {
	gap: 8px;
}

/* ===================================================
   スマホ専用 下部固定フローティングバー & ボトムシート
   =================================================== */
/* PC（769px以上）では完全に非表示 */
@media (min-width: 769px) {
	.hnzrsvp-mobile-container {
		display: none !important;
	}
}

/* スマホ（768px以下）での表示スタイル */
@media (max-width: 768px) {
	.hnzrsvp-mobile-container {
		display: block;
	}

	/* 画面最下部固定バー（パターン1: スマート展開型） */
	.hnzrsvp-floating-bar {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		height: auto;
		min-height: 52px;
		background: rgba(255, 255, 255, 0.96);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		border-top: 1px solid #e1e8ed;
		box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
		z-index: 99990;
		box-sizing: border-box;
		cursor: pointer;
		transition: background-color 0.15s;
	}

	.hnzrsvp-floating-bar:active {
		background-color: rgba(248, 250, 252, 0.98);
	}

	.hnzrsvp-floating-info {
		display: flex;
		align-items: center;
		gap: 6px;
		min-width: 0;
		padding: 0;
		margin: 0;
	}

	.hnzrsvp-floating-badge {
		background: #f0f3f5;
		color: #1c242c;
		font-size: 11px;
		font-weight: bold;
		padding: 2px 7px;
		border-radius: 9999px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 95px;
		display: inline-flex;
		align-items: center;
		line-height: 1.2;
		flex-shrink: 0;
	}

	.hnzrsvp-floating-status {
		display: inline-flex;
		align-items: center;
		gap: 4px;
		white-space: nowrap;
	}

	.hnzrsvp-floating-status .badge-yes {
		background-color: #e8f5fd;
		color: #1d9bf0;
		font-size: 10px;
		font-weight: bold;
		padding: 2px 5px;
		border-radius: 4px;
		line-height: 1.2;
		display: inline-flex;
		align-items: center;
	}

	.hnzrsvp-floating-count {
		font-size: 12px;
		font-weight: 600;
		color: #14171a;
		white-space: nowrap;
		display: inline-flex;
		align-items: center;
		line-height: 1.2;
	}

	.hnzrsvp-floating-count strong {
		color: #1d9bf0;
		font-size: 13px;
		margin: 0 1px;
	}

	.hnzrsvp-floating-actions {
		display: flex;
		align-items: center;
		flex-shrink: 0;
		margin-left: 8px;
	}

	.hnzrsvp-floating-open-btn {
		background-color: #1d9bf0;
		color: #ffffff;
		border: none;
		border-radius: 9999px;
		height: 32px;
		padding: 0 14px;
		font-size: 12px;
		font-weight: bold;
		cursor: pointer;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 4px;
		box-shadow: 0 2px 6px rgba(29, 155, 240, 0.35);
		transition: background-color 0.2s, transform 0.1s;
		white-space: nowrap;
		line-height: 1;
	}

	.hnzrsvp-floating-open-btn:hover {
		background-color: #1a8cd8;
	}

	.hnzrsvp-floating-open-btn:active {
		transform: scale(0.97);
	}

	.hnzrsvp-floating-arrow {
		font-size: 9px;
		transform: translateY(-1px);
	}

	/* 背景オーバーレイ（外側タップで閉じる領域） */
	.hnzrsvp-sheet-overlay {
		position: fixed;
		inset: 0;
		background: rgba(15, 23, 42, 0.5);
		z-index: 99995;
		display: none;
		opacity: 0;
		transition: opacity 0.25s ease;
		cursor: pointer;
	}

	.hnzrsvp-sheet-overlay.is-active {
		display: block;
		opacity: 1;
	}

	/* ボトムシート（展開時のハーフモーダル） */
	.hnzrsvp-bottom-sheet {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		max-height: 85vh;
		background: #ffffff;
		border-radius: 18px 18px 0 0;
		box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
		z-index: 99996;
		transform: translateY(105%);
		transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
	}

	.hnzrsvp-bottom-sheet.is-active {
		transform: translateY(0);
	}

	.hnzrsvp-sheet-drag-handle {
		width: 36px;
		height: 4px;
		background: #cbd5e1;
		border-radius: 9999px;
		margin: 10px auto 4px;
		flex-shrink: 0;
	}

	.hnzrsvp-sheet-header {
		padding: 8px 16px 12px;
		border-bottom: 1px solid #f1f5f9;
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		flex-shrink: 0;
	}

	.hnzrsvp-sheet-title {
		margin: 0 0 6px 0;
		font-size: 16px;
		font-weight: bold;
		color: #0f172a;
	}

	.hnzrsvp-sheet-close-btn {
		background: #f1f5f9;
		color: #64748b;
		border: none;
		border-radius: 50%;
		width: 28px;
		height: 28px;
		font-size: 14px;
		line-height: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		transition: background 0.15s;
		flex-shrink: 0;
	}

	.hnzrsvp-sheet-close-btn:hover {
		background: #e2e8f0;
		color: #0f172a;
	}

	.hnzrsvp-sheet-body {
		padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.hnzrsvp-sheet-body .hnzrsvp-actions {
		display: flex;
		gap: 10px;
		margin-bottom: 18px;
	}

	.hnzrsvp-sheet-body .hnzrsvp-btn {
		flex: 1;
		padding: 11px 16px;
		font-size: 13px;
		border-radius: 9999px;
	}

	/* 画面幅が狭い機種（iPhone SE等: 横幅380px以下）は自動的に2段組みにしてタップ領域を最大化 */
	@media (max-width: 380px) {
		.hnzrsvp-sheet-body .hnzrsvp-actions {
			flex-direction: column;
			gap: 8px;
		}
		.hnzrsvp-sheet-body .hnzrsvp-btn {
			width: 100%;
			padding: 12px 16px;
			font-size: 13px;
		}
	}
}
