html.ebs-lock, html.ebs-lock body { overflow: hidden !important; }

.ebs{
  --bg:#ffffff;
  --card:#ffffff;
  --muted:rgba(15,23,42,.64);
  --text:#0f172a;
  --line:rgba(15,23,42,.10);
  --soft:rgba(15,23,42,.04);
  --shadow: 0 12px 30px rgba(2,8,23,.08);
  --brand:#134785;
  --brand2:#0b2f5f;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
}

.ebs-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  max-width: 1120px;
  margin: 0 auto;
  box-shadow: 0 6px 16px rgba(2,8,23,.04);
}

.ebs-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}
.ebs-title{ font-weight: 900; font-size: 16px; letter-spacing: -.2px; }
.ebs-sub{ font-size: 13px; color: var(--muted); margin-top:4px; }
.ebs-actions{ display:flex; gap:8px; flex-wrap:wrap; }

.ebs-field{ flex:1; min-width: 220px; }

.ebs-input, .ebs-select{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  outline: none;
  font-size: 14px;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.ebs-input:focus, .ebs-select:focus{
  border-color: rgba(19,71,133,.35);
  box-shadow: 0 0 0 4px rgba(19,71,133,.10);
}

.ebs-btn{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-weight: 900;
  cursor: pointer;
  font-size: 14px;
  transition: transform .04s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.ebs-btn:active{ transform: translateY(1px); }
.ebs-btn:disabled{ opacity:.6; cursor:not-allowed; }

.ebs-btn-primary{
  background: var(--brand);
  border-color: rgba(19,71,133,.35);
  color:#fff;
}
.ebs-btn-primary:hover{ background: var(--brand2); }

.ebs-btn-ghost{
  background: #fff;
  color: var(--brand2);
}
.ebs-btn-ghost:hover{
  background: rgba(19,71,133,.06);
  border-color: rgba(19,71,133,.20);
}

.ebs-bar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.ebs-adv{
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.ebs-adv-grid{
  display:grid;
  gap:10px;
}
@media (min-width: 940px){
  .ebs-adv-grid{ grid-template-columns: 1fr 1fr 1.2fr; }
}

.ebs-panel{
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
  padding: 12px;
}
.ebs-panel-title{ font-size: 13px; font-weight: 900; margin-bottom: 8px; }
.ebs-row{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }

.ebs-check{
  font-size: 13px;
  color: rgba(15,23,42,.78);
  font-weight: 800;
  display:flex;
  gap:8px;
  align-items:center;
}
.ebs-hint{ margin-top: 8px; font-size: 12px; color: var(--muted); }

.ebs-status{
  margin-top: 12px;
  min-height: 20px;
  font-size: 13px;
  color: rgba(15,23,42,.70);
  display:flex;
  align-items:center;
  gap:8px;
}
.ebs-status.is-error{ color: #b42318; }

.ebs-spin{
  width:14px;height:14px;
  border-radius:999px;
  border:2px solid rgba(15,23,42,.18);
  border-top-color: var(--brand);
  display:inline-block;
  animation: ebsSpin .9s linear infinite;
}
@keyframes ebsSpin { to { transform: rotate(360deg); } }

.ebs-results{ margin-top: 12px; display:grid; gap:10px; }

.ebs-item{
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: #fff;
}
.ebs-item-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}
.ebs-item-actions{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }

.ebs-ref{ font-weight: 950; font-size: 14px; }
.ebs-text{ font-size: 14px; line-height: 1.85; color: rgba(15,23,42,.92); margin-top: 8px; }

.ebs-pill{
  display:inline-block;
  margin-left:8px;
  padding: 4px 8px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(15,23,42,.03);
  font-size: 12px;
  font-weight: 900;
  color: rgba(15,23,42,.70);
}

.ebs-empty{
  border: 1px dashed rgba(15,23,42,.22);
  border-radius: 18px;
  padding: 12px;
  color: rgba(15,23,42,.65);
  background: rgba(15,23,42,.02);
}

/* Verse-by-verse display */
.ebs-verse{
  display:flex;
  gap:10px;
  margin-bottom: 8px;
}
.ebs-verse-num{
  min-width: 18px;
  text-align:right;
  font-weight: 950;
  font-size: 12px;
  color: rgba(15,23,42,.55);
}
.ebs-verse-text{
  flex:1;
  font-size: 14px;
  color: rgba(15,23,42,.95);
}

/* Overlay + Modal */
.ebs-overlay{
  position: fixed;
  inset: 0;
  background: rgba(2,8,23,.55);
  backdrop-filter: blur(6px);
  z-index: 99998;
  display:none;
}
.ebs-overlay.is-open{ display:block; }

.ebs-modal{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%) scale(.98);
  width: min(980px, calc(100vw - 22px));
  max-height: min(78vh, 760px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  z-index: 99999;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  overflow:hidden;
  display:flex;
  flex-direction: column;
}
.ebs-modal.is-open{
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.ebs-modal-head{
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(15,23,42,.02);
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}
.ebs-modal-ref{ font-weight: 950; font-size: 14px; }
.ebs-modal-sub{ font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 800; }
.ebs-modal-actions{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }

.ebs-modal-body{
  padding: 14px;
  overflow:auto;
}
.ebs-divider{
  height:1px;
  background: var(--line);
  margin: 12px 0;
}

.ebs-fonts{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.ebs-chip{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 900;
  cursor:pointer;
}
.ebs-chip[aria-pressed="true"]{
  background: rgba(19,71,133,.08);
  border-color: rgba(19,71,133,.22);
  color: var(--brand2);
}
.ebs-reader{ font-size: 16px; line-height: 1.95; }
.ebs-reader.is-compact{ font-size: 14px; line-height: 1.75; }
.ebs-reader.is-large{ font-size: 18px; line-height: 2.05; }
.ebs-reader-plain{ font-size: 14px; line-height: 1.8; }

.ebs-hl-row .ebs-hl{
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:#fff;
  font-weight: 900;
  cursor:pointer;
}
.ebs-hl-row .ebs-hl:hover{ background: rgba(15,23,42,.03); }

.ebs-drawer{
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(440px, 94vw);
  background: #fff;
  border-left: 1px solid var(--line);
  z-index: 99999;
  transform: translateX(102%);
  transition: transform .18s ease;
  display:flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(2,8,23,.08);
}
.ebs-drawer.is-open{ transform: translateX(0); }

.ebs-drawer-head{
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(15,23,42,.02);
  display:flex;
  justify-content: space-between;
  align-items:center;
}
.ebs-drawer-title{ font-weight: 950; font-size: 13px; }
.ebs-drawer-body{ padding: 12px; overflow:auto; }

.ebs-saved{ display:grid; gap:10px; }
.ebs-saved-item{
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background:#fff;
}
.ebs-saved-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}
.ebs-saved-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.ebs-meta{ margin-top: 8px; font-size: 12px; color: rgba(15,23,42,.72); }

.hl-yellow{ background: rgba(255,235,59,.18); border-color: rgba(255,235,59,.45); }
.hl-green{ background: rgba(76,175,80,.14); border-color: rgba(76,175,80,.35); }
.hl-blue{ background: rgba(33,150,243,.12); border-color: rgba(33,150,243,.30); }

.ebs-toast{
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  z-index: 100000;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  font-size: 13px;
  font-weight: 800;
}
.ebs-toast.is-show{
  opacity: 1;
  transform: translateY(0);
}

.ebs-daily{
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(2,8,23,.04);
}
.ebs-daily-title{ font-weight: 950; font-size: 14px; margin-bottom: 10px; }