/* LinKnote Related Accounts */
.lnra-wrap {
	max-width: 900px;
	margin: 0 auto;
	color: #334047;
}

.lnra-section-heading {
	margin: 0 0 18px;
}

.lnra-section-heading h3 {
	margin: 0 0 6px;
	font-size: 21px;
	line-height: 1.35;
}

.lnra-section-heading p,
.lnra-help {
	margin: 0;
	color: #68777d;
	font-size: 14px;
	line-height: 1.65;
}

.lnra-card {
	margin: 0 0 18px;
	padding: 18px;
	border: 1px solid #dfe8ea;
	border-radius: 9px;
	background: #fff;
}

.lnra-card h4,
.lnra-public-group h4 {
	margin: 0 0 12px;
	font-size: 16px;
}

.lnra-notice {
	margin: 0 0 14px;
	padding: 10px 12px;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.5;
}

.lnra-notice.is-success {
	background: #edf8f1;
	color: #237247;
}

.lnra-notice.is-error {
	background: #fff0f0;
	color: #aa3535;
}

.lnra-field {
	display: block;
	margin: 0 0 13px;
}

.lnra-field > span {
	display: block;
	margin: 0 0 5px;
	font-size: 13px;
	font-weight: 700;
}

.lnra-field em {
	font-style: normal;
	font-weight: 400;
	color: #7c8b90;
}

.lnra-field input,
.lnra-field select,
.lnra-field textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid #ccd9dd;
	border-radius: 5px;
	background: #fff;
	color: #344248;
}

.lnra-field textarea {
	min-height: 78px;
	resize: vertical;
}

.lnra-search-results {
	display: none;
	margin: -7px 0 12px;
	border: 1px solid #d9e4e7;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 5px 14px rgba(0, 0, 0, .08);
	overflow: hidden;
}

.lnra-search-results.is-active {
	display: block;
}

.lnra-search-result,
.lnra-selected-user {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	box-sizing: border-box;
	padding: 9px 10px;
	border: 0;
	background: #fff;
	color: #334047;
	text-align: left;
	cursor: pointer;
}

.lnra-search-result + .lnra-search-result {
	border-top: 1px solid #edf1f2;
}

.lnra-search-result:hover {
	background: #f6fbfc;
}

.lnra-search-result img,
.lnra-selected-user img,
.lnra-avatar {
	border-radius: 50%;
	object-fit: cover;
}

.lnra-search-result img,
.lnra-selected-user img {
	width: 32px;
	height: 32px;
}

.lnra-search-result strong,
.lnra-selected-user strong {
	display: block;
	font-size: 13px;
}

.lnra-search-result small,
.lnra-selected-user small,
.lnra-user-identity small {
	display: block;
	margin-top: 1px;
	color: #77878c;
	font-size: 11px;
}

.lnra-selected-user {
	margin: -7px 0 12px;
	padding: 9px 10px;
	border: 1px solid #b9d8df;
	border-radius: 6px;
	background: #f4fbfc;
	cursor: default;
}

.lnra-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	margin-left: 4px;
	border-radius: 10px;
	background: #eaf2f4;
	color: #4c666e;
	font-size: 12px;
}

.lnra-request-item + .lnra-request-item {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid #e8eff1;
}

.lnra-request-top,
.lnra-manage-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.lnra-user-identity {
	display: inline-flex;
	align-items: center;
	min-width: 0;
	gap: 9px;
	color: #334047;
	text-decoration: none;
}

.lnra-user-identity:hover {
	color: #1684aa;
}

.lnra-user-identity img {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
}

.lnra-user-identity strong {
	display: block;
	overflow: hidden;
	font-size: 14px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lnra-relation-pill {
	flex: 0 0 auto;
	padding: 4px 7px;
	border-radius: 999px;
	background: #edf5f7;
	color: #48636c;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.lnra-request-message {
	margin: 11px 0;
	padding: 9px 10px;
	border-radius: 5px;
	background: #f7fafb;
	color: #526269;
	font-size: 13px;
	line-height: 1.6;
}

.lnra-response-note {
	margin-top: 12px;
}

.lnra-inline-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
}

.lnra-button-secondary,
.lnra-button-danger,
.lnra-order-buttons button {
	box-sizing: border-box;
	min-height: 36px;
	padding: 0 11px;
	border: 1px solid #cad7da;
	border-radius: 4px;
	background: #fff;
	color: #52646b;
	font-size: 13px;
	cursor: pointer;
}

.lnra-button-secondary:hover,
.lnra-order-buttons button:hover {
	border-color: #a9c8cf;
	background: #f6fbfc;
}

.lnra-button-danger {
	border-color: #e7c6c6;
	color: #af3a3a;
}

.lnra-button-danger:hover {
	background: #fff5f5;
}

.lnra-manage-list {
	display: flex;
	flex-direction: column;
	gap: 9px;
	margin: 14px 0;
}

.lnra-manage-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border: 1px solid #e0e9eb;
	border-radius: 7px;
	background: #fff;
}

.lnra-manage-main {
	justify-content: flex-start;
	min-width: 0;
}

.lnra-manage-controls {
	display: flex;
	align-items: center;
	gap: 10px;
}

.lnra-toggle {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: #526269;
	font-size: 12px;
	white-space: nowrap;
	cursor: pointer;
}

.lnra-toggle input {
	margin: 0;
}

.lnra-order-buttons {
	display: flex;
	gap: 3px;
}

.lnra-order-buttons button {
	width: 30px;
	min-height: 32px;
	padding: 0;
}

.lnra-order-buttons button:disabled {
	opacity: .38;
	cursor: not-allowed;
}

.lnra-remove-form {
	margin: 0;
}

.lnra-empty {
	margin: 0;
	color: #718187;
	font-size: 14px;
}

.lnra-public-group + .lnra-public-group {
	margin-top: 22px;
}

.lnra-public-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 9px;
}

.lnra-public-item {
	display: grid;
	grid-template-columns: 46px minmax(0, 1fr) 14px;
	align-items: center;
	gap: 9px;
	padding: 10px;
	border: 1px solid #dfe8ea;
	border-radius: 7px;
	background: #fff;
	color: #334047;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.lnra-public-item:hover {
	border-color: #abcbd3;
	background: #f7fcfd;
	color: #24525f;
}

.lnra-public-item img {
	width: 46px;
	height: 46px;
}

.lnra-public-item > span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lnra-public-item b {
	color: #93a4a9;
	font-size: 18px;
	text-align: right;
}

/* Header summary: moved under the existing SNS activity row by JS. */
.um-profile .um-profile-meta > .lnra-header-summary {
	order: 3;
	width: 100%;
	margin: 8px 0 14px;
	padding-bottom: 2px;
}

.lnra-header-summary {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	max-width: 100%;
}

.lnra-header-title {
	flex: 0 0 auto;
	padding-top: 5px;
	color: #75858a;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.lnra-header-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	min-width: 0;
}

.lnra-header-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	max-width: 100%;
	min-height: 29px;
	box-sizing: border-box;
	padding: 3px 8px 3px 5px;
	border: 1px solid #d8e5e8;
	border-radius: 999px;
	background: #fff;
	color: #43545a;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
}

.lnra-header-chip:hover {
	border-color: #a8c8d0;
	background: #f6fbfc;
	color: #245363;
}

.lnra-chip-label {
	color: #668189;
	font-size: 10px;
	font-weight: 700;
	white-space: nowrap;
}

.lnra-chip-avatar {
	width: 20px;
	height: 20px;
	border-radius: 50%;
}

.lnra-chip-name {
	overflow: hidden;
	max-width: 130px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lnra-header-more {
	justify-content: center;
	min-width: 30px;
	padding: 3px 8px;
	color: #63777e;
}

@media screen and (max-width: 700px) {
	.lnra-card {
		padding: 14px;
	}

	.lnra-manage-item {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.lnra-manage-main {
		grid-column: 1 / -1;
	}

	.lnra-remove-form {
		grid-column: 1 / -1;
	}

	.lnra-button-danger {
		width: 100%;
	}

	.lnra-header-summary {
		align-items: flex-start;
		flex-direction: column;
		gap: 4px;
		margin-bottom: 10px;
	}

	.lnra-header-title {
		padding-top: 0;
	}

	.lnra-chip-name {
		max-width: 115px;
	}
}

@media screen and (max-width: 480px) {
	.lnra-inline-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.lnra-inline-actions .um-button,
	.lnra-button-secondary {
		width: 100%;
	}

	.lnra-manage-controls {
		align-items: flex-start;
		flex-direction: column;
		gap: 7px;
	}

	.lnra-public-list {
		grid-template-columns: 1fr;
	}
}


/* v1.1.1: keep related-account chips clear of the header's lower divider. */
.um-profile .um-header .um-profile-meta > .lnra-header-summary {
	margin: 10px 0 0 !important;
	padding-bottom: 18px !important;
}

@media screen and (max-width: 700px) {
	.um-profile .um-header .um-profile-meta > .lnra-header-summary {
		padding-bottom: 14px !important;
	}
}

/* Relation-direction helper in the request form */
.lnra-relation-guide {
	margin: -5px 0 13px;
	padding: 9px 10px;
	border-left: 3px solid #b9d8df;
	border-radius: 4px;
	background: #f6fbfc;
	color: #53656b;
	font-size: 12px;
	line-height: 1.6;
}

.lnra-relation-guide p {
	margin: 0;
}

/* v1.2.1: relation-direction guide below the relation selector */
.lnra-relation-guide[hidden] {
	display: none !important;
}

.lnra-relation-guide .lnra-relation-guide-text {
	margin: 0;
}
