* {
	scrollbar-width: thin;
}

body.logged-out .compose-box,
body.logged-out #composeContainer {
	display: none !important;
}

body.logged-out .nav-bottom {
	display: none;
}

.logged-out-welcome {
	border: 1px solid rgb(from var(--border-primary) r g b / 0.3);
	border-radius: 16px;
	padding: 20px;
	margin-bottom: 28px;
	background: rgb(from var(--border-primary) r g b / 0.2);
}

.logged-out-welcome h2 {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 700;
}

.logged-out-welcome p {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--text-secondary);
	max-width: 300px;
	line-height: 1.4;
}

.logged-out-welcome-actions {
	display: flex;
	gap: 10px;
}

.logged-out-welcome-signup,
.logged-out-welcome-login {
	padding: 8px 20px;
	border-radius: 100px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: opacity 0.15s;
	border: none;
}

.logged-out-welcome-signup {
	background: var(--primary);
	color: var(--primary-fg, #fff);
}

.logged-out-welcome-login {
	background: transparent;
	border: 1px solid var(--border-primary);
	color: rgb(var(--text-primary));
}

.logged-out-welcome-signup:hover,
.logged-out-welcome-login:hover {
	opacity: 0.85;
}

.auth-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(4px);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: authFadeIn 0.15s ease;
}

@keyframes authFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
@keyframes authPopIn {
	from {
		opacity: 0;
		transform: scale(0.96) translateY(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.auth-popup {
	background: var(--bg-primary);
	border-radius: 16px;
	width: 100%;
	max-width: 600px;
	min-height: 500px;
	display: flex;
	flex-direction: column;
	overflow: clip;
	animation: authPopIn 0.2s ease;
}

.auth-popup-header {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 16px;
	height: 53px;
	position: relative;
	flex-shrink: 0;
}

.auth-popup-close {
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: none;
	background: transparent;
	color: var(--text-primary);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.auth-popup-close:hover {
	background: var(--bg-secondary);
}

.auth-popup-logo-icon {
	color: var(--primary);
	fill: var(--primary);
}

.auth-popup-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 0 120px 48px;
}

@media (max-width: 700px) {
	.auth-popup {
		max-width: 95vw;
		min-height: 400px;
		border-radius: 12px;
	}
	.auth-popup-body {
		padding: 0 24px 32px;
	}
}

.auth-step {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.auth-step h1 {
	font-size: 28px;
	font-weight: 700;
	margin: 16px 0 28px;
}

.auth-step-desc {
	font-size: 15px;
	color: var(--text-secondary);
	margin: -16px 0 24px;
	line-height: 1.4;
}

.auth-input-wrapper {
	position: relative;
	margin-bottom: 20px;
}

.auth-input-wrapper input {
	width: 100%;
	background: transparent;
	border: 1px solid var(--border-primary);
	border-radius: 4px;
	padding: 24px 8px 8px;
	font-size: 17px;
	line-height: 24px;
	color: var(--text-primary);
	font-family: inherit;
	outline: none;
	transition:
		border-color 0.2s,
		box-shadow 0.2s;
	caret-color: var(--primary);
}

.auth-input-wrapper input::placeholder {
	color: transparent;
}

.auth-input-wrapper label {
	position: absolute;
	left: 8px;
	top: 16px;
	font-size: 17px;
	line-height: 24px;
	color: var(--text-secondary);
	pointer-events: none;
	transition: all 0.15s ease;
}

.auth-input-wrapper input:focus + label,
.auth-input-wrapper input:not(:placeholder-shown) + label {
	top: 6px;
	font-size: 13px;
	line-height: 16px;
	color: var(--primary);
}

.auth-input-wrapper input:not(:focus):not(:placeholder-shown) + label {
	color: var(--text-secondary);
}

.auth-input-wrapper input:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 1px var(--primary);
}

.auth-btn-primary {
	width: 100%;
	height: 52px;
	border-radius: 9999px;
	font-size: 17px;
	font-weight: 700;
	font-family: inherit;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgb(var(--text-primary));
	color: rgb(var(--bg-rgb, 255, 255, 255));
	transition: opacity 0.15s;
}

.auth-btn-primary:hover:not(:disabled) {
	opacity: 0.85;
}
.auth-btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.auth-btn-spinner {
	width: 20px;
	height: 20px;
	border: 2.5px solid transparent;
	border-top-color: rgb(var(--bg-rgb, 255, 255, 255));
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}

.auth-error {
	color: var(--error-color, #ef4444);
	font-size: 14px;
	min-height: 20px;
	margin-top: -8px;
	margin-bottom: 8px;
}

.auth-spacer {
	flex: 1;
}

.auth-footer {
	font-size: 15px;
	color: var(--text-secondary);
	margin-top: auto;
	padding-top: 32px;
}

.auth-footer a {
	color: var(--primary);
	text-decoration: none;
}

.auth-footer a:hover {
	text-decoration: underline;
}

.auth-form-login {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.auth-form-login .auth-error {
	text-align: center;
	margin-top: 8px;
}

.auth-form-login .auth-btn-primary {
	margin-top: 8px;
}

.auth-success-icon {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: var(--primary);
	color: var(--primary-fg, #fff);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: auto auto 24px;
	animation: authPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-step-success {
	align-items: center;
	justify-content: center;
	text-align: center;
}

.auth-step-success h1 {
	margin-bottom: 8px;
}

.auth-passkey-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 16px 0;
	color: var(--text-secondary);
	font-size: 14px;
}

.auth-passkey-divider::before,
.auth-passkey-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--border-primary);
}

.auth-passkey-btn {
	width: 100%;
	height: 44px;
	border-radius: 9999px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	border: 1px solid var(--border-primary);
	background: transparent;
	color: rgb(var(--text-primary));
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background 0.15s;
}

.auth-passkey-btn:hover:not(:disabled) {
	background: var(--bg-secondary);
}

.auth-passkey-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.logged-out-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background: var(--primary);
	color: var(--primary-fg, #fff);
	padding: 12px 20px;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
}

.logged-out-banner-content {
	max-width: 900px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.logged-out-banner-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.logged-out-banner-text strong {
	font-size: 18px;
}

.logged-out-banner-text span {
	font-size: 14px;
	opacity: 0.85;
}

.logged-out-banner-actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.logged-out-login-btn,
.logged-out-signup-btn {
	padding: 8px 20px;
	border-radius: 100px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.15s;
	font-family: inherit;
}

.logged-out-login-btn {
	background: transparent;
	border: 1px solid var(--primary-fg, #fff);
	color: var(--primary-fg, #fff);
}

.logged-out-signup-btn {
	background: var(--primary-fg, #fff);
	color: var(--primary);
	border: none;
}

.logged-out-login-btn:hover,
.logged-out-signup-btn:hover {
	opacity: 0.85;
}

body.logged-out {
	padding-bottom: 70px;
}

body {
	display: flex;
	gap: 18px;
	min-height: 100vh;
	max-width: calc(600px + 240px);
	width: 100%;
	margin: 0px auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scrollbar-gutter: stable;
}

body:has(.tweet-share-wrapper) {
	&::before {
		position: fixed;
		top: 0px;
		left: 0px;
		right: 0px;
		bottom: 0px;
		content: "Downloading tweet image…";
		background-color: var(--bg-primary);
		z-index: 99999998;
		display: flex;
		align-items: center;
		justify-content: center;
		color: rgb(var(--text-primary));
		margin-top: 50px;
	}

	&::after {
		content: "";
		position: fixed;
		width: 26px;
		height: 26px;
		left: 0px;
		top: calc(50vh - 38px);
		right: 0px;
		margin: 0px auto;
		border-radius: 50%;
		border: 2px solid transparent;
		border-top-color: rgb(var(--primary-rgb));
		z-index: 99999999;
		animation: spin 1s linear infinite;
	}
}

.tweet-share-wrapper {
	position: fixed;
	top: 0px;
	left: 0px;
	pointer-events: none;

	display: flex;
	justify-content: center;
	align-items: center;
	padding: 120px 80px;
	background-color: var(--primary);
	z-index: -1;

	.tweet-share-container {
		background-color: var(--bg-primary);
		border-radius: 16px;
		padding: 16px;
		width: 460px;
	}

	.tweet-share-attribution {
		position: absolute;
		bottom: 20px;
		right: 20px;
		color: var(--primary-fg);
	}
}

.hidden {
	display: none !important;
}

.app-container {
	display: flex;
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
}

.main-content {
	flex: 1;
	min-width: 0;
	max-width: 600px;
	width: 100%;
	margin: 0px;
	padding: 12px;
}

.page-active {
	opacity: 1;
}

nav {
	position: sticky;
	top: 0;
	height: 100vh;
	width: 240px;
	padding: 6px 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	z-index: 20;
	padding-top: 44px;

	button {
		position: relative;
		background-color: transparent;
		border: none;
		font-family: inherit;
		cursor: pointer;
		padding: 10px 14px;
		display: flex;
		align-items: center;
		gap: 12px;
		color: inherit;
		border-radius: 9999px;
		font-size: 20px;
		font-weight: 400;
		justify-content: flex-start;
		width: fit-content;
		user-select: none;
		transition: transform 0.2s;

		&::after {
			content: "";
			position: absolute;
			top: 0px;
			left: 0px;
			right: 0px;
			bottom: 0px;
			border-radius: 9999px;
			transition:
				background-color 0.1s,
				transform 0.2s,
				opacity 0.1s,
				filter 0.3s;
			transform: scale(0.9);
			filter: blur(2px);
		}

		&:hover:after {
			background-color: rgba(var(--text-primary), 0.04);
			transform: scale(1);
			filter: blur(0px);
		}

		&:active::after {
			opacity: 0.8;
			transform: scale(0.95);
		}

		&:active {
			transform: scale(0.97);
		}

		@media (max-width: 768px) {
			&:active {
				transform: scale(0.9);
			}
		}

		&.active {
			font-weight: 500;

			svg {
				display: none;

				&.filled {
					display: block;
				}
			}
		}

		svg {
			color: var(--text-primary);
			min-width: 24px;

			&.filled {
				display: none;
			}
		}
	}

	.home-btn,
	.search-btn,
	.notifications-btn,
	.dm-btn {
		position: relative;
	}

	.notifications-btn {
		.notification-count {
			position: absolute;
			top: 8px;
			left: 28px;
			background-color: var(--primary);
			color: var(--primary-fg);
			border-radius: 10px;
			padding: 2px 6px;
			font-size: 11px;
			font-weight: 600;
			width: 18px;
			height: 18px;
			display: flex;
			align-items: center;
			justify-content: center;
			box-shadow: 0 0 0 2px var(--bg-primary);
		}
	}

	.dm-btn {
		.dm-count {
			position: absolute;
			top: 8px;
			left: 28px;
			background-color: var(--primary);
			color: var(--primary-fg);
			font-size: 11px;
			font-weight: 600;
			padding: 2px 6px;
			border-radius: 10px;
			min-width: 18px;
			height: 18px;
			display: flex;
			align-items: center;
			justify-content: center;
			box-shadow: 0 0 0 2px var(--bg-primary);
		}
	}

	.account {
		margin-top: auto;
		padding: 10px 12px;
		gap: 4px;
		width: fit-content;
		margin-bottom: 12px;

		img {
			width: 36px;
			height: 36px;
			border-radius: 50%;
			font-size: 0px;
			pointer-events: none;
		}

		svg {
			margin-left: auto;
			transform: rotate(180deg);
		}
	}
}

.background {
	display: none;
}

.icon {
	display: block;

	&.logo {
		color: var(--primary);
		fill: var(--primary);
		margin-left: 14px;
		margin-bottom: 14px;
	}
}

.timeline .tab-nav {
	font-weight: 500;
	font-size: 24px;
	margin: 0px;
	margin-bottom: 20px;
	user-select: none;
}

.empty-timeline {
	text-align: center;
	color: var(--text-secondary);

	img {
		width: 120px;
		height: 120px;
		margin-bottom: 12px;
	}

	h3 {
		color: var(--text-primary);
		margin: 0px;
		margin-bottom: 8px;
		line-height: 1.4;
	}
}

.followers-modal-header {
	padding: 10px 16px;

	h2 {
		margin: 0;
		font-size: 20px;
		font-weight: 600;
	}

	.close-btn {
		background: none;
		border: none;
		font-size: 24px;
		cursor: pointer;
		color: var(--text-secondary);
		width: 32px;
		height: 32px;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
	}
}

.followers-modal-container {
	display: flex;
	flex-direction: column;
	max-height: 70vh;
	overflow: hidden;
}

.followers-modal-tabs {
	display: flex;
	border-bottom: 1px solid var(--border-primary);
	position: relative;

	&::after {
		content: "";
		position: absolute;
		bottom: 0;
		left: var(--indicator-left, 0);
		width: var(--indicator-width, 0);
		height: 3px;
		background-color: rgb(var(--primary-rgb));
		border-radius: 3px 3px 0 0;
		transition:
			left 0.2s ease,
			width 0.2s ease;
	}

	.followers-modal-tab {
		flex: 1;
		padding: 12px 16px;
		background: none;
		border: none;
		font-size: 14px;
		font-weight: 500;
		color: var(--text-secondary);
		cursor: pointer;
		transition:
			color 0.2s,
			background-color 0.2s,
			font-weight 0.2s;

		&:hover {
			background-color: var(--surface-hover);
		}

		&.active {
			color: var(--text-primary);
			font-weight: 500;
		}
	}
}

.followers-list-container {
	flex: 1;
	overflow-y: auto;
}

.followers-loading {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px;
	color: var(--text-secondary);
}

.followers-list {
	max-height: 60vh;
	overflow-y: auto;
	padding: 12px;
	display: flex;
	gap: 8px;
	flex-direction: column;

	.skeleton-container {
		overflow: clip;
	}
}

.follower-item {
	display: flex;
	gap: 12px;
	padding: 4px;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.2s ease;

	&:hover {
		background-color: var(--surface-hover);
	}
}

.follower-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	flex-shrink: 0;
}

.follower-info {
	flex: 1;
	min-width: 0;
}

.follower-name {
	font-weight: 600;
	color: var(--text-primary);
}

.follower-username {
	color: var(--text-secondary);
	font-size: 14px;
}

.empty-followers {
	text-align: center;
	color: var(--text-secondary);
}

.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	flex-direction: column;
}

.compose-tweet {
	margin-bottom: 24px;
	width: 100%;
	border-bottom: 1px solid var(--border-primary);
	padding-bottom: 12px;
	transition: all 0.2s ease;

	&:is(.modal .compose-tweet) {
		border-bottom: none;
		padding: 20px;
		margin: 0px;
	}

	.compose-header {
		display: flex;
		gap: 12px;
		margin-bottom: 8px;

		&:is(.modal .compose-header) {
			margin-bottom: 0px;
		}

		img#compose-avatar {
			width: 40px;
			height: 40px;
			border-radius: 50%;
			flex-shrink: 0;
			object-fit: cover;
			transition: box-shadow 0.2s ease;
		}

		.compose-input {
			flex: 1;
			position: relative;
			max-width: 100%;
			overflow-x: hidden;

			textarea {
				width: 100%;
				border: none;
				outline: none;
				font-family: inherit;
				font-size: 16px;
				line-height: 1.5;
				resize: none;
				min-height: 45px;
				max-height: 250px;
				height: 0px;
				padding-top: 0px;
				margin: 0;
				background-color: transparent;
				color: var(--text-primary);
				caret-color: var(--primary);

				&:is(.tweetPage .compose-input textarea) {
					min-height: 30px;
				}

				&::placeholder {
					color: var(--text-secondary);
					font-size: 16px;
				}

				&.drag-over {
					background-color: rgba(var(--primary-rgb), 0.1);
					border: 2px dashed var(--primary);
					border-radius: 12px;
					padding: 12px;
				}

				&:focus {
					outline: none;
					border: none;
				}
			}

			#quoted-tweet-container {
				margin-top: 8px;
				margin-bottom: 10px;

				&:empty {
					display: none;
				}
			}

			#reply-restriction-select {
				-webkit-appearance: none;
				-moz-appearance: none;
				appearance: none;
				font-family: inherit;
				font-size: 14px;
				line-height: 1;
				background-color: var(--bg-primary);
				color: var(--text-primary);
				outline: none;
				margin-bottom: 4px;
				cursor: pointer;
				background-image:
					linear-gradient(45deg, transparent 50%, var(--text-placeholder) 50%),
					linear-gradient(135deg, var(--text-placeholder) 50%, transparent 50%);
				background-position:
					calc(100% - 12px) calc(1em + -9px),
					calc(100% - 8px) calc(1em + -9px);
				background-size:
					4px 4px,
					4px 4px;
				background-repeat: no-repeat;
				padding-right: 23px;
				border: none;
				transition: color 0.1s;
				user-select: none;

				&:not(:hover) {
					color: var(--text-placeholder);
				}
			}

			.compose-footer {
				display: flex;
				justify-content: space-between;
				align-items: center;
				gap: 8px;

				.compose-actions {
					display: flex;
					gap: 8px;
					max-width: 100%;
					overflow: auto;
					position: relative;

					button {
						background-color: transparent;
						color: var(--text-secondary);
						border: none;
						padding: 0px;
						cursor: pointer;
						transition: filter 0.2s;

						&:hover {
							filter: brightness(1.5);
						}

						svg {
							width: 20px;
							height: 20px;
						}
					}
				}

				.compose-submit {
					display: flex;
					align-items: center;
					gap: 6px;
					justify-content: flex-end;
				}

				.character-counter {
					position: relative;
					width: 30px;
					height: 30px;
					user-select: none;
					display: flex;
					align-items: center;
					justify-content: center;

					svg {
						transform: rotate(-90deg);
						width: 24px;
						height: 24px;
					}

					.counter-bg {
						fill: none;
						stroke: var(--border-primary);
						stroke-width: 3;
					}

					.counter-progress {
						fill: none;
						stroke: var(--primary);
						stroke-width: 3;
						stroke-linecap: round;
						transition:
							stroke-dashoffset 0.15s ease,
							stroke 0.15s ease;
					}

					.counter-text {
						position: absolute;
						top: 50%;
						left: 50%;
						transform: translate(-50%, -50%);
						font-size: 10px;
						font-weight: 600;
						color: var(--text-secondary);
					}

					&.warning .counter-progress {
						stroke: #f59e0b;
					}

					&.warning .counter-text {
						color: #f59e0b;
					}

					&#over-limit .counter-progress {
						stroke: #ef4444;
					}

					&#over-limit .counter-text {
						color: #ef4444;
					}
				}

				&:has(#tweet-button[disabled]) {
					.character-counter:not(.warning):not(#over-limit) {
						display: none;
					}
					.compose-button-group {
						opacity: 0.5;
						cursor: not-allowed;

						> button {
							cursor: not-allowed;
							pointer-events: none;
						}
					}
				}

				.compose-button-group {
					position: relative;
					display: inline-flex;
					align-items: stretch;
					height: 34px;
					transition: opacity 0.15s ease;

					&[data-more-hidden="true"] #tweet-button {
						border-radius: 8px;
						border-right: none;
					}

					> button {
						background-color: var(--primary);
						color: var(--primary-fg);
						border: 1px solid var(--primary);
						font-family: inherit;
						font-size: 15px;
						font-weight: 600;
						cursor: pointer;
						display: inline-flex;
						align-items: center;
						justify-content: center;
						transition: background-color 0.15s ease;

						&:hover:not(:disabled) {
							background-color: var(--primary-hover);
						}
					}

					#tweet-button {
						padding: 0 16px;
						border-top-left-radius: 8px;
						border-bottom-left-radius: 8px;
						border-right: 1px solid color-mix(in srgb, var(--primary-fg) 18%, var(--primary));

						span {
							display: inline-flex;
							align-items: center;
							justify-content: center;
							transition:
								transform 0.2s,
								filter 0.2s,
								opacity 0.2s;
						}
					}

					.tweet-more-btn {
						padding: 0 3px;
						border-top-right-radius: 8px;
						border-bottom-right-radius: 8px;

						svg {
							width: 18px;
							height: 18px;
						}
					}
				}
			}
		}
	}

	#poll-container {
		margin: 16px 0;
		padding: 10px;
		border: 1px solid var(--border-primary);
		border-radius: 12px;
		background-color: var(--bg-secondary);
		transition:
			opacity 0.2s,
			transform 0.2s;

		@starting-style {
			& {
				opacity: 0;
				transform: scale(0.95);
				transform-origin: left bottom;
			}
		}

		.poll-options {
			display: flex;
			flex-direction: column;
			gap: 8px;
			margin-bottom: 12px;
		}

		.poll-option {
			display: flex;
			align-items: center;
			gap: 8px;

			input {
				flex: 1;
				padding: 8px 12px;
				border: 1px solid var(--border-primary);
				border-radius: 7px;
				font-family: inherit;
				font-size: 14px;
				background-color: var(--bg-primary);
				color: var(--text-primary);

				&:focus {
					outline: none;
					border-color: var(--primary);
				}
			}

			.remove-option {
				background-color: transparent;
				color: var(--text-secondary);
				border: none;
				padding: 0px;
				cursor: pointer;
				font-size: 16px;
				display: flex;
				align-items: center;
				justify-content: center;
				line-height: 1;

				&:hover {
					opacity: 0.8;
				}
			}
		}

		.poll-settings {
			display: flex;
			align-items: center;
			gap: 8px;
			font-size: 14px;

			label {
				color: var(--text-secondary);
			}

			select {
				padding: 6px 8px;
				border: 1px solid var(--border-primary);
				border-radius: 6px;
				background-color: var(--bg-primary);
				color: var(--text-primary);
				font-family: inherit;
				font-size: 14px;

				&:focus {
					outline: none;
					border-color: var(--primary);
				}
			}
		}
	}

	#add-poll-option {
		background-color: transparent;
		color: var(--primary);
		border: 1px solid var(--primary);
		border-radius: 8px;
		padding: 8px 12px;
		font-family: inherit;
		font-size: 14px;
		cursor: pointer;
		width: 100%;
		margin-bottom: 12px;
		transition:
			background-color 0.2s,
			transform 0.2s;

		&:hover {
			background-color: rgba(var(--primary-rgb), 0.1);
		}

		&:active {
			transform: scale(0.98);
		}
	}
}

#attachment-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;

	&:empty {
		display: none;
	}

	.attachment-preview-item {
		position: relative;
		border-radius: 12px;
		overflow: hidden;
		max-width: 150px;
		border: 1px solid var(--border-primary);
		transition: filter 0.2s ease;

		img,
		video {
			width: 100%;
			height: auto;
			max-height: 150px;
			object-fit: cover;
			display: block;
			transition: filter 0.2s ease;
		}

		&.spoiler-marked {
			img,
			video {
				filter: blur(9px);
			}
		}

		.toggle-spoiler {
			position: absolute;
			top: 4px;
			left: 4px;
			background: rgba(0, 0, 0, 0.7);
			color: white;
			border: none;
			border-radius: 50%;
			width: 24px;
			height: 24px;
			display: flex;
			align-items: center;
			justify-content: center;
			cursor: pointer;
			font-size: 14px;
			line-height: 1;
			padding: 0;
			transition: background-color 0.2s ease;

			&:hover {
				background: rgba(0, 0, 0, 0.9);
			}
		}

		.remove-attachment {
			position: absolute;
			top: 4px;
			right: 4px;
			background: rgba(0, 0, 0, 0.7);
			color: white;
			border: none;
			border-radius: 50%;
			width: 24px;
			height: 24px;
			display: flex;
			align-items: center;
			justify-content: center;
			cursor: pointer;
			font-size: 16px;
			line-height: 1;
			padding: 0;

			&:hover {
				background: rgba(0, 0, 0, 0.9);
			}
		}
	}

	.emoji-kitchen-preview {
		max-width: 300px;
		max-height: 300px;
		border: none;

		img {
			max-width: 300px;
			max-height: 300px;
			width: auto;
			height: auto;
			object-fit: contain;
		}
	}
}

.emoji-kitchen-popover {
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 280px;
	max-width: 320px;

	.emoji-kitchen-title {
		font-size: 15px;
		font-weight: 700;
		color: var(--text-primary);
		margin: 0;
		letter-spacing: -0.01em;
	}

	.emoji-kitchen-helper {
		margin: 0;
		color: var(--text-secondary);
		font-size: 13px;
		line-height: 1.4;
	}

	.emoji-kitchen-pick-row {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 16px;
		margin: 4px 0;
	}

	.emoji-kitchen-picker {
		width: 100px;
		height: 100px;
		border: 2px solid var(--border-primary);
		border-radius: 16px;
		background: var(--bg-secondary);
		font-family: inherit;
		color: var(--text-primary);
		font-size: 56px;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		transition:
			transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
			border-color 0.2s;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

		&:hover {
			border-color: var(--primary);
			transform: scale(1.05);
		}

		&:active {
			transform: scale(0.98);
		}

		&:focus-visible {
			outline: 3px solid var(--primary);
			outline-offset: 2px;
		}
	}

	.emoji-kitchen-plus {
		font-size: 28px;
		font-weight: 600;
		color: var(--text-secondary);
		user-select: none;
	}

	.emoji-kitchen-preview-container {
		display: none;
		justify-content: center;
		align-items: center;
		padding: 8px;
		border-radius: 12px;
		background: var(--bg-secondary);
		border: 1px solid var(--border-primary);
		min-height: 60px;

		img {
			display: block;
		}
	}

	.emoji-kitchen-empty {
		margin: 0;
		font-size: 13px;
		color: var(--text-tertiary);
	}

	.emoji-kitchen-create {
		width: 100%;
		padding: 12px 16px;
		border: none;
		border-radius: 10px;
		background: linear-gradient(
			135deg,
			var(--primary) 0%,
			var(--primary-hover) 100%
		);
		color: var(--primary-fg);
		font-weight: 700;
		font-size: 14px;
		font-family: inherit;
		cursor: pointer;
		transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
		margin-top: 4px;

		&:disabled {
			opacity: 0.5;
			cursor: not-allowed;
			transform: none;
			box-shadow: none;
		}

		&:not(:disabled):hover {
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
		}

		&:not(:disabled):active {
			box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
		}
	}
}

#gif-picker {
	background: var(--bg-primary);
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	margin-top: 12px;
	overflow: hidden;
	max-height: 400px;

	.gif-picker-header {
		display: flex;
		align-items: center;
		gap: 8px;
		padding: 12px;
		border-bottom: 1px solid var(--border-primary);
		background: var(--bg-secondary);

		input {
			flex: 1;
			padding: 8px 12px;
			border: 1px solid var(--border-primary);
			border-radius: 20px;
			font-family: inherit;
			font-size: 14px;
			background-color: var(--bg-primary);
			color: var(--text-primary);

			&:focus {
				outline: none;
				border-color: var(--primary);
			}
		}

		button {
			background: transparent;
			color: var(--text-secondary);
			border: none;
			font-size: 24px;
			cursor: pointer;
			padding: 0;
			width: 32px;
			height: 32px;
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 50%;
			transition: background-color 0.2s;

			&:hover {
				background: rgba(var(--primary-rgb), 0.1);
				color: var(--text-primary);
			}
		}
	}

	#gif-results {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 4px;
		padding: 4px;
		max-height: 320px;
		overflow-y: auto;

		.gif-item {
			position: relative;
			aspect-ratio: 1;
			cursor: pointer;
			overflow: hidden;
			border-radius: 8px;
			transition: box-shadow 0.12s;

			&:hover {
				box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
			}

			img {
				width: 100%;
				height: 100%;
				object-fit: cover;
				display: block;
			}
		}
	}
}

#unsplash-picker {
	background: var(--bg-primary);
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	margin-top: 12px;
	overflow: hidden;
	max-height: 400px;

	.unsplash-picker-header {
		display: flex;
		align-items: center;
		gap: 8px;
		padding: 12px;
		border-bottom: 1px solid var(--border-primary);
		background: var(--bg-secondary);

		input {
			flex: 1;
			padding: 8px 12px;
			border: 1px solid var(--border-primary);
			border-radius: 20px;
			font-family: inherit;
			font-size: 14px;
			background-color: var(--bg-primary);
			color: var(--text-primary);

			&:focus {
				outline: none;
				border-color: var(--primary);
			}
		}

		button {
			background: transparent;
			color: var(--text-secondary);
			border: none;
			font-size: 24px;
			cursor: pointer;
			padding: 0;
			width: 32px;
			height: 32px;
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 50%;
			transition: background-color 0.2s;

			&:hover {
				background: rgba(var(--primary-rgb), 0.1);
				color: var(--text-primary);
			}
		}
	}

	#unsplash-results {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 4px;
		padding: 4px;
		max-height: 320px;
		overflow-y: auto;

		.unsplash-item {
			position: relative;
			aspect-ratio: 1;
			cursor: pointer;
			overflow: hidden;
			border-radius: 8px;
			transition: box-shadow 0.12s;

			&:hover {
				box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);

				.unsplash-attribution-overlay {
					opacity: 1;
				}
			}

			img {
				width: 100%;
				height: 100%;
				object-fit: cover;
				display: block;
			}

			.unsplash-attribution-overlay {
				position: absolute;
				bottom: 0;
				left: 0;
				right: 0;
				background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
				padding: 20px 8px 8px;
				color: white;
				font-size: 12px;
				opacity: 0;
				transition: opacity 0.2s;
				pointer-events: none;

				span {
					display: block;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
				}
			}
		}
	}
}

.unsplash-attribution-badge {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: rgb(0 0 0 / 50%);
	color: #ffffff96;
	padding: 1px 5px;
	border-radius: 4px;
	font-size: 10px;
	pointer-events: auto;
	z-index: 10;
	user-select: none;
	backdrop-filter: blur(2px);

	a {
		color: #ffffffcc;
		text-decoration: none;

		&:hover {
			color: #e0e0e0;
		}
	}
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.timeline {
	display: flex;
	flex-direction: column;

	@media (max-width: 768px) {
		& {
			margin-top: 0px;
		}

		.tab-nav {
			margin-top: -8px;
		}
	}

	.articles-container {
		display: flex;
		flex-direction: column;
		gap: 20px;

		.open-article-composer-button {
			display: flex;
			align-items: center;
			gap: 10px;
			padding: 2px 6px;
			font-family: inherit;
			padding-left: 0px;
			border: none;
			color: var(--primary);
			background-color: transparent;
			cursor: pointer;
			font-weight: 500;
			font-size: 15px;
			transition: opacity 0.2s ease;
			align-self: flex-start;

			svg {
				flex-shrink: 0;
			}

			&:hover {
				opacity: 0.85;
			}
		}

		.articles-empty {
			padding: 32px;
			text-align: center;
			border: 1px dashed var(--border-primary);
			border-radius: 16px;
			color: var(--text-secondary);
			background-color: var(--surface-primary);
		}

		.articles-list {
			display: flex;
			flex-direction: column;
			gap: 16px;

			.article-card {
				border: 1px solid var(--border-primary);
				border-radius: 16px;
				overflow: clip;
				background-color: var(--surface-primary);
				cursor: pointer;
				transition:
					box-shadow 0.18s ease,
					transform 0.08s ease;

				&:hover {
					transform: translateY(-1px);
					box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
				}

				.article-card-cover {
					width: 100%;
					padding-top: 45%;
					background-size: cover;
					background-position: center;
				}

				.article-card-content {
					display: flex;
					flex-direction: column;
					gap: 8px;
					padding: 18px;

					.article-card-title {
						margin: 0;
						font-size: 20px;
						color: var(--text-primary);
					}

					.article-card-excerpt {
						margin: 0;
						color: var(--text-secondary);
						line-height: 1.5;
					}

					.article-card-meta {
						font-size: 13px;
						color: var(--text-muted);
					}
				}
			}
		}

		.articles-load-more {
			align-self: center;
			padding: 10px 18px;
			border-radius: 999px;
			border: 1px solid var(--border-primary);
			background-color: transparent;
			color: var(--text-primary);
			cursor: pointer;
			transition: background-color 0.2s ease;

			&:hover {
				background-color: var(--surface-hover);
			}
		}
	}

	.article-modal-overlay {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: var(--bg-primary);
		z-index: 10000;
		display: flex;
		align-items: center;
		justify-content: center;
		opacity: 0;
		transition: opacity 0.15s ease;

		&:not(.hidden) {
			opacity: 1;
		}

		@starting-style {
			& {
				opacity: 0;
			}
		}

		.article-composer-modal {
			background-color: var(--bg-primary);
			width: 100%;
			height: 100%;
			overflow: hidden;
			transition: transform 0.2s ease;
			display: flex;
			flex-direction: column;

			@starting-style {
				& {
					transform: scale(0.99);
				}
			}

			.article-modal-content {
				display: flex;
				flex-direction: column;
				flex: 1;
				overflow: hidden;

				.article-modal-header {
					display: flex;
					align-items: center;
					justify-content: space-between;
					padding: 16px 24px;
					background-color: var(--bg-primary);
					flex-shrink: 0;

					.article-modal-close {
						width: 36px;
						height: 36px;
						border-radius: 50%;
						border: none;
						background-color: transparent;
						color: var(--text-secondary);
						font-size: 28px;
						line-height: 1;
						cursor: pointer;
						transition: background-color 0.2s ease;
						display: flex;
						align-items: center;
						justify-content: center;

						&:hover {
							background-color: var(--surface-hover);
						}
					}
				}

				.article-title-input {
					margin: 0;
					padding: 16px 24px;
					width: 100%;
					border: none;
					font-family: inherit;
					background-color: transparent;
					color: var(--text-primary);
					font-size: 32px;
					font-weight: 700;
					line-height: 1.2;
					flex-shrink: 0;

					&:focus {
						outline: none;
					}

					&::placeholder {
						color: var(--text-placeholder);
					}
				}

				.article-cover-row {
					display: flex;
					flex-wrap: wrap;
					align-items: center;
					gap: 12px;
					margin: 0;
					padding: 0 24px 16px;
					width: 100%;
					flex-shrink: 0;

					.article-cover-button {
						padding: 8px 16px;
						border-radius: 4px;
						background-color: transparent;
						color: var(--text-secondary);
						border: 1px solid var(--border-primary);
						cursor: pointer;
						font-weight: 500;
						font-size: 14px;
						transition: background-color 0.2s ease;

						&:hover {
							background-color: var(--surface-hover);
						}
					}

					.article-cover-preview {
						position: relative;
						width: 100%;
						min-height: 240px;
						border-radius: 4px;
						background-size: cover;
						background-position: center;
						background-color: var(--bg-secondary);

						.article-cover-remove {
							position: absolute;
							top: 12px;
							right: 12px;
							padding: 6px 12px;
							border-radius: 4px;
							background-color: rgba(0, 0, 0, 0.75);
							color: #fff;
							border: none;
							cursor: pointer;
							font-weight: 500;
							font-size: 13px;
							transition: background-color 0.2s ease;

							&:hover {
								background-color: rgba(0, 0, 0, 0.9);
							}
						}
					}
				}

				.article-editor-container {
					flex: 1;
					display: flex;
					gap: 24px;
					padding: 0 24px 24px;

					.article-editor-pane {
						flex: 1;
						display: flex;
						flex-direction: column;
						min-width: 0;

						.article-pane-label {
							font-size: 12px;
							font-weight: 600;
							text-transform: uppercase;
							letter-spacing: 0.5px;
							color: var(--text-muted);
							margin-bottom: 8px;
						}

						.article-markdown-input {
							flex: 1;
							min-height: 450px;
							border: 1px solid var(--border-primary);
							border-radius: 8px;
							background-color: var(--bg-secondary);
							color: var(--text-primary);
							padding: 16px;
							resize: none;
							font-size: 14px;
							line-height: 1.6;
							font-family:
								ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
								monospace;

							&:focus {
								outline: none;
								border-color: var(--primary);
							}

							&::placeholder {
								color: var(--text-muted);
							}
						}
					}

					.article-preview-pane {
						flex: 1;
						display: flex;
						flex-direction: column;
						min-width: 0;

						.article-pane-label {
							font-size: 12px;
							font-weight: 600;
							text-transform: uppercase;
							letter-spacing: 0.5px;
							color: var(--text-muted);
							margin-bottom: 8px;
						}

						.article-preview-content {
							flex: 1;
							min-height: 450px;
							background-color: var(--bg-secondary);
							color: var(--text-primary);
							padding: 16px;
							border-radius: 8px;
							border: 1px solid var(--border-primary);
							font-size: 15px;
							line-height: 1.6;
							overflow-y: auto;
							font-family:
								-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
								Ubuntu, Cantarell, sans-serif;

							&:empty::before {
								content: "Preview will appear here...";
								color: var(--text-muted);
							}

							h1,
							h2,
							h3,
							h4,
							h5,
							h6 {
								margin-top: 1.5em;
								margin-bottom: 0.5em;
								font-weight: 600;
								line-height: 1.3;

								&:first-child {
									margin-top: 0;
								}
							}

							h1 {
								font-size: 1.8em;
							}

							h2 {
								font-size: 1.4em;
							}

							h3 {
								font-size: 1.2em;
							}

							p {
								margin: 0 0 1em;
							}

							ul,
							ol {
								margin: 0 0 1em;
								padding-left: 1.5em;
							}

							li {
								margin-bottom: 0.25em;
							}

							blockquote {
								margin: 0 0 1em;
								padding-left: 1em;
								border-left: 4px solid var(--border-primary);
								color: var(--text-secondary);
							}

							code {
								font-family:
									ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
									monospace;
								background-color: var(--bg-tertiary);
								padding: 0.2em 0.4em;
								border-radius: 4px;
								font-size: 0.9em;
							}

							pre {
								margin: 0 0 1em;
								padding: 16px;
								background-color: var(--bg-tertiary);
								border-radius: 8px;
								overflow-x: auto;

								code {
									background-color: transparent;
									padding: 0;
								}
							}

							a {
								color: var(--primary);
								text-decoration: underline;
							}

							img {
								max-width: 100%;
								border-radius: 8px;
							}

							hr {
								margin: 2em 0;
								border: none;
								border-top: 1px solid var(--border-primary);
							}

							table {
								width: 100%;
								margin: 0 0 1em;
								border-collapse: collapse;

								th,
								td {
									padding: 8px 12px;
									border: 1px solid var(--border-primary);
									text-align: left;
								}

								th {
									background-color: var(--bg-tertiary);
									font-weight: 600;
								}
							}
						}
					}

					@media (max-width: 900px) {
						flex-direction: column;
						gap: 16px;

						.article-editor-pane {
							.article-markdown-input {
								min-height: 250px;
							}
						}

						.article-preview-pane {
							.article-preview-content {
								min-height: 200px;
							}
						}
					}
				}

				.article-actions {
					display: flex;
					align-items: center;
					justify-content: flex-end;
					gap: 12px;
					padding: 16px 24px;
					background-color: var(--bg-primary);
					border-top: 1px solid var(--border-primary);
					flex-shrink: 0;

					.article-cancel-button {
						padding: 10px 20px;
						border-radius: 4px;
						border: none;
						background-color: transparent;
						font-family: inherit;
						color: var(--text-secondary);
						font-weight: 500;
						font-size: 14px;
						cursor: pointer;
						transition: background-color 0.2s ease;

						&:hover {
							background-color: var(--surface-hover);
						}
					}

					.article-publish-button {
						padding: 10px 24px;
						border-radius: 4px;
						border: none;
						background-color: var(--primary);
						color: var(--primary-fg);
						font-weight: 500;
						font-family: inherit;
						font-size: 14px;
						cursor: pointer;
						transition: transform 0.2s ease;

						&:hover {
							transform: scale(0.98);
						}

						&:disabled {
							opacity: 0.6;
							cursor: not-allowed;
						}
					}
				}
			}
		}
	}
}

.tweets {
	display: flex;
	flex-direction: column;
	gap: 16px;

	& > .tweet {
		margin-bottom: 14px;
	}
}

.tweet {
	display: flex;
	flex-direction: column;
	gap: 12px;
	height: auto;
	position: relative;
	transition: none;
	word-wrap: break-word;
	overflow-wrap: break-word;

	&.clickable {
		cursor: pointer;
	}

	&.tweet-preview {
		gap: 0px;

		.tweet-attachments {
			margin-top: 8px;
		}
	}

	.tweet-header {
		display: flex;
		align-items: center;
		gap: 8px;
		font-size: 14.95px;
		position: relative;

		img {
			width: 40px;
			height: 40px;
			border-radius: 50%;
			cursor: pointer;
			transition:
				transform 0.2s,
				opacity 0.2s;

			&:active {
				opacity: 0.8;
				transform: scale(0.98);
			}
		}

		.tweet-header-info {
			display: flex;
			flex-direction: column;
			flex-wrap: wrap;
			font-size: 14.5px;

			&:hover .name {
				text-decoration: underline;
			}

			p {
				margin: 0px;
				display: flex;
				align-items: center;
				gap: 2px;

				&.name {
					font-weight: 500;
					margin-bottom: -4px;
					cursor: pointer;

					.verification-badge {
						display: inline-flex;
						align-items: center;
						vertical-align: middle;
						margin-left: 2px;

						svg {
							width: 16px;
							height: 16px;
							flex-shrink: 0;
						}
					}

					.custom-badge {
						display: inline-flex;
						align-items: center;
						vertical-align: middle;
						margin-left: 2px;

						svg,
						img {
							width: 16px;
							height: 16px;
							flex-shrink: 0;
							border-radius: 3px;
						}
					}

					.tweet-header-username-span {
						color: var(--text-secondary);
						font-weight: 400;
						margin-left: 2px;
					}
				}

				&.username {
					color: var(--text-secondary);
					cursor: pointer;
					user-select: none;
					padding-top: 1px;

					.tweet-source-icon-wrapper:not(
							.tweet[data-main-tweet="true"]
								.tweet-source-icon-wrapper:not(
									.tweet-preview .tweet-source-icon-wrapper
								)
						) {
						display: none;
					}
				}
			}
		}
	}

	.tweet-content {
		font-size: 16px;
		line-height: 1.6;
		color: var(--text-primary);
		overflow: clip;
		max-width: 100%;
		overflow-wrap: break-word;

		&:not(.tweet-preview .tweet-content):is([data-main-tweet] .tweet-content) {
			font-size: 18px;
		}

		p {
			margin: 0;

			&:not(:last-child) {
				margin-bottom: 8px;
			}
		}

		h1:first-child,
		h2:first-child,
		h3:first-child,
		h4:first-child,
		h5:first-child,
		h6:first-child {
			margin-top: 0;
		}

		h1 {
			margin-bottom: 8px;
		}

		h2 {
			margin-bottom: 8px;
		}

		h3 {
			margin-bottom: 8px;
		}

		h4 {
			margin-bottom: 8px;
		}

		blockquote {
			border-left: 4px solid var(--border-secondary);
			margin-left: 0;
			padding-left: 12px;
			color: var(--text-secondary);
			margin-top: 8px;
			margin-bottom: 8px;
		}

		a,
		.tweet-ellipsis {
			color: var(--primary);
			text-underline-offset: 3px;
			text-decoration: none;
			cursor: pointer;

			&.tweet-ellipsis {
				user-select: none;
			}

			&:hover {
				text-decoration: underline;
			}
		}

		code {
			background-color: var(--bg-secondary);
			color: var(--text-primary);
			padding: 2px 4px;
			border-radius: 4px;
			font-family: monospace, "none";
		}

		ul {
			list-style: disc;
			padding-left: 24px;
			margin: 8px 0;
		}

		ol {
			list-style: decimal;
			padding-left: 24px;
			margin: 8px 0;
		}

		li {
			margin-bottom: 4px;
		}
	}

	.tweet-youtube-iframe {
		width: 100%;
		height: 280px;
		border-radius: 10px;
	}

	.link-preview {
		display: block;
		margin-top: 12px;
		border: 1px solid var(--border-primary);
		border-radius: 12px;
		overflow: clip;
		text-decoration: none;
		color: inherit;
		transition: background-color 0.2s;

		&:hover {
			background-color: var(--bg-secondary);
		}

		.link-preview-image {
			width: 100%;
			height: 200px;
			object-fit: cover;
			display: block;
			border-bottom: 1px solid var(--border-primary);
		}

		.link-preview-content {
			padding: 12px;
		}

		.link-preview-site {
			font-size: 12px;
			color: var(--text-secondary);
			margin-bottom: 4px;
			text-transform: uppercase;
			letter-spacing: 0.5px;
		}

		.link-preview-title {
			font-size: 15px;
			font-weight: 600;
			color: var(--text-primary);
			margin-bottom: 4px;
			line-height: 1.4;
		}

		.link-preview-description {
			font-size: 14px;
			color: var(--text-secondary);
			line-height: 1.4;
		}

		&.tweet-game-card .link-preview-image {
			object-fit: contain;
			background: #0c0b14;
			height: 220px;
		}

		.tweet-game-cta {
			display: inline-block;
			margin-top: 10px;
			padding: 6px 14px;
			background: #ac97ff;
			color: #0c0b14;
			border-radius: 999px;
			font-size: 13px;
			font-weight: 700;
		}
	}

	.tweet-edited-indicator {
		color: var(--text-secondary);
		font-size: 12px;
		font-weight: 500;
		cursor: pointer;
		margin-left: 3px;
		padding: 0px 4px;
		height: 18px;
		border-radius: 4px;
		text-decoration: none;
		position: relative;

		&::after {
			content: "";
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			background-color: var(--border-primary);
			border-radius: 4px;
			opacity: 0.5;
			pointer-events: none;
			transition:
				opacity 0.2s,
				transform 0.2s;
			z-index: -1;
		}

		&:hover {
			&::after {
				opacity: 1;
			}
		}

		&:active {
			&::after {
				transform: scale(0.95);
			}
		}
	}

	.fact-check-banner {
		display: flex;
		gap: 12px;
		align-items: flex-start;
		padding: 12px 16px;
		margin: 12px 0;
		border-radius: 8px;
		border: 1px solid;
		background: var(--bg-secondary);

		&[data-severity="warning"] {
			border-color: #f59e0b;
			background: rgba(245, 158, 11, 0.1);

			.fact-check-icon {
				color: #f59e0b;
			}
		}

		&[data-severity="danger"] {
			border-color: #ef4444;
			background: rgba(239, 68, 68, 0.1);

			.fact-check-icon {
				color: #ef4444;
			}
		}

		&[data-severity="info"] {
			border-color: #3b82f6;
			background: rgba(59, 130, 246, 0.1);

			.fact-check-icon {
				color: #3b82f6;
			}
		}

		.fact-check-icon {
			flex-shrink: 0;
			display: flex;
			align-items: center;
			justify-content: center;
		}

		.fact-check-content {
			flex: 1;

			strong {
				display: block;
				margin-bottom: 4px;
				font-size: 14px;
				font-weight: 600;
				color: var(--text-primary);
			}

			p {
				margin: 0;
				font-size: 14px;
				line-height: 1.6;
				color: var(--text-primary);

				a {
					color: var(--primary);
				}
			}
		}

		.tweet-mention {
			color: var(--primary);
			text-decoration: none;

			&:hover {
				text-decoration: underline;
				color: var(--primary-hover, var(--primary));
			}
		}

		.tweet-mention {
			font-weight: 500;
		}

		.tweet-hashtag {
			color: var(--primary);
			text-decoration: none;
			font-weight: 500;
		}

		h1 {
			font-size: 1.6em;
			margin: 0.67em 0;
			font-weight: 600;
		}

		h2 {
			font-size: 1.5em;
			margin: 0.83em 0;
		}

		h3 {
			font-size: 1.17em;
			margin: 1em 0;
		}

		h4 {
			font-size: 1em;
			margin: 1.33em 0;
		}

		h5 {
			font-size: 0.83em;
			margin: 1.67em 0;
		}

		h6 {
			font-size: 0.75em;
			margin: 2.33em 0;
		}

		.tweet-collapse-btn,
		.tweet-ellipsis {
			margin-top: 8px;
			display: inline-block;
			background: transparent;
			border: none;
			color: var(--primary);
			cursor: pointer;
			font-weight: 600;
			padding: 0;
			font-family: inherit;
			font-size: 14px;
		}
	}

	.top-reply:first-of-type {
		margin-top: 6px;
	}

	.tweet-interactions {
		display: flex;
		gap: 14px;
		user-select: none;
		align-items: center;

		.tweet-interactions-right {
			margin-left: auto;
			display: flex;
			gap: 12px;
			align-items: center;
			flex-wrap: nowrap;
		}

		.views-count {
			display: inline-flex;
			align-items: center;
			gap: 4px;
			cursor: default;
			pointer-events: none;
			opacity: 0.7;
			font-size: 15px;
			line-height: 0;
			color: var(--text-secondary);

			&:is(.tweet:not([data-main-tweet]) .views-count) {
				display: none;
			}

			svg {
				width: 18px;
				height: 18px;
				flex-shrink: 0;
				margin-top: 1px;
			}

			.view-number {
				font-size: 13px;
				color: var(--text-secondary);
			}
		}

		button {
			padding: 0px;
			border: none;
			background-color: transparent;
			color: var(--text-secondary);
			cursor: pointer;
			font-size: 15px;
			font-family: inherit;
			display: flex;
			align-items: center;
			gap: 5px;
			transition: color 0.3s;
			position: relative;

			&:after {
				content: "";
				position: absolute;
				top: -4.5px;
				bottom: -4.5px;
				left: -6px;
				right: -6px;
				border-radius: 200px;
				background-color: rgba(var(--color), 0.2);
				z-index: 0;
				opacity: 0;
				transform: scale(0.95);
				transition:
					opacity 0.2s,
					transform 0.2s;
				pointer-events: none;
			}

			svg {
				transition: color 0.15s;
				z-index: 5;
				position: relative;
			}

			&[data-liked="true"],
			&[data-retweeted="true"] {
				color: rgb(var(--color));
				font-weight: 600;
			}

			&:hover {
				color: rgb(var(--color));

				&:after {
					opacity: 1;
					transform: scale(1);
				}
			}

			&.engagement {
				transition: transform 0.2s;

				&:active {
					transform: scale(0.93);

					&:not(:hover)::after {
						opacity: 0.5;
					}
				}

				.retweet-count:empty,
				.like-count:empty,
				.reply-count:empty {
					display: none;
				}

				.like-bump {
					animation: like-bump 0.5s ease-in-out;
				}
			}
		}

		button.reply-restricted {
			opacity: 0.5;
			cursor: not-allowed;
		}
	}

	.reply-restriction-info {
		font-size: 13px;
		color: var(--text-secondary);
		display: flex;
		align-items: center;
		gap: 6px;

		svg {
			opacity: 0.5;
			width: 16px;
			height: 16px;
		}
	}

	.tweet.blocked-by-profile .tweet-interactions {
		opacity: 0.6;
		pointer-events: none;
	}

	.tweet.blocked-by-profile .tweet-interactions button {
		cursor: not-allowed;
	}

	.tweet-attachments {
		border-radius: 8px;
		overflow: clip;
		border: 1px solid var(--border-primary);
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);

		.tweet-attachment {
			width: 100%;
			background-color: var(--bg-primary);
			position: relative;

			img {
				width: 100%;
				height: auto;
				max-height: 500px;
				object-fit: contain;
				display: block;
				cursor: pointer;
				transition:
					opacity 0.2s ease,
					filter 0.2s ease;
			}

			video {
				width: 100%;
				height: auto;
				max-height: 500px;
				object-fit: contain;
				display: block;
				background-color: #000;
				transition: filter 0.2s ease;
			}

			&.spoiler {
				img,
				video {
					filter: blur(28px);
				}
			}

			&.spoiler-revealed {
				img,
				video {
					filter: blur(0);
				}
			}

			.spoiler-overlay {
				position: absolute;
				top: 0;
				left: 0;
				right: 0;
				bottom: 0;
				background-color: rgba(0, 0, 0, 0.6);
				display: flex;
				align-items: center;
				justify-content: center;
				cursor: pointer;
				transition: background-color 0.2s ease;
				z-index: 10;
			}

			&.spoiler-revealed .spoiler-overlay {
				display: none;
			}

			.spoiler-overlay:hover {
				background-color: rgba(0, 0, 0, 0.5);
			}

			.spoiler-content {
				display: flex;
				flex-direction: column;
				align-items: center;
				gap: 8px;
				color: #fff;
				font-weight: 500;
				pointer-events: none;
				user-select: none;

				svg {
					width: 32px;
					height: 32px;
				}

				span {
					font-size: 14px;
				}
			}

			&:not(:last-child) {
				border-bottom: 1px solid var(--border-primary);
			}
		}

		&:has(.tweet-attachment:nth-child(2)) {
			display: grid;
			grid-template-columns: 1fr 1fr;
			gap: 1px;
			background-color: var(--border-primary);

			.tweet-attachment {
				border: none;
				background-color: #000;

				img {
					height: 200px;
				}

				video {
					height: 200px;
				}
			}
		}

		&:has(.tweet-attachment:nth-child(3)) {
			grid-template-areas:
				"first second"
				"first third";

			.tweet-attachment:first-child {
				grid-area: first;
				background-color: #000;

				img {
					height: 100%;
					min-height: 200px;
				}

				video {
					height: 100%;
					min-height: 200px;
				}
			}
		}

		&:has(.tweet-attachment:nth-child(4)) {
			grid-template-columns: 1fr 1fr;
			grid-template-rows: 1fr 1fr;

			.tweet-attachment {
				background-color: #000;

				img,
				video {
					height: 150px;
				}
			}
		}
	}

	.tweet-poll {
		overflow: clip;

		.poll-options {
			display: flex;
			flex-direction: column;
		}

		.poll-option.quiz-correct {
			outline: 2px solid #22c55e;
		}
		.poll-option.quiz-correct .poll-option-bar {
			background: rgba(34, 197, 94, 0.25);
		}
		.poll-option.quiz-wrong {
			outline: 2px solid #ef4444;
		}
		.poll-option.quiz-wrong .poll-option-bar {
			background: rgba(239, 68, 68, 0.25);
		}

		.poll-option {
			position: relative;
			padding: 8px 16px;
			border: 1px solid var(--primary);
			margin-bottom: 5px;
			border-radius: 100px;
			transition:
				background-color 0.15s ease,
				opacity 0.15s ease,
				transform 0.2s;

			&.poll-option-clickable {
				cursor: pointer;
			}

			&:not(.voted):not(.expired):hover {
				background-color: rgba(var(--primary-rgb), 0.1);
			}

			&:not(.voted):not(.expired):active {
				opacity: 0.8;
				transform: scale(0.98);
			}

			&.voted,
			&.expired {
				cursor: default;
			}

			.poll-option-bar {
				position: absolute;
				top: 0;
				left: 0;
				height: 100%;
				background-color: rgba(var(--primary-rgb), 0.2);
				transition: width 0.3s ease;
				border-radius: inherit;
			}

			&.voted .poll-option-bar {
				background-color: rgba(var(--primary-rgb), 0.4);
			}

			.poll-option-content {
				position: relative;
				display: flex;
				justify-content: space-between;
				align-items: center;
				z-index: 1;

				.poll-option-text {
					font-size: 15px;
					color: var(--primary);
					text-align: center;
					font-weight: 500;
					width: 100%;
				}

				.poll-option-percentage {
					font-size: 14px;
					font-weight: 600;
					color: var(--text-primary);
				}
			}
		}

		&:has(.voted) {
			.poll-option {
				pointer-events: none;
				user-select: none;
			}

			.poll-option:not(.voted) {
				border-color: var(--border-primary);
				/* Tr Cursor is not stuck but it */
			}

			.poll-option-text {
				text-align: left !important;
				font-weight: 400 !important;
				color: var(--text-primary) !important;

				&:is(.voted .poll-option-text) {
					display: flex;
					align-items: center;
					gap: 5px;

					svg {
						width: 16px;
						height: 16px;
						flex-shrink: 0;
					}
				}
			}
		}

		.poll-meta {
			padding-top: 12px;
			padding-bottom: 6px;
			display: flex;
			justify-content: space-between;
			align-items: center;
			font-size: 14px;
			color: var(--text-secondary);

			.poll-votes-container {
				display: flex;
				align-items: center;
				gap: 8px;

				.voter-avatars {
					display: flex;

					.voter-avatar {
						width: 20px;
						height: 20px;
						border-radius: 50%;
						border: 2px solid var(--bg-secondary);
						margin-left: -6px;
						position: relative;
					}

					.voter-avatar:first-child {
						margin-left: 0;
					}
				}

				.poll-votes-text {
					color: var(--text-primary);
				}
			}
		}
	}

	.tweet-focused-reply {
		border-left: 2px solid var(--border-primary);
		margin-left: 14px;
		padding-left: 14px;

		.tweet {
			padding: 4px 0px;

			.tweet-header {
				img {
					width: 26px;
					height: 26px;
				}

				.tweet-header-info {
					flex-direction: row;
					gap: 6px;
				}
			}
		}
	}
}

.tweet.tweet-removing {
	opacity: 0;
	filter: blur(2.5px);
	transform: scale(0.98);
}

.game-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 24px;
	animation: game-modal-in 0.18s ease;
}
.game-modal-card {
	background: #0c0b14;
	border: 1px solid #2a2540;
	border-radius: 12px;
	width: min(960px, 100%);
	height: min(90vh, 800px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
.game-modal-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid #2a2540;
	background: #1a1530;
}
.game-modal-title {
	font-weight: 700;
	font-size: 16px;
	color: #f5f1ff;
	flex: 1;
	margin: 0;
}
.game-modal-pop,
.game-modal-close {
	background: transparent;
	border: 0;
	color: #a39db8;
	cursor: pointer;
	padding: 4px 10px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 16px;
	line-height: 1;
	font-family: inherit;
}
.game-modal-close {
	font-size: 22px;
	color: #f5f1ff;
}
.game-modal-pop:hover,
.game-modal-close:hover {
	background: #2a2540;
	color: #f5f1ff;
}
.game-modal-frame {
	flex: 1;
	border: 0;
	background: #0c0b14;
	width: 100%;
	display: block;
}
@keyframes game-modal-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@media (max-width: 600px) {
	.game-modal-overlay { padding: 0; }
	.game-modal-card { border-radius: 0; height: 100vh; }
}

.tweet-source-icon-wrapper {
	display: inline-flex;
	align-items: center;
	margin-left: 4px;
	transform: translateY(1px);
}

.tweet-source-icon {
	width: 13px;
	height: 13px;
}

.tweet-header-avatar {
	cursor: pointer;
}

.tweet-header-name,
.tweet-header-username {
	cursor: pointer;
}

.tweetPage {
	flex-direction: column;

	.back-button {
		margin-bottom: 12px;
		margin-top: 16px;
	}

	.tweet:not(.tweet-preview) {
		margin-bottom: 26px;
	}
}

.profile {
	display: none;
	flex-direction: column;
	position: relative;
	margin-top: -12px;

	.back-button {
		position: absolute;
		top: 10px;
		left: 6px;
		width: 31px;
		height: 31px;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: rgba(0, 0, 0, 0.5);
		border-radius: 999px;
		transition:
			background 0.2s,
			transform 0.2s,
			opacity 0.2s;

		&:hover {
			background-color: rgba(0, 0, 0, 0.7);
		}

		&:active {
			transform: scale(0.95);
			opacity: 0.7;
		}
	}

	@media (min-width: 570px) {
		.profile-banner {
			border-radius: 12px;
			margin-left: 0px;
			margin-right: 0px;
			width: 100%;
		}

		.profile-card {
			.profile-avatar {
				margin-left: 20px;
			}
		}
	}

	.profile-banner {
		height: 200px;
		background-color: var(--bg-secondary);
		margin-left: -24px;
		margin-right: -24px;
		width: calc(100% + 48px);
	}

	.profile-card {
		margin-bottom: 6px;
		position: relative;
		z-index: 1;
		display: flex;
		flex-direction: column;

		.profile-avatar {
			width: 100px;
			height: 100px;
			border-radius: 50%;
			margin-top: -50px;
			margin-left: -3px;
			border: 3px solid var(--bg-primary);
		}

		.profile-actions {
			position: absolute;
			top: 16px;
			right: 0px;
			display: flex;
			justify-content: flex-end;
			margin-bottom: 16px;
			gap: 6px;

			.profile-btn {
				padding: 8px 16px;
				border-radius: 20px;
				border: 1px solid var(--border-primary);
				background-color: var(--bg-primary);
				color: var(--text-primary);
				cursor: pointer;
				font-size: 14px;
				font-weight: 500;
				font-family: inherit;
				transition:
					background-color 0.15s ease,
					color 0.15s ease,
					border-color 0.15s ease,
					width 0.2s ease;

				&#profileDmBtn {
					width: 40px;
					display: flex;
					align-items: center;
					justify-content: center;
					padding: 0px;
				}

				&:hover {
					background-color: var(--bg-secondary);
				}

				&:active {
					opacity: 0.85;
				}

				&.profile-btn-primary {
					background-color: var(--primary);
					color: var(--primary-fg);
					border-color: var(--primary);

					&:hover {
						background-color: var(--primary-hover);
					}
				}

				&.profile-btn-following {
					background-color: transparent;
					color: var(--text-primary);
					width: 97px;

					&:hover {
						background-color: #dc2626;
						color: white;
						border-color: #dc2626;
						font-size: 0px;

						&::before {
							content: "Unfollow";
							font-size: 14px;
						}
					}

					&:active {
						background-color: #b91c1c;
					}
				}

				&.profile-btn-follow {
					width: 76px;
				}
			}

			.profile-dropdown {
				position: relative;
				display: inline-block;

				.profile-dropdown-btn {
					display: flex;
					align-items: center;
					justify-content: center;
					width: 36px;
					height: 36px;
					padding: 0;
					transition:
						transform 0.2s,
						opacity 0.2s;

					&:hover {
						opacity: 0.7;
					}

					&:active {
						transform: scale(0.95);
					}
				}
			}

			.profile-notification-dropdown {
				position: relative;
				display: inline-block;

				button {
					display: flex;
					align-items: center;
					justify-content: center;
					width: 36px;
					height: 36px;
					padding: 0;
					transition:
						transform 0.2s,
						opacity 0.2s;

					&:hover {
						opacity: 0.7;
					}

					&:active {
						transform: scale(0.95);
					}

					&.notifications-active svg {
						fill: currentColor;
					}
				}
			}
		}

		.profile-info {
			width: 100%;
			display: flex;
			flex-direction: column;

			h2 {
				margin-top: 11px;
				font-weight: 600;
				margin-bottom: 0px;
				font-size: 1.875rem;
				display: flex;
				align-items: center;
				gap: 8px;
				flex-wrap: wrap;
			}

			.verification-badge {
				display: inline-flex;
				align-items: center;
				vertical-align: middle;
				margin-left: 2px;

				svg {
					width: 20px;
					height: 20px;
					flex-shrink: 0;
					vertical-align: middle;
				}
			}

			.custom-badge {
				display: inline-flex;
				align-items: center;
				vertical-align: middle;
				margin-left: 4px;

				svg,
				img {
					width: 20px;
					height: 20px;
					flex-shrink: 0;
					vertical-align: middle;
					border-radius: 4px;
				}
			}

			.username {
				color: var(--text-secondary);
				font-size: 16px;
				margin-top: -2px;
				margin-bottom: 10px;
				display: flex;
				align-items: center;
				gap: 8px;

				.follows-me-badge {
					margin: -5px 0;
					padding: 4px 8px;
					background: rgba(var(--primary-rgb), 0.1);
					color: rgb(var(--primary-rgb));
					border-radius: 4px;
					font-weight: 500;
					white-space: nowrap;
					flex-shrink: 0;
					user-select: none;
					height: 21px;
					display: flex;
					align-items: center;
					font-size: 12.5px;
				}
			}

			.profile-pronouns {
				color: var(--text-secondary);
				font-size: 14px;
				margin: -8px 0 8px 0;
			}

			.profile-bio {
				margin: 0 0 10px 0;
				font-size: 16px;
				line-height: 1.4;

				a {
					color: var(--primary);
					text-decoration: underline;
					text-underline-offset: 3px;

					&:hover {
						text-decoration: none;
					}
				}

				/*Ranchel*/
			}

			.profile-meta {
				display: flex;
				flex-wrap: wrap;
				gap: 16px;
				margin-bottom: 10px;
				font-size: 14px;
				color: var(--text-secondary);

				.profile-meta-item {
					display: flex;
					align-items: center;
					gap: 6px;

					a {
						color: var(--primary);
						text-decoration: underline;
						text-underline-offset: 3px;
						font-weight: 500;

						&:hover {
							text-decoration: none;
						}
					}

					&:has(.tweeta-joindate) {
						cursor: pointer;

						&:hover {
							text-decoration: underline;
						}
					}
				}
			}
		}

		@media (max-width: 768px) {
			.profile-tab-btn {
				font-size: 14px;
				padding: 12px;
			}
		}
	}

	.profile-block-banner {
		display: none;
		align-items: center;
		gap: 12px;
		padding: 14px 16px;
		margin-top: 12px;
		border-radius: 10px;
		color: var(--text-primary);
		border: 1px solid var(--error-color);
		width: calc(100% - 0px);
		user-select: none;
		flex-direction: column;
		margin-bottom: 12px;
	}

	.profile-block-banner .banner-icon {
		flex: 0 0 28px;
		display: flex;
		align-items: center;
		justify-content: center;
		color: var(--error-color);
	}

	.profile-block-banner .banner-text {
		flex: 1 1 auto;
		font-size: 14px;
		line-height: 1.2;
		text-align: center;

		strong {
			font-weight: 600;
			color: var(--error-color);
		}
	}

	.profile-block-banner .banner-sub {
		color: var(--text-secondary);
		font-size: 13px;
		max-width: 200px;
		margin: 0px auto;
		margin-top: 6px;
	}

	.profile-stats {
		display: flex;
		gap: 8px;
		font-size: 15px;
		user-select: none;
		margin-bottom: 4px;

		a {
			text-decoration: none;
			color: var(--text-primary);
			text-underline-offset: 3px;

			&:hover {
				text-decoration: underline;
				text-decoration-color: var(--text-secondary);
			}
		}

		.number {
			font-weight: 600;
			color: var(--text-primary);
		}

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

	.followers-you-know {
		display: flex;
		align-items: center;
		gap: 12px;
		margin-top: 12px;
		border-radius: 12px;
		cursor: pointer;
		user-select: none;
		transition: background-color 0.2s;

		&:hover {
			background-color: var(--bg-tertiary);
		}

		.followers-you-know-avatars {
			display: flex;
			align-items: center;

			img {
				width: 30px;
				height: 30px;
				border-radius: 50%;
				object-fit: cover;
				border: 1px solid var(--bg-secondary);
				margin-left: -8px;

				&:first-child {
					margin-left: 0;
				}
			}
		}

		.followers-you-know-text {
			font-size: 13px;
			color: var(--text-secondary);
		}
	}

	.profile-tabs {
		.profile-tab-content {
			padding: 0;
		}
	}

	#profilePostsContainer {
		display: flex;
		flex-direction: column;
		gap: 26px;
		padding-top: 24px;
	}

	#profilePostsContainer.media-grid {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 2px;
		padding-top: 0;
	}

	.media-grid-item {
		aspect-ratio: 1;
		overflow: clip;
		background: var(--bg-secondary);
		position: relative;
		cursor: pointer;
		transition:
			opacity 0.15s ease,
			transform 0.15s ease;
	}

	.media-grid-item:hover {
		opacity: 0.85;
	}

	.media-grid-item:active {
		transform: scale(0.98);
	}

	@media (max-width: 768px) {
		#profilePostsContainer.media-grid {
			grid-template-columns: repeat(2, 1fr);
		}
	}

	#profileAffiliatesContainer {
		display: flex;
		flex-direction: column;
		gap: 10px;
		padding: 24px 0 0 0;
	}

	#profileAffiliatesContainer .profile-empty-state {
		padding: 36px 24px;
	}

	#profileAffiliatesContainer .profile-empty-state p {
		max-width: 320px;
	}

	.profile-affiliate-card {
		display: flex;
		align-items: center;
		gap: 14px;
		padding-bottom: 10px;
		border-bottom: 1px solid var(--border-primary);
		cursor: pointer;

		&:last-of-type {
			border-bottom: none;
		}

		.affiliate-avatar {
			width: 48px;
			height: 48px;
			border-radius: 50%;
			object-fit: cover;
			flex-shrink: 0;
		}

		.affiliate-info {
			display: flex;
			flex-direction: column;
			gap: 2px;
			min-width: 0;

			.affiliate-name-row {
				display: flex;
				align-items: center;
				gap: 8px;
				font-weight: 600;
				color: var(--text-primary);
			}

			.affiliate-username {
				font-size: 14px;
				color: var(--text-secondary);
			}
		}
	}

	.profile-empty-state {
		text-align: center;
		padding: 48px 24px;
		color: var(--text-secondary);
		width: 100%;
		user-select: none;

		img {
			width: 120px;
			height: 120px;
			margin-bottom: 12px;
			pointer-events: none;
		}

		h3 {
			margin: 0 0 2px 0;
			font-size: 20px;
			font-weight: 600;
		}

		p {
			font-size: 16px;
			max-width: 235px;
			margin: 0px auto;
		}
	}
}

#profileContainer.suspended .profile-banner {
	display: none;
}

#profileContainer.suspended #profileAvatar[data-suspended="true"] {
	display: none;
}

#profileContainer.suspended .profile-tab-nav {
	display: none !important;
}

#profileContainer.restricted .profile-banner {
	filter: grayscale(20%);
}

#profileContainer.restricted #profileAvatar {
	opacity: 0.9;
}

#profileContainer.restricted-self #followBtn,
#profileContainer.restricted-self #profileDmBtn,
#profileContainer.restricted-self #editProfileBtn,
#profileContainer.restricted-self #profileDropdown {
	opacity: 0.7;
	pointer-events: none;
}

#profileContainer.suspended #profileFollowersLink,
#profileContainer.suspended #profileFollowingLink {
	display: none !important;
}

#profileContainer.suspended #followBtn,
#profileContainer.suspended #profileDmBtn,
#profileContainer.suspended #editProfileBtn,
#profileContainer.suspended #profileDropdown {
	display: none !important;
}

#profileSuspendedNotice {
	display: none;
	padding: 16px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border-radius: 8px;
	margin: 12px 0;
}

.profile .restricted-account-banner.small-restricted-banner {
	border: 1px solid var(--border-hover);
	border-radius: 8px;
	padding: 10px 14px;
	margin: 8px 0 12px 0;
	display: flex;
	align-items: center;
	gap: 12px;

	svg {
		width: 18px;
		height: 18px;
		stroke: currentColor;
	}

	.restricted-banner-text {
		font-size: 13px;
		color: inherit;
		line-height: 1.3;
	}

	strong {
		display: block;
		font-weight: 600;
		color: inherit;
	}

	p {
		margin: 0px;
	}
}

.profile-suspended {
	display: none;
	align-items: flex-start;
	gap: 8px;
	padding: 12px 14px;
	margin-top: 12px;
	border-radius: 10px;
	background-color: rgba(0, 0, 0, 0.04);
	color: var(--text-primary);
	border: 1px solid var(--border-primary);
	width: calc(100%);
}

.profile-suspended .suspended-sub {
	color: var(--text-secondary);
	margin-top: 4px;
	font-size: 13px;
}

#profileAvatar {
	background-color: transparent;
}

#profileAvatar[suspended] {
	background-color: var(--suspended-avatar-bg, #bdbdbd);
}

#profileAvatar[data-suspended="true"] {
	background-image: none !important;
	background-color: var(--suspended-avatar-bg, #bdbdbd) !important;
	border-radius: 50% !important;
	object-fit: cover !important;
	filter: none !important;
}

.edit-profile-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: none;
	z-index: 1100;
	align-items: center;
	justify-content: center;

	&.show {
		display: flex;
	}

	.modal-content {
		background-color: var(--bg-primary);
		border-radius: 16px;
		width: 90%;
		max-width: 600px;
		max-height: 90vh;
		overflow: hidden;
		display: flex;
		flex-direction: column;
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	}

	.modal-header {
		h3 {
			margin: 0;
			font-size: 18px;
			font-weight: 600;
			color: var(--text-primary);
		}
	}

	.edit-profile-tabs {
		padding: 0 20px;
		border-bottom: 1px solid var(--border-primary);
		display: flex;
		gap: 4px;
		margin: 0;
	}

	.edit-profile-tab-btn {
		flex: 1;
		padding: 14px 16px;
		background: none;
		border: none;
		border-bottom: 2px solid transparent;
		color: var(--text-secondary);
		font-size: 14px;
		font-weight: 600;
		cursor: pointer;
		transition: all 0.2s ease;
		font-family: inherit;

		&:hover {
			background-color: var(--bg-secondary);
			color: var(--text-primary);
		}

		&.active {
			color: var(--text-primary);
			border-bottom-color: var(--primary);
		}
	}

	.edit-profile-tab-content {
		&.hidden {
			display: none;
		}
	}

	.modal-close {
		background-color: transparent;
		border: none;
		cursor: pointer;
		padding: 8px;
		display: flex;
		align-items: center;
		justify-content: center;
		color: var(--text-secondary);
		border-radius: 50%;
		transition: all 0.2s ease;

		&:hover {
			background-color: var(--bg-secondary);
			color: var(--text-primary);
		}
	}

	.modal-body {
		padding: 20px;
		flex: 1;
		overflow-y: auto;
	}
}

.form-group {
	margin-bottom: 20px;

	label {
		display: block;
		margin-bottom: 8px;
		font-size: 14px;
		font-weight: 600;
		color: var(--text-primary);
	}

	.tip {
		margin: 0px;
		font-size: 14px;
		color: var(--text-secondary);
		margin-top: -9px;
	}

	input,
	textarea,
	select {
		width: 100%;
		padding: 12px 16px;
		border: 1px solid var(--border-primary);
		border-radius: 8px;
		font-size: 14px;
		font-family: inherit;
		background-color: var(--bg-secondary);
		color: var(--text-primary);
		transition: border-color 0.2s;

		&::placeholder {
			color: var(--text-secondary);
		}

		&:focus {
			outline: none;
			border-color: var(--primary);
		}
	}

	select {
		cursor: pointer;
		appearance: none;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
		background-repeat: no-repeat;
		background-position: right 12px center;
		padding-right: 36px;
	}

	textarea {
		resize: vertical;
		min-height: 80px;
	}

	.char-count {
		text-align: right;
		font-size: 12px;
		color: var(--text-secondary);
		margin-top: 4px;
	}

	.checkbox-label {
		display: flex;
		align-items: center;
		gap: 10px;
		cursor: pointer;
		font-weight: 500;
		margin-bottom: 0;

		input[type="checkbox"] {
			width: auto;
			cursor: pointer;
			margin: 0;
			accent-color: var(--primary);
		}

		span {
			font-weight: 500;
		}
	}
}

.edit-profile-modal .modal-actions {
	display: flex;
	gap: 12px;
	padding: 20px;
	border-top: 1px solid var(--border-primary);

	.profile-btn {
		flex: 1;
		padding: 12px 24px;
		border: 1px solid var(--border-primary);
		border-radius: 8px;
		background-color: transparent;
		color: var(--text-primary);
		font-size: 14px;
		font-weight: 600;
		cursor: pointer;
		font-family: inherit;
		transition:
			transform 0.2s,
			opacity 0.2s;

		&:hover {
			opacity: 0.7;
		}

		&:active {
			transform: scale(0.95);
		}

		&.profile-btn-primary {
			background-color: var(--primary);
			color: var(--primary-fg);
			border-color: var(--primary);
		}
	}
}

.avatar-section {
	margin-bottom: 24px;

	> label {
		display: block;
		margin-bottom: 12px;
		font-size: 14px;
		font-weight: 600;
		color: var(--text-primary);
	}

	.avatar-preview {
		position: relative;
		width: 100px;
		height: 100px;
		margin: 0 auto 16px;
		border-radius: 50%;
		overflow: hidden;
		background-color: var(--bg-secondary);
		cursor: pointer;
		border: 4px solid var(--border-primary);
		transition: border-color 0.2s;

		img {
			width: 100%;
			height: 100%;
			object-fit: cover;
		}

		.avatar-overlay {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			background-color: rgba(0, 0, 0, 0.6);
			display: flex;
			align-items: center;
			justify-content: center;
			opacity: 0;
			transition: opacity 0.2s;
			color: white;
		}

		&:hover {
			border-color: var(--primary);

			.avatar-overlay {
				opacity: 1;
			}
		}
	}

	.avatar-controls {
		display: flex;
		flex-direction: column;
		gap: 10px;
		align-items: center;

		.profile-btn {
			padding: 10px 20px;
			font-size: 14px;
			border: 1px solid var(--border-primary);
			border-radius: 8px;
			background-color: transparent;
			color: var(--text-primary);
			font-weight: 600;
			cursor: pointer;
			font-family: inherit;
			transition: all 0.2s ease;

			&:hover {
				background-color: var(--bg-secondary);
			}
		}

		#avatarRadiusControls {
			width: 100%;
			margin-top: 4px;

			> label {
				display: block;
				margin-bottom: 10px;
				font-size: 14px;
				font-weight: 500;
				color: var(--text-secondary);
				text-align: center;
			}

			> div {
				display: flex;
				gap: 8px;
				align-items: center;
				justify-content: center;

				.profile-btn {
					flex: 1;
					max-width: 100px;
					padding: 8px 16px;
					font-size: 14px;
				}

				input[type="number"] {
					width: 80px;
					padding: 8px 12px;
					border: 1px solid var(--border-primary);
					border-radius: 6px;
					background-color: var(--bg-secondary);
					color: var(--text-primary);
					font-size: 14px;
					font-family: inherit;
					text-align: center;
					transition: border-color 0.2s;

					&:focus {
						outline: none;
						border-color: var(--primary);
					}
				}

				span {
					font-size: 14px;
					color: var(--text-secondary);
					font-weight: 500;
				}
			}
		}
	}
}

.banner-section {
	margin-bottom: 24px;

	> label {
		display: block;
		margin-bottom: 12px;
		font-size: 14px;
		font-weight: 600;
		color: var(--text-primary);
	}

	.banner-preview {
		position: relative;
		width: 100%;
		height: 150px;
		margin: 0 0 16px;
		border-radius: 12px;
		overflow: hidden;
		background-color: var(--bg-secondary);
		cursor: pointer;
		border: 2px solid var(--border-primary);
		transition: border-color 0.2s;

		.banner-image {
			width: 100%;
			height: 100%;
			background-size: cover;
			background-position: center;
			background-repeat: no-repeat;
			position: relative;
		}

		.banner-overlay {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			background-color: rgba(0, 0, 0, 0.6);
			display: flex;
			align-items: center;
			justify-content: center;
			opacity: 0;
			transition: opacity 0.2s;
			color: white;
		}

		&:hover {
			border-color: var(--primary);

			.banner-overlay {
				opacity: 1;
			}
		}
	}

	.banner-controls {
		display: flex;
		flex-direction: column;
		gap: 10px;
		align-items: center;

		.profile-btn {
			padding: 10px 20px;
			font-size: 14px;
			border: 1px solid var(--border-primary);
			border-radius: 8px;
			background-color: transparent;
			color: var(--text-primary);
			font-weight: 600;
			cursor: pointer;
			font-family: inherit;
			transition: all 0.2s ease;

			&:hover {
				background-color: var(--bg-secondary);
			}
		}
	}
}

.quoted-tweet {
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	padding: 12px;
	background-color: var(--bg-secondary);
	cursor: pointer;
	transition:
		background-color 0.2s,
		border-color 0.2s;
	position: relative;

	&:hover {
		background-color: var(--bg-secondary);
		border-color: var(--border-secondary);
	}

	.quoted-tweet-header {
		display: flex;
		align-items: center;
		gap: 8px;
		margin-bottom: 8px;

		img {
			width: 20px;
			height: 20px;
			border-radius: 50%;
		}

		.quoted-tweet-header-info {
			display: flex;
			flex-direction: column;
			line-height: 1.2;

			.quoted-author-name {
				font-weight: 600;
				font-size: 14px;
				color: var(--text-primary);
			}

			.quoted-author-username {
				font-size: 12px;
				color: var(--text-secondary);
			}
		}
	}

	.quoted-tweet-content {
		font-size: 14px;
		line-height: 1.4;
		color: var(--text-primary);
		margin: 0;
	}
}

.composer-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	transition: opacity 0.2s;

	@starting-style {
		opacity: 0;
	}

	.modal {
		position: relative;
		display: block;
		transition: transform 0.2s;

		@starting-style {
			transform: scale(0.99);
		}
	}

	.modal-close {
		position: absolute;
		top: 10px;
		right: 10px;
		border-radius: 50%;
		width: 32px;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		background-color: transparent;
		border: none;
		color: var(--text-secondary);
		transition:
			background-color 0.2s,
			color 0.2s;
		z-index: 1001;

		&:hover {
			background-color: var(--bg-secondary);
			color: var(--text-primary);
		}
	}

	.compose-tweet {
		background: var(--bg-primary);
		border-radius: 12px;
		padding: 20px;
		max-width: 500px;
		width: 90%;
		max-height: 80vh;
		overflow-y: auto;
		padding-bottom: 14px;
	}
}

.quotes-list {
	padding: 18px;
}

.quoted-tweet-preview {
	border: 1px solid var(--border-primary);
	border-radius: 8px;
	padding: 12px;
	margin: 12px 0;
	background-color: var(--bg-secondary);

	.quoted-tweet-header {
		display: flex;
		align-items: center;
		gap: 8px;
		margin-bottom: 8px;

		img {
			width: 20px;
			height: 20px;
			border-radius: 50%;
		}

		div {
			display: flex;
			flex-direction: column;
			line-height: 1.2;

			.quoted-author-name {
				font-weight: 600;
				font-size: 14px;
				color: var(--text-primary);
			}

			.quoted-author-username {
				font-size: 12px;
				color: var(--text-secondary);
			}
		}
	}

	.quoted-tweet-content {
		font-size: 14px;
		line-height: 1.4;
		color: var(--text-primary);
		margin: 0;
	}

	@media (max-width: 768px) {
		padding: 8px;
		margin: 8px 0;

		.quoted-tweet-header {
			gap: 6px;

			img {
				width: 18px;
				height: 18px;
			}

			div {
				.quoted-author-name {
					font-size: 13px;
				}

				.quoted-author-username {
					font-size: 11px;
				}
			}
		}

		.quoted-tweet-content {
			font-size: 13px;
		}
	}
}

.tweet.top-reply {
	margin-left: 15px;
	padding-left: 16px;
	border-left: 3px solid var(--border-secondary);
	position: relative;
	margin-top: -12px;
	padding-top: 12px;
	padding-bottom: 4px;

	.tweet-header {
		img {
			width: 32px;
			height: 32px;
		}

		.tweet-header-name,
		.tweet-header-username {
			font-size: 14px;
		}
	}

	.tweet-content {
		font-size: 14px;
	}
}

.composer-overlay {
	.modal {
		background: var(--bg-primary);
		border-radius: 12px;
		max-width: 500px;
		width: 90%;
		max-height: 80vh;
		overflow-y: auto;

		&.settings-modal {
			max-width: 1400px;
			width: min(1400px, calc(100vw - 32px));
			height: min(90vh, 900px);
			max-height: 90vh;
			overflow: hidden;
		}

		.compose-tweet {
			border: none;
			background: transparent;
			width: 100%;
			margin-bottom: 0px;
		}
	}
}

.tweet-preview {
	border: 1px solid var(--border-secondary);
	border-radius: 12px;
	padding: 12px;
	cursor: pointer;
	transition:
		background-color 0.2s,
		border-color 0.2s,
		transform 0.2s;
	position: relative;

	&:hover {
		background-color: var(--bg-overlay-light);
		border-color: var(--border-primary);
	}

	&.active {
		transform: scale(0.98);
	}

	.tweet-header {
		img {
			width: 20px;
			height: 20px;
		}

		.tweet-header-info {
			font-size: 13px;
			flex-direction: row;
			gap: 5px;

			p.name {
				font-size: 14px;
				margin-bottom: -2px;
			}

			p.username {
				font-size: 14px;
			}
		}
	}

	.tweet-content {
		font-size: 14px;
		line-height: 1.4;
		margin-top: 8px;
	}

	.quoted-tweet {
		margin-top: 8px;
		padding: 8px;
		border-radius: 8px;
	}

	.tweet-poll {
		margin-top: 8px;

		.poll-option {
			padding: 6px 12px;
			margin-bottom: 4px;

			.poll-option-content {
				.poll-option-text {
					font-size: 13px;
				}

				.poll-option-percentage {
					font-size: 12px;
				}
			}
		}

		.poll-meta {
			font-size: 12px;
			padding-top: 8px;

			.voter-avatars .voter-avatar {
				width: 18px;
				height: 18px;
			}
		}
	}

	& .unavailable-quote {
		padding: 16px;
		border: 1px solid var(--border-secondary);
		border-radius: 12px;
		color: var(--text-secondary);
		text-align: center;
		margin-top: 8px;

		&:hover {
			background-color: transparent;
			border-color: var(--border-secondary);
		}
	}
}

.reaction-wrapper {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	position: relative;
	flex-shrink: 0;
}

.reaction-count {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	padding: 0;
	height: auto;
	min-width: fit-content;
	color: var(--text-secondary);
	background: transparent;
	flex-shrink: 0;
	line-height: 1;

	&:empty {
		display: none !important;
	}
}

.reactions-modal {
	.reactions-list {
		display: flex;
		flex-direction: column;
		gap: 12px;
		padding: 0;
	}

	.reaction-item {
		position: relative;

		&:hover .reaction-remove-btn {
			opacity: 1;
		}
	}

	.reaction-remove-btn {
		position: absolute;
		right: 12px;
		top: 50%;
		transform: translateY(-50%);
		background: var(--bg-secondary);
		border: 1px solid var(--border-primary);
		border-radius: 50%;
		width: 32px;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		opacity: 0;
		transition:
			opacity 0.2s,
			background-color 0.2s,
			border-color 0.2s;
		color: var(--text-secondary);

		&:hover {
			background: rgba(244, 67, 54, 0.1);
			border-color: rgba(244, 67, 54, 0.3);
			color: #f44336;
		}

		svg {
			width: 16px;
			height: 16px;
		}
	}

	.reaction-emoji {
		font-size: 24px;
		width: 32px;
		height: 32px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
	}

	.reaction-user-avatar {
		width: 32px;
		height: 32px;
		flex-shrink: 0;

		img {
			width: 100%;
			height: 100%;
			border-radius: 50%;
			object-fit: cover;
		}
	}

	.reaction-content {
		display: flex;
		align-items: center;
		gap: 12px;
		flex: 1;
	}

	.reaction-user-info {
		display: flex;
		flex-direction: column;
		gap: 2px;
		line-height: 1.2;
	}

	.reaction-user-name {
		font-weight: 600;
		color: var(--text-primary);
		font-size: 14px;
	}

	.reaction-user-username {
		font-size: 13px;
		color: var(--text-secondary);
	}
}

.retweet-indicator {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--text-secondary);
	font-weight: 500;
	user-select: none;

	svg {
		width: 16px;
		height: 16px;
		opacity: 0.7;
		color: var(--text-secondary);
	}

	span {
		font-weight: 500;
	}
}

.notifications-btn {
	.notification-count {
		position: absolute;
		top: 2px;
		right: 2px;
		background-color: var(--primary);
		color: var(--primary-fg);
		border-radius: 10px;
		padding: 2px 6px;
		font-size: 12px;
		font-weight: 600;
		min-width: 18px;
		height: 18px;
		display: flex;
		align-items: center;
		justify-content: center;
		box-shadow: 0 0 0 2px var(--bg-primary);
	}
}

.notifications {
	display: none;
	flex-direction: column;
	width: 100%;
	min-height: 100vh;
}

.notifications-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 0;
	margin-bottom: 0;
	user-select: none;
}

.notifications-header-info {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;

	h1 {
		font-size: 20px;
		font-weight: 600;
		color: var(--text-primary);
		margin: 0;
	}
}

.mark-all-read-btn {
	background: none;
	border: none;
	color: var(--primary);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	padding: 8px 12px;
	font-family: inherit;
	border-radius: 16px;
	transition: background-color 0.2s ease;

	&:hover {
		background-color: rgba(var(--primary-rgb), 0.1);
	}

	&:disabled {
		opacity: 0.5;
		cursor: not-allowed;
	}
}

.notifications-list {
	flex: 1;
}

.push-banner {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 12px 16px;
	padding: 12px 14px;
	border: 1px solid var(--border-primary);
	border-radius: 14px;
	background: rgba(var(--primary-rgb), 0.08);
}

.push-banner-icon {
	font-size: 22px;
	line-height: 1;
}

.push-banner-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.push-banner-text strong {
	font-size: 14px;
	color: var(--text-secondary);
}

.push-banner-text span {
	font-size: 13px;
	color: var(--text-tertiary);
}

.push-banner-enable {
	flex-shrink: 0;
	padding: 8px 14px;
	border: none;
	border-radius: 9999px;
	background: var(--primary);
	color: var(--primary-fg);
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
}

.push-banner-enable:disabled {
	opacity: 0.6;
	cursor: default;
}

.push-banner-dismiss {
	flex-shrink: 0;
	background: none;
	border: none;
	color: var(--text-tertiary);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.push-prompt {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9999;
	display: flex;
	gap: 12px;
	width: min(360px, calc(100vw - 40px));
	padding: 16px;
	border: 1px solid var(--border-primary);
	border-radius: 16px;
	background: var(--bg-secondary);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
	transform: translateY(20px);
	opacity: 0;
	transition: transform 0.22s ease, opacity 0.22s ease;
}

.push-prompt.visible {
	transform: translateY(0);
	opacity: 1;
}

.push-prompt-icon {
	font-size: 26px;
	line-height: 1;
}

.push-prompt-body {
	flex: 1;
	min-width: 0;
}

.push-prompt-body strong {
	display: block;
	font-size: 15px;
	margin-bottom: 4px;
}

.push-prompt-body p {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--text-secondary);
	line-height: 1.4;
}

.push-prompt-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.push-prompt-enable {
	padding: 8px 14px;
	border: none;
	border-radius: 9999px;
	background: var(--primary);
	color: var(--primary-fg);
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
}

.push-prompt-enable:disabled {
	opacity: 0.6;
	cursor: default;
}

.push-prompt-later {
	padding: 8px 12px;
	border: none;
	background: none;
	color: var(--text-tertiary);
	font-size: 13px;
	cursor: pointer;
}

.push-prompt-close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none;
	border: none;
	color: var(--text-tertiary);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.no-notifications {
	padding: 40px 16px;
	text-align: center;
	color: var(--text-secondary);
	font-size: 15px;
	display: flex;
	flex-direction: column;
	align-items: center;

	img {
		width: 120px;
		height: 120px;
		margin-bottom: 12px;
		pointer-events: none;
		margin-top: -20px;
	}
}

.notification-item {
	padding: 16px 0px;
	padding-left: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	cursor: pointer;
	transition:
		background-color 0.2s,
		opacity 0.15s;
	position: relative;

	&:active {
		opacity: 0.7;

		&::after {
			opacity: 0.8;
		}
	}

	&::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0px;
		bottom: 0;
		height: 1px;
		border-radius: 100px;
		background-color: var(--border-primary);
		opacity: 0.5;
		z-index: 2;
		transition: opacity 0.2s;
	}

	&.unread {
		background-color: rgba(var(--primary-rgb), 0.1);

		&::before {
			content: "";
			position: absolute;
			z-index: 12;
			left: 0;
			top: 0;
			bottom: 0;
			width: 2.5px;
			border-radius: 100px;
			background-color: var(--primary);
		}

		&:hover {
			background-color: rgba(var(--primary-rgb), 0.05);
		}
	}
}

.notification-header {
	display: flex;
	gap: 8px;
	align-items: center;
}

.notification-avatars {
	display: flex;
	gap: 0;
	align-items: center;
}

.notification-avatar-wrapper {
	position: relative;
	width: 32px;
	height: 32px;
	margin-left: -10px;
	flex-shrink: 0;

	&:first-child {
		margin-left: 0;
	}
}

.notification-avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	background-color: var(--bg-secondary);
}

.notification-main {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.notification-icon {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-right: -8px;

	&.like-icon {
		color: #f91880;
	}

	&.retweet-icon {
		color: #00ba7c;
	}

	&.reply-icon {
		color: var(--primary);
	}

	&.follow-icon {
		color: var(--primary);
	}

	&.quote-icon {
		color: #00ba7c;
	}

	&.mention-icon {
		color: var(--primary);
	}

	&.reaction-icon {
		color: #8a3ffc;
	}

	&.community-join-request-icon {
		color: #ff8c42;
	}

	&.community-join-approved-icon {
		color: #00ba7c;
	}

	&.community-join-rejected-icon {
		color: #ff4d4f;
	}

	&.community-role-change-icon {
		color: #0aa3b5;
	}

	&.community-ban-icon {
		color: #c0392b;
	}

	&.community-unban-icon {
		color: #7dd36e;
	}

	&.default-icon {
		color: #6c757d;
	}

	svg {
		width: 26px;
		height: 26px;
	}

	&.custom-icon {
		width: 32px;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: transparent;

		img {
			width: 32px;
			height: 32px;
			border-radius: 8px;
			object-fit: contain;
		}
	}
}

.notification-content {
	flex: 1;
	min-width: 0;
	margin-top: -6px;

	p {
		color: var(--text-primary);
		font-size: 15px;
		line-height: 1.4;
		margin: 0;
		word-wrap: break-word;
	}

	strong {
		font-weight: 700;
	}

	.notification-time {
		color: var(--text-secondary);
		font-size: 13px;
		font-weight: 400;
	}
}

.notification-actor-link {
	color: var(--text-primary);
	font-weight: 600;
	text-decoration: none;
}

.notification-actor-link:hover {
	text-decoration: underline;
	color: var(--primary);
}

.notification-tweet-preview {
	margin-top: 6px;

	.tweet {
		border: 1px solid var(--border-primary);
		border-radius: 8px;
		padding: 12px;
		background-color: var(--bg-secondary);
		font-size: 13px;

		.tweet-header {
			margin-bottom: 0px;
			margin-top: 1px;
		}

		.tweet-content {
			margin-bottom: 6px;
		}

		.tweet-actions {
			display: none;
		}
	}
}

.notification-tweet-subtitle {
	color: var(--text-secondary);
	font-size: 14px;
	margin-top: 6px;
	font-weight: 400;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.notification-tweet-images {
	display: flex;
	gap: 4px;
	margin-top: 8px;
	border-radius: 12px;
	overflow: clip;

	img {
		width: 48px;
		height: 48px;
		object-fit: cover;
		border-radius: 8px;
	}
}

.search-page {
	display: none;
	flex-direction: column;
	width: 100%;

	.search-header {
		display: flex;
		align-items: center;
		gap: 16px;
		padding: 12px 0;

		.search-input-container {
			flex: 1;
			position: relative;
			display: flex;
			align-items: center;

			.search-icon {
				position: absolute;
				left: 16px;
				color: var(--text-secondary);
				z-index: 1;
			}

			input {
				width: 100%;
				padding: 12px 16px 12px 48px;
				border: 1px solid var(--border-primary);
				font-family: inherit;
				border-radius: 24px;
				background-color: var(--bg-primary);
				color: var(--text-primary);
				font-size: 16px;
				outline: none;
				transition:
					border-color 0.2s,
					box-shadow 0.2s;

				&::placeholder {
					color: var(--text-secondary);
				}

				&:focus {
					border-color: var(--primary);
					box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
				}
			}
		}
	}

	.search-filters {
		margin-bottom: 24px;
	}

	&:not(:has(.nrf-title)):has(.search-empty:not([style="display: none;"])) {
		.search-filters {
			display: none;
		}
	}

	.search-results-page {
		display: flex;
		flex-direction: column;
		width: 100%;

		.search-empty:not(:has(.nrf-title)) {
			width: 100%;

			h1,
			h2,
			h3,
			h4,
			h5 {
				color: var(--text-primary);
				margin: 0 0 8px 0;
			}

			h2 {
				font-size: 17px;
				margin-bottom: -7px;
				margin-top: 18px;
			}

			.explore-container {
				display: flex;
				flex-direction: column;
				gap: 8px;
			}

			.explore-section h3 {
				font-size: 18px;
				font-weight: 700;
				margin: 0 0 12px;
			}

			.explore-container {
				display: flex;
				flex-direction: column;
			}

			.trending-hashtags {
				display: flex;
				flex-direction: column;
				border-bottom: 1px solid var(--border-primary);
			}

			.trending-hashtag {
				display: flex;
				align-items: center;
				padding: 10px 0;
				text-decoration: none;
				color: inherit;
				transition: background-color 0.15s;

				&:hover {
					opacity: 0.8;
				}

				.trending-hashtag-info {
					display: flex;
					flex-direction: column;
					gap: 0;
				}
				.trending-hashtag-category {
					font-size: 13px;
					color: var(--text-secondary);
				}
				.hashtag-name {
					font-weight: 700;
					font-size: 15px;
				}
				.hashtag-count {
					font-size: 13px;
					color: var(--text-secondary);
				}
			}

			.explore-tweets {
				gap: 0 !important;
			}

			.explore-tweets > .tweet {
				padding: 12px 0;
				margin-bottom: 0 !important;
			}

			.explore-empty {
				text-align: center;
				padding: 40px 0;
				color: var(--text-secondary);
			}
		}

		.search-empty:has(.nrf-title) {
			display: flex;
			flex-direction: column;
			align-items: center;
			text-align: center;
			gap: 12px;
			margin-top: 2em;

			svg {
				color: var(--text-placeholder);
			}

			h3,
			p {
				margin: 0px;
			}

			p {
				margin-top: 2px;
				color: var(--text-muted);
			}
		}

		.users-section,
		.tweets-section {
			margin-bottom: 32px;

			h4 {
				margin: 0 0 16px 0;
				font-size: 18px;
				font-weight: 600;
				color: var(--text-primary);
			}

			.user-info {
				h4 {
					margin: 0px;
				}
			}
		}

		.users-results-page {
			display: flex;
			flex-direction: column;
			gap: 12px;
		}

		.tweets-results-page {
			display: flex;
			flex-direction: column;
			gap: 26px;
		}
	}
}

.search-user {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	background-color: var(--bg-secondary);
	text-decoration: none;
	color: inherit;
	transition:
		background-color 0.2s,
		border-color 0.2s;

	&:hover {
		background-color: var(--bg-tertiary);
		border-color: var(--border-secondary);
	}

	img {
		width: 48px;
		height: 48px;
		border-radius: 50%;
		flex-shrink: 0;
	}

	.user-info {
		flex: 1;
		min-width: 0;

		h4 {
			margin: 0 0 4px 0;
			color: var(--text-primary);
			font-size: 16px;
			font-weight: 600;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
		}

		p {
			margin: 0;
			color: var(--text-secondary);
			font-size: 14px;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
		}
	}
}

.bookmarks-page {
	display: none;
	flex-direction: column;
	width: 100%;

	.bookmarks-header {
		display: flex;
		align-items: center;
		gap: 16px;
		margin-bottom: 24px;
		padding: 12px 0;

		.bookmarks-header-info {
			flex: 1;

			h1 {
				margin: 0 0 4px 0;
				font-size: 24px;
				font-weight: 600;
				color: var(--text-primary);
			}

			p {
				margin: 0;
				color: var(--text-secondary);
				font-size: 14px;
			}
		}
	}

	.bookmarks-content {
		display: flex;
		flex-direction: column;

		.bookmarks-empty {
			text-align: center;
			color: var(--text-secondary);
			padding: 64px 24px;

			svg {
				margin: 0 auto 24px;
				color: var(--text-secondary);
				opacity: 0.6;
			}

			h3 {
				color: var(--text-primary);
				margin: 0 0 8px 0;
				font-size: 20px;
				font-weight: 600;
			}

			p {
				margin: 0px auto;
				font-size: 16px;
				max-width: 300px;
			}
		}

		.bookmarks-list {
			display: flex;
			flex-direction: column;
			gap: 26px;
		}
	}
}

.direct-messages {
	display: none;
	flex-direction: column;
	height: 100vh;
	margin-left: -12px;
	margin-right: -12px;
	margin-top: -12px;
	margin-bottom: -12px;

	&.page-active {
		display: flex;
	}
}

html:has(.direct-messages.page-active, .dm-conversation.page-active) {
	scrollbar-gutter: unset;
}

@media (max-width: 768px) {
	.direct-messages {
		height: calc(100vh - 70px);
	}
}

.dm-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	border-bottom: 1px solid var(--border-primary);
	background-color: var(--bg-primary);
	z-index: 10;
	user-select: none;

	h1 {
		margin: 0;
		font-size: 20px;
		font-weight: 600;
		color: var(--text-primary);
	}

	.new-message-btn {
		background-color: var(--primary);
		border: none;
		cursor: pointer;
		padding: 8px;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		color: var(--primary-fg);

		&:hover {
			opacity: 0.9;
		}

		svg {
			width: 20px;
			height: 20px;
		}
	}
}

.dm-conversations-list {
	display: flex;
	flex-direction: column;
	overflow-y: auto;

	.no-conversations {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 60px 20px;
		text-align: center;
		color: var(--text-secondary);

		img {
			width: 120px;
			height: 120px;
			margin-bottom: 16px;
			pointer-events: none;
		}

		p {
			margin: 0;

			&:first-child {
				font-size: 18px;
				font-weight: 600;
				color: var(--text-primary);
				margin-bottom: 8px;
			}

			&:last-child {
				font-size: 14px;
			}
		}
	}
}

.dm-conversation-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px;
	border-bottom: 1px solid var(--border-primary);
	cursor: pointer;
	transition: background-color 0.15s ease;

	&:hover {
		background-color: var(--bg-secondary);
	}

	&.unread {
		background-color: rgba(var(--primary-rgb), 0.06);

		.dm-conversation-name {
			font-weight: 700;
		}

		.dm-last-message {
			color: var(--text-primary);
			font-weight: 500;
		}
	}

	.dm-avatar {
		width: 40px;
		height: 40px;
		border-radius: 50%;
		flex-shrink: 0;
		object-fit: cover;
		background-color: var(--bg-tertiary);
	}

	.dm-conversation-info {
		flex: 1;
		min-width: 0;
		display: flex;
		flex-direction: column;

		.dm-conversation-name {
			margin: 0px;
			font-size: 15px;
			font-weight: 600;
			color: var(--text-primary);
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
		}

		.dm-last-message {
			margin: 0;
			font-size: 14px;
			color: var(--text-secondary);
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
			line-height: 1.4;

			.dm-sender {
				font-weight: 500;
				color: var(--text-primary);
			}
		}
	}

	.dm-conversation-meta {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: 6px;

		.dm-time {
			font-size: 12px;
			color: var(--text-secondary);
			user-select: none;
		}

		.dm-unread-count {
			background-color: var(--primary);
			color: var(--primary-fg);
			font-size: 11px;
			font-weight: 700;
			padding: 3px 7px;
			border-radius: 12px;
			min-width: 20px;
			text-align: center;
			user-select: none;
		}
	}
}

.dm-conversation {
	display: none;
	flex-direction: column;
	margin-left: -12px;
	margin-right: -12px;
	margin-top: -12px;
	margin-bottom: -12px;
	height: 100vh;

	&.page-active {
		display: flex;
	}

	.no-messages {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 60px 20px;
		text-align: center;
		color: var(--text-secondary);

		img {
			width: 120px;
			height: 120px;
			margin-bottom: 16px;
			pointer-events: none;
		}

		p {
			margin: 0;
			font-size: 16px;
			font-weight: 400;
			color: var(--text-primary);
			margin-bottom: 8px;
		}
	}
}

@media (max-width: 768px) {
	.dm-conversation {
		height: calc(100vh - 70px);
	}
}

.dm-conversation-header {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--border-primary);
	background-color: var(--bg-primary);
	user-select: none;

	.dm-back-button {
		background-color: transparent;
		border: none;
		cursor: pointer;
		padding: 8px;
		margin: -8px;
		margin-right: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		color: var(--text-primary);
		border-radius: 50%;

		&:hover {
			background-color: var(--bg-secondary);
		}
	}

	.dm-conversation-info {
		flex: 1;
		display: flex;
		align-items: center;
		gap: 10px;
		min-width: 0;

		.dm-participant-avatars {
			display: flex;

			img {
				width: 36px;
				height: 36px;
				border-radius: 50%;
				object-fit: cover;
				margin-left: -8px;

				&:first-child {
					margin-left: 0;
				}
			}

			.avatar-more {
				width: 36px;
				height: 36px;
				border-radius: 50%;
				background-color: var(--bg-primary);
				margin-left: -8px;
				display: flex;
				align-items: center;
				justify-content: center;
				font-size: 11px;
				font-weight: 600;
				color: var(--text-secondary);
			}
		}

		.dm-conversation-names {
			min-width: 0;
			justify-content: center;
			display: flex;
			flex-direction: column;
			gap: 4px;

			h2 {
				margin: 0;
				font-size: 15px;
				font-weight: 600;
				color: var(--text-primary);
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
				line-height: 1;
			}

			span {
				font-size: 12px;
				color: var(--text-secondary);
				line-height: 1;
			}
		}
	}

	.dm-conversation-actions {
		display: flex;
		gap: 8px;

		.dm-action-btn {
			background-color: transparent;
			border-radius: 0px;
			width: 36px;
			height: 36px;
			display: flex;
			align-items: center;
			justify-content: center;
			cursor: pointer;
			color: var(--text-secondary);
			border: none;
			padding: 0px;

			&:hover {
				background-color: var(--bg-secondary);
				color: var(--text-primary);
			}
		}
	}
}

.dm-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background-color: var(--bg-primary);
}

.dm-message {
	display: flex;
	gap: 8px;
	max-width: 80%;
	align-items: flex-start;
	position: relative;
	padding: 4px 0;

	&.own {
		margin-left: auto;
		flex-direction: row-reverse;

		.dm-message-avatar {
			display: none;
		}

		.dm-message-bubble {
			background-color: var(--primary);
			color: var(--primary-fg);
			border-radius: 18px 18px 4px 18px;
		}

		.dm-message-footer {
			flex-direction: row-reverse;
		}

		.dm-reactions {
			flex-direction: row-reverse;
		}

		.dm-message-actions {
			right: auto;
			left: 0;
			flex-direction: row-reverse;
		}
	}

	&:not(.own) {
		.dm-message-bubble {
			padding: 0px;
		}

		.dm-message-actions {
			left: auto;
			right: 0;
		}
	}

	.dm-message-avatar {
		width: 32px;
		height: 32px;
		border-radius: 50%;
		flex-shrink: 0;
		object-fit: cover;
		background-color: var(--bg-tertiary);
	}

	.dm-message-wrapper {
		display: flex;
		flex-direction: column;
		gap: 4px;
		min-width: 0;
		flex: 1;
	}

	.dm-message-content {
		display: flex;
		align-items: flex-end;
		gap: 8px;

		&:is(.dm-message.own .dm-message-content) {
			flex-direction: row-reverse;
		}
	}

	.dm-reply-preview {
		padding: 8px 12px;
		margin-bottom: 4px;
		border-left: 3px solid transparent;
		background-color: var(--bg-secondary);
		font-size: 13px;
		position: relative;
		max-width: fit-content;

		&::before {
			content: "";
			position: absolute;
			left: 0;
			top: 0;
			bottom: 0;
			width: 2px;
			background-color: var(--primary);
			border-radius: 9px;
		}

		.dm-reply-author {
			font-weight: 600;
			color: var(--primary);
			display: block;
			margin-bottom: 2px;
			font-size: 12px;
		}

		.dm-reply-text {
			color: var(--text-secondary);
			display: block;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
			max-width: 200px;
		}
	}

	.dm-message-bubble {
		padding: 10px 14px;
		font-size: 15px;
		line-height: 1.45;
		word-wrap: break-word;
		word-break: break-word;
		max-width: fit-content;

		.dm-link {
			color: var(--primary);
			text-decoration: none;

			&:hover {
				text-decoration: underline;
			}

			&:is(.dm-message.own .dm-link) {
				color: var(--primary-fg);
				text-decoration: underline;
			}
		}
	}

	.dm-message-attachments {
		display: flex;
		flex-direction: column;
		gap: 6px;

		img {
			max-width: 260px;
			border-radius: 16px;
			cursor: pointer;
		}
	}

	.dm-reactions {
		display: flex;
		gap: 4px;
		flex-wrap: wrap;
		align-items: center;

		.dm-reaction {
			display: inline-flex;
			align-items: center;
			gap: 3px;
			padding: 3px 8px;
			border-radius: 12px;
			background-color: var(--bg-secondary);
			border: 1px solid var(--border-primary);
			font-size: 13px;
			cursor: pointer;

			&:hover {
				background-color: var(--bg-tertiary);
				border-color: var(--border-secondary);
			}

			&.reacted {
				background-color: rgba(var(--primary-rgb), 0.12);
				border-color: rgba(var(--primary-rgb), 0.3);
			}

			.dm-reaction-emoji {
				line-height: 1;
			}

			.dm-reaction-count {
				font-size: 12px;
				font-weight: 600;
				color: var(--text-primary);
			}
		}

		.dm-add-reaction {
			background-color: transparent;
			border: 1px dashed var(--border-primary);
			cursor: pointer;
			padding: 0px;
			display: flex;
			align-items: center;
			justify-content: center;
			color: var(--text-secondary);
			font-size: 13px;
			border-radius: 12px;
			opacity: 0;
			width: 24px;
			height: 24px;

			&:hover {
				background-color: var(--bg-secondary);
				color: var(--text-primary);
				border-style: solid;
			}
		}
	}

	&:hover .dm-add-reaction {
		opacity: 1;
	}

	.dm-message-footer {
		display: flex;
		align-items: center;
		gap: 8px;

		.dm-message-time {
			font-size: 11px;
			color: var(--text-secondary);
		}

		.dm-message-actions {
			display: flex;
			align-items: center;
			gap: 2px;
			opacity: 0;
		}

		.dm-message-action-btn {
			background-color: transparent;
			border: none;
			cursor: pointer;
			padding: 4px;
			color: var(--text-secondary);
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 6px;

			&:hover {
				color: var(--text-primary);
				background-color: var(--bg-secondary);
			}

			&.dm-delete-btn:hover {
				color: var(--error);
			}

			svg {
				width: 14px;
				height: 14px;
			}
		}
	}

	&:hover .dm-message-actions {
		opacity: 1;
	}
}

.dm-typing-indicators {
	padding: 8px 16px;
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--text-secondary);
	font-size: 13px;

	.dm-typing-container {
		display: flex;
		align-items: center;
		gap: 8px;
	}

	.dm-typing-dots {
		display: flex;
		align-items: center;
		gap: 3px;

		span {
			width: 4px;
			height: 4px;
			border-radius: 50%;
			background-color: var(--text-secondary);
			animation: dm-typing-dot 1.4s infinite;

			&:nth-child(2) {
				animation-delay: 0.2s;
			}

			&:nth-child(3) {
				animation-delay: 0.4s;
			}
		}
	}
}

@keyframes dm-typing-dot {
	0%,
	60%,
	100% {
		opacity: 0.3;
	}

	30% {
		opacity: 1;
	}
}

.dm-composer {
	border-top: 1px solid var(--border-primary);
	background-color: var(--bg-primary);
	padding-bottom: env(safe-area-inset-bottom);

	.dm-reply-preview-composer {
		padding: 12px 16px;
		background-color: var(--bg-secondary);
		display: none;
		align-items: center;
		gap: 12px;
		padding-bottom: 0px;

		&.active {
			display: flex;
		}

		.dm-reply-preview-line {
			width: 3px;
			height: 32px;
			background-color: var(--primary);
			border-radius: 2px;
			flex-shrink: 0;
		}

		.dm-reply-preview-content {
			flex: 1;
			min-width: 0;
			gap: 5px;
			display: flex;

			.dm-reply-preview-label {
				font-size: 13px;
				font-weight: 600;
				color: var(--primary);
				margin-bottom: 2px;
			}

			.dm-reply-preview-text {
				font-size: 13px;
				color: var(--text-secondary);
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}
		}

		.dm-reply-preview-cancel {
			background-color: transparent;
			border: none;
			cursor: pointer;
			padding: 6px;
			color: var(--text-secondary);
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 50%;

			&:hover {
				background-color: var(--bg-tertiary);
				color: var(--text-primary);
			}
		}
	}

	.dm-composer-attachments {
		display: flex;
		gap: 10px;
		padding: 12px 16px 0;
		flex-wrap: wrap;

		&:empty {
			display: none;
		}

		.dm-attachment-preview {
			position: relative;
			width: 64px;
			height: 64px;
			border-radius: 12px;
			overflow: clip;

			img {
				width: 100%;
				height: 100%;
				object-fit: cover;
			}

			.remove-attachment {
				position: absolute;
				top: 4px;
				right: 4px;
				background-color: rgba(0, 0, 0, 0.75);
				color: white;
				border: none;
				border-radius: 50%;
				width: 20px;
				height: 20px;
				display: flex;
				align-items: center;
				justify-content: center;
				cursor: pointer;
				font-size: 12px;

				&:hover {
					background-color: rgba(0, 0, 0, 0.9);
				}
			}
		}
	}

	.dm-composer-input {
		display: flex;
		align-items: flex-end;
		gap: 4px;
		padding: 12px 16px;
		position: relative;
		transition: background-color 0.2s;

		&.drag-over {
			background-color: var(--bg-secondary);
			border-radius: 12px;
			outline: 2px dashed var(--primary);
			outline-offset: -4px;
		}

		.dm-attachment-btn,
		.dm-gif-btn {
			background-color: transparent;
			border: none;
			cursor: pointer;
			padding: 8px;
			display: flex;
			align-items: center;
			justify-content: center;
			color: var(--primary);
			border-radius: 50%;
			margin-bottom: 2px;

			&:hover {
				background-color: var(--bg-secondary);
			}
		}

		.dm-gif-picker {
			position: absolute;
			bottom: 100%;
			left: 16px;
			width: 320px;
			max-height: 400px;
			background-color: var(--bg-primary);
			border: 1px solid var(--border-primary);
			border-radius: 12px;
			box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
			z-index: 100;
			overflow: hidden;

			.dm-gif-picker-header {
				display: flex;
				align-items: center;
				gap: 8px;
				padding: 12px;
				border-bottom: 1px solid var(--border-primary);

				input {
					flex: 1;
					border: 1px solid var(--border-primary);
					border-radius: 8px;
					padding: 8px 12px;
					font-size: 14px;
					background-color: var(--bg-secondary);
					color: var(--text-primary);
					outline: none;

					&::placeholder {
						color: var(--text-secondary);
					}

					&:focus {
						border-color: var(--primary);
					}
				}

				button {
					background-color: transparent;
					border: none;
					cursor: pointer;
					font-size: 20px;
					color: var(--text-secondary);
					padding: 4px 8px;
					border-radius: 4px;

					&:hover {
						background-color: var(--bg-secondary);
						color: var(--text-primary);
					}
				}
			}

			.dm-gif-results {
				display: grid;
				grid-template-columns: repeat(2, 1fr);
				gap: 8px;
				padding: 12px;
				max-height: 300px;
				overflow-y: auto;

				.dm-gif-item {
					aspect-ratio: 1;
					cursor: pointer;
					border-radius: 8px;
					overflow: clip;
					background-color: var(--bg-secondary);

					img {
						width: 100%;
						height: 100%;
						object-fit: cover;
						transition: transform 0.15s ease;
					}

					&:hover img {
						transform: scale(1.05);
					}
				}
			}
		}

		#dmMessageInput {
			flex: 1;
			border: none;
			padding: 10px 0px;
			font-family: inherit;
			font-size: 15px;
			color: var(--text-primary);
			background-color: var(--bg-secondary);
			resize: none;
			min-height: 44px;
			max-height: 120px;
			outline: none;
			line-height: 1.4;
			caret-color: var(--primary);

			&::placeholder {
				color: var(--text-secondary);
			}
		}

		.dm-send-btn {
			background-color: var(--bg-secondary);
			border: none;
			cursor: pointer;
			padding: 10px;
			display: flex;
			align-items: center;
			justify-content: center;
			color: var(--text-secondary);
			border-radius: 50%;
			margin-bottom: 2px;

			&:disabled {
				opacity: 0.4;
				cursor: not-allowed;
			}

			&:not(:disabled) {
				background-color: var(--primary);
				color: var(--primary-fg);
			}
		}
	}
}

.dm-group-avatars {
	display: flex;

	img {
		width: 32px;
		height: 32px;
		border-radius: 50%;
		object-fit: cover;
		background-color: var(--bg-tertiary);
		border: 2px solid var(--bg-primary);
		margin-left: -8px;

		&:first-child {
			margin-left: 0;
		}
	}

	.dm-avatar-more {
		width: 32px;
		height: 32px;
		border-radius: 50%;
		background-color: var(--bg-primary);
		border: 1px solid var(--border-primary);
		margin-left: -8px;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 11px;
		font-weight: 600;
		color: var(--text-secondary);
		user-select: none;
	}
}

.dm-conversation-item.group {
	.dm-conversation-name {
		display: flex;
		align-items: center;
		gap: 4px;

		.group-indicator {
			font-size: 12px;
			opacity: 0.7;
		}
	}
}

.new-message-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1000;

	.modal-content {
		background-color: var(--bg-primary);
		border-radius: 16px;
		width: 90%;
		max-width: 600px;
		max-height: 80vh;
		overflow: hidden;
		display: flex;
		flex-direction: column;

		.modal-header {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 20px;
			border-bottom: 1px solid var(--border-primary);

			h3 {
				margin: 0;
				font-size: 18px;
				font-weight: 600;
				color: var(--text-primary);
			}

			.modal-close {
				background-color: transparent;
				border: none;
				cursor: pointer;
				padding: 8px;
				display: flex;
				align-items: center;
				justify-content: center;
				color: var(--text-secondary);
				border-radius: 50%;
				transition: all 0.2s ease;

				&:hover {
					background-color: var(--bg-secondary);
					color: var(--text-primary);
				}
			}
		}

		.modal-body {
			padding: 20px;
			flex: 1;
			overflow-y: auto;
		}

		.modal-actions {
			display: flex;
			gap: 12px;
			padding: 20px;
			border-top: 1px solid var(--border-primary);

			.btn-secondary {
				flex: 1;
				padding: 12px 24px;
				border: 1px solid var(--border-primary);
				border-radius: 8px;
				background-color: transparent;
				color: var(--text-primary);
				font-size: 14px;
				font-weight: 600;
				cursor: pointer;
				transition: all 0.2s;

				&:hover {
					background-color: var(--bg-secondary);
				}
			}

			.btn-primary {
				flex: 1;
				padding: 12px 24px;
				border: none;
				border-radius: 8px;
				background-color: var(--primary);
				color: var(--primary-fg);
				font-size: 14px;
				font-weight: 600;
				cursor: pointer;
				transition: background-color 0.2s;

				&:disabled {
					background-color: var(--bg-tertiary);
					color: var(--text-secondary);
					cursor: not-allowed;
				}

				&:not(:disabled):hover {
					background-color: var(--primary-dark);
				}
			}
		}
	}
}

.group-settings-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;

	.modal-content {
		background-color: var(--bg-primary);
		border-radius: 16px;
		width: 90%;
		max-width: 600px;
		max-height: 80vh;
		overflow: hidden;
		display: flex;
		flex-direction: column;

		.modal-header {
			h3 {
				margin: 0;
				font-size: 18px;
				font-weight: 600;
				color: var(--text-primary);
			}

			.modal-close {
				background-color: transparent;
				border: none;
				cursor: pointer;
				padding: 8px;
				display: flex;
				align-items: center;
				justify-content: center;
				color: var(--text-secondary);
				border-radius: 50%;
				transition: all 0.2s ease;

				&:hover {
					background-color: var(--bg-secondary);
					color: var(--text-primary);
				}
			}
		}

		.modal-body {
			padding: 20px;
			flex: 1;
			overflow-y: auto;

			.form-group {
				margin-bottom: 24px;

				label {
					display: block;
					margin-bottom: 8px;
					font-size: 14px;
					font-weight: 600;
					color: var(--text-primary);
				}

				#groupNameInput {
					width: 100%;
					padding: 12px 16px;
					border: 1px solid var(--border-primary);
					border-radius: 8px;
					background-color: var(--bg-secondary);
					color: var(--text-primary);
					font-size: 14px;
					outline: none;
					transition: border-color 0.2s;

					&::placeholder {
						color: var(--text-secondary);
					}

					&:focus {
						border-color: var(--primary);
					}
				}

				.participants-list {
					max-height: 300px;
					overflow-y: auto;
					border: 1px solid var(--border-primary);
					border-radius: 8px;
					margin-bottom: 12px;

					.participant-item {
						display: flex;
						align-items: center;
						gap: 12px;
						padding: 12px 16px;
						border-bottom: 1px solid var(--border-primary);

						&:last-child {
							border-bottom: none;
						}

						img {
							width: 40px;
							height: 40px;
							border-radius: 50%;
							object-fit: cover;
							background-color: var(--bg-tertiary);
						}

						.participant-info {
							flex: 1;

							.participant-name {
								display: block;
								font-size: 14px;
								font-weight: 600;
								color: var(--text-primary);
								margin-bottom: 2px;
							}

							.participant-username {
								font-size: 12px;
								color: var(--text-secondary);
							}
						}

						.remove-participant-btn {
							background-color: transparent;
							border: 1px solid var(--border-primary);
							border-radius: 6px;
							padding: 6px 12px;
							color: var(--text-secondary);
							font-size: 12px;
							cursor: pointer;
							transition: all 0.2s ease;

							&:hover {
								background-color: var(--error);
								border-color: var(--error);
								color: white;
							}
						}

						.current-user-badge {
							background-color: var(--primary);
							color: var(--primary-fg);
							padding: 4px 8px;
							border-radius: 12px;
							font-size: 11px;
							font-weight: 600;
						}
					}
				}
			}
		}

		.modal-actions {
			display: flex;
			gap: 12px;
			padding: 20px;
			border-top: 1px solid var(--border-primary);

			.btn-secondary {
				flex: 1;
				padding: 12px 24px;
				border: 1px solid var(--border-primary);
				border-radius: 8px;
				background-color: transparent;
				color: var(--text-primary);
				font-size: 14px;
				font-weight: 600;
				cursor: pointer;
				transition: all 0.2s;

				&:hover {
					background-color: var(--bg-secondary);
				}
			}

			.btn-primary {
				flex: 1;
				padding: 12px 24px;
				border: none;
				border-radius: 8px;
				background-color: var(--primary);
				color: var(--primary-fg);
				font-size: 14px;
				font-weight: 600;
				cursor: pointer;
				transition: background-color 0.2s;

				&:hover {
					background-color: var(--primary-dark);
				}
			}
		}
	}
}

.add-participant-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;

	.modal-content {
		background-color: var(--bg-primary);
		border-radius: 16px;
		width: 90%;
		max-width: 500px;
		max-height: 80vh;
		overflow: hidden;
		display: flex;
		flex-direction: column;

		.modal-header {
			h3 {
				margin: 0;
				font-size: 18px;
				font-weight: 600;
				color: var(--text-primary);
			}

			.modal-close {
				background-color: transparent;
				border: none;
				cursor: pointer;
				padding: 8px;
				display: flex;
				align-items: center;
				justify-content: center;
				color: var(--text-secondary);
				border-radius: 50%;
				transition: all 0.2s ease;

				&:hover {
					background-color: var(--bg-secondary);
					color: var(--text-primary);
				}
			}
		}

		.modal-body {
			padding: 20px;
			flex: 1;
			overflow-y: auto;

			.form-group {
				position: relative;
				margin-bottom: 16px;

				label {
					display: block;
					margin-bottom: 8px;
					font-size: 14px;
					font-weight: 600;
					color: var(--text-primary);
				}

				#addParticipantTo,
				#newMessageTo {
					width: 100%;
					padding: 12px 16px;
					border: 1px solid var(--border-primary);
					border-radius: 8px;
					background-color: var(--bg-secondary);
					color: var(--text-primary);
					font-size: 14px;
					outline: none;
					transition: border-color 0.2s;

					&::placeholder {
						color: var(--text-secondary);
					}

					&:focus {
						border-color: var(--primary);
					}
				}

				.search-suggestions {
					position: absolute;
					top: 100%;
					left: 0;
					right: 0;
					background-color: var(--bg-primary);
					border: 1px solid var(--border-primary);
					border-top: none;
					border-radius: 0 0 8px 8px;
					max-height: 200px;
					overflow-y: auto;
					z-index: 10;
					display: none;

					&.show {
						display: block;
					}

					.suggestion-item {
						display: flex;
						align-items: center;
						gap: 12px;
						padding: 12px 16px;
						cursor: pointer;
						transition: background-color 0.2s;

						&:hover {
							background-color: var(--bg-secondary);
						}

						img {
							width: 32px;
							height: 32px;
							border-radius: 50%;
							object-fit: cover;
							background-color: var(--bg-tertiary);
						}

						.user-info {
							flex: 1;

							.username {
								font-size: 14px;
								font-weight: 600;
								color: var(--text-primary);
								margin: 0;
							}

							.name {
								font-size: 12px;
								color: var(--text-secondary);
								margin: 0;
							}
						}
					}

					.no-suggestions {
						padding: 12px 16px;
						text-align: center;
						color: var(--text-secondary);
						font-size: 14px;
						font-style: italic;
					}
				}
			}

			.selected-users {
				display: flex;
				flex-wrap: wrap;
				gap: 8px;
				margin-bottom: 16px;

				.selected-user {
					display: flex;
					align-items: center;
					gap: 8px;
					background-color: var(--bg-secondary);
					padding: 6px 12px;
					border-radius: 16px;
					font-size: 14px;
					color: var(--text-primary);

					.remove-user {
						background-color: transparent;
						border: none;
						cursor: pointer;
						color: var(--text-secondary);
						font-size: 16px;
						line-height: 1;

						&:hover {
							color: var(--text-primary);
						}
					}
				}
			}
		}

		.modal-actions {
			display: flex;
			gap: 12px;
			padding: 20px;
			border-top: 1px solid var(--border-primary);

			.btn-secondary {
				flex: 1;
				padding: 12px 24px;
				border: 1px solid var(--border-primary);
				border-radius: 8px;
				background-color: transparent;
				color: var(--text-primary);
				font-size: 14px;
				font-weight: 600;
				cursor: pointer;
				transition: all 0.2s;

				&:hover {
					background-color: var(--bg-secondary);
				}
			}

			.btn-primary {
				flex: 1;
				padding: 12px 24px;
				border: none;
				border-radius: 8px;
				background-color: var(--primary);
				color: var(--primary-fg);
				font-size: 14px;
				font-weight: 600;
				cursor: pointer;
				transition: background-color 0.2s;

				&:disabled {
					background-color: var(--bg-tertiary);
					color: var(--text-secondary);
					cursor: not-allowed;
				}

				&:not(:disabled):hover {
					background-color: var(--primary-dark);
				}
			}
		}
	}
}

@media (max-width: 768px) {
	.dm-message {
		max-width: 90%;
	}

	.new-message-modal .modal-content,
	.group-settings-modal .modal-content,
	.add-participant-modal .modal-content,
	.direct-settings-modal .modal-content {
		width: 100%;
		max-width: 100%;
		height: auto;
		max-height: 80vh;
		margin: 0;
		border-radius: 16px 16px 0 0;
		align-self: flex-end;
	}

	.new-message-modal,
	.group-settings-modal,
	.add-participant-modal,
	.direct-settings-modal {
		align-items: flex-end;

		.modal-content {
			transform-origin: bottom center;

			@starting-style {
				transform: scale(1) translateY(20px);
				opacity: 0;
			}
		}
	}

	nav {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		top: auto;
		width: 100%;
		height: auto;
		flex-direction: row;
		padding: 8px 4px;
		border-top: 1px solid var(--border-primary);
		background-color: var(--bg-primary);
		z-index: 100;
		justify-content: space-around;
		align-items: center;

		.logo {
			display: none;
		}

		button {
			padding: 8px;
			width: auto;
			flex: 1;
			justify-content: center;
			border-radius: 12px;

			.nav-label {
				display: none;
			}

			svg {
				margin: 0;
			}
		}

		.account {
			margin-top: 0;
			width: auto;
			flex: 1;
			padding: 8px;
			margin-bottom: 0px;
			justify-content: center;

			img {
				width: 28px;
				height: 28px;
			}

			svg {
				display: none;
			}
		}
	}

	.main-content {
		margin-bottom: 70px;
		max-width: 100vw;
	}

	body {
		padding-bottom: 0;
	}

	#gif-picker {
		#gif-results {
			grid-template-columns: repeat(2, 1fr);
		}
	}
}

.interactions-modal {
	width: 90%;
	max-width: 400px;
	max-height: 80vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.interactions-modal .modal-header h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: var(--text-primary);
	padding-bottom: 16px;
}

.users-list {
	overflow-y: auto;
	flex: 1;
	padding: 0;
}

.user-item {
	display: flex;
	align-items: center;
	padding: 16px 20px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	border-bottom: 1px solid var(--border-primary);
}

.user-item:hover {
	background-color: var(--bg-secondary);
}

.user-item:last-child {
	border-bottom: none;
}

.user-avatar {
	margin-right: 12px;
}

.user-avatar img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.user-info {
	flex: 1;
}

.user-name {
	font-weight: 700;
	color: var(--text-primary);
	font-size: 15px;
	line-height: 1.2;
}

.user-username {
	color: var(--text-secondary);
	font-size: 14px;
	line-height: 1.2;
	margin-top: 2px;
}

.user-time {
	color: var(--text-secondary);
	font-size: 13px;
	margin-top: 4px;
}

.interactions-tabbed-modal {
	width: 90%;
	max-width: 500px;
	max-height: 80vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.interactions-modal-content {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

.interactions-tabs {
	display: flex;
	gap: 0;
	border-bottom: 1px solid var(--border-primary);
	padding: 0 12px;
	flex-shrink: 0;
	position: relative;

	&::after {
		content: "";
		position: absolute;
		bottom: 0;
		left: var(--indicator-left, 0);
		width: var(--indicator-width, 0);
		height: 3px;
		background-color: rgb(var(--primary-rgb));
		border-radius: 3px 3px 0 0;
		transition:
			left 0.2s ease,
			width 0.2s ease;
	}
}

.interactions-tabs .tab-button {
	flex: 1;
	padding: 12px 16px;
	border: none;
	background: transparent;
	color: var(--text-secondary);
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition:
		color 0.2s ease,
		background-color 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-family: inherit;
}

.interactions-tabs .tab-button:hover {
	background-color: var(--bg-secondary);
	color: var(--text-primary);
}

.interactions-tabs .tab-button.active {
	color: var(--text-primary);
	font-weight: 600;
}

.interactions-content {
	flex: 1;
	overflow-y: auto;
	padding: 12px 0;
}

.interactions-content .tweet {
	margin-bottom: 14px;
	padding: 0 12px;
}

.interactions-content .loading,
.interactions-content .empty-state {
	padding: 40px 20px;
	text-align: center;
	color: var(--text-secondary);
	font-size: 15px;
}

.reaction-wrapper {
	display: flex;
	align-items: center;
	gap: 4px;
}

.top-reactions {
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.2s ease;
	display: none;
}

.top-reactions:hover {
	transform: scale(1.1);
}

.reaction-count {
	font-size: 13px;
	color: var(--text-secondary);
	min-width: 16px;
	text-align: left;
	cursor: pointer;
	transition: color 0.2s ease;
	display: none;
}

.reaction-count:hover {
	color: var(--text-primary);
	text-decoration: underline;
}

.reaction-btn {
	position: relative;
}

.reactions-list {
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.reaction-item {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 12px;
	padding-top: 2px;
}

.reaction-user-avatar {
	flex-shrink: 0;
}

.reaction-user-avatar img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.reaction-content {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
}

.reaction-emoji {
	font-size: 24px;
	line-height: 1;
}

.reaction-user-info {
	flex: 1;
}

.reaction-user-name {
	font-weight: 600;
	color: var(--text-primary);
	font-size: 15px;
	line-height: 1.2;
}

.reaction-user-username {
	color: var(--text-secondary);
	font-size: 14px;
	line-height: 1.2;
	margin-top: 2px;
}

.clickable-count {
	cursor: pointer;
	transition: color 0.2s ease;
}

.clickable-count:hover {
	color: var(--primary);
	text-decoration: underline;
}

.edit-tweet-modal {
	padding: 20px;

	.modal-header {
		padding: 0 0 16px;
		margin-bottom: 0;
		border-bottom: 1px solid var(--border-primary);

		h2 {
			font-size: 18px;
			font-weight: 700;
		}
	}

	.modal-close {
		top: 16px;
		right: 16px;
	}
}

.edit-tweet-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-top: 16px;
}

.edit-tweet-textarea {
	width: 100%;
	min-height: 140px;
	padding: 14px 16px;
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	background-color: var(--bg-secondary);
	color: var(--text-primary);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	resize: vertical;
	transition:
		border-color 0.2s,
		box-shadow 0.2s;

	&:focus {
		outline: none;
		border-color: var(--primary);
		box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
	}

	&::placeholder {
		color: var(--text-tertiary);
	}
}

.edit-tweet-char-counter {
	text-align: right;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-tertiary);
	margin-top: -8px;

	&.warning {
		color: #f59e0b;
	}

	&.error {
		color: var(--error);
	}
}

.edit-tweet-buttons {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	padding-top: 8px;
	border-top: 1px solid var(--border-primary);
}

.edit-tweet-cancel {
	padding: 10px 20px;
	border: 1px solid var(--border-primary);
	border-radius: 9999px;
	background-color: transparent;
	color: var(--text-primary);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition:
		background-color 0.2s,
		border-color 0.2s;

	&:hover {
		background-color: var(--bg-secondary);
		border-color: var(--border-hover);
	}
}

.edit-tweet-save {
	padding: 10px 24px;
	border: none;
	border-radius: 9999px;
	background-color: var(--primary);
	color: var(--primary-fg);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition:
		opacity 0.2s,
		transform 0.1s;

	&:hover {
		opacity: 0.9;
	}

	&:active {
		transform: scale(0.98);
	}

	&:disabled {
		opacity: 0.6;
		cursor: not-allowed;
	}
}

.tweet-stat-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 0;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.tweet-stat-item:hover {
	opacity: 0.75;
}

.stat-avatars {
	display: flex;
	margin-right: 8px;
}

.stat-avatar {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid var(--bg-primary);
	margin-left: -8px;
	object-fit: cover;
}

.stat-avatar:first-child {
	margin-left: 0;
}

.stat-text {
	font-size: 14px;
	color: var(--text-secondary);
	line-height: 1.4;
}

.pinned-indicator {
	display: flex;
	align-items: center;
	gap: 6px;
	user-select: none;
	margin-bottom: 4px;
	color: var(--text-secondary);
	font-size: 13px;
	font-weight: 600;
}

.community-pinned-indicator {
	color: var(--primary, #1d9bf0);
}

.tweet-community-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px 6px 6px;
	margin-bottom: 8px;
	background: var(--bg-secondary, rgba(29, 155, 240, 0.08));
	border: 1px solid var(--border-primary, rgba(29, 155, 240, 0.15));
	border-radius: 999px;
	color: var(--text-primary);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	max-width: fit-content;
	line-height: 1;
	transition:
		background 0.15s ease,
		transform 0.12s ease,
		border-color 0.15s ease;
	cursor: pointer;
}

.tweet-community-label:hover {
	background: var(--bg-tertiary, rgba(29, 155, 240, 0.14));
	border-color: var(--primary, rgba(29, 155, 240, 0.35));
	transform: translateY(-1px);
}

.tweet-community-label-icon {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	object-fit: cover;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: var(--bg-tertiary);
	font-weight: 700;
	font-size: 12px;
	color: var(--text-primary);
	text-transform: uppercase;
}

.tweet-community-label-icon-default {
	background: linear-gradient(135deg, var(--primary, #1d9bf0), #7c5cff);
	color: #fff;
}

.tweet-community-label-text {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 260px;
}

.tweet-community-label-prefix {
	color: var(--text-secondary);
	font-weight: 400;
}

.tweet-community-label-name {
	font-weight: 600;
}

.tweet-community-label-lock {
	color: var(--text-secondary);
	flex-shrink: 0;
}

@media (max-width: 560px) {
	.tweet-community-label-prefix {
		display: none;
	}
	.tweet-community-label-text {
		max-width: 200px;
	}
}

.tweet-article {
	display: flex;
	flex-direction: column;
	gap: 16px;

	h2 {
		margin: 0px;
		font-size: 22px;
		font-weight: 600;
		line-height: 1.2;
	}

	.article-cover {
		border-radius: 18px;
		overflow: clip;

		img {
			width: 100%;
			display: block;
			height: auto;
			border-radius: 18px;
		}
	}

	.tweet-article-body {
		font-size: 16px;
		line-height: 1.6;

		img {
			max-width: 100%;
			display: block;
			margin: 12px 0;
			border-radius: 14px;
		}

		pre {
			background-color: var(--bg-secondary);
			border-radius: 14px;
			padding: 12px;
			overflow-x: auto;
			margin: 0 0 16px;
		}

		blockquote {
			margin: 0 0 16px;
			padding-left: 14px;
			border-left: 4px solid var(--border-secondary);
			color: var(--text-secondary);
		}

		h1,
		h2,
		h3,
		h4,
		h5,
		h6 {
			margin: 18px 0 10px;
			font-weight: 600;
			line-height: 1.25;
		}
	}

	.tweet-article-preview {
		font-size: 16px;
		line-height: 1.5;
	}

	.tweet-article-read-more {
		align-self: flex-start;
		margin-top: 8px;
		background-color: transparent;
		border: 1px solid var(--border-secondary);
		border-radius: 9999px;
		padding: 6px 14px;
		font-size: 14px;
		font-weight: 600;
		cursor: pointer;
		color: var(--primary);
		transition: background-color 0.2s ease;
		font-family: inherit;

		&:hover {
			background-color: rgba(var(--primary-rgb), 0.08);
		}
	}
}

.profile-label,
.tweet-label {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 4px;
	font-weight: 500;
	border-radius: 6px;
	font-size: 10px;
	vertical-align: middle;
}

.profile-label {
	font-size: 11px;
}

.label-parody {
	color: #d9ab3b;
	border: 1px solid rgb(218 165 32);
}

.label-fan {
	color: #db2777;
	border: 1px solid rgba(219, 39, 119);
}

.label-commentary {
	color: #3b82f6;
	border: 1px solid rgba(59, 130, 246);
}

.communities-page {
	display: none;
	flex-direction: column;
	max-width: 600px;
	width: 100%;
	margin: 0 auto;
}

.communities-header {
	padding: 16px;
	border-bottom: 1px solid var(--border-primary);
	display: flex;
	justify-content: space-between;
	align-items: center;
	user-select: none;
}

.communities-header-info {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;

	h1 {
		font-size: 20px;
		font-weight: 600;
		color: var(--text-primary);
		margin: 0;
	}
}

.create-community-btn {
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	background: var(--primary);
	color: var(--primary-fg);
	display: flex;
	align-items: center;
	gap: 6px;
	transition:
		background 0.2s,
		transform 0.2s;
	margin-left: auto;
	font-family: inherit;

	&:hover {
		background: var(--primary-hover);
	}

	&:active {
		transform: scale(0.97);
	}
}

.communities-content {
	margin-top: 16px;
	flex: 1;
	overflow-y: auto;
}

.communities-list {
	display: flex;
	flex-direction: column;

	&.hidden {
		display: none;
	}
}

.community-card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	cursor: pointer;
	transition:
		background-color 0.15s ease,
		transform 0.15s ease;
	border-bottom: 1px solid var(--border-primary);
	flex-direction: column;

	&:hover {
		background-color: var(--bg-secondary);
	}

	&:last-child {
		border-bottom: none;
	}
}

.communities-search-wrap {
	padding: 10px 16px 12px;
	border-bottom: 1px solid var(--border-primary);
}

.communities-search-inner {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--bg-secondary, rgba(127, 127, 127, 0.08));
	border-radius: 999px;
	padding: 10px 14px;
	color: var(--text-secondary);
	border: 1px solid transparent;
	transition:
		border-color 0.15s ease,
		background 0.15s ease;
}

.communities-search-inner:focus-within {
	border-color: var(--primary, #1d9bf0);
	background: var(--bg-primary);
}

.communities-search-inner input {
	flex: 1;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--text-primary);
	font-size: 15px;
}

.communities-search-inner input::placeholder {
	color: var(--text-placeholder, var(--text-tertiary));
	opacity: 1;
}

.communities-tabs .communities-tab {
	white-space: nowrap;
}

.vibe-modal .vibe-options-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	padding: 4px 0 4px;
}

.vibe-option-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	border-radius: 10px;
	color: var(--text-primary);
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	text-align: left;
	transition:
		background 0.15s,
		border-color 0.15s,
		transform 0.15s;

	&:hover {
		background: var(--bg-tertiary, var(--bg-secondary));
		border-color: var(--primary);
	}

	&:active {
		transform: scale(0.98);
	}

	&.selected {
		border-color: var(--primary);
		background: color-mix(in srgb, var(--primary) 12%, transparent);
	}

	.vibe-emoji {
		font-size: 22px;
		line-height: 1;
	}
}

.tweet-more-menu {
	position: fixed;
	min-width: 180px;
	background: var(--bg-primary);
	border: 1px solid var(--border-primary);
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	padding: 4px;
	z-index: 50;
	animation: composeMoreMenuIn 0.15s ease;
}

.tweet-more-menu[hidden] {
	display: none;
}

.tweet-more-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 10px;
	background: none;
	border: none;
	border-radius: 6px;
	color: var(--text-primary);
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	text-align: left;

	&:hover {
		background: var(--bg-secondary);
	}

	.tweet-more-label {
		flex: 1;
	}

	.tweet-more-meta {
		font-size: 12px;
		font-weight: 400;
		color: var(--primary);

		&:empty {
			display: none;
		}
	}
}

@keyframes composeMoreMenuIn {
	from {
		opacity: 0;
		transform: translateY(-4px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.replying-to-chip {
	font-size: 13px;
	color: var(--text-secondary);
	padding: 4px 16px 10px;
	border-bottom: 1px dashed var(--border-primary);
	margin-bottom: 8px;

	.replying-to-handle {
		color: var(--primary);
		text-decoration: none;
		font-weight: 500;

		&:hover {
			text-decoration: underline;
		}
	}
}

.vibe-selector-btn {
	padding: 4px 10px !important;
	background: color-mix(in srgb, var(--primary) 10%, transparent) !important;
	color: var(--primary) !important;
	border-radius: 999px !important;
	font-weight: 500;
	font-size: 13px;
	white-space: nowrap;
}

.communities-section-heading {
	font-size: 13px;
	font-weight: 600;
	padding: 16px 16px 8px;
	margin: 0;
	color: var(--text-tertiary);
	letter-spacing: normal;
}

.community-category-badge,
.community-recent-badge,
.community-friends-in {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 500;
	padding: 2px 8px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--text-primary) 8%, transparent);
	color: var(--text-secondary);
}

.community-recent-badge {
	background: color-mix(in srgb, var(--primary) 14%, transparent);
	color: var(--primary);
}

.community-friends-in {
	background: transparent;
	color: var(--text-tertiary);
	padding-left: 0;

	&::before {
		content: "";
		width: 4px;
		height: 4px;
		border-radius: 50%;
		background: currentColor;
		opacity: 0.5;
		margin-right: 2px;
	}
}

.community-card-description {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--text-secondary);
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.composer-community-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px 6px 6px;
	margin: 0 0 10px;
	background: var(--bg-secondary, rgba(29, 155, 240, 0.08));
	border: 1px solid var(--border-primary, rgba(29, 155, 240, 0.2));
	border-radius: 999px;
	color: var(--text-primary);
	font-size: 13px;
	max-width: fit-content;
}

.composer-community-chip-icon {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	object-fit: cover;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 12px;
}

.composer-community-chip-icon-default {
	background: linear-gradient(135deg, var(--primary, #1d9bf0), #7c5cff);
	color: #fff;
}

.composer-community-chip-clear {
	background: transparent;
	border: 0;
	color: var(--text-secondary);
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	padding: 0 4px;
}
.composer-community-chip-clear:hover {
	color: var(--text-primary);
}

.dm-tweet-embed {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px;
	margin-top: 6px;
	background: var(--bg-secondary, rgba(127, 127, 127, 0.06));
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	color: var(--text-primary);
	text-decoration: none;
	max-width: 420px;
	transition:
		background 0.15s ease,
		border-color 0.15s ease;
}
.dm-tweet-embed:hover {
	background: var(--bg-tertiary, rgba(127, 127, 127, 0.12));
	border-color: var(--primary, #1d9bf0);
}
.dm-tweet-embed-header {
	display: flex;
	align-items: center;
	gap: 8px;
}
.dm-tweet-embed-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--primary, #1d9bf0);
	color: #fff;
	font-weight: 700;
	font-size: 13px;
}
.dm-tweet-embed-author {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}
.dm-tweet-embed-author strong {
	font-size: 14px;
}
.dm-tweet-embed-author span {
	font-size: 12px;
	color: var(--text-secondary);
}
.dm-tweet-embed-content {
	font-size: 14px;
	white-space: pre-wrap;
	word-wrap: break-word;
	line-height: 1.4;
}
.dm-tweet-embed-stats {
	display: flex;
	gap: 12px;
	font-size: 12px;
	color: var(--text-secondary);
}

.dm-link-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	margin-top: 6px;
	background: var(--bg-secondary, rgba(127, 127, 127, 0.06));
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	text-decoration: none;
	color: var(--text-primary);
	max-width: 420px;
}
.dm-link-preview:hover {
	background: var(--bg-tertiary, rgba(127, 127, 127, 0.12));
}
.dm-link-preview-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.dm-link-preview-host {
	font-weight: 600;
	font-size: 14px;
}
.dm-link-preview-url {
	font-size: 12px;
	color: var(--text-secondary);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 380px;
}

.dm-mention,
.dm-hashtag {
	color: var(--primary, #1d9bf0);
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.dm-mention:hover,
.dm-hashtag:hover {
	text-decoration: underline;
}

.dm-message.own .dm-message-bubble .dm-mention,
.dm-message.own .dm-message-bubble .dm-hashtag {
	color: var(--primary-fg, #fff);
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.55);
}

.dm-message.grouped > .dm-message-avatar {
	visibility: hidden;
}
.dm-message.grouped {
	margin-top: 2px !important;
}
.dm-message.dm-message-pending {
	opacity: 0.55;
}
.dm-message.dm-message-failed .dm-message-bubble {
	outline: 1.5px solid #ef4444;
}
.dm-message.dm-message-failed .dm-message-bubble::after {
	content: " (failed)";
	color: #ef4444;
	font-size: 12px;
}

.dm-community-embed {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 12px;
	margin-top: 6px;
	background: var(--bg-secondary, rgba(127, 127, 127, 0.06));
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	text-decoration: none;
	color: var(--text-primary);
	max-width: 420px;
	transition:
		background 0.15s ease,
		border-color 0.15s ease;
}
.dm-community-embed:hover {
	background: var(--bg-tertiary, rgba(127, 127, 127, 0.12));
	border-color: var(--primary, #1d9bf0);
}
.dm-community-embed-icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	object-fit: cover;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 16px;
	flex-shrink: 0;
}
.dm-community-embed-icon-default {
	background: linear-gradient(135deg, var(--primary, #1d9bf0), #7c5cff);
	color: #fff;
}
.dm-community-embed-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.dm-community-embed-body strong {
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.dm-community-embed-meta {
	font-size: 12px;
	color: var(--text-secondary);
}
.dm-community-embed-desc {
	font-size: 12px;
	color: var(--text-secondary);
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.dm-profile-embed {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 12px;
	margin-top: 6px;
	background: var(--bg-secondary, rgba(127, 127, 127, 0.06));
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	text-decoration: none;
	color: var(--text-primary);
	max-width: 420px;
}
.dm-profile-embed:hover {
	background: var(--bg-tertiary, rgba(127, 127, 127, 0.12));
	border-color: var(--primary, #1d9bf0);
}
.dm-profile-embed-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--primary, #1d9bf0);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	flex-shrink: 0;
}
.dm-profile-embed-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.dm-profile-embed-body strong {
	font-size: 14px;
}
.dm-profile-embed-body > span {
	font-size: 12px;
	color: var(--text-secondary);
}
.dm-profile-embed-bio {
	color: var(--text-primary) !important;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.community-detail-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	padding: 6px 0 0;
	color: var(--text-secondary);
	font-size: 13px;
}

.timeline-inline-suggestions {
	padding: 12px 16px;
	margin: 12px 0;
	background: var(--bg-secondary, rgba(127, 127, 127, 0.05));
	border: 1px solid var(--border-primary);
	border-radius: 16px;
}
.timeline-inline-suggestions-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}
.timeline-inline-suggestions-header h3 {
	margin: 0;
	font-size: 16px;
}
.timeline-inline-suggestions-seeall {
	font-size: 13px;
	color: var(--primary, #1d9bf0);
	text-decoration: none;
}
.timeline-inline-suggestions-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.timeline-inline-suggestion {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 8px;
	border-radius: 12px;
	background: transparent;
	color: inherit;
	text-decoration: none;
	transition: background 0.12s ease;
}
.timeline-inline-suggestion:hover {
	background: var(--bg-primary, rgba(127, 127, 127, 0.04));
}
.timeline-inline-suggestion-icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	object-fit: cover;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	flex-shrink: 0;
}
.timeline-inline-suggestion-icon.default {
	background: linear-gradient(135deg, var(--primary, #1d9bf0), #7c5cff);
	color: #fff;
}
.timeline-inline-suggestion-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.timeline-inline-suggestion-body strong {
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.timeline-inline-suggestion-body span {
	font-size: 12px;
	color: var(--text-secondary);
}
.timeline-inline-suggestion-cta {
	padding: 6px 14px;
	font-size: 13px;
	border-radius: 999px;
}
.community-access-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--bg-secondary);
	font-size: 11px;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
}
.community-detail-members-link {
	background: transparent;
	border: 0;
	padding: 0;
	color: var(--text-secondary);
	font-size: 13px;
	cursor: pointer;
	font-family: inherit;
}

.profile-communities {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 12px 0 6px;
}
.profile-communities-header {
	font-size: 13px;
	color: var(--text-secondary);
}
.profile-communities-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.profile-community-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px 4px 4px;
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	border-radius: 999px;
	color: var(--text-primary);
	font-size: 13px;
	text-decoration: none;
	transition:
		background 0.12s ease,
		transform 0.1s ease;
}
.profile-community-chip:hover {
	background: var(--bg-tertiary, rgba(127, 127, 127, 0.12));
	transform: translateY(-1px);
}
.profile-community-chip img {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	object-fit: cover;
}
.profile-community-chip-default {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	background: linear-gradient(135deg, var(--primary, #1d9bf0), #7c5cff);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 12px;
}

.tweet-community-role-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	margin-left: 4px;
}
.tweet-community-role-badge.role-owner {
	background: rgba(250, 180, 60, 0.18);
	color: #c77b00;
}
.tweet-community-role-badge.role-admin {
	background: rgba(120, 210, 90, 0.18);
	color: #2f9a4a;
}
.tweet-community-role-badge.role-mod {
	background: rgba(29, 155, 240, 0.18);
	color: var(--primary, #1d9bf0);
}
.community-detail-members-link:hover {
	text-decoration: underline;
	color: var(--text-primary);
}

.about-section {
	padding: 16px;
	margin: 12px 16px;
	background: var(--bg-secondary, rgba(127, 127, 127, 0.05));
	border: 1px solid var(--border-primary);
	border-radius: 16px;
}
.about-section-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	color: var(--text-secondary);
}
.about-section-header h3 {
	margin: 0;
	font-size: 15px;
	color: var(--text-primary);
}
.about-section-body {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--text-primary);
	white-space: pre-wrap;
	word-wrap: break-word;
}

.community-banner {
	display: none;
}

.community-card-content {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.community-icon {
	width: 44px;
	height: 44px;
	min-width: 44px;
	border-radius: 10px;
	object-fit: cover;
	border: none;
	margin: 0;
	background: var(--bg-secondary);

	&.default {
		background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 85%, white 0%), color-mix(in srgb, var(--primary) 55%, #7c5cff));
		color: var(--primary-fg);
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 18px;
		font-weight: 700;
	}
}

.community-info {
	flex: 1;
	min-width: 0;

	h3 {
		font-size: 15px;
		font-weight: 700;
		margin: 0;
		display: flex;
		align-items: center;
		gap: 4px;
		color: var(--text-primary);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

.lock-icon {
	font-size: 12px;
}

.community-description {
	font-size: 13px;
	color: var(--text-secondary);
	margin: 2px 0 0 0;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.community-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 8px;
	font-size: 13px;
	color: var(--text-tertiary);
	margin-top: 4px;
}

.role-badge {
	padding: 3px 8px;
	border-radius: 8px;
	font-size: 11px;
	font-weight: 600;
	text-transform: none;

	&.owner {
		background: #fef3c7;
		color: #92400e;
	}

	&.mod {
		background: #dcfce7;
		color: #166534;
	}

	&.member {
		background: var(--bg-secondary);
		color: var(--text-secondary);
	}
}

.dark .role-badge {
	&.owner {
		background: #78350f;
		color: #fef3c7;
	}

	&.mod {
		background: #14532d;
		color: #dcfce7;
	}

	&.member {
		background: #2a2a2a;
		color: var(--text-secondary);
	}
}

.empty-state {
	text-align: center;
	color: var(--text-secondary);
	padding: 40px 20px;
	font-size: 15px;

	display: flex;
	flex-direction: column;
	align-items: center;

	img {
		width: 120px;
		height: 120px;
		margin-bottom: 12px;
		pointer-events: none;
	}
}

.community-detail-page {
	display: none;
	flex-direction: column;
	max-width: 600px;
	width: 100%;
	margin: 0 auto;
}

.community-detail-header {
	padding: 12px 16px;
	border-bottom: 1px solid var(--border-primary);
	display: flex;
	align-items: center;
	gap: 24px;
}

.community-detail-header-info {
	flex: 1;
	display: flex;
	justify-content: space-between;
	align-items: center;

	h1 {
		font-size: 20px;
		font-weight: 800;
		margin: 0;
	}
}

.community-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;

	button {
		padding: 8px 16px;
		border-radius: 20px;
		font-size: 14px;
		font-weight: 600;
		cursor: pointer;
		transition: all 0.2s;
		border: 1px solid var(--border-primary);
		background: var(--bg-primary);
		color: var(--text-primary);
		white-space: nowrap;

		&:hover {
			background: var(--bg-secondary);
			border-color: var(--primary);
		}

		&.primary {
			background: var(--primary);
			color: var(--primary-fg);
			border-color: var(--primary);

			&:hover {
				background: var(--primary-hover);
			}
		}

		&.danger {
			background: var(--error-color);
			color: white;
			border-color: var(--error-color);

			&:hover {
				opacity: 0.9;
			}
		}
	}
}

.community-detail-banner {
	width: 100%;
	background-color: var(--bg-secondary);
	background-size: cover;
	background-position: center;
}

.community-detail-content {
	flex: 1;
	overflow: visible;
	max-height: none;
	display: flex;
	flex-direction: column;
}

.community-detail-tabs {
	flex-shrink: 0;
}

.community-detail-tab {
	&.hidden {
		display: none;
	}
}

.community-detail-tab-content {
	padding: 0;
}

.community-detail-content,
.community-detail-tab-content,
.community-detail-banner {
	width: 100%;
	overflow-x: hidden;
}

.community-detail-tab-content .compose-tweet {
	margin: 0 0 18px 0;
	padding: 12px 14px;
	padding-top: 20px;
	border-bottom: 1px solid var(--border-primary);
	width: 100%;
}

.community-detail-tab-content textarea:focus,
.community-detail-tab-content .compose-input textarea:focus {
	outline: none !important;
	box-shadow: none !important;
	border-color: transparent !important;
}

.community-detail-content.tab-tweets-active .community-detail-tab-content {
	overflow-x: hidden;
	padding-right: 12px;
}

.community-detail-content.tab-tweets-active
	.community-detail-tab-content::-webkit-scrollbar {
	width: 12px;
}

.community-detail-content.tab-tweets-active
	.community-detail-tab-content::-webkit-scrollbar-track {
	background: transparent;
}

.community-detail-content.tab-tweets-active
	.community-detail-tab-content::-webkit-scrollbar-thumb {
	background-color: rgba(100, 100, 100, 0.18);
	border-radius: 8px;
	border: 3px solid transparent;
	background-clip: padding-box;
}

.community-detail-content.tab-tweets-active .community-detail-tab-content {
	scrollbar-color: rgba(100, 100, 100, 0.18) transparent;
}

.community-detail-content.tab-tweets-active .community-detail-tab-content > * {
	max-width: 100%;
	overflow-wrap: anywhere;
}

.community-detail-content.tab-tweets-active.tweets-no-composer
	.community-detail-tab-content {
	padding: 20px 16px;
}

.community-detail-content.tab-tweets-active.tweets-no-composer
	.community-tweets {
	gap: 20px;
	padding-top: 8px;
}

.community-detail-header .community-actions {
	margin-left: auto;
	display: flex;
	flex-direction: row;
	gap: 8px;
	align-items: center;
	flex-wrap: nowrap;
	white-space: nowrap;
}

.community-detail-header .community-actions button {
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
}

.community-only-container {
	padding-top: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--text-secondary);
}

.community-only-checkbox {
	width: 18px;
	height: 18px;
	cursor: pointer;
	margin: 0;
}

.community-only-label {
	cursor: pointer;
	user-select: none;
	color: var(--text-primary);
}

.about-section {
	padding: 16px;
	border-bottom: 1px solid var(--border-primary);

	h3 {
		font-size: 16px;
		font-weight: 700;
		margin-bottom: 8px;
	}

	p {
		font-size: 14px;
		color: var(--text-secondary);
		line-height: 1.6;
		white-space: pre-wrap;
	}
}

.member-item,
.request-item {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 16px;
	border-bottom: 1px solid var(--border-primary);
	cursor: pointer;
	transition: background 0.2s;

	&:hover {
		background: var(--bg-secondary);
	}

	&:last-child {
		border-bottom: none;
	}
}

.member-avatar,
.request-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;

	&.default {
		background: var(--primary);
		color: var(--primary-fg);
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 20px;
		font-weight: 700;
	}
}

.member-info,
.request-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.member-name {
	display: flex;
	align-items: center;
	gap: 8px;

	strong {
		font-size: 14px;
		font-weight: 600;
	}
}

.member-username,
.request-username {
	font-size: 13px;
	color: var(--text-secondary);
}

.banned-badge {
	display: inline-block;
	padding: 2px 6px;
	background: var(--error-color);
	color: white;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
}

.member-actions,
/* why stuck cursor? */
	.request-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-shrink: 0;
}

.role-select,
.community-detail-page select:not(:is(.compose-tweet select)),
.community-detail-page .dropdown {
	padding: 8px 12px;
	border: 1px solid var(--border-primary);
	border-radius: 8px;
	font-size: 14px;
	background: var(--bg-primary);
	color: var(--text-primary);
	cursor: pointer;
	transition: all 0.2s;
	font-family: inherit;

	&:hover {
		border-color: var(--primary);
		background: var(--bg-secondary);
	}

	&:focus {
		outline: none;
		border-color: var(--primary);
		box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
	}
}

.settings-section {
	padding: 16px;
	border-bottom: 1px solid var(--border-primary);

	h3 {
		font-size: 16px;
		font-weight: 700;
		margin-bottom: 12px;
	}

	&:last-child {
		border-bottom: none;
	}
}

.setting-item-accent .color-presets {
	justify-content: flex-start;
	gap: 12px;
}

@media (max-width: 1024px) {
	.setting-item.setting-item-accent {
		grid-template-columns: minmax(0, 1fr);
	}

	.setting-item-accent .setting-control {
		width: 100%;
	}
}

.bulk-delete-card {
	margin-top: 16px;
	padding: 20px;
	border: 1px solid var(--border-primary);
	border-radius: 16px;
	background-color: var(--bg-primary);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.bulk-delete-description {
	margin: 0;
	color: var(--text-secondary);
	font-size: 14px;
	line-height: 1.5;
}

.bulk-delete-controls {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.bulk-delete-control {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 14px;
	color: var(--text-secondary);

	input,
	select {
		width: 100%;
		padding: 10px 12px;
		border: 1px solid var(--border-primary);
		border-radius: 10px;
		background-color: var(--bg-secondary);
		color: var(--text-primary);
		font-size: 14px;
	}
}

.bulk-delete-control-title {
	font-weight: 600;
	color: var(--text-primary);
}

.bulk-delete-toggle {
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	padding: 12px;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background-color: var(--bg-secondary);

	input {
		margin-top: 4px;
	}

	strong {
		display: block;
		font-size: 14px;
		margin-bottom: 4px;
	}

	span {
		font-size: 13px;
		color: var(--text-secondary);
	}
}

.bulk-delete-status {
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	padding: 16px;
	background-color: var(--bg-secondary);
	transition: border-color 0.2s ease;

	&[data-variant="success"] {
		border-color: var(--primary);
	}

	&[data-variant="warning"] {
		border-color: var(--error-color);
	}

	strong {
		display: block;
		margin-bottom: 4px;
	}

	p {
		margin: 0;
		color: var(--text-secondary);
		font-size: 14px;
		line-height: 1.5;
	}
}

.bulk-delete-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;

	.btn {
		flex: 1;
		min-width: 180px;
	}
}

.bulk-delete-warning {
	margin: 0;
	font-size: 13px;
	color: var(--error-color);
}

.settings-select,
.community-detail-page input[type="text"],
.community-detail-page input[type="file"],
.community-detail-page textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border-primary);
	border-radius: 8px;
	font-size: 14px;
	background: var(--bg-primary);
	color: var(--text-primary);
	margin-bottom: 12px;
	transition: all 0.2s;

	&:hover {
		border-color: var(--primary);
	}

	&:focus {
		outline: none;
		border-color: var(--primary);
		box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
	}
}

.loading {
	text-align: center;
	padding: 20px;
	color: var(--text-secondary);
}

.icon-preview,
.banner-preview {
	margin-top: 10px;

	img {
		max-width: 200px;
		max-height: 200px;
		border-radius: 8px;
		border: 1px solid var(--border-primary);
	}
}

#createCommunityModal,
#editCommunityModal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 20px;

	&.hidden {
		display: none;
	}

	.modal-content {
		background-color: var(--bg-primary);
		border-radius: 16px;
		width: 90%;
		max-width: 600px;
		max-height: 90vh;
		overflow: hidden;
		display: flex;
		flex-direction: column;
		box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	}

	.modal-header {
		h2 {
			margin: 0;
			font-size: 20px;
			font-weight: 700;
			color: var(--text-primary);
		}
	}

	.modal-close {
		background-color: transparent;
		border: none;
		cursor: pointer;
		font-size: 24px;
		color: var(--text-secondary);
		padding: 4px 8px;
		border-radius: 50%;
		width: 32px;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		transition: all 0.2s ease;

		&:hover {
			background-color: var(--bg-secondary);
			color: var(--text-primary);
		}
	}

	.modal-body {
		padding: 20px;
		flex: 1;
		overflow-y: auto;
	}

	.modal-actions {
		display: flex;
		gap: 12px;
		justify-content: flex-end;
		padding-top: 16px;
		border-top: 1px solid var(--border-primary);
		margin-top: 16px;

		button {
			padding: 10px 20px;
			border-radius: 20px;
			font-size: 14px;
			font-weight: 600;
			cursor: pointer;
			transition: all 0.2s ease;
			border: none;

			&.profile-btn {
				background-color: transparent;
				color: var(--text-primary);
				border: 1px solid var(--border-primary);

				&:hover {
					background-color: var(--bg-secondary);
				}
			}

			&.profile-btn-primary {
				background-color: var(--primary);
				color: var(--primary-fg);
				border: 1px solid var(--primary);

				&:hover {
					opacity: 0.9;
				}

				&:disabled {
					opacity: 0.5;
					cursor: not-allowed;
				}
			}
		}
	}

	.form-group {
		margin-bottom: 20px;

		label {
			display: block;
			margin-bottom: 8px;
			font-size: 14px;
			font-weight: 600;
			color: var(--text-primary);
		}

		input[type="text"],
		textarea,
		select {
			width: 100%;
			padding: 12px 16px;
			border: 1px solid var(--border-primary);
			border-radius: 8px;
			font-size: 14px;
			font-family: inherit;
			background-color: var(--bg-secondary);
			color: var(--text-primary);
			transition: border-color 0.2s;

			&:focus {
				outline: none;
				border-color: var(--primary);
			}

			&::placeholder {
				color: var(--text-secondary);
			}
		}

		input[type="file"] {
			width: 100%;
			padding: 8px;
			border: 1px solid var(--border-primary);
			border-radius: 8px;
			font-size: 14px;
			background-color: var(--bg-secondary);
			color: var(--text-primary);
			cursor: pointer;

			&::-webkit-file-upload-button {
				padding: 6px 12px;
				border: none;
				border-radius: 6px;
				background-color: var(--primary);
				color: var(--primary-fg);
				cursor: pointer;
				margin-right: 8px;
				font-size: 13px;
				font-weight: 500;

				&:hover {
					opacity: 0.9;
				}
			}
		}

		textarea {
			resize: vertical;
			min-height: 100px;
		}

		select {
			cursor: pointer;
		}

		.icon-preview,
		.banner-preview {
			margin-top: 10px;

			img {
				max-width: 200px;
				border-radius: 8px;
				border: 1px solid var(--border-primary);
			}
		}
	}
}

.label-automated {
	padding: 0px;
}

.profile-btn {
	padding: 10px 20px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	background-color: transparent;
	color: var(--text-primary);
	border: 1px solid var(--border-primary);

	&:hover:not(:disabled) {
		background-color: var(--bg-secondary);
	}

	&:disabled {
		opacity: 0.5;
		cursor: not-allowed;
	}
}

.profile-btn-primary {
	background-color: var(--primary);
	border: 1px solid var(--primary);
	color: var(--primary-fg);
	font-family: inherit;

	&:hover:not(:disabled) {
		opacity: 0.9;
		background-color: var(--primary);
	}
}

.profile-btn-secondary {
	background-color: transparent;
	color: #ef4444;
	border: 1px solid #ef4444;

	&:hover:not(:disabled) {
		background-color: rgba(239, 68, 68, 0.1);
	}
}

input[type="checkbox"],
input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border: 1px solid var(--border-primary);
	border-radius: 4px;
	cursor: pointer;
	background-color: var(--bg-primary);
	transition: all 0.2s ease;
	flex-shrink: 0;

	&:hover {
		border-color: var(--primary);
	}

	&:checked {
		background-color: var(--primary);
		border-color: var(--primary);
		background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M15.784%204.002a.625.625%200%200%201%20.214.857L9.445%2015.784a.625.625%200%200%201-1.01.085l-4.37-5.098a.625.625%200%200%201%20.948-.814l3.806%204.44%206.109-10.181a.625.625%200%200%201%20.857-.214%22%20%3E%3C%2Fpath%3E%3C%2Fsvg%3E");
		background-repeat: no-repeat;
		background-position: center;
		background-size: contain;
	}

	&:focus {
		outline: none;
		box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
	}

	&:disabled {
		opacity: 0.5;
		cursor: not-allowed;
	}
}

input[type="radio"] {
	border-radius: 50%;

	&:checked {
		background-image: radial-gradient(circle, white 40%, transparent 40%);
	}
}

label {
	cursor: pointer;
	user-select: none;
	transition: color 0.2s ease;

	&:has(input[type="checkbox"]:hover),
	&:has(input[type="radio"]:hover) {
		color: var(--text-primary);
	}

	&:has(input:disabled) {
		opacity: 0.5;
		cursor: not-allowed;
	}
}

label[for="community-only-checkbox"],
label[for*="checkbox"],
label[for*="radio"] {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	font-size: 14px;
	color: var(--text-primary);
	cursor: pointer;
	user-select: none;
}

.community-tweets {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.image-fullscreen-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: var(--bg-overlay);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	animation: fadeIn 0.1s ease;

	&.closing {
		animation: fadeOut 0.1s ease forwards;
	}
}

.image-fullscreen-container {
	position: relative;
	width: 90%;
	height: 90%;
	display: flex;
	align-items: center;
	justify-content: center;

	img {
		max-width: 100%;
		max-height: 100%;
		object-fit: contain;
		animation: zoomIn 0.1s ease;
	}
}

.image-fullscreen-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background-color: rgba(255, 255, 255, 0.2);
	border: none;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: white;
	transition: background-color 0.2s ease;
	z-index: 10001;

	&:hover {
		background-color: rgba(255, 255, 255, 0.3);
	}

	svg {
		width: 24px;
		height: 24px;
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
		filter: blur(2px);
	}

	to {
		opacity: 1;
		filter: blur(0px);
	}
}

@keyframes fadeOut {
	from {
		opacity: 1;
	}

	to {
		opacity: 0;
	}
}

@keyframes zoomIn {
	from {
		transform: scale(0.96);
		opacity: 0;
	}

	to {
		transform: scale(1);
		opacity: 1;
	}
}

emoji-picker {
	--border-radius: 12px;
	--border-color: var(--border-primary);
	--background: var(--bg-primary);
	--category-emoji-size: 1.25rem;
	--emoji-size: 1.5rem;
	--input-border-color: var(--border-primary);
	--input-font-color: var(--text-primary);
	--input-placeholder-color: var(--text-secondary);
	--num-columns: 8;
	--outline-color: var(--primary);
	--indicator-color: var(--primary);
	--input-padding: 6px 12px;
	--emoji-font-family:
		Noto Color Emoji, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Android Emoji,
		EmojiSymbols, sans-serif;

	z-index: 10000;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

emoji-picker.emoji-picker-popup {
	position: fixed;
	z-index: 10001;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.emoji-kitchen-popup {
	max-width: 90vw;
	max-height: 90vh;
	overflow: visible;

	.popup-content {
		max-height: 90vh;
		overflow-y: auto;
	}
}

.main-content:has(.settings.page-active) {
	max-width: 100%;
}

.settings {
	flex-direction: column;
	min-height: 100vh;
	max-width: 1600px;
	margin: 0 auto;
	padding: 0 20px;
}

.settings-header {
	display: flex;
	align-items: center;
	padding: 20px 0;
	border-bottom: 1px solid var(--border-primary);
	margin-bottom: 12px;
}

.back-button {
	background: none;
	border: none;
	color: var(--text-primary);
	cursor: pointer;
	width: fit-content;
	text-decoration: none;

	svg {
		width: 20px;
		height: 20px;
	}
}

.settings-header-info h1 {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	color: var(--text-primary);
}

.settings-body {
	display: flex;
	gap: 24px;
	flex: 1;
	width: 100%;
	align-items: flex-start;
	justify-content: center;
}

.settings-sidebar {
	background-color: var(--bg-secondary);
	border-radius: 8px;
	padding: 8px;
	width: 200px;
	flex-shrink: 0;
	height: fit-content;
}

.settings-tab-btn {
	width: 100%;
	background: transparent;
	border: none;
	color: var(--text-primary);
	text-align: left;
	padding: 12px 16px;
	font-size: 16px;
	cursor: pointer;
	border-radius: 6px;
	margin-bottom: 4px;
	font-family: inherit;
	font-weight: 400;
	transition: background-color 0.2s;
}

.settings-tab-btn:hover {
	background-color: var(--bg-overlay-light);
}

.settings-tab-btn.active {
	background-color: var(--primary);
	color: #fff;
	font-weight: 500;
}

.settings-content {
	background-color: var(--bg-secondary);
	border-radius: 8px;
	padding: 24px;
	flex: 1;
	min-width: 0;
	max-width: 900px;
	overflow-x: hidden;
}

.settings-modal-overlay {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background-color: rgba(15, 20, 25, 0.6);
	z-index: 10002;

	.settings-form-modal {
		background-color: var(--bg-primary);
		border-radius: 16px;
		width: min(480px, 90vw);
		max-height: 85vh;
		box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
		display: flex;
		flex-direction: column;
		overflow: hidden;

		.modal-header {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 16px 20px;
			border-bottom: 1px solid var(--border-primary);

			position: relative;

			h2 {
				margin: 0;
				font-size: 20px;
				font-weight: 600;
				color: var(--text-primary);
			}

			.close-btn {
				background: transparent;
				border: none;
				color: var(--text-secondary);
				cursor: pointer;
				font-size: 24px;
				line-height: 1;
				width: 32px;
				height: 32px;
				border-radius: 50%;
				display: flex;
				align-items: center;
				justify-content: center;
				transition:
					background-color 0.2s ease,
					color 0.2s ease;

				&:hover {
					background-color: var(--bg-secondary);
					color: var(--text-primary);
				}
			}

			/* Force the close button to the top-right corner of the modal */
			.close-btn {
				position: absolute;
				right: 12px;
				top: 12px;
				transform: none;
			}
		}

		.modal-body {
			padding: 20px;
			overflow-y: auto;
			color: var(--text-primary);

			.form-group {
				margin-bottom: 18px;

				label {
					display: block;
					margin-bottom: 6px;
					font-size: 14px;
					font-weight: 500;
					color: var(--text-primary);
				}

				input {
					width: 100%;
					padding: 10px 12px;
					border-radius: 10px;
					border: 1px solid var(--border-primary);
					background-color: var(--bg-secondary);
					color: var(--text-primary);
				}

				small {
					display: block;
					margin-top: 6px;
					color: var(--text-secondary);
					font-size: 12px;
				}
			}

			p {
				margin: 0 0 16px 0;
				font-size: 14px;
				line-height: 1.5;
			}
		}

		.form-actions {
			display: flex;
			justify-content: flex-end;
			align-items: center;
			gap: 10px;
			margin-top: 12px;
		}
	}
}

.settings-modal-overlay {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background-color: rgba(15, 20, 25, 0.6);
	z-index: 1200;

	&.active {
		display: flex;
	}
}

.settings-modal-overlay .settings-form-modal {
	background-color: var(--bg-primary);
	border-radius: 16px;
	width: min(480px, 90vw);
	max-height: 85vh;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.settings-section h1 {
	margin: 0 0 20px 0;
	font-size: 24px;
	font-weight: 700;
	color: var(--text-primary);
}

.setting-group {
	margin-bottom: 24px;

	button {
		width: fit-content;
	}
}

.setting-group h2 {
	margin: 0 0 4px 0;
	font-size: 24px;
	font-weight: 600;
	color: var(--text-primary);
}

.setting-item {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: stretch;
	padding: 10px 0;
	border-bottom: 1px solid var(--border-primary);
}

.setting-item:last-child {
	border-bottom: none;
}

.setting-label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.setting-label:empty {
	display: none;
}

.setting-title {
	font-size: 16px;
	font-weight: 500;
	color: var(--text-primary);
}

.setting-description {
	font-size: 14px;
	color: var(--text-secondary);
}

.settings-status-text {
	font-size: 14px;
	color: var(--text-secondary);
	margin-top: 8px;
	padding: 0 4px;
}

.setting-control {
	flex-shrink: 0;
	min-width: 0;
	max-width: 100%;
}

.setting-item.setting-item-inline {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
}

.setting-item-inline .setting-control {
	justify-self: end;
	width: auto;
	display: flex;
}

.setting-item-inline .custom-dropdown-button {
	min-width: 140px;
}

.setting-item.setting-item-accent {
	display: grid;
	grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
	gap: 20px;
	align-items: flex-start;
}

.setting-item-accent .setting-label {
	min-width: 0;
}

.setting-item-accent .setting-control {
	min-width: 0;
}

.setting-item-accent .accent-color-section {
	display: grid;
	gap: 16px;
}

.setting-item-accent .color-presets {
	justify-content: flex-start;
	gap: 12px;
}

.custom-dropdown {
	position: relative;
	display: inline-block;
}

.custom-dropdown-button {
	padding: 8px 12px;
	background: var(--bg-primary);
	border: 1px solid var(--border-primary);
	color: var(--text-primary);
	border-radius: 6px;
	font-size: 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	justify-content: space-between;
	min-width: 100px;
	transition: all 0.2s;
}

.custom-dropdown-button:hover {
	background: var(--bg-secondary);
	border-color: var(--border-hover);
}

.custom-dropdown-arrow {
	transition: transform 0.2s;
	margin-left: 8px;
	flex-shrink: 0;
}

.custom-dropdown.open .custom-dropdown-arrow {
	transform: rotate(180deg);
}

.custom-dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--bg-primary);
	border: 1px solid var(--border-primary);
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: all 0.2s;
}

.custom-dropdown.open .custom-dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.custom-dropdown-option {
	padding: 8px 12px;
	cursor: pointer;
	transition: background-color 0.2s;
	font-size: 14px;
}

.custom-dropdown-option:hover {
	background: var(--bg-secondary);
}

.custom-dropdown-option.selected {
	background: var(--primary);
	color: #fff;
	position: relative;
}

.custom-dropdown-option.selected::after {
	content: "✓";
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #fff;
	font-weight: 700;
	pointer-events: none;
}

.theme-mode-select {
	display: none;
}

.danger-group {
	border: 1px solid var(--error-color);
	border-radius: 8px;
	padding: 16px;
	background-color: rgba(220, 38, 38, 0.05);
}

.danger-group h2 {
	color: var(--error-color);
}

.modal-content {
	background: var(--bg-primary);
	border-radius: 12px;
	width: 90%;
	max-width: 500px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow:
		0 20px 25px -5px rgba(0, 0, 0, 0.1),
		0 10px 10px -5px rgba(0, 0, 0, 0.04);
	transition: transform 0.2s;

	@starting-style {
		& {
			transform: scale(0.95);
		}
	}
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px 0;
	width: 100%;
}

.modal-header h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: var(--text-primary);
}

.close-btn {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: var(--text-secondary);
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s;
}

.close-btn:hover {
	background-color: var(--bg-overlay-light);
}

.modal-body {
	padding: 0 24px 24px;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: var(--text-primary);
}

.form-group input {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--border-input);
	border-radius: 8px;
	font-size: 16px;
	background-color: var(--bg-primary);
	color: var(--text-primary);
	transition: border-color 0.2s;

	&::placeholder {
		color: var(--text-placeholder);
	}
}

.form-group input:focus {
	outline: none;
	border-color: var(--primary);
}

.form-group small {
	display: block;
	margin-top: 4px;
	color: var(--text-secondary);
	font-size: 14px;
}

.username-wrapper {
	display: flex;
	align-items: center;
	border: 1px solid var(--border-input);
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 0.2s;

	&:focus-within {
		border-color: var(--primary);
	}

	span {
		padding: 12px 8px 12px 12px;
		background-color: var(--bg-secondary);
		color: var(--text-secondary);
		font-size: 16px;
	}

	input {
		border: none !important;
		flex: 1;
		background-color: var(--bg-primary);
		padding: 0px !important;
		font-size: 16px;
		color: var(--text-primary);

		&:focus {
			outline: none !important;
		}
	}
}

.form-actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 24px;
}

.setting-control .btn {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0 auto;
	display: block;
}

.btn {
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.2s;
	min-width: 0;
	height: 44px;
}

.form-actions .btn {
	width: auto;
}

.btn.primary {
	background-color: var(--primary);
	color: var(--primary-fg);
}

.btn.primary:hover {
	background-color: var(--primary-hover);
}

.btn.secondary {
	background: transparent;
	color: var(--text-primary);
	border-color: var(--btn-secondary-border);
}

.btn.secondary:hover {
	background: var(--btn-secondary-hover-bg);
	border-color: var(--btn-secondary-hover-border);
}

.btn.danger {
	background: var(--error-color);
	color: black;
}

.btn.danger:hover {
	background: #b91c1c;
}

@media (max-width: 768px) {
	.settings {
		padding: 0 8px;
	}

	.settings-header {
		padding: 12px 0;
	}

	.settings-header-info h1 {
		font-size: 20px;
	}

	.settings-body {
		flex-direction: column;
		gap: 12px;
	}

	.settings-sidebar {
		width: 100%;
		display: flex;
		overflow-x: auto;
		gap: 4px;
		padding: 6px;
	}

	.settings-tab-btn {
		white-space: nowrap;
		margin-bottom: 0;
		padding: 10px 14px;
		font-size: 14px;
	}

	.setting-item {
		flex-direction: column;
		gap: 16px;
	}

	.setting-item.setting-item-inline {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 12px;
	}

	.setting-item-inline .setting-control {
		width: auto;
	}

	.setting-item.setting-item-accent {
		gap: 20px;
	}

	.setting-item-accent .accent-color-section {
		gap: 14px;
		margin-top: 4px;
	}

	.setting-item-accent .color-presets {
		justify-content: center;
		width: 100%;
	}

	.settings-content {
		max-width: 100%;
		padding: 16px 12px;
	}

	.color-presets {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		justify-content: center;
	}

	.color-option {
		width: 48px;
		height: 48px;
	}

	.accent-color-section {
		max-width: 100%;
	}
}

.toggle-switch {
	position: relative;
	display: inline-block;
	width: 60px;
	height: 34px;
}

.toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: var(--bg-overlay-light);
	transition: 0.4s;
	border-radius: 34px;
}

.toggle-slider:before {
	position: absolute;
	content: "";
	height: 26px;
	width: 26px;
	left: 4px;
	bottom: 4px;
	background-color: white;
	transition: 0.4s;
	border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
	background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
	transform: translateX(26px);
}

.modal.settings-modal {
	width: min(1400px, calc(100vw - 32px));
	height: min(90vh, 900px);
	padding: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.modal.settings-modal .modal-close {
	top: 20px;
	right: 20px;
}

.settings-modal-wrapper {
	display: flex;
	flex-direction: row;
	flex: 1;
	min-height: 0;
	overflow: hidden;
	width: 100%;
	height: 100%;
}

.settings-modal-sidebar {
	width: 220px;
	background: var(--bg-primary);
	overflow-y: auto;
	overflow-x: hidden;
	flex-shrink: 0;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.settings-modal-tab {
	width: 100%;
	padding: 10px 14px;
	text-align: left;
	background: none;
	border: none;
	color: var(--text-primary);
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition:
		background 0.15s,
		color 0.15s;
	border-radius: 8px;
	font-family: inherit;
}

.settings-modal-tab:hover {
	background: var(--bg-overlay-light);
}

.settings-modal-tab.active {
	background: var(--primary);
	border-color: var(--primary);
	color: var(--primary-fg);
	font-weight: 500;
}

.settings-modal-content-wrapper {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 32px;
	min-width: 0;
	max-width: 100%;
	background: var(--bg-secondary);
	scrollbar-gutter: stable both-edges;
}

.modal.settings-modal .settings-section {
	padding: 0;
	border-bottom: none;
}

.modal.settings-modal .settings-section h1 {
	margin: 0 0 24px 0;
	font-size: 28px;
	font-weight: 700;
	color: var(--text-primary);
}

.modal.settings-modal .setting-group {
	margin-bottom: 32px;
}

.modal.settings-modal .setting-item {
	display: flex;
	flex-direction: row;
	gap: 16px;
	align-items: center;
	padding: 16px 0;
}

.modal.settings-modal .setting-label {
	flex: 1;
	min-width: 0;
}

.modal.settings-modal .setting-control {
	flex-shrink: 0;
}

.modal.settings-form-modal {
	width: min(480px, calc(100vw - 32px));
	display: flex;
	flex-direction: column;
	gap: 0;
	height: fit-content;
}

.modal.settings-form-modal form {
	display: flex;
	flex-direction: column;
}

.modal.settings-form-modal .settings-form-body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.modal.settings-form-modal .settings-form-description {
	font-size: 14px;
	color: var(--text-secondary);
	margin: 0 0 4px 0;
	line-height: 1.5;
}

.modal.settings-form-modal .settings-form-description:where(.danger) {
	color: var(--error-color);
	background-color: color-mix(in srgb, var(--error-color) 12%, transparent);
	padding: 12px;
	border-radius: 8px;
	border: 1px solid color-mix(in srgb, var(--error-color) 30%, transparent);
}

.modal.settings-form-modal .settings-form-field {
	font-weight: 600;
	color: var(--text-primary);
	display: block;
}

.modal.settings-form-modal input,
.modal.settings-form-modal textarea {
	width: 100%;
	border: 1px solid var(--border-primary);
	border-radius: 8px;
	padding: 10px 12px;
	background-color: var(--bg-secondary);
	color: var(--text-primary);
}

.modal.settings-form-modal input:focus,
.modal.settings-form-modal textarea:focus {
	outline: 2px solid var(--primary);
	outline-offset: 1px;
}

.modal.settings-form-modal .settings-form-actions,
.modal.settings-form-modal .form-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 8px;
}

.modal.settings-form-modal .form-helper {
	font-size: 13px;
	color: var(--text-secondary);
}

.modal.settings-modal .setting-item-inline {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
}

.modal.settings-modal .setting-item-inline .setting-control {
	justify-self: end;
	width: auto;
	display: flex;
	margin-top: 0;
}

.modal.settings-modal .setting-item-inline .custom-dropdown-button {
	min-width: 140px;
}

.modal.settings-modal .setting-item-accent {
	display: grid;
	grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
	gap: 20px;
	align-items: flex-start;
}

.modal.settings-modal .setting-item-accent .setting-label {
	min-width: 0;
}

.modal.settings-modal .setting-item-accent .setting-control {
	min-width: 0;
}

.modal.settings-modal .setting-item-accent .accent-color-section {
	display: grid;
	gap: 16px;
}

.modal.settings-modal .setting-item-accent .color-presets {
	justify-content: flex-start;
	gap: 12px;
}

.modal.settings-modal .accent-color-section {
	max-width: 100%;
}

.modal.settings-modal .color-presets {
	width: 100%;
	max-width: 100%;
}

.role-badge.affiliate-with {
	padding: 0px;
	margin-bottom: -2px;
	margin-left: 2px;

	height: fit-content;
	display: inline-block;
	line-height: 1;

	&:is(.top-reply .affiliate-with) {
		margin-left: 2px;
	}

	&:is(#profileDisplayName .role-badge.affiliate-with) {
		margin-left: -3px;
	}

	.affiliate-with-avatar {
		width: 20px;
		height: 20px;
		border-radius: 2px;
		border: 1px solid var(--border-secondary);
		user-select: none;
		transition:
			border-color 0.2s,
			opacity 0.2s;

		&:is(.top-reply .affiliate-with-avatar) {
			width: 16px;
			height: 16px;
		}

		&:hover {
			border-color: var(--primary);
		}

		&:active {
			opacity: 0.7;
		}
	}
}

@media (max-width: 768px) {
	.modal.settings-modal {
		width: 100vw;
		height: 100vh;
		max-height: 100vh;
		border-radius: 0;

		.modal-header {
			position: sticky;
			top: 0;
			padding: calc(16px + env(safe-area-inset-top)) 16px 16px;
			background-color: var(--bg-primary);
			z-index: 5;
		}

		.modal-close {
			top: calc(16px + env(safe-area-inset-top));
			right: 16px;
		}

		.settings-modal-content-wrapper {
			padding: 20px 16px 28px;
			display: flex;
			flex-direction: column;
			gap: 24px;
			background-color: var(--bg-secondary);
		}

		.settings-section {
			display: flex;
			flex-direction: column;
			gap: 20px;

			h1 {
				font-size: 24px;
				margin-bottom: 0;
			}
		}

		.setting-group {
			display: flex;
			flex-direction: column;
			gap: 14px;
			margin: 0;
		}

		.setting-item {
			display: flex;
			flex-direction: column;
			gap: 14px;
			align-items: stretch;
		}

		.setting-item:last-child {
			border-bottom: none;
		}

		.setting-item-inline {
			display: flex;
			flex-direction: column;
			gap: 12px;
		}

		.setting-control {
			width: 100%;
			min-width: 0;
			margin-top: 0;

			.custom-dropdown-button,
			.btn {
				width: 100%;
			}
		}

		.setting-item-accent {
			display: flex;
			flex-direction: column;
			gap: 16px;

			.accent-color-section {
				gap: 12px;
				margin-top: 0;
			}

			.color-presets {
				justify-content: center;
				gap: 10px;
				flex-wrap: wrap;
			}
		}
	}

	.settings-modal-wrapper {
		flex-direction: column;
		padding-bottom: env(safe-area-inset-bottom);
	}

	.settings-modal-sidebar {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid var(--border-primary);
		display: flex;
		overflow-x: auto;
		overflow-y: hidden;
		flex-shrink: 0;
		padding: 10px calc(12px + env(safe-area-inset-left)) 12px;
		gap: 8px;
		background-color: var(--bg-primary);
		scroll-snap-type: x mandatory;
		scrollbar-width: none;

		&::-webkit-scrollbar {
			display: none;
		}
	}

	.settings-modal-tab {
		white-space: nowrap;
		padding: 10px 16px;
		font-size: 14px;
		border-radius: 999px;
		flex: none;
		width: auto;
		margin-bottom: 0;
		scroll-snap-align: start;
		border: 1px solid var(--border-primary);
		background-color: var(--bg-secondary);
		transition:
			background-color 0.2s ease,
			color 0.2s ease,
			border-color 0.2s ease;

		&:focus-visible {
			outline: 2px solid rgba(var(--primary-rgb), 0.5);
			outline-offset: 2px;
		}
	}
}

@keyframes like-bump {
	0% {
		transform: scale(1);
	}

	30% {
		transform: scale(1.3);
	}

	50% {
		transform: scale(0.95);
	}

	70% {
		transform: scale(1.01);
	}

	100% {
		transform: scale(1);
	}
}

.interactive-card {
	margin-top: 12px;
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	overflow: hidden;
}

.interactive-card .card-media {
	width: 100%;
	background: var(--bg-secondary);
}

.interactive-card .card-media img,
.interactive-card .card-media video {
	width: 100%;
	display: block;
	max-height: 400px;
	object-fit: cover;
}

.interactive-card .card-options {
	display: flex;
	flex-direction: column;
	gap: 0;
	border-top: 1px solid var(--border-primary);
}

.interactive-card .card-option-button {
	padding: 14px 16px;
	border: none;
	background: var(--bg-primary);
	color: var(--primary);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition:
		background-color 0.2s,
		opacity 0.2s;
	border-bottom: 1px solid var(--border-primary);
	text-align: center;

	&:last-child {
		border-bottom: none;
	}

	&:hover {
		background-color: rgba(var(--primary-rgb), 0.1);
	}

	&:active {
		opacity: 0.5;
	}
}

.modal.new-avatar-modal {
	max-width: 400px;
	width: calc(100% - 32px);

	.new-avatar-tweet-modal {
		display: flex;
		flex-direction: column;
		gap: 16px;
		align-items: stretch;
		padding: 0 4px 12px 4px;

		p {
			margin: 0;
			font-size: 16px;
			text-align: center;
			color: var(--text-primary);
		}

		img {
			width: 120px;
			height: 120px;
			border-radius: 50%;
			object-fit: cover;
			align-self: center;
			background-color: var(--bg-secondary);
		}

		.new-avatar-actions {
			display: flex;
			gap: 12px;

			button {
				flex: 1;
			}
		}
	}
}

.direct-settings-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

.direct-settings-modal .modal-content {
	background-color: var(--bg-primary);
	border-radius: 16px;
	width: 90%;
	max-width: 500px;
	max-height: 80vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.direct-settings-modal .modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid var(--border-primary);
}

.direct-settings-modal .modal-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--text-primary);
}

.direct-settings-modal .modal-header .modal-close {
	background-color: transparent;
	border: none;
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-secondary);
	border-radius: 50%;
	transition: all 0.2s ease;
}

.direct-settings-modal .modal-header .modal-close:hover {
	background-color: var(--bg-secondary);
	color: var(--text-primary);
}

.direct-settings-modal .modal-body {
	padding: 20px;
	flex: 1;
	overflow-y: auto;
}

.direct-settings-modal .modal-actions {
	display: flex;
	gap: 12px;
	padding: 20px;
	border-top: 1px solid var(--border-primary);
}

.direct-settings-modal .modal-actions .btn-secondary,
.direct-settings-modal .modal-actions .btn-primary {
	flex: 1;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
}

.direct-settings-modal .modal-actions .btn-secondary {
	border: 1px solid var(--border-primary);
	background-color: transparent;
	color: var(--text-primary);
}

.direct-settings-modal .modal-actions .btn-secondary:hover {
	background-color: var(--bg-secondary);
}

.direct-settings-modal .modal-actions .btn-primary {
	border: none;
	background-color: var(--primary);
	color: var(--primary-fg);
}

.direct-settings-modal .modal-actions .btn-primary:hover {
	background-color: var(--primary-dark);
}

.disappearing-settings {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.disappearing-settings .checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 14px;
	color: var(--text-primary);
	font-weight: 500;
}

.disappearing-settings .checkbox-label input[type="checkbox"] {
	cursor: pointer;
	width: 18px;
	height: 18px;
}

.disappearing-settings .disappearing-duration {
	padding-left: 26px;
}

.disappearing-settings .disappearing-duration label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-secondary);
}

.disappearing-settings .disappearing-duration select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border-primary);
	border-radius: 8px;
	background-color: var(--bg-secondary);
	color: var(--text-primary);
	font-size: 14px;
	outline: none;
	cursor: pointer;
	transition: border-color 0.2s;
}

.disappearing-settings .disappearing-duration select:focus {
	border-color: var(--primary);
}

.disappearing-settings .disappearing-duration select option {
	background-color: var(--bg-primary);
	color: var(--text-primary);
}

.community-tag {
	position: relative;
	display: inline-flex;
	align-items: center;
	user-select: none;
	gap: 2px;
	padding: 0px 4px;
	height: 18px;
	margin-left: 3px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color 0.2s,
		border-color 0.2s,
		transform 0.2s;
	vertical-align: middle;
	color: var(--text-secondary);
	text-decoration-color: transparent;

	&::after {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: var(--border-primary);
		border-radius: 4px;
		opacity: 0.5;
		pointer-events: none;
		transition:
			opacity 0.2s,
			transform 0.2s;
		z-index: -1;
	}

	&:hover {
		&::after {
			opacity: 1;
		}
	}

	&:active {
		&::after {
			transform: scale(0.95);
		}
	}
}

.transparency-items {
	display: flex;
	flex-direction: column;
	gap: 15px;
	width: 100%;
	margin-top: 12px;

	.transparency-item {
		display: flex;
		gap: 9px;
		width: 100%;

		svg {
			margin-top: 6px;
		}

		img {
			pointer-events: none;
			user-select: none;
		}

		.map {
			width: 100%;
			border-radius: 3px;
			margin-top: 6px;
			background-color: #213782;
			aspect-ratio: 360 / 157;
		}

		.flag {
			margin-left: 4px;
			margin-bottom: -3px;
		}

		.transparency-data {
			display: flex;
			flex-direction: column;
			gap: 5px;
			width: 100%;
			color: var(--text-muted);

			&:not(:has(span)) {
				margin-top: 6px;
			}

			strong {
				margin-bottom: -6px;
				font-weight: 500;
				color: var(--text-muted-hover);
			}

			span {
				overflow: hidden;
			}

			a {
				color: var(--primary);
				text-decoration: none;

				&:hover {
					text-decoration: underline;
				}
			}
		}
	}
}

.scheduled-posts-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.scheduled-posts-empty {
	color: var(--text-secondary);
	font-size: 14px;
}

.scheduled-post-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	background-color: var(--bg-primary);
	border-radius: 8px;
	border: 1px solid var(--border-primary);
}

.scheduled-post-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.scheduled-post-time {
	font-weight: 500;
	color: var(--primary);
	font-size: 14px;
}

.scheduled-post-delete {
	padding: 6px 12px;
	font-size: 13px;
	max-width: 100px;
}

.scheduled-post-content {
	color: var(--text-primary);
	font-size: 14px;
	word-wrap: break-word;
}

.modal-body p.modal-warning {
	margin: 0 0 16px 0;
	line-height: 1.5;

	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 25px;
	font-size: 18px;

	img {
		width: 160px;
		height: 160px;
		margin-bottom: 12px;
	}
}

.modal-description {
	margin: 0 0 16px 0;
	font-size: 14px;
	line-height: 1.5;
}

.form-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
}

.hidden {
	display: none !important;
}

/* Algo Stats Card */
.algo-stats-card {
	background-color: var(--bg-secondary);
	border-radius: 12px;
	padding: 16px;
	border: 1px solid var(--border-primary);
}

.algo-stats-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border-primary);
}

.algo-stats-title {
	font-weight: 600;
	font-size: 16px;
	flex: 1;
}

.algo-stats-rating {
	font-size: 14px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 20px;
}

.rating-excellent {
	background-color: rgba(76, 175, 80, 0.15);
	color: #4caf50;
}

.rating-good {
	background-color: rgba(33, 150, 243, 0.15);
	color: #2196f3;
}

.rating-average {
	background-color: rgba(255, 152, 0, 0.15);
	color: #ff9800;
}

.rating-below-average {
	background-color: rgba(255, 87, 34, 0.15);
	color: #ff5722;
}

.rating-poor,
.rating-bad {
	background-color: rgba(244, 67, 54, 0.15);
	color: #f44336;
}

.algo-stats-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.algo-stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.algo-stat-full {
	grid-column: span 2;
	margin-top: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--border-primary);
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
}

.algo-stat-label {
	font-size: 13px;
	color: var(--text-secondary);
}

.algo-stat-value {
	font-size: 16px;
	font-weight: 600;
	color: var(--text-primary);
}

.algo-stat-value-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
}

.algo-details-btn {
	background: none;
	border: none;
	color: var(--primary);
	font-size: 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 2px 6px;
	border-radius: 4px;
}

.algo-details-btn:hover {
	background-color: rgba(var(--primary-rgb), 0.1);
}

.algo-stat-description {
	grid-column: span 2;
	font-size: 13px;
	color: var(--text-secondary);
	margin-top: 8px;
	line-height: 1.4;
}

/* Passkeys List */
.passkey-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.passkey-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px;
	background-color: var(--bg-secondary);
	border-radius: 8px;
	border: 1px solid var(--border-primary);
}

.passkey-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.passkey-name {
	font-weight: 600;
	font-size: 15px;
}

.passkey-meta {
	font-size: 12px;
	color: var(--text-secondary);
}

.passkey-actions {
	display: flex;
	gap: 8px;
}

/* Delegates List */
.delegates-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 12px;
}

.delegate-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background-color: var(--bg-secondary);
	border-radius: 8px;
	border: 1px solid var(--border-primary);
}

.delegate-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}

.delegate-info {
	flex: 1;
	min-width: 0;
}

.delegate-name {
	font-weight: 600;
	font-size: 15px;
}

.delegate-username {
	font-size: 13px;
	color: var(--text-secondary);
}

.delegate-actions {
	display: flex;
	gap: 8px;
}

.delegate-invite-form {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
}

.delegate-invite-input {
	flex: 1;
	padding: 8px 12px;
	border-radius: 8px;
	border: 1px solid var(--border-primary);
	background-color: var(--bg-primary);
	color: var(--text-primary);
}

/* Blocked Causes */
.blocked-causes-container {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.blocked-cause-item {
	background-color: var(--bg-secondary);
	border-radius: 12px;
	padding: 16px;
	border: 1px solid var(--border-primary);
	cursor: pointer;
	transition: background-color 0.2s;
}

.blocked-cause-item:hover {
	background-color: var(--surface-hover);
}

.blocked-cause-header {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
	font-size: 13px;
	color: var(--text-secondary);
}

.blocked-cause-count {
	font-weight: 600;
	color: var(--error);
}

.blocked-cause-content {
	font-size: 15px;
	line-height: 1.4;
	color: var(--text-primary);
}

.blocked-causes-empty {
	text-align: center;
	padding: 32px;
	color: var(--text-secondary);
}

.blocked-causes-empty-hint {
	font-size: 13px;
	opacity: 0.7;
	margin-top: 4px;
}

.blocked-causes-error {
	text-align: center;
	padding: 20px;
	color: var(--error);
}

.moderation-history-container {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.moderation-history-item {
	background-color: var(--bg-secondary);
	border-radius: 12px;
	padding: 16px;
	border: 1px solid var(--border-primary);
}

.moderation-history-header {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.moderation-action-badge,
.moderation-status-badge {
	padding: 4px 12px;
	border-radius: 16px;
	font-size: 13px;
	font-weight: 600;
	text-transform: capitalize;
}

.moderation-action-suspend {
	background-color: rgba(220, 38, 38, 0.15);
	color: #dc2626;
}

.moderation-action-restrict {
	background-color: rgba(251, 146, 60, 0.15);
	color: #fb923c;
}

.moderation-action-shadowban {
	background-color: rgba(168, 85, 247, 0.15);
	color: #a855f7;
}

.moderation-action-warn {
	background-color: rgba(234, 179, 8, 0.15);
	color: #eab308;
}

.moderation-status-active {
	background-color: rgba(220, 38, 38, 0.15);
	color: #dc2626;
}

.moderation-status-lifted {
	background-color: rgba(34, 197, 94, 0.15);
	color: #22c55e;
}

.moderation-status-expired {
	background-color: rgba(107, 114, 128, 0.15);
	color: #6b7280;
}

.moderation-history-reason {
	font-size: 15px;
	line-height: 1.4;
	color: var(--text-primary);
	margin-bottom: 8px;
}

.moderation-history-notes {
	font-size: 14px;
	line-height: 1.4;
	color: var(--text-secondary);
	margin-bottom: 8px;
	font-style: italic;
}

.moderation-history-meta {
	font-size: 13px;
	color: var(--text-secondary);
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--border-primary);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.no-history-message {
	text-align: center;
	padding: 32px;
	color: var(--text-secondary);
	font-size: 15px;
}

.error-message {
	text-align: center;
	padding: 20px;
	color: var(--error);
}

.account-switcher-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
}

.add-account-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
}

.lists-page {
	max-width: 600px;
	margin: 0 auto;

	.lists-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 16px;
		border-bottom: 1px solid var(--border-primary);

		.lists-header-info {
			display: flex;
			align-items: center;
			justify-content: space-between;
			width: 100%;
		}

		h1 {
			font-size: 20px;
			font-weight: 700;
			margin: 0;
		}
	}

	.create-list-btn {
		display: flex;
		align-items: center;
		gap: 6px;
		background-color: var(--primary);
		color: white;
		border: none;
		padding: 8px 16px;
		border-radius: 20px;
		font-weight: 600;
		font-size: 14px;
		cursor: pointer;
		transition: background-color 0.2s;

		svg {
			flex-shrink: 0;
		}

		&:hover {
			background-color: var(--primary-hover);
		}
	}

	.lists-create-btn {
		background-color: var(--primary);
		color: white;
		border: none;
		padding: 8px 16px;
		border-radius: 20px;
		font-weight: 600;
		font-size: 14px;
		cursor: pointer;
		transition: background-color 0.2s;

		&:hover {
			background-color: var(--primary-hover);
		}
	}

	.lists-tabs {
		display: flex;
		border-bottom: 1px solid var(--border-primary);
		position: relative;
	}

	.lists-tab {
		flex: 1;
		padding: 16px;
		text-align: center;
		font-weight: 600;
		color: var(--text-secondary);
		cursor: pointer;
		transition:
			color 0.2s,
			background-color 0.2s;
		border: none;
		background: none;

		&:hover {
			background-color: var(--hover-overlay);
		}

		&.active {
			color: var(--text-primary);
		}
	}

	.lists-content {
		min-height: 200px;
	}
}

.list-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border-bottom: 1px solid var(--border-primary);
	cursor: pointer;
	transition: background-color 0.2s;

	&:hover {
		background-color: var(--hover-overlay);
	}

	.list-item-icon {
		width: 48px;
		height: 48px;
		border-radius: 12px;
		background-color: var(--primary);
		display: flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;

		svg {
			color: white;
		}
	}

	.list-item-info {
		flex: 1;
		min-width: 0;
	}

	.list-item-name-row {
		display: flex;
		align-items: center;
		gap: 8px;
	}

	.list-item-name {
		font-weight: 700;
		font-size: 15px;
		color: var(--text-primary);
	}

	.list-private-badge {
		font-size: 12px;
		padding: 2px 6px;
		background-color: var(--bg-tertiary);
		border-radius: 4px;
		color: var(--text-secondary);
	}

	.list-item-owner {
		font-size: 14px;
		color: var(--text-secondary);
	}

	.list-item-meta {
		font-size: 13px;
		color: var(--text-secondary);
	}
}

.lists-empty {
	text-align: center;
	padding: 48px 24px;
	color: var(--text-secondary);

	.lists-empty-icon {
		margin-bottom: 16px;
		opacity: 0.5;
	}

	h3 {
		font-size: 18px;
		font-weight: 700;
		color: var(--text-primary);
		margin: 0 0 8px;
	}

	p {
		margin: 0;
		font-size: 14px;
	}
}

.list-detail-page {
	max-width: 600px;
	margin: 0 auto;

	.list-detail-header {
		padding: 16px;
		border-bottom: 1px solid var(--border-primary);

		.list-detail-back {
			display: flex;
			align-items: center;
			gap: 24px;
			margin-bottom: 16px;

			.back-btn {
				background: none;
				border: none;
				padding: 8px;
				margin: -8px;
				cursor: pointer;
				border-radius: 50%;
				color: var(--text-primary);
				transition: background-color 0.2s;

				&:hover {
					background-color: var(--hover-overlay);
				}
			}
		}

		h1 {
			font-size: 20px;
			font-weight: 700;
			margin: 0;
		}

		.list-detail-owner {
			font-size: 14px;
			color: var(--text-secondary);
			margin-top: 2px;
		}

		.list-detail-info {
			margin-top: 12px;
		}

		.list-detail-description {
			font-size: 15px;
			color: var(--text-primary);
			margin: 0 0 12px;
			line-height: 1.4;
		}

		.list-detail-stats {
			display: flex;
			gap: 16px;
			font-size: 14px;
			color: var(--text-secondary);

			strong {
				color: var(--text-primary);
			}
		}

		.list-detail-actions {
			display: flex;
			gap: 12px;
			margin-top: 16px;
		}
	}

	.list-detail-tabs {
		display: flex;
		border-bottom: 1px solid var(--border-primary);
		position: relative;
	}

	.list-detail-tab {
		flex: 1;
		padding: 16px;
		text-align: center;
		font-weight: 600;
		color: var(--text-secondary);
		cursor: pointer;
		transition:
			color 0.2s,
			background-color 0.2s;
		border: none;
		background: none;

		&:hover {
			background-color: var(--hover-overlay);
		}

		&.active {
			color: var(--text-primary);
		}
	}

	.list-detail-content {
		min-height: 200px;
	}
}

.list-action-btn {
	padding: 8px 16px;
	border-radius: 20px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s;
	background-color: transparent;
	color: var(--text-primary);
	border: 1px solid var(--border-primary);

	&:hover {
		background-color: var(--hover-overlay);
	}

	&.list-action-btn-primary {
		background-color: var(--primary);
		color: white;
		border-color: var(--primary);

		&:hover {
			background-color: var(--primary-hover);
		}
	}
}

.list-member-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--border-primary);
	cursor: pointer;
	transition: background-color 0.2s;

	&:hover {
		background-color: var(--hover-overlay);
	}

	.list-member-avatar {
		width: 48px;
		height: 48px;
		object-fit: cover;
		flex-shrink: 0;
	}

	.list-member-info {
		flex: 1;
		min-width: 0;
	}

	.list-member-name {
		font-weight: 700;
		font-size: 15px;
		color: var(--text-primary);
	}

	.list-member-username {
		font-size: 14px;
		color: var(--text-secondary);
	}

	.list-member-remove {
		background: none;
		border: none;
		padding: 8px;
		cursor: pointer;
		border-radius: 50%;
		color: var(--text-secondary);
		transition: all 0.2s;

		&:hover {
			background-color: rgba(244, 33, 46, 0.1);
			color: var(--error);
		}
	}
}

.create-list-modal,
.add-member-modal {
	.modal-content {
		max-width: 400px;
	}
}

.create-list-form,
.add-member-form {
	.form-group {
		margin-bottom: 16px;

		label {
			display: block;
			font-weight: 600;
			font-size: 14px;
			margin-bottom: 6px;
			color: var(--text-primary);
		}

		input[type="text"],
		textarea {
			width: 100%;
			padding: 12px;
			border: 1px solid var(--border-primary);
			border-radius: 8px;
			font-size: 15px;
			background-color: var(--bg-primary);
			color: var(--text-primary);
			resize: vertical;
			box-sizing: border-box;

			&:focus {
				outline: none;
				border-color: var(--primary);
				box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
			}
		}

		&.checkbox-group {
			.checkbox-label {
				display: flex;
				align-items: center;
				gap: 10px;
				cursor: pointer;
				font-weight: 400;

				input[type="checkbox"] {
					width: 18px;
					height: 18px;
					cursor: pointer;
				}
			}
		}
	}

	.modal-actions {
		display: flex;
		gap: 12px;
		justify-content: flex-end;
		margin-top: 24px;
	}
}

.add-member-results {
	max-height: 300px;
	overflow-y: auto;
	margin-top: 12px;
}

.add-member-user {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border-radius: 8px;
	transition: background-color 0.2s;

	&:hover {
		background-color: var(--hover-overlay);
	}

	.add-member-avatar {
		width: 40px;
		height: 40px;
		object-fit: cover;
		flex-shrink: 0;
	}

	.add-member-info {
		flex: 1;
		min-width: 0;
	}

	.add-member-name {
		font-weight: 600;
		font-size: 14px;
		color: var(--text-primary);
	}

	.add-member-username {
		font-size: 13px;
		color: var(--text-secondary);
	}

	.add-member-btn {
		padding: 6px 14px;
		border-radius: 16px;
		font-weight: 600;
		font-size: 13px;
		cursor: pointer;
		background-color: var(--text-primary);
		color: var(--bg-primary);
		border: none;
		transition: opacity 0.2s;

		&:hover:not(:disabled) {
			opacity: 0.85;
		}

		&:disabled {
			opacity: 0.6;
			cursor: not-allowed;
		}

		&.added {
			background-color: var(--success);
			color: white;
		}
	}
}

.no-results {
	text-align: center;
	padding: 24px;
	color: var(--text-secondary);
	font-size: 14px;
}

.tweet-translate-container {
	padding: 0;
	margin-top: -9px;

	&:is(
			.quoted-tweet-container .tweet-translate-container,
			.tweet-preview .tweet-translate-container
		) {
		margin-top: 0;
	}

	.tweet-translate-btn {
		background: none;
		border: none;
		color: var(--primary);
		font-size: 13px;
		cursor: pointer;
		padding: 4px 0;
		font-weight: 500;
		font-family: inherit;
		transition: opacity 0.15s;
		display: flex;
		align-items: center;
		gap: 4px;

		svg {
			width: 16px;
			height: 16px;
		}

		&:hover {
			text-decoration: underline;
		}

		&:disabled {
			opacity: 0.6;
			cursor: wait;
		}
	}
}

.tweet-translated-content {
	line-height: 1.5;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.emojik-wrapper {
	width: 150px;
	height: 150px;
	position: relative;

	img {
		width: 150px;
		height: 150px;
		border: none;
		border-radius: 0px;
	}

	.emojik-label {
		position: absolute;
		bottom: 0;
		left: 0;
		background: rgba(0, 0, 0, 0.6);
		color: white;
		font-size: 15px;
		padding: 1px 4px;
		opacity: 0;
		transform: translateY(4px) scale(0.9);
		text-align: center;
		width: fit-content;
		transform-origin: left;
		border-radius: 4px;
		transition:
			opacity 0.2s,
			transform 0.2s;
		backdrop-filter: blur(1px);
	}

	&:hover .emojik-label {
		opacity: 1;
		transform: translateY(0px) scale(1);
	}
}

.badge-popup-menu {
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	padding: 8px 0;
	min-width: 180px;
	max-width: 280px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	animation: badgePopupFadeIn 0.15s ease-out;

	.badge-popup-title {
		padding: 8px 16px;
		font-size: 13px;
		font-weight: 600;
		color: var(--text-secondary);
		border-bottom: 1px solid var(--border-primary);
		margin-bottom: 4px;
	}

	.badge-popup-item {
		display: flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		padding: 10px 16px;
		background: none;
		border: none;
		color: var(--text-primary);
		font-size: 14px;
		font-family: inherit;
		cursor: pointer;
		text-align: left;
		transition: background 0.12s;

		i {
			font-size: 16px;
			color: var(--text-secondary);
			flex-shrink: 0;
		}

		&:hover {
			background: var(--bg-overlay-light);
		}
	}
}

@keyframes badgePopupFadeIn {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.badge-modal-content {
	padding: 16px;
	line-height: 1.6;

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		margin-top: 0;
		margin-bottom: 12px;
		font-weight: 600;
	}

	p {
		margin: 0 0 12px;
	}

	ul,
	ol {
		margin: 0 0 12px;
		padding-left: 20px;
	}

	a {
		color: var(--primary);
		text-decoration: none;

		&:hover {
			text-decoration: underline;
		}
	}

	code {
		background: var(--bg-overlay-light);
		padding: 2px 6px;
		border-radius: 4px;
		font-family: "SF Mono", Monaco, monospace;
		font-size: 0.9em;
	}

	pre {
		background: var(--bg-overlay-light);
		padding: 12px;
		border-radius: 8px;
		overflow-x: auto;

		code {
			background: none;
			padding: 0;
		}
	}

	img {
		max-width: 100%;
		height: auto;
		border-radius: 8px;
	}

	blockquote {
		margin: 0 0 12px;
		padding-left: 12px;
		border-left: 3px solid var(--primary);
		color: var(--text-secondary);
	}
}

.custom-badge {
	cursor: pointer;

	&:focus-visible {
		outline: 2px solid var(--primary);
		outline-offset: 2px;
		border-radius: 4px;
	}
}

.embed-code {
	display: flex;
	flex-direction: row;
	gap: 8px;
	width: calc(100% - 30px);
	margin: 15px;
	margin-top: 0px;
	height: 44px;

	.input {
		border-radius: 10px;
		background-color: var(--border-primary);
		border-color: rgba(0, 0, 0, 0);
		border-width: 2px;
		width: 100%;
		display: flex;
		align-items: center;
		padding-left: 12px;
		padding-right: 12px;
		gap: 4px;

		input {
			font-size: 15px;
			padding: 11px 4px;
			line-height: 18px;
			width: 100%;
			font-family: inherit;
			border: none;
			background-color: transparent;
			border-radius: 0px;

			&:focus {
				outline: none;
			}
		}

		&:has(input:focus) {
			border-color: var(--primary);
			box-shadow: 0 0 0 3px var(--primary);

			svg {
				color: var(--primary);
			}
		}
	}

	button {
		flex-direction: row;
		align-items: center;
		justify-content: center;
		background-color: var(--primary);
		color: var(--primary-fg);
		border-radius: 999px;
		padding: 12px 24px;
		gap: 6px;
		display: flex;
		font-family: inherit;
		width: fit-content;
		border: none;
		white-space: nowrap;
		font-size: 15px;
		font-weight: 500;
		cursor: pointer;
		transition:
			background-color 0.2s,
			transform 0.2s,
			opacity 0.2s;

		&:hover {
			background-color: var(--primary-hover);
		}

		&:active {
			transform: scale(0.96);
			opacity: 0.8;
		}
	}
}

#pull-to-refresh {
	position: sticky;
	top: var(--ptr-offset, 0);
	left: 0;
	right: 0;
	height: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg-primary);
	transition: height 0.2s ease-out;
	z-index: 100;

	.ptr-spinner {
		width: 24px;
		height: 24px;
		color: var(--primary);
		transition: transform 0.2s;
	}

	.ptr-text {
		margin-left: 8px;
		font-size: 13px;
		color: var(--text-secondary);
	}

	&.refreshing {
		.ptr-spinner {
			animation: ptr-spin 1s linear infinite;
		}
	}
}

@keyframes ptr-spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}
