.brn-reader {
	max-width: 780px;
	margin: 0 auto;
	font-family: Georgia, 'Times New Roman', serif;
	position: relative;
}

.brn-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
	align-items: center;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.brn-toolbar select {
	padding: 6px 8px;
}

.brn-search {
	position: relative;
	flex: 1 1 200px;
	min-width: 160px;
}

.brn-search-input {
	width: 100%;
	padding: 6px 8px;
	box-sizing: border-box;
}

.brn-search-results {
	display: none;
	position: absolute;
	z-index: 20;
	background: #fff;
	border: 1px solid #ddd;
	box-shadow: 0 4px 10px rgba(0,0,0,.1);
	max-height: 320px;
	overflow-y: auto;
	width: 100%;
}

.brn-search-item {
	padding: 8px 10px;
	font-size: 13px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.brn-search-item:hover { background: #f5f5f5; }
.brn-search-empty { padding: 10px; color: #777; font-size: 13px; }

.brn-nav-buttons {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 10px 0 18px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.brn-chapter-title {
	margin: 0;
	font-family: Georgia, serif;
	text-align: center;
	flex: 1;
}

.brn-nav-buttons button {
	background: #f4f4f4;
	border: 1px solid #ddd;
	padding: 6px 14px;
	cursor: pointer;
	border-radius: 3px;
}
.brn-nav-buttons button:disabled { opacity: .4; cursor: default; }

.brn-verses {
	font-size: 19px;
	line-height: 1.8;
}

.brn-verse { margin: 0 0 6px; }

.brn-verse-num {
	font-weight: bold;
	color: #a33;
	margin-right: 2px;
}

.brn-verse-notes-btn {
	background: none;
	border: none;
	cursor: pointer;
	opacity: .35;
	font-size: 13px;
	vertical-align: middle;
}
.brn-verse-notes-btn.has-notes { opacity: 1; }
.brn-note-count {
	font-size: 11px;
	background: #2271b1;
	color: #fff;
	border-radius: 10px;
	padding: 0 6px;
	font-family: sans-serif;
}

.brn-empty, .brn-loading {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #666;
}

.brn-note-panel {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.4);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.brn-note-panel-inner {
	background: #fff;
	width: 92%;
	max-width: 480px;
	max-height: 80vh;
	overflow-y: auto;
	border-radius: 6px;
	padding: 20px;
	position: relative;
}

.brn-note-close {
	position: absolute;
	top: 8px;
	right: 12px;
	background: none;
	border: none;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
}

.brn-note-verse-ref {
	margin: 0 30px 12px 0;
	font-family: Georgia, serif;
}

.brn-note-item {
	border-bottom: 1px solid #eee;
	padding: 10px 0;
	font-size: 14px;
}
.brn-note-meta { font-size: 12px; color: #888; margin-top: 4px; }
.brn-note-actions { margin-top: 4px; }
.brn-note-actions .link-button {
	background: none; border: none; color: #b32d2e; cursor: pointer; padding: 0; font-size: 12px;
}

.brn-note-form { margin-top: 14px; }
.brn-note-textarea { width: 100%; box-sizing: border-box; padding: 8px; }
.brn-note-form-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 8px;
}
.brn-note-save {
	background: #2271b1;
	color: #fff;
	border: none;
	padding: 8px 16px;
	border-radius: 3px;
	cursor: pointer;
}

.brn-inline-verse { }
.brn-inline-ref { font-size: .85em; color: #666; }

/* Highlighted note-anchored text within a verse */
.brn-note-mark {
	background: #fff3c4;
	padding: 1px 2px;
	border-radius: 2px;
	cursor: pointer;
	position: relative;
}
.brn-note-mark:hover { background: #ffe89a; }
.brn-note-icon {
	font-size: .75em;
	margin-right: 1px;
	vertical-align: middle;
}

/* Custom right-click context menu */
.brn-context-menu {
	position: absolute;
	z-index: 100001;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba(0,0,0,.18);
	padding: 8px 10px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 13px;
	min-width: 200px;
}
.brn-context-menu-label {
	color: #555;
	margin-bottom: 6px;
}
.brn-context-menu-icons {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
}
.brn-context-icon {
	background: #f4f4f4;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 18px;
	padding: 4px 7px;
	cursor: pointer;
	line-height: 1;
}
.brn-context-icon:hover { background: #e8e8e8; }

/* Icon picker inside the note form */
.brn-icon-picker {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}
.brn-icon-option {
	background: #f4f4f4;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 17px;
	padding: 3px 7px;
	cursor: pointer;
	line-height: 1;
}
.brn-icon-option.selected {
	border-color: #2271b1;
	background: #e7f1fa;
}

.brn-note-selected-text {
	font-style: italic;
	color: #555;
	font-size: 13px;
	border-left: 3px solid #ffd76b;
	padding-left: 8px;
	margin: 0 0 10px;
}

.brn-note-head {
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 2px;
}

.brn-note-actions .link-button + .link-button { margin-left: 10px; }

.brn-note-cancel-edit {
	background: #f4f4f4;
	border: 1px solid #ddd;
	padding: 8px 14px;
	border-radius: 3px;
	cursor: pointer;
	margin-right: 8px;
}

/* Commentary button + modal */
.brn-commentary-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 13px;
	vertical-align: middle;
	opacity: .8;
}
.brn-commentary-btn:hover { opacity: 1; }

.brn-commentary-modal {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.45);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.brn-commentary-modal-inner {
	background: #fff;
	width: 92%;
	max-width: 560px;
	max-height: 80vh;
	overflow-y: auto;
	border-radius: 6px;
	padding: 22px 24px;
	position: relative;
}
.brn-commentary-close {
	position: absolute;
	top: 8px;
	right: 12px;
	background: none;
	border: none;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
}
.brn-commentary-entry {
	border-bottom: 1px solid #eee;
	padding: 10px 0 16px;
}
.brn-commentary-entry:last-child { border-bottom: none; }
.brn-commentary-entry h3 {
	margin: 4px 30px 8px 0;
	font-family: Georgia, serif;
}
.brn-commentary-body {
	font-size: 15px;
	line-height: 1.7;
}
.brn-commentary-meta {
	font-size: 12px;
	color: #888;
	margin-top: 8px;
}
