/* ==========================================================================
   Biblia — cititorul (.eb). Modelul: Bible.com — o coloană liniștită de citit, bara de navigare
   lipită sus, alegerea cărții și a capitolului dintr-un dialog, versetele care se pot selecta.
   Paleta și rolurile din manual: titlu Foco 900 mov, eyebrow Montserrat 800 portocaliu,
   textul Macha (sau „Clasică”: serif de sistem), controale rotunde cu contur auriu.
   ========================================================================== */
.eb {
	--eb-size: 20px;
	--eb-font: "macha", sans-serif;
	--eb-paper: #fff;
	--plum: #483041;
	--ink: #1B141A;
	--read: #2E262D;
	--gold: #DAA769;
	--line: #E2D6D3;
	--tint: #F7F3F2;
	--hl-gold: #F6E2BE;
	--hl-rose: #F4D3D3;
	--hl-sage: #D8EAD4;
	--hl-sky: #D3E3F4;
	--ease: cubic-bezier(.22, .8, .2, 1);
	position: relative;
	background: var(--eb-paper);
	transition: background-color .3s;
}
.eb[data-font="serif"] { --eb-font: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, serif; }
.eb[data-paper="warm"] { --eb-paper: #FBF6EE; }
.eb *, .eb *::before, .eb *::after { box-sizing: border-box; }
.eb button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.eb button:focus { outline: none; }
.eb :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Bara de citire ---------- */
.eb-bar {
	position: sticky;
	top: 0;
	z-index: 40;
	margin: 0 calc(50% - 50vw);   /* pe toată lățimea ecranului; conținutul rămâne pe coloana de citit */
	background: rgba(255, 255, 255, .92);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	        backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid var(--line);
}
.eb[data-paper="warm"] .eb-bar { background: rgba(251, 246, 238, .92); }
body.admin-bar .eb-bar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .eb-bar { top: 0; } }
.eb-bar__in {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 760px;
	height: 64px;
	margin: 0 auto;
	padding: 0 var(--elim-gutter, 20px);
}
.eb-bar__sp { flex: 1; }
/* anterior / următor: cercurile cu contur auriu din site */
.eb-step {
	position: relative;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border: 1px solid var(--gold);
	border-radius: 50%;
	background: #fff;
	transition: background-color .25s, opacity .25s;
}
.eb-step span {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 7px;
	height: 13px;
	background: var(--plum);
	-webkit-mask: var(--haicon-right) center / contain no-repeat;
	        mask: var(--haicon-right) center / contain no-repeat;
}
.eb-prev span { transform: scaleX(-1); }
.eb-step:hover, .eb-step:focus-visible { background: var(--gold); }
.eb-step[aria-disabled="true"] { opacity: .35; pointer-events: none; }
/* „Ioan 3 ▾” */
.eb-ref {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	padding: 0 14px 0 18px !important;
	border-radius: 999px !important;
	background: var(--tint) !important;
	font-family: "macha", sans-serif !important;
	font-weight: 500 !important;
	font-size: 18px !important;
	color: var(--plum) !important;
	white-space: nowrap;
	transition: background-color .2s;
}
.eb-ref:hover { background: #EFE7E5 !important; }
.eb-ref svg { width: 18px; height: 18px; }
.eb-ver { font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 12px; letter-spacing: 0; text-transform: uppercase; color: #A8948F; margin-right: 6px; }
.eb-tool {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50% !important;
	color: var(--plum) !important;
	transition: background-color .2s;
}
.eb-tool:hover { background: var(--tint) !important; }
.eb-tool svg { width: 21px; height: 21px; }
/* cât din capitol ai citit */
.eb-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.eb-progress i { display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; }

/* ---------- Capitolul ---------- */
.eb-page {
	max-width: 680px;
	margin: 0 auto;
	padding: 56px var(--elim-gutter, 20px) 80px;
	transition: opacity .25s;
}
.eb.is-loading .eb-page { opacity: .35; }
.eb-k {
	margin: 0 0 8px !important;
	font-family: "Montserrat", sans-serif;
	font-weight: 800;
	font-size: 15px;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #FF8C1A;
}
.eb-title {
	margin: 0 0 28px !important;
	font-family: "foco", sans-serif !important;
	font-weight: 900 !important;
	font-size: 44px !important;
	line-height: 1.05 !important;
	color: var(--plum) !important;
}
.eb-text {
	font-family: var(--eb-font);
	font-size: var(--eb-size);
	line-height: 1.8;
	color: var(--read);
	text-wrap: pretty;
	hyphens: manual;
}
.eb-v {
	border-radius: 4px;
	-webkit-box-decoration-break: clone;
	        box-decoration-break: clone;
	cursor: pointer;
	transition: background-color .25s;
}
@media (hover: hover) { .eb-v:hover { background: rgba(72, 48, 65, .05); } }
.eb-v.is-sel {
	text-decoration: underline;
	text-decoration-style: dotted;
	text-decoration-color: var(--plum);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}
/* semnul de carte: o panglică aurie în marginea versetului */
.eb-v.is-mark { position: relative; }
.eb-v.is-mark::before {
	content: "";
	display: inline-block;
	width: .62em;
	height: .9em;
	margin: 0 .25em -.08em 0;
	background: var(--gold);
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
}
.eb-mark-btn { color: var(--gold) !important; }
.eb-mark-btn svg { fill: rgba(218, 167, 105, .25); }
.eb-mark-btn[hidden] { display: none; }
.eb-v[data-hl="gold"] { background: var(--hl-gold); }
.eb-v[data-hl="rose"] { background: var(--hl-rose); }
.eb-v[data-hl="sage"] { background: var(--hl-sage); }
.eb-v[data-hl="sky"]  { background: var(--hl-sky); }
/* versetul trimis prin legătură (…&verse=16): o lumină aurie care se stinge încet */
.eb-v.is-ref { animation: ebRef 3.6s ease .3s both; }
@keyframes ebRef { 0%, 55% { background-color: rgba(218, 167, 105, .32); } 100% { background-color: rgba(218, 167, 105, .12); } }
.eb-n {
	position: relative;
	top: -.45em;
	margin: 0 .3em 0 .1em;
	font-family: "Montserrat", sans-serif;
	font-weight: 800;
	font-size: .55em;
	line-height: 0;
	color: #B8925F;
	user-select: none;
}
.eb-v:first-child .eb-n { margin-left: 0; }
.eb[data-flow="lines"] .eb-v { display: block; margin-bottom: .5em; padding-left: 1.6em; text-indent: -1.6em; }
.eb[data-flow="lines"] .eb-n { display: inline-block; width: 1.6em; margin: 0; text-indent: 0; font-size: .6em; top: -.3em; }
.eb[data-nums="off"] .eb-n { display: none; }

/* capitolul anterior / următor, la final */
.eb-end { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; }
.eb-end__a {
	display: block;
	padding: 18px 22px;
	border: 1px solid var(--line);
	border-radius: 20px;
	text-decoration: none !important;
	transition: border-color .25s, background-color .25s;
}
.eb-end__a--next { grid-column: 2; text-align: right; }
.eb-end__a:hover { border-color: var(--gold); background: rgba(218, 167, 105, .06); }
.eb-end__a small {
	display: block;
	margin-bottom: 6px;
	font-family: "Montserrat", sans-serif;
	font-weight: 800;
	font-size: 12px;
	text-transform: uppercase;
	color: var(--gold);
}
.eb-end__a span { font-family: "macha", sans-serif; font-weight: 500; font-size: 20px; color: var(--plum); }
.eb-copy { margin: 40px 0 0 !important; font-family: "macha", sans-serif; font-size: 14px; color: #A8948F; text-align: center; }

/* ---------- Versetele selectate ---------- */
.eb-act {
	position: fixed;
	left: 50%;
	bottom: 18px;
	z-index: 60;
	width: min(600px, calc(100% - 24px));
	transform: translate(-50%, 0);
	transition: transform .35s var(--ease), opacity .25s;
}
.eb-act[hidden] { display: block; visibility: hidden; opacity: 0; transform: translate(-50%, 24px); pointer-events: none; }
.eb-act__in {
	padding: 14px 18px 16px;
	border-radius: 26px;
	background: var(--ink);
	color: #fff;
	box-shadow: 0 24px 48px -16px rgba(27, 20, 26, .5);
}
.eb-act__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.eb-act__ref { font-family: "macha", sans-serif; font-weight: 500; font-size: 18px; color: var(--gold); }
.eb-act__x { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: rgba(255, 255, 255, .7) !important; }
.eb-act__x:hover { color: #fff !important; background: rgba(255, 255, 255, .08) !important; }
.eb-act__x svg { width: 18px; height: 18px; }
.eb-act__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.eb-sw { display: flex; gap: 10px; }
.eb-sw__c {
	width: 30px;
	height: 30px;
	border-radius: 50% !important;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .0);
	transition: transform .2s var(--ease), box-shadow .2s;
}
.eb-sw__c[data-c="gold"] { background: var(--hl-gold) !important; }
.eb-sw__c[data-c="rose"] { background: var(--hl-rose) !important; }
.eb-sw__c[data-c="sage"] { background: var(--hl-sage) !important; }
.eb-sw__c[data-c="sky"]  { background: var(--hl-sky) !important; }
.eb-sw__c--none { display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .35) !important; color: rgba(255, 255, 255, .8) !important; }
.eb-sw__c--none svg { width: 15px; height: 15px; }
.eb-sw__c:hover { transform: scale(1.12); }
.eb-sw__c.is-on { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--gold); }
.eb-act__btns { display: flex; gap: 4px; }
.eb-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 38px;
	padding: 0 12px !important;
	border-radius: 999px !important;
	font-family: "macha", sans-serif !important;
	font-size: 16px !important;
	color: #fff !important;
	transition: background-color .2s;
}
.eb-btn:hover { background: rgba(255, 255, 255, .1) !important; }
.eb-btn svg { width: 19px; height: 19px; color: var(--gold); }

.eb-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 70;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--plum);
	color: #fff;
	font-family: "macha", sans-serif;
	font-size: 16px;
	opacity: 0;
	transform: translate(-50%, 10px);
	transition: opacity .25s, transform .3s var(--ease);
	pointer-events: none;
}
.eb-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.eb.has-sel .eb-toast { bottom: 150px; }

/* ---------- Dialogurile ---------- */
.eb-dlg {
	width: min(760px, calc(100% - 32px));
	max-height: min(82vh, 820px);
	padding: 0;
	border: 0;
	border-radius: 30px;
	background: #fff;
	color: var(--read);
	box-shadow: 0 40px 80px -24px rgba(27, 20, 26, .45);
	overflow: hidden;
}
.eb-dlg[open] { display: flex; flex-direction: column; animation: ebDlg .35s var(--ease); }
.eb-dlg::backdrop { background: rgba(27, 20, 26, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes ebDlg { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.eb-settings { width: min(440px, calc(100% - 32px)); }
.eb-dlg__head { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px 22px; border-bottom: 1px solid var(--line); }
.eb-dlg__head--t { padding-left: 26px; }
.eb-dlg__t { flex: 1; margin: 0 !important; font-family: "macha", sans-serif; font-weight: 500; font-size: 20px; color: var(--plum); }
.eb-dlg__x { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50% !important; color: var(--plum) !important; }
.eb-dlg__x:hover { background: var(--tint) !important; }
.eb-dlg__x svg { width: 20px; height: 20px; }
.eb-dlg__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px 26px; }

.eb-find { flex: 1; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 999px; background: var(--tint); color: #8F7F8B; }
.eb-find svg { flex: 0 0 20px; width: 20px; height: 20px; }
.eb-find__in {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
	font-family: "macha", sans-serif !important;
	font-size: 17px !important;
	color: var(--ink) !important;
	outline: none !important;
}
.eb-find__in::-webkit-search-cancel-button { cursor: pointer; }

.eb-pk-k {
	margin: 18px 0 8px !important;
	font-family: "Montserrat", sans-serif;
	font-weight: 800;
	font-size: 12px;
	text-transform: uppercase;
	color: var(--gold);
}
.eb-pk-k:first-of-type { margin-top: 4px !important; }
.eb-books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.eb-books li { margin: 0 !important; }
.eb-books li::before { content: none !important; }
.eb-book {
	display: block;
	width: 100%;
	padding: 9px 12px !important;
	border-radius: 12px !important;
	text-align: left;
	font-family: "macha", sans-serif !important;
	font-size: 17px !important;
	color: var(--read) !important;
	transition: background-color .15s;
}
.eb-book:hover, .eb-book.is-active { background: var(--tint) !important; }
.eb-book.is-cur { color: var(--plum) !important; font-weight: 500 !important; }
.eb-book.is-cur::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: #FF8C1A; vertical-align: middle; }
.eb-book[hidden] { display: none; }

.eb-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	padding: 6px 12px 6px 8px !important;
	border-radius: 999px !important;
	font-family: "macha", sans-serif !important;
	font-size: 16px !important;
	color: var(--plum) !important;
}
.eb-back:hover { background: var(--tint) !important; }
.eb-back span { width: 7px; height: 13px; background: var(--plum); -webkit-mask: var(--haicon-right) center / contain no-repeat; mask: var(--haicon-right) center / contain no-repeat; transform: scaleX(-1); }
.eb-pk-t { margin: 0 0 14px !important; font-family: "foco", sans-serif; font-weight: 900; font-size: 28px; color: var(--plum); }
.eb-chs { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.eb-ch {
	height: 52px;
	border-radius: 14px !important;
	background: var(--tint) !important;
	font-family: "macha", sans-serif !important;
	font-weight: 500 !important;
	font-size: 17px !important;
	color: var(--plum) !important;
	transition: background-color .15s, color .15s, transform .15s;
}
.eb-ch:hover { background: var(--plum) !important; color: #fff !important; }
.eb-ch.is-cur { box-shadow: inset 0 0 0 2px var(--gold); }

.eb-last {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
	padding: 12px 16px;
	border-radius: 18px;
	background: rgba(218, 167, 105, .12);
}
.eb-last[hidden] { display: none; }
.eb-last { flex-direction: column; align-items: stretch; gap: 6px; }
.eb-last__r { display: flex; align-items: center; gap: 12px; }
.eb-last__k { font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 12px; text-transform: uppercase; color: #B8925F; }
.eb-last a { margin-left: auto; font-family: "macha", sans-serif; font-weight: 500; font-size: 17px; color: var(--plum); text-decoration: none; }
.eb-last a:hover { text-decoration: underline; text-decoration-color: var(--gold); }

/* rezultatele căutării */
.eb-res__go {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-bottom: 14px;
	padding: 14px 18px !important;
	border-radius: 18px !important;
	background: var(--plum) !important;
	color: #fff !important;
	font-family: "macha", sans-serif !important;
	font-weight: 500 !important;
	font-size: 18px !important;
	text-align: left;
}
.eb-res__go small { font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 12px; text-transform: uppercase; color: var(--gold); }
.eb-res__n { margin: 0 0 10px !important; font-family: "macha", sans-serif; font-size: 15px; color: #8F7F8B; }
.eb-res__i {
	display: block;
	width: 100%;
	padding: 12px 14px !important;
	border-radius: 14px !important;
	text-align: left;
	font-family: "macha", sans-serif !important;
	font-size: 17px !important;
	line-height: 1.55 !important;
	color: var(--read) !important;
}
.eb-res__i:hover { background: var(--tint) !important; }
.eb-res__i b { display: block; margin-bottom: 2px; font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 12px; text-transform: uppercase; color: var(--gold); }
.eb-res__i mark { background: var(--hl-gold); color: inherit; border-radius: 3px; padding: 0 1px; }
.eb-res__more { display: block; margin: 12px auto 0; padding: 10px 18px !important; border: 1px solid var(--gold) !important; border-radius: 999px !important; font-family: "macha", sans-serif !important; font-size: 16px !important; color: var(--plum) !important; }
.eb-res__none { font-family: "macha", sans-serif; font-size: 17px; color: #8F7F8B; }

/* setările */
.eb-set { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--tint); }
.eb-set:last-child { border-bottom: 0; }
.eb-set__k { font-family: "macha", sans-serif; font-size: 17px; color: var(--read); }
.eb-size { display: flex; align-items: center; gap: 10px; }
.eb-size__b { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--gold) !important; border-radius: 50% !important; font-family: "macha", sans-serif !important; font-size: 14px !important; color: var(--plum) !important; }
.eb-size__b--big { font-size: 20px !important; }
.eb-size__b:hover { background: var(--gold) !important; }
.eb-size__v { min-width: 2ch; text-align: center; font-family: "macha", sans-serif; font-weight: 500; font-size: 17px; color: var(--plum); font-variant-numeric: tabular-nums; }
.eb-seg { display: flex; padding: 3px; border-radius: 999px; background: var(--tint); }
.eb-seg button { height: 36px; padding: 0 14px !important; border-radius: 999px !important; font-family: "macha", sans-serif !important; font-size: 15px !important; color: #6E5F6A !important; transition: background-color .2s, color .2s; }
.eb-seg button[aria-checked="true"] { background: #fff !important; color: var(--plum) !important; box-shadow: 0 2px 6px rgba(27, 20, 26, .1); }
.eb-seg--serif { font-family: Charter, "Iowan Old Style", Georgia, serif !important; }

/* ---------- Telefon ---------- */
@media (max-width: 767px) {
	.eb { --eb-size: 19px; }
	.eb-bar__in { height: 58px; gap: 6px; }
	.eb-ver { display: none; }
	.eb-ref { flex: 1; justify-content: center; padding: 0 10px 0 14px !important; font-size: 17px !important; min-width: 0; }
	.eb-ref__t { overflow: hidden; text-overflow: ellipsis; }
	.eb-bar__sp { display: none; }
	.eb-tool { flex: 0 0 38px; width: 38px; }
	.eb-page { padding-top: 36px; padding-bottom: 140px; }
	.eb-title { font-size: 34px !important; }
	.eb-end { grid-template-columns: 1fr; }
	.eb-end__a--next { grid-column: auto; }
	/* dialogurile: panou de jos, pe toată lățimea */
	.eb-dlg { width: 100%; max-width: none; height: 88vh; max-height: none; margin: auto 0 0; border-radius: 26px 26px 0 0; }
	.eb-dlg[open] { animation: ebSheet .4s var(--ease); }
	.eb-settings { height: auto; }
	@keyframes ebSheet { from { transform: translateY(40px); opacity: 0; } }
	.eb-books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.eb-act { bottom: 10px; }
	.eb-act__row { gap: 12px; }
	.eb-btn span { display: none; }
	.eb-btn { width: 42px; justify-content: center; padding: 0 !important; }
	.eb-btn svg { width: 21px; height: 21px; }
}
@media (prefers-reduced-motion: reduce) {
	.eb *, .eb *::before, .eb *::after { transition: none !important; animation: none !important; }
}
