/* shared/collab.css — Bible Parlor Collaborative Study Mode  v1
 * Covers:
 *   - Collab Bar (slim strip below topbar)
 *   - Presence avatar chips
 *   - 6-digit invite code modal (Start Session + Join Session)
 *   - Annotation overlays on Reader verses
 *   - Section lock badges in Builder
 *   - Bar toast notifications
 *   - Collab panel drawer shell (tabs populated by collab-panel.js)
 * All values use tokens from shared/tokens.css.
 * Dark-mode handled via the same data-theme-early="dark" selector the rest of the site uses.
 */

/* ============================================================
   COLLAB BAR — slim strip injected below .hub-topbar
   ============================================================ */
.bp-collab-bar {
  position: sticky;
  top: var(--topbar-h, 52px);
  z-index: 900;
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  line-height: 1;
  /* Allow the bar to push content down naturally */
  flex-shrink: 0;
}

.bp-collab-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 36px;
  max-width: 100%;
  overflow: hidden;
}

/* Live pulse dot */
.bp-collab-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  opacity: .85;
  flex-shrink: 0;
  animation: bp-collab-pulse 2.2s ease-in-out infinite;
}
@keyframes bp-collab-pulse {
  0%,100% { transform: scale(1);   opacity: .85; }
  50%      { transform: scale(1.4); opacity: 1;   }
}

/* Session title */
.bp-collab-title {
  font-weight: 600;
  font-size: var(--t-xs);
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  flex-shrink: 1;
  color: rgba(255,255,255,.95);
}

/* Invite code display (facilitator only) */
.bp-collab-code {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,.18);
  border-radius: var(--r-sm);
  padding: 3px 8px;
  flex-shrink: 0;
  user-select: none;
}
.bp-collab-code-lbl {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .7;
}
.bp-collab-code-digits {
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: .18em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.bp-collab-code-copy {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  border-radius: var(--r-xs);
  transition: color var(--dur-1), background var(--dur-1);
}
.bp-collab-code-copy:hover { color: #fff; background: rgba(255,255,255,.15); }
.bp-collab-code-copy:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff; }

/* Presence avatars */
.bp-collab-presence {
  display: flex;
  align-items: center;
  gap: -4px;
  flex-shrink: 0;
  margin-left: auto;
}
.bp-collab-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  font-size: .62rem;
  font-weight: 700;
  color: #fff;
  margin-left: -5px;
  flex-shrink: 0;
  cursor: default;
  transition: transform var(--dur-1), z-index 0s;
  position: relative;
}
.bp-collab-avatar:first-child { margin-left: 0; }
.bp-collab-avatar:hover { transform: translateY(-2px) scale(1.15); z-index: 10; }
.bp-collab-avatar-more {
  background: rgba(0,0,0,.28);
  font-size: .58rem;
  letter-spacing: -.02em;
}

/* Action buttons in bar */
.bp-collab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--r-sm);
  color: #fff;
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 600;
  padding: 4px 9px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--dur-1), border-color var(--dur-1);
  white-space: nowrap;
}
.bp-collab-btn:hover { background: rgba(255,255,255,.25); border-color: rgba(255,255,255,.4); }
.bp-collab-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff; }
.bp-collab-btn svg { flex-shrink: 0; }

.bp-collab-btn-leave {
  background: rgba(0,0,0,.22);
  border-color: rgba(255,255,255,.2);
  margin-left: 4px;
}
.bp-collab-btn-leave:hover { background: rgba(0,0,0,.38); }

/* Bar toast */
.bp-collab-bar-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(14px);
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 10100;
  white-space: nowrap;
}
.bp-collab-bar-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Mobile — compress bar */
@media (max-width: 600px) {
  .bp-collab-title  { max-width: 100px; }
  .bp-collab-code   { display: none; }
  .bp-collab-btn span { display: none; }
  .bp-collab-btn    { padding: 4px 7px; }
}

/* ============================================================
   MODAL BACKDROP — shared by Start + Join modals
   ============================================================ */
.bp-collab-modal-back {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--dur-2);
}
.bp-collab-modal-back.open { opacity: 1; }

/* ============================================================
   BASE MODAL CARD
   ============================================================ */
.bp-collab-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  width: 100%;
  max-width: 440px;
  max-height: 90dvh;
  overflow-y: auto;
  font-family: var(--font-sans);
  color: var(--ink);
  transform: translateY(16px) scale(.97);
  opacity: 0;
  transition: transform var(--dur-3) var(--ease-spring), opacity var(--dur-2);
}
.bp-collab-modal-back.open .bp-collab-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Modal head */
.bp-collab-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--accent-tint), transparent);
}
.bp-collab-modal-head-inner { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bp-collab-modal-title {
  font-family: var(--font-serif);
  font-size: var(--t-xl);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.bp-collab-modal-sub {
  font-size: var(--t-xs);
  color: var(--ink-3);
  letter-spacing: .02em;
}
.bp-collab-modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--ink-3);
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  transition: background var(--dur-1), color var(--dur-1);
}
.bp-collab-modal-close:hover { background: var(--surface-2); color: var(--ink); }

/* Modal body */
.bp-collab-modal-body { padding: 22px 22px 10px; }

/* Modal footer */
.bp-collab-modal-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   FORM ELEMENTS inside modals
   ============================================================ */
.bp-collab-field-label {
  display: block;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
  font-variant-caps: all-small-caps;
}
.bp-collab-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--t-md);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
  margin-bottom: 14px;
}
.bp-collab-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}
.bp-collab-input::placeholder { color: var(--ink-3); }

.bp-collab-select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  margin-bottom: 14px;
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
}
.bp-collab-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}

.bp-collab-field-row { margin-bottom: 14px; }

/* Buttons */
.bp-collab-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--r-md);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  transition: background var(--dur-1), border-color var(--dur-1);
  white-space: nowrap;
}
.bp-collab-modal-btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.bp-collab-modal-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.bp-collab-modal-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.bp-collab-modal-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.bp-collab-modal-btn:disabled { opacity: .45; cursor: default; pointer-events: none; }

/* ============================================================
   6-DIGIT CODE DISPLAY (shown after starting a session)
   ============================================================ */
.bp-collab-code-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 0 10px;
}
.bp-collab-code-display-label {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.bp-collab-code-digits-big {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: .35em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-family: var(--font-sans);
  /* Subtle separator between first 3 and last 3 */
  padding: 14px 22px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft, rgba(122,31,43,.15));
  border-radius: var(--r-lg);
  user-select: all;
}
.bp-collab-code-digits-sep {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--ink-3);
  letter-spacing: 0;
}
.bp-collab-code-copy-btn {
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--accent);
  cursor: pointer;
  transition: background var(--dur-1), border-color var(--dur-1);
}
.bp-collab-code-copy-btn:hover { background: var(--surface-3); border-color: var(--accent); }
.bp-collab-code-hint {
  font-size: var(--t-xs);
  color: var(--ink-3);
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
}

/* ============================================================
   6-DIGIT CODE INPUT (join modal) — individual digit boxes
   ============================================================ */
.bp-collab-digits-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 18px;
}
.bp-collab-digit {
  width: 48px;
  height: 58px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  caret-color: var(--accent);
  transition: border-color var(--dur-1), box-shadow var(--dur-1), background var(--dur-1);
  -webkit-appearance: none;
  appearance: none;
}
.bp-collab-digit:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
  background: var(--accent-tint);
}
.bp-collab-digit.filled {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent);
}
.bp-collab-digit.error {
  border-color: #c0392b;
  background: rgba(192,57,43,.06);
  animation: bp-collab-shake .35s ease;
}
@keyframes bp-collab-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  60%      { transform: translateX(5px); }
}

/* Separator between digit groups */
.bp-collab-digit-sep {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--ink-3);
  user-select: none;
  padding: 0 2px;
}

/* Error / info messages below digit input */
.bp-collab-code-error {
  font-size: var(--t-sm);
  color: #c0392b;
  text-align: center;
  min-height: 1.2em;
  margin-top: -10px;
  margin-bottom: 6px;
  font-weight: 500;
}
.bp-collab-code-info {
  font-size: var(--t-xs);
  color: var(--ink-3);
  text-align: center;
  margin-top: -6px;
  margin-bottom: 10px;
}

/* ============================================================
   ANNOTATION OVERLAYS — Reader verse layer
   ============================================================ */

/* Annotation count badge on a verse */
.bp-collab-ann-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: .02em;
  vertical-align: middle;
  margin-left: 5px;
  cursor: pointer;
  transition: transform var(--dur-1), background var(--dur-1);
  flex-shrink: 0;
}
.bp-collab-ann-badge:hover { transform: scale(1.12); background: var(--accent-hover); }

/* Verse highlight glow — left border per member */
.bp-collab-verse-highlight {
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 2px;
  pointer-events: none;
}

/* Focus chip — shows which verse another member is reading */
.bp-collab-focus-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: .58rem;
  font-weight: 700;
  color: #fff;
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: .88;
  animation: bp-collab-fadein var(--dur-3) var(--ease);
}
@keyframes bp-collab-fadein {
  from { opacity: 0; transform: translateY(-50%) scale(.7); }
  to   { opacity: .88; transform: translateY(-50%) scale(1); }
}

/* Inline annotation thread — appears below a verse when open */
.bp-collab-ann-thread {
  margin: 4px 8px 8px 28px;
  border-left: 2px solid var(--border);
  padding-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: bp-collab-fadein var(--dur-2);
}
.bp-collab-ann-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 9px 11px;
  position: relative;
}
.bp-collab-ann-item-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}
.bp-collab-ann-author-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: .6rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.bp-collab-ann-author-name {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--ink-2);
}
.bp-collab-ann-type-tag {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--r-xs);
  margin-left: auto;
}
/* Type tag colors */
.bp-collab-ann-type-tag.exegetical    { background: rgba(41,128,185,.12); color: #2980b9; }
.bp-collab-ann-type-tag.cross_ref     { background: rgba(39,174,96,.12);  color: #27ae60; }
.bp-collab-ann-type-tag.question      { background: rgba(230,126,34,.12); color: #e67e22; }
.bp-collab-ann-type-tag.key_claim     { background: rgba(155,89,182,.12); color: #8e44ad; }
.bp-collab-ann-type-tag.observation   { background: rgba(52,73,94,.1);    color: var(--ink-2); }
.bp-collab-ann-type-tag.interpretation{ background: rgba(22,160,133,.12); color: #16a085; }
.bp-collab-ann-type-tag.application   { background: rgba(122,31,43,.1);   color: var(--accent); }

.bp-collab-ann-body {
  font-size: var(--t-sm);
  line-height: 1.6;
  color: var(--ink);
}
.bp-collab-ann-ts {
  font-size: .62rem;
  color: var(--ink-3);
  margin-top: 4px;
}

/* Add annotation button — appears on verse hover */
.bp-collab-add-ann-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 3px 7px;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--dur-1), border-color var(--dur-1);
  margin-left: 5px;
  vertical-align: middle;
}
/* Show on verse hover */
.hub-scripture .verse:hover .bp-collab-add-ann-btn { opacity: 1; }
.bp-collab-add-ann-btn:hover { border-color: var(--accent); }

/* ============================================================
   BUILDER — Section lock badges
   ============================================================ */
.bp-collab-section-lock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--t-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  color: #fff;
  margin-left: 8px;
  vertical-align: middle;
  animation: bp-collab-fadein var(--dur-2);
  pointer-events: none;
}
.bp-collab-section-lock svg { flex-shrink: 0; }

/* Suggest mode — amber highlight over section body */
.bp-collab-suggest-overlay {
  position: relative;
}
.bp-collab-suggest-overlay::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--r-sm);
  border: 2px dashed #e67e22;
  pointer-events: none;
  opacity: .6;
}
.bp-collab-suggest-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--t-xs);
  font-weight: 700;
  color: #e67e22;
  background: rgba(230,126,34,.1);
  border: 1px solid rgba(230,126,34,.3);
  border-radius: var(--r-sm);
  padding: 2px 7px;
  margin-left: 6px;
}

/* Accept / Reject suggestion buttons */
.bp-collab-suggest-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.bp-collab-suggest-accept,
.bp-collab-suggest-reject {
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--dur-1);
}
.bp-collab-suggest-accept {
  background: rgba(39,174,96,.12);
  color: #27ae60;
  border: 1px solid rgba(39,174,96,.3);
}
.bp-collab-suggest-accept:hover { background: rgba(39,174,96,.22); }
.bp-collab-suggest-reject {
  background: rgba(192,57,43,.08);
  color: #c0392b;
  border: 1px solid rgba(192,57,43,.2);
}
.bp-collab-suggest-reject:hover { background: rgba(192,57,43,.16); }

/* Outline section presence dot */
.bp-collab-outline-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ============================================================
   RESEARCH TRAY — pin button added to tool cards
   ============================================================ */
.bp-collab-pin-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 3px 8px;
  cursor: pointer;
  transition: border-color var(--dur-1), background var(--dur-1);
  white-space: nowrap;
}
.bp-collab-pin-btn:hover { border-color: var(--accent); background: var(--accent-soft, rgba(122,31,43,.12)); }
.bp-collab-pin-btn.pinned {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================================
   COLLAB PANEL DRAWER SHELL
   (content populated by shared/collab-panel.js)
   ============================================================ */
.bp-collab-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2);
}
.bp-collab-panel-overlay.open { opacity: 1; pointer-events: auto; }

.bp-collab-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 9001;
  width: 400px;
  max-width: 94vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-3) var(--ease);
  box-shadow: var(--shadow-3);
  font-family: var(--font-sans);
  color: var(--ink);
}
.bp-collab-panel.open { transform: translateX(0); }

/* Panel header */
.bp-collab-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.bp-collab-panel-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--t-lg);
  color: var(--accent);
  flex: 1;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-collab-panel-close {
  width: 30px;
  height: 30px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-1), color var(--dur-1);
}
.bp-collab-panel-close:hover { background: var(--surface-3); color: var(--ink); }

/* Panel tabs */
.bp-collab-panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.bp-collab-panel-tab {
  flex: 1;
  padding: 10px 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--ink-3);
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--dur-1), border-color var(--dur-1);
  min-height: 42px;
  position: relative;
  white-space: nowrap;
}
.bp-collab-panel-tab:hover { color: var(--ink); }
.bp-collab-panel-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.bp-collab-panel-tab-badge {
  position: absolute;
  top: 6px;
  right: 4px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: .58rem;
  font-weight: 700;
  padding: 1px 4px;
  min-width: 14px;
  text-align: center;
  line-height: 1.3;
}

/* Panel body */
.bp-collab-panel-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px;
}
.bp-collab-panel-body::-webkit-scrollbar { width: 4px; }
.bp-collab-panel-body::-webkit-scrollbar-track { background: transparent; }
.bp-collab-panel-body::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 2px;
}

/* Panel pane — shown/hidden per active tab */
.bp-collab-pane { display: none; }
.bp-collab-pane.active { display: block; }

/* Panel empty state */
.bp-collab-panel-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-3);
  font-size: var(--t-sm);
  line-height: 1.6;
}
.bp-collab-panel-empty-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 8px;
  opacity: .5;
}

/* Mobile — panel goes full width */
@media (max-width: 480px) {
  .bp-collab-panel { width: 100vw; max-width: 100vw; border-left: none; }
}

/* ============================================================
   WRAP-UP MODAL
   ============================================================ */
.bp-collab-wrapup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 8px;
}
.bp-collab-wrapup-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--dur-1);
}
.bp-collab-wrapup-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.bp-collab-wrapup-check {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.bp-collab-wrapup-item-body { flex: 1; min-width: 0; }
.bp-collab-wrapup-item-title {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}
.bp-collab-wrapup-item-sub {
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-bottom: 6px;
}
.bp-collab-wrapup-item-ctrl {
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
}
.bp-collab-wrapup-item-ctrl:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}

/* Session stats in wrap-up header */
.bp-collab-session-stats {
  display: flex;
  gap: 16px;
  padding: 10px 0 16px;
  flex-wrap: wrap;
}
.bp-collab-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bp-collab-stat-val {
  font-size: var(--t-xl);
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.bp-collab-stat-lbl {
  font-size: var(--t-xs);
  color: var(--ink-3);
  font-weight: 500;
}

/* ============================================================
   TYPING INDICATOR in discussion
   ============================================================ */
.bp-collab-typing {
  font-size: var(--t-xs);
  color: var(--ink-3);
  font-style: italic;
  padding: 4px 0;
  min-height: 1.4em;
}
.bp-collab-typing-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-3);
  margin: 0 1px;
  vertical-align: middle;
  animation: bp-collab-typing-bounce 1.2s ease-in-out infinite;
}
.bp-collab-typing-dot:nth-child(2) { animation-delay: .2s; }
.bp-collab-typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes bp-collab-typing-bounce {
  0%,80%,100% { transform: translateY(0); }
  40%          { transform: translateY(-5px); }
}

/* ============================================================
   PASSAGE SYNC TOAST (Reader)
   ============================================================ */
.bp-collab-sync-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-3);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink);
  z-index: 9500;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2), transform var(--dur-3) var(--ease);
  white-space: nowrap;
  max-width: 90vw;
}
.bp-collab-sync-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.bp-collab-sync-follow-btn {
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background var(--dur-1);
  white-space: nowrap;
}
.bp-collab-sync-follow-btn:hover { background: var(--accent-hover); }

/* ============================================================
   PHASE 7-9 ADDITIONS
   Explorer pin buttons, Strong's/WordStudy pin buttons,
   Atlas popup pin, Bring Your Study modal
   ============================================================ */

/* ---- Explorer: + Session pin button on verse rows / topic cards ---- */
.exp-collab-pin-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  font: 600 10px var(--font-sans);
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--r-xs, 4px);
  cursor: pointer;
  flex-shrink: 0;
  align-self: center;
  transition: background var(--dur-1), color var(--dur-1);
  margin-left: 4px;
}
.exp-collab-pin-btn:hover {
  background: var(--accent);
  color: #fff;
}
.exp-collab-pin-topic {
  font-size: 9px;
  padding: 2px 7px;
}

/* ---- Strong's lexicon / verse card pin button ---- */
.collab-lex-pin,
.collab-vcard-pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font: 600 11px var(--font-sans);
  background: var(--accent-tint, rgba(122, 31, 43, .1));
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm, 5px);
  cursor: pointer;
  transition: background var(--dur-1), color var(--dur-1);
  margin-left: 4px;
}
.collab-lex-pin:hover,
.collab-vcard-pin:hover {
  background: var(--accent);
  color: #fff;
}

/* ---- Word Study pin button ---- */
.collab-ws-pin {
  margin-left: 8px;
}

/* ================================================================
   BRING YOUR STUDY MODAL
   ================================================================ */
.bys-modal {
  max-width: 560px;
  width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bys-header {
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
}
.bys-title {
  font-family: var(--font-serif);
  font-size: var(--t-xl, 1.25rem);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}
.bys-sub {
  font-size: var(--t-sm, .85rem);
  color: var(--ink-3);
  margin: 0;
  line-height: 1.45;
}

.bys-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bys-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bys-section-label {
  font: 700 11px var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-3);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.bys-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bys-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm, 5px);
  cursor: pointer;
  transition: background var(--dur-1);
  border: 1px solid transparent;
}
.bys-item:hover {
  background: var(--surface-2);
  border-color: var(--border);
}
.bys-item input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.bys-item-title {
  flex: 1;
  font-size: var(--t-sm, .85rem);
  color: var(--ink);
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bys-mode-select {
  flex-shrink: 0;
  font: 600 11px var(--font-sans);
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs, 3px);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.bys-readonly-badge {
  font: 600 10px var(--font-sans);
  color: var(--ink-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xs, 3px);
  padding: 2px 7px;
  flex-shrink: 0;
}

.bys-empty {
  font-size: var(--t-sm);
  color: var(--ink-3);
  padding: 8px 0;
  font-style: italic;
}
.bys-empty-state {
  text-align: center;
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.bys-empty-icon {
  font-size: 2.5rem;
  opacity: .5;
}
.bys-empty-msg {
  font-size: var(--t-sm);
  color: var(--ink-3);
  max-width: 320px;
  line-height: 1.5;
}

.bys-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ================================================================
   DARK THEME OVERRIDES (Bring Your Study)
   ================================================================ */
[data-theme-early="dark"] .bys-mode-select {
  background: var(--surface-2);
  color: var(--ink);
}

/* ================================================================
   COLLAB PANEL v2 — REDESIGNED COMPONENT STYLES
   bpcp-* prefix for all new panel internals
   ================================================================ */

/* ---- Panel header improvements ---- */
.bp-collab-panel-head {
  background: linear-gradient(180deg, var(--accent-tint), transparent 100%);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px 13px;
}
.bp-collab-panel-head-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.bp-collab-panel-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27ae60;
  flex-shrink: 0;
  animation: bp-collab-pulse 2.2s ease-in-out infinite;
}

/* ---- Tab improvements ---- */
.bp-collab-tab-icon {
  display: block;
  font-size: .9rem;
  line-height: 1;
  margin-bottom: 1px;
}
.bp-collab-tab-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1;
}
.bp-collab-panel-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px 6px;
  min-height: 48px;
}

/* ---- Panel body — no padding, each pane manages its own ---- */
.bp-collab-panel-body { padding: 0; }

/* ---- Outline tab ---- */
.bpcp-outline-meta {
  padding: 12px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bpcp-outline-meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bpcp-meta-label {
  font: 700 10px var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.bpcp-meta-value {
  font-size: var(--t-sm);
  color: var(--ink-2);
  line-height: 1.45;
}
.bpcp-meta-passage {
  font-family: var(--font-serif);
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--accent);
}
.bpcp-outline-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 14px;
}
.bpcp-outline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--r-md);
  margin-bottom: 6px;
  transition: border-color .12s;
}
.bpcp-outline-item.completed {
  border-left-color: var(--accent);
  opacity: .7;
}
.bpcp-outline-check {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.bpcp-outline-bullet {
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 20px;
  text-align: center;
  padding-top: 1px;
  flex-shrink: 0;
}
.bpcp-outline-text { flex: 1; min-width: 0; }
.bpcp-outline-title {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.bpcp-outline-item.completed .bpcp-outline-title {
  text-decoration: line-through;
  color: var(--ink-3);
  font-weight: 400;
}
.bpcp-outline-notes {
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-top: 2px;
}
.bpcp-outline-add {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.bpcp-inline-input {
  margin-bottom: 0 !important;
  flex: 1;
  font-size: var(--t-sm) !important;
  padding: 8px 10px !important;
}
.bpcp-outline-add-btn {
  flex-shrink: 0;
  padding: 8px 14px !important;
  font-size: var(--t-sm) !important;
}
.bpcp-panel-hint {
  font-size: var(--t-xs);
  color: var(--ink-3);
  padding: 10px 14px;
  margin: 0;
  line-height: 1.5;
}

/* ---- Discussion tab ---- */
.bpcp-disc-feed {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  max-height: calc(100vh - 380px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bpcp-disc-msg {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  animation: bp-collab-fadein .15s ease;
}
.bpcp-disc-msg-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.bpcp-disc-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .58rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.bpcp-disc-author {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--ink-2);
}
.bpcp-disc-type-tag {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--r-xs);
  border: 1px solid transparent;
}
.bpcp-disc-time {
  margin-left: auto;
  font-size: .62rem;
  color: var(--ink-3);
}
.bpcp-disc-body {
  font-size: var(--t-sm);
  line-height: 1.6;
  color: var(--ink);
}
.bpcp-disc-composer {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.bpcp-disc-type-sel {
  margin-bottom: 0 !important;
  font-size: var(--t-xs) !important;
  padding: 6px 8px !important;
}
.bpcp-disc-ta {
  resize: vertical;
  min-height: 72px;
  font-family: var(--font-sans);
  font-size: var(--t-sm) !important;
  margin-bottom: 0 !important;
}
.bpcp-disc-send-btn { width: 100%; }

/* ---- Research tab ---- */
.bpcp-research-inner {
  padding: 10px 0;
}
.bpcp-research-section {
  padding: 0 14px 14px;
}
.bpcp-research-section + .bpcp-research-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.bpcp-section-label {
  font: 700 10px var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
  margin-bottom: 8px;
}

/* Shared resource cards */
.bpcp-shared-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.bpcp-shared-card:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.bpcp-shared-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  color: var(--accent);
}
.bpcp-shared-info { flex: 1; min-width: 0; }
.bpcp-shared-title {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bpcp-shared-meta {
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.bpcp-collab-badge {
  font: 700 10px var(--font-sans);
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  border-radius: var(--r-xs);
  padding: 1px 6px;
  letter-spacing: .04em;
}
.bpcp-readonly-badge {
  font: 600 10px var(--font-sans);
  color: var(--ink-3);
  background: var(--surface-3, var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 1px 6px;
}
.bpcp-open-btn {
  flex-shrink: 0;
  font: 600 11px var(--font-sans);
  color: var(--accent);
  background: none;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 4px 9px;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.bpcp-open-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* Tray item cards */
.bpcp-tray-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 6px;
}
.bpcp-tray-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--accent-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: var(--accent);
}
.bpcp-tray-info { flex: 1; min-width: 0; }
.bpcp-tray-ref {
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bpcp-tray-label {
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-bottom: 3px;
}
.bpcp-tray-body {
  font-size: var(--t-sm);
  color: var(--ink);
  line-height: 1.45;
  max-height: 58px;
  overflow: hidden;
}
.bpcp-tray-meta {
  font-size: .62rem;
  color: var(--ink-3);
  margin-top: 4px;
}

/* AI result cards */
.bpcp-ai-card {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 8px;
}
.bpcp-ai-question {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}
.bpcp-ai-body {
  font-size: var(--t-sm);
  color: var(--ink);
  line-height: 1.55;
  max-height: 120px;
  overflow: hidden;
}

/* ---- Mirror tab ---- */
.bpcp-mirror-empty {
  text-align: center;
  padding: 48px 20px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.bpcp-mirror-empty-icon {
  font-size: 2.5rem;
  color: var(--accent);
  opacity: .4;
}
.bpcp-mirror-empty-title {
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--ink-2);
}
.bpcp-mirror-empty-sub {
  font-size: var(--t-sm);
  color: var(--ink-3);
  line-height: 1.6;
  max-width: 300px;
  margin: 0;
}
.bpcp-mirror-chooser {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.bpcp-mirror-chooser-label {
  font: 600 11px var(--font-sans);
  color: var(--ink-3);
  white-space: nowrap;
}
.bpcp-mirror-sel {
  flex: 1;
  margin-bottom: 0 !important;
  font-size: var(--t-xs) !important;
  padding: 6px 8px !important;
}
.bpcp-mirror-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 14px 20px;
}
.bpcp-mirror-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  gap: 10px;
}
.bpcp-mirror-doc-title {
  font-family: var(--font-serif);
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bpcp-mirror-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 700 10px var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #27ae60;
  background: rgba(39,174,96,.1);
  border: 1px solid rgba(39,174,96,.3);
  border-radius: var(--r-xs);
  padding: 2px 8px;
  flex-shrink: 0;
}
.bpcp-mirror-live-badge .bp-collab-pulse {
  background: #27ae60;
  width: 6px;
  height: 6px;
}
.bpcp-mirror-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bpcp-mirror-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.bpcp-mirror-sec-type {
  font: 700 9px var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 3px;
}
.bpcp-mirror-sec-title {
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.35;
}
.bpcp-mirror-sec-body {
  font-size: var(--t-sm);
  color: var(--ink-2);
  line-height: 1.6;
}
.bpcp-mirror-sec-verses {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bpcp-mirror-verse {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 6px 10px;
  background: var(--surface);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.bpcp-mirror-verse-ref {
  font: 700 10px var(--font-sans);
  color: var(--accent);
  flex-shrink: 0;
  letter-spacing: .04em;
}
.bpcp-mirror-verse-text {
  font-family: var(--font-serif);
  font-size: var(--t-sm);
  color: var(--ink-2);
  line-height: 1.5;
}
.bpcp-mirror-empty-doc {
  padding: 18px 0;
  color: var(--ink-3);
  font-size: var(--t-sm);
  line-height: 1.6;
}
.bpcp-mirror-hint {
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-top: 8px;
}
/* ---- Mirror: collaborative editing hint + editable textareas ---- */
.bpcp-mirror-collab-hint {
  font-size: var(--t-xs);
  color: var(--accent);
  margin-top: 4px;
  opacity: 0.85;
}
.bpcp-mirror-notes-ta {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: var(--t-sm);
  font-family: inherit;
  line-height: 1.6;
  color: var(--ink-1);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  resize: vertical;
  min-height: 72px;
  margin-top: 6px;
  transition: border-color .12s, box-shadow .12s;
}
.bpcp-mirror-notes-ta:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-tint, rgba(100,100,240,.15));
}

/* ---- Presence tab ---- */
.bpcp-presence-list {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bpcp-presence-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color .12s;
}
.bpcp-presence-row.is-me {
  background: var(--accent-tint);
  border-color: var(--accent);
}
.bpcp-presence-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.bpcp-presence-info { flex: 1; min-width: 0; }
.bpcp-presence-name {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.bpcp-you-chip {
  font-size: .62rem;
  font-weight: 400;
  color: var(--ink-3);
}
.bpcp-role-chip {
  font-size: .62rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 1px 5px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.bpcp-presence-context {
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-top: 2px;
}
.bpcp-follow-btn {
  flex-shrink: 0;
  font: 600 11px var(--font-sans);
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 5px 10px;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.bpcp-follow-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* BYS section hint */
.bys-section-hint {
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin: -2px 0 4px;
  font-style: italic;
}
