.bbs, .bbs *, .bbs-reopen { box-sizing: border-box; }
.bbs[hidden], .bbs [hidden], .bbs-reopen[hidden] { display: none !important; }

.bbs {
	--bbs-accent: #1f2a37;
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 99999;
	max-width: 720px;
	margin: 0 auto;
	color: #1f2a37;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
}
.bbs-card {
	background: #fff;
	color: #1f2a37;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 8px 32px rgba(15, 23, 42, .18), 0 0 0 1px rgba(15, 23, 42, .06);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
}
.bbs .bbs-title { margin: 0 0 8px; padding: 0; font-size: 18px; line-height: 1.3; font-weight: 700; color: #1f2a37; }
.bbs .bbs-text { margin: 0 0 16px; padding: 0; color: #1f2a37; font-size: 15px; }
.bbs .bbs-link { color: #1f2a37; text-decoration: underline; white-space: nowrap; }

.bbs .bbs-actions { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.bbs .bbs-btn {
	appearance: none;
	-webkit-appearance: none;
	display: block;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 18px;
	border-radius: 8px;
	border: 2px solid var(--bbs-accent);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: none;
}
.bbs .bbs-btn-main { background: var(--bbs-accent); color: #fff; }
.bbs .bbs-btn-main:hover { background: var(--bbs-accent); color: #fff; opacity: .9; }
.bbs .bbs-btn-ghost { background: #fff; color: var(--bbs-accent); }
.bbs .bbs-btn-ghost:hover { background: #f3f4f6; color: var(--bbs-accent); }
.bbs .bbs-btn:focus-visible,
.bbs .bbs-link:focus-visible,
.bbs .bbs-switch:focus-visible,
.bbs-reopen:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

.bbs .bbs-prefs { margin: 0 0 16px; }
.bbs .bbs-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0;
	border-top: 1px solid #e5e7eb;
}
.bbs .bbs-row:last-of-type { border-bottom: 1px solid #e5e7eb; margin-bottom: 16px; }
.bbs .bbs-label { display: block; flex: 1; margin: 0; cursor: pointer; }
.bbs .bbs-name { display: block; font-weight: 600; color: #1f2a37; }
.bbs .bbs-desc { display: block; font-size: 13px; color: #4b5563; }

.bbs .bbs-switch {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 26px;
	margin: 0;
	border: 0;
	border-radius: 13px;
	background: #9ca3af;
	cursor: pointer;
	transition: background .15s;
}
.bbs .bbs-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s;
}
.bbs .bbs-switch:checked { background: var(--bbs-accent); }
.bbs .bbs-switch:checked::after { transform: translateX(20px); }
.bbs .bbs-switch:disabled { opacity: .55; cursor: not-allowed; }

.bbs-reopen {
	position: fixed;
	left: 12px;
	bottom: 12px;
	z-index: 99998;
	margin: 0;
	padding: 4px 10px;
	min-height: 28px;
	border: 1px solid rgba(15, 23, 42, .15);
	border-radius: 14px;
	background: rgba(255, 255, 255, .92);
	color: #4b5563;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 12px;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: none;
}
.bbs-reopen:hover { color: #1f2a37; background: #fff; }

@media (min-width: 640px) {
	.bbs .bbs-actions { flex-direction: row; }
	.bbs .bbs-btn { width: auto; flex: 1 1 0; }
	.bbs-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.bbs .bbs-switch, .bbs .bbs-switch::after { transition: none; }
}
