/* Keep touch annotation actions out of the native text-selection menu's area.
   Native copying and selection handles remain available on the screenplay. */
.selection-bar{max-width:calc(100vw - 20px);isolation:isolate}
.selection-context{display:none;min-width:0}
.selection-actions{display:flex;align-items:center;gap:2px}
.selection-bar button{min-height:44px;min-width:44px}
.selection-bar button:focus-visible{outline-color:#c8e7de;outline-offset:-3px}
.selection-bar.is-docked{
  left:max(12px,env(safe-area-inset-left))!important;
  right:max(12px,env(safe-area-inset-right));
  top:auto!important;
  bottom:calc(10px + env(safe-area-inset-bottom) + var(--selection-keyboard-inset,0px));
  width:auto;max-width:none;display:flex;flex-direction:column;gap:8px;
  padding:12px;border:1px solid #ffffff24;border-radius:12px;
  box-shadow:0 8px 30px #102d3c30;
}
.selection-bar.is-docked .selection-context{display:grid;gap:5px;padding:0 3px}
#selection-count{font:600 11px/1.5 var(--ui);color:#c8dddf}
#selection-preview{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:12px/1.7 var(--ui);color:#f2f7f7;min-width:0}
.selection-bar.is-docked .selection-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;gap:6px;width:100%}
.selection-bar.is-docked [data-selection="highlight"],.selection-bar.is-docked [data-selection="note"]{border:1px solid #ffffff30;background:#ffffff0d;font-size:13px;padding:10px 8px}
.selection-bar.is-docked [data-selection="note"]{background:#e0eeea;color:#173a49;border-color:#e0eeea;font-weight:600}
.selection-bar.is-docked .selection-close{font-size:22px;font-weight:400;border-left:0;padding:6px}
body.has-mobile-selection .reading-toolbar{visibility:hidden;pointer-events:none}
body.has-mobile-selection .cloud-update-prompt{bottom:calc(142px + env(safe-area-inset-bottom) + var(--selection-keyboard-inset,0px))}
html:has(body.has-mobile-selection){scroll-padding-bottom:calc(140px + env(safe-area-inset-bottom))}
@media print{.selection-bar{display:none!important}}
