/* ===== Notes as bubbles in the margin (notebubbles.js): locked = only you, open = shared / others' notes ===== */
/* the old open note boxes and passage-comment counts give way to the bubble */
html body #art .mnote,html body #art .pbub{display:none!important}

.rbub{all:unset;box-sizing:border-box;position:absolute;z-index:5;display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 9px 0 7px;
  border-radius:10px;cursor:pointer;color:var(--ink3);background:transparent;transition:color .15s,background .15s}
.rbub > .ic,.rbub > svg{width:19px;height:19px}
.rbub b{font:500 14px/1 "EB Garamond",Georgia,serif;font-variant-numeric:lining-nums}
/* locked: your private note — a small lock rides on the bubble */
.rbub .rbub-lk{display:inline-grid;margin-left:-2px}
.rbub .rbub-lk :is(.ic,svg){width:12px;height:12px}
.rbub.mine{color:var(--ink2)}
.rbub.open.mine b{color:#A8352C}
@media (hover:hover){.rbub:hover{color:var(--ink);background:color-mix(in srgb,var(--ink) 6%,transparent)}}
.rbub.on{color:var(--ink);background:color-mix(in srgb,var(--ink) 8%,transparent)}
.rbub:focus-visible{outline:2px solid #A8352C;outline-offset:2px}

/* the thread beside the bubble (a sheet from the bottom when there's no margin) */
.rbthread{position:absolute;z-index:46;width:min(380px,calc(100vw - 32px));max-height:min(70vh,640px);overflow:auto;padding:16px 16px 12px;
  background:var(--rb-card,#FFFEFB);border:1px solid var(--rb-line,rgba(60,45,30,.12));border-radius:0;box-shadow:var(--rb-shadow,0 12px 32px -10px rgba(40,25,10,.28))}
.rbthread.sheet{position:fixed;left:0;right:0;bottom:0;top:auto;width:auto;max-height:72vh;border-radius:0}
.rbt-x{all:unset;position:absolute;top:8px;right:8px;width:30px;height:30px;display:grid;place-items:center;cursor:pointer;color:var(--ink3)}
.rbt-x :is(.ic,svg){width:17px;height:17px}
.rbt-q{margin:0 34px 14px 0;padding:2px 0 2px 10px;border-left:3px solid #E7C46A;font:italic 400 15.5px/1.45 "EB Garamond",Georgia,serif;color:var(--ink2)}
.rbt-me{padding:12px;margin:0 0 10px;border-radius:0;background:color-mix(in srgb,var(--ink) 4%,transparent)}
.rbt-me header{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.rbt-me header b{font:600 15px "EB Garamond",Georgia,serif;color:var(--ink)}
.rbt-me .rbt-av,.rbt-me .av{width:24px!important;height:24px!important;font-size:12px!important;flex:none}
.rbt-vis{margin-left:auto;display:inline-flex;align-items:center;gap:4px;font:400 13px "EB Garamond",Georgia,serif;color:var(--ink3)}
.rbt-vis.pub{color:#2F6B45}
.rbt-vis :is(.ic,svg){width:13px;height:13px}
.rbt-me p{margin:0;font:400 17px/1.45 "EB Garamond",Georgia,serif;color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere}
.rbt-me footer{display:flex;gap:16px;margin-top:10px}
.rbt-me footer button{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:5px;font:500 14px "EB Garamond",Georgia,serif;color:var(--ink3)}
.rbt-me footer :is(.ic,svg){width:14px;height:14px}
@media (hover:hover){.rbt-me footer button:hover{color:var(--ink)}}
.rbt-none,.rbt-alone{margin:4px 0 8px;font:italic 400 15px/1.4 "EB Garamond",Georgia,serif;color:var(--ink3)}
.rbt-more{all:unset;cursor:pointer;display:flex;align-items:center;gap:7px;width:100%;box-sizing:border-box;padding:10px 2px;border-top:1px solid var(--rb-line,rgba(60,45,30,.12));
  font:500 15px "EB Garamond",Georgia,serif;color:#A8352C}
.rbt-more :is(.ic,svg){width:16px;height:16px}
.rbt-others[hidden]{display:none}
.rbt-others .cm{padding:10px 0;border-top:1px solid var(--rb-line,rgba(60,45,30,.1))}
.rbt-others .cm .quote{display:none}
html.night .rbt-vis.pub{color:#7BC593}
.rbt-mecm{position:relative;padding:4px 12px 2px;margin:0 0 10px;border-radius:0;background:color-mix(in srgb,var(--ink) 4%,transparent)}
.rbt-mecm > .rbt-vis{position:absolute;top:12px;right:12px}
.rbt-mecm .cm .quote{display:none}
.rbt-mecm{padding-top:30px!important}
.rbt-mecm > .rbt-vis{top:10px!important;left:12px;right:auto!important;margin:0}

/* the highlight card's note button on a passage that has notes: their count beside it (the user, 2026-11-19) */
#selbar [data-rb="note"] .rb-n{font:500 13px/1 "EB Garamond",Georgia,serif;color:var(--ink2,#5A544C);margin-left:-3px;font-variant-numeric:lining-nums}
/* "Add a note" under your notes: same row style as "See other notes" */
.rbthread .rbt-addnote{border-top:0}
html body #selbar [data-rb="note"].rb-hasn{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:3px;width:auto!important;padding-left:8px;padding-right:8px}
