.card {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	padding: 0.875rem 1rem;
	margin-top: 0.25rem;
	border: 1px solid var(--background-modifier-accent);
	border-radius: 0.5rem;
	background-color: var(--background-secondary);
	max-width: 520px;
}

.question {
	font-size: 1rem;
	font-weight: 700;
	color: var(--text-primary);
	word-wrap: break-word;
}

.meta {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-tertiary);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.metaEnded {
	color: var(--status-warning, #f0b232);
}

.answers {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

/* Each answer row is a button so the whole row is tappable.
   The fill bar is a pseudo-element that sits behind the label
   and grows from 0% to `var(--pct)` based on the tally. */
.answer {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.625rem;
	width: 100%;
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--background-modifier-accent);
	border-radius: 0.375rem;
	background-color: transparent;
	color: var(--text-primary);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	text-align: left;
	cursor: pointer;
	overflow: hidden;
	transition: background-color 0.12s, border-color 0.12s;
}

.answer::before {
	content: '';
	position: absolute;
	inset: 0;
	width: var(--pct, 0%);
	background-color: var(--brand-primary-muted, rgba(70, 65, 217, 0.15));
	transition: width 0.25s ease;
	pointer-events: none;
}

.answer:hover:not(.answerDisabled) {
	border-color: var(--brand-primary, #4641d9);
	background-color: var(--background-modifier-hover);
}

.answer > * {
	position: relative;
	z-index: 1;
}

.answerSelected {
	border-color: var(--brand-primary, #4641d9);
}

.answerSelected::before {
	background-color: var(--brand-primary-faded, rgba(70, 65, 217, 0.22));
}

.answerDisabled {
	cursor: default;
}

.radio {
	flex-shrink: 0;
	width: 1.125rem;
	height: 1.125rem;
	border-radius: 50%;
	border: 2px solid var(--background-modifier-accent);
	background-color: var(--background-primary);
}

.radioCheckbox {
	border-radius: 0.25rem;
}

.radioChecked {
	border-color: var(--brand-primary, #4641d9);
	background-color: var(--brand-primary, #4641d9);
	box-shadow: inset 0 0 0 3px var(--background-primary);
}

.label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.count {
	flex-shrink: 0;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-tertiary);
}

.totalRow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: 0.125rem;
	font-size: 0.75rem;
	color: var(--text-tertiary);
}

.endButton {
	padding: 0.25rem 0.625rem;
	border: 1px solid var(--background-modifier-accent);
	border-radius: 0.25rem;
	background-color: transparent;
	color: var(--text-tertiary);
	font: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.12s, color 0.12s, background-color 0.12s;
}

.endButton:hover {
	color: var(--text-primary);
	border-color: var(--brand-primary, #4641d9);
	background-color: var(--background-modifier-hover);
}

.endModalBody {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	padding: 0.25rem 0.25rem 0.5rem;
}

.endModalDescription {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--text-secondary, var(--text-primary));
}

.endModalQuestion {
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--background-modifier-accent);
	border-radius: 0.375rem;
	background-color: var(--background-secondary);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-primary);
	word-wrap: break-word;
}

.endModalError {
	color: var(--status-danger);
	font-size: 0.8125rem;
}

.endModalActions {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
}

/* ── Reaction row ──────────────────────────────────────────────
   Matches MessageGroup's reaction chips so polls and messages
   feel visually unified. */
.reactions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin-top: 0.25rem;
}

.reactionChip {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	height: 1.5rem;
	padding: 0 0.5rem;
	border: 1px solid var(--background-modifier-accent);
	border-radius: 0.5rem;
	background-color: var(--background-tertiary);
	color: var(--text-primary);
	font: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.12s, border-color 0.12s;
}

.reactionChip:hover {
	background-color: var(--background-modifier-hover);
}

.reactionMe {
	border-color: var(--brand-primary, #4641d9);
	background-color: var(--brand-primary-faded, rgba(70, 65, 217, 0.22));
}

.reactionCount {
	color: var(--text-secondary);
}

.addReactionChip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.5rem;
	padding: 0;
	border: 1px dashed var(--background-modifier-accent);
	border-radius: 0.5rem;
	background-color: transparent;
	color: var(--text-tertiary);
	cursor: pointer;
	transition: color 0.12s, border-color 0.12s, background-color 0.12s;
}

.addReactionChip:hover {
	color: var(--text-primary);
	border-color: var(--brand-primary, #4641d9);
	background-color: var(--background-modifier-hover);
}
