/* =====================================================================
   Edit, in the Bible reader (js/bible-editor.js): the choice drawn over the text and its two handles; the dock at the
   foot of the screen, with its head (the choice's name, the keys, Extend, Verse, Undo, Redo, Done), its tabs and their
   tools; the sheets it opens (a new link, a table's headers, a link's card, the keys); and the colours of the swatches,
   here and in the bar of chosen verses (js/bible-tools.js), one to each of the store's ten (js/bible-study.js). Read
   after css/reader.css, whose colour tokens (--hl-, --bd-, --hs-) it uses.
   ===================================================================== */

/* ---- the ten colours, for a swatch or a chip: its wash (--sw-hl), its band (--sw-bd), and the colour itself (--sw) ---- */
.bb-sw[data-hl="yellow"], .bb-sw[data-c="yellow"], .bbe-chip[data-c="yellow"], .bbe-card[data-c="yellow"] { --sw: var(--hs-yellow); --sw-hl: var(--hl-yellow); --sw-bd: var(--bd-yellow); }
.bb-sw[data-hl="green"], .bb-sw[data-c="green"], .bbe-chip[data-c="green"], .bbe-card[data-c="green"] { --sw: var(--hs-green); --sw-hl: var(--hl-green); --sw-bd: var(--bd-green); }
.bb-sw[data-hl="blue"], .bb-sw[data-c="blue"], .bbe-chip[data-c="blue"], .bbe-card[data-c="blue"] { --sw: var(--hs-blue); --sw-hl: var(--hl-blue); --sw-bd: var(--bd-blue); }
.bb-sw[data-hl="pink"], .bb-sw[data-c="pink"], .bbe-chip[data-c="pink"], .bbe-card[data-c="pink"] { --sw: var(--hs-pink); --sw-hl: var(--hl-pink); --sw-bd: var(--bd-pink); }
.bb-sw[data-hl="orange"], .bb-sw[data-c="orange"], .bbe-chip[data-c="orange"], .bbe-card[data-c="orange"] { --sw: var(--hs-orange); --sw-hl: var(--hl-orange); --sw-bd: var(--bd-orange); }
.bb-sw[data-hl="purple"], .bb-sw[data-c="purple"], .bbe-chip[data-c="purple"], .bbe-card[data-c="purple"] { --sw: var(--hs-purple); --sw-hl: var(--hl-purple); --sw-bd: var(--bd-purple); }
.bb-sw[data-hl="red"], .bb-sw[data-c="red"], .bbe-chip[data-c="red"], .bbe-card[data-c="red"] { --sw: var(--hs-red); --sw-hl: var(--hl-red); --sw-bd: var(--bd-red); }
.bb-sw[data-hl="teal"], .bb-sw[data-c="teal"], .bbe-chip[data-c="teal"], .bbe-card[data-c="teal"] { --sw: var(--hs-teal); --sw-hl: var(--hl-teal); --sw-bd: var(--bd-teal); }
.bb-sw[data-hl="brown"], .bb-sw[data-c="brown"], .bbe-chip[data-c="brown"], .bbe-card[data-c="brown"] { --sw: var(--hs-brown); --sw-hl: var(--hl-brown); --sw-bd: var(--bd-brown); }
.bb-sw[data-hl="gray"], .bb-sw[data-c="gray"], .bbe-chip[data-c="gray"], .bbe-card[data-c="gray"] { --sw: var(--hs-gray); --sw-hl: var(--hl-gray); --sw-bd: var(--bd-gray); }
/* a swatch: the wash it gives, rimmed in its colour so that the ten are told apart; chosen, ringed in it */
.bb-sw:not(.bb-sw-none) { border-color: color-mix(in srgb, var(--sw) 70%, transparent); background-image: linear-gradient(var(--sw-hl), var(--sw-hl)); }
.bb-sw:not(.bb-sw-none):hover { border-color: var(--sw); }
.bb-sw[aria-pressed="true"] { outline: 2px solid var(--sw, var(--ink)); outline-offset: 2px; }
.bb-sw:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bb-sw:disabled { opacity: 0.35; cursor: default; }
/* the shadow at the edge of a row that scrolls sideways, where it hides more: of the ink, so that it shows on the
   dark page as on the light */
.bbe, .bb-act-colors { --bbe-cue: color-mix(in srgb, var(--ink) 26%, transparent); }
/* the bar of chosen verses: its ten colours, each the size of a finger, in a row that scrolls sideways where it is too
   wide (with a shadow at the edge that hides more) */
.bb-act-colors { gap: 8px; margin: 0 -2px 4px; padding: 4px 2px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  background: linear-gradient(to right, var(--bg) 40%, transparent) left center / 28px 100% no-repeat local, linear-gradient(to left, var(--bg) 40%, transparent) right center / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--bbe-cue), transparent) left center / 12px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, var(--bbe-cue), transparent) right center / 12px 100% no-repeat scroll; }
.bb-act-colors::-webkit-scrollbar { display: none; }
.bb-act-colors .bb-sw { flex: none; width: 2.25rem; height: 2.25rem; }

/* ---- Edit in the reader's bar: pressed while it is on ---- */
.bb-tb[aria-pressed="true"], .bb-tb[aria-pressed="true"] .bb-tool-i { color: var(--rubric); }
.bb-tb[aria-pressed="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--rubric); }

/* ---- the text while Edit is on: a tap chooses a word; on a touch screen no press-and-hold callout, no double-tap zoom ---- */
.bb.is-editing .bb-text { cursor: text; }
/* the choice, washed, shows where the keys are at: no dotted ring round the whole text of its pane as well (with no
   choice, the ring shows where the focus is) */
.bb.is-editing .bbe-chosen .bb-text:focus-visible { outline: none; }
@media (pointer: coarse) {
  .bb.is-editing .bb-text { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
}
/* the choice, washed as a selection is, readable over the reader's own colours */
::highlight(bb-sel) { background-color: rgba(214, 226, 255, 0.26); }
:root[data-theme="light"] ::highlight(bb-sel) { background-color: rgba(40, 82, 170, 0.2); }
.bb-t.is-esel { background-color: rgba(214, 226, 255, 0.18); }
:root[data-theme="light"] .bb-t.is-esel { background-color: rgba(40, 82, 170, 0.14); }

/* the handles at the ends of the choice: a rubric stem the height of the line, and a round grip (above the start,
   below the end) with a ring around it to take the finger; a tap on either, not a drag, is a tap on the words beneath
   (js/bible-editor.js), so that the line next to the choice can still be tapped */
.bbe-h { position: fixed; z-index: 37; left: 0; top: 0; width: 2px; margin-left: -1px; background: var(--rubric); pointer-events: none; }
.bbe-h[hidden] { display: none; }
.bbe-h-grip { position: absolute; left: 50%; width: 22px; height: 22px; margin-left: -11px; box-sizing: border-box; border: 2px solid var(--bg); border-radius: 50%; background: var(--rubric); box-shadow: 0 1px 5px var(--shadow); pointer-events: auto; touch-action: none; cursor: grab; }
.bbe-h-s .bbe-h-grip { top: -19px; }
.bbe-h-e .bbe-h-grip { bottom: -19px; }
.bbe-h-grip::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
body.bbe-dragging, body.bbe-dragging .bbe-h-grip { cursor: grabbing; }
body.bbe-dragging .bbe-h-grip { pointer-events: none; }        /* not in the way of the word looked for under it */
body.bbe-dragging .bb-text { -webkit-user-select: none; user-select: none; }

/* the cell bar (js/bible-editor.js): the cell's own tools in a strip just above the cell chosen in a table, as the
   dock draws its tools but smaller, beneath the handles (whose grips stay to be taken) and over the text; its shades
   in a row beneath, opened by Shade; × at its end puts it away. On a narrow screen its tools go on in a second row. */
/* the dock and the cell bar are tools packed to the width of a phone, laid out in EB Garamond and IM Fell's small
   capitals, narrower faces than Inter: their words are in Inter at the size whose small letters are 0.48 of it (Inter's
   own are 0.55), still taller than they were in the old faces, and the labels in the text's weight, not the semibold */
#bbEd, .bbe-cb { --caps-wt: 400; font-size-adjust: 0.48; }
.bbe-cb { position: fixed; z-index: 36; left: 0; top: 0; box-sizing: border-box; max-width: calc(100vw - 12px); padding: 2px; border: 1px solid var(--press); background: var(--bg); color: var(--ink); box-shadow: 0 6px 20px var(--shadow), 0 1px 4px var(--lift); }
.bbe-cb[hidden] { display: none; }
:where(.bbe-cb) button { font: inherit; border-radius: 0; box-shadow: none; -webkit-tap-highlight-color: transparent; }
.bbe-cb button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.bbe-cb svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.bbe-cb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1px; }
.bbe-cb-row[hidden] { display: none; }
.bbe-cb .bbe-t.bbe-cbt { flex: none; min-width: 2.6rem; height: 2.65rem; padding: 2px 3px 1px; font-size: 0.68rem; }
.bbe-cb .bbe-gap { margin: 6px 2px; }
.bbe-cb-x { flex: none; width: 2.2rem; height: 2.65rem; padding: 0; border: 0; background: none; font-size: 1.35rem; line-height: 1; color: var(--muted); cursor: pointer; }
.bbe-cb-sws { gap: 5px; padding: 4px 4px 3px; border-top: 1px solid var(--rule); }
body.bbe-dragging .bbe-cb { visibility: hidden; }
@media (hover: hover) { .bbe-cb-x:hover { color: var(--rubric); } }

/* ---- the dock ----
   On a wide screen it stands at the foot of the screen, above the site's bar, as the bar of chosen verses does; on a
   phone it is as wide as the screen, just above the site's bar, in the place of the row of study tools. Its head names
   the choice; beneath it the tabs, and two rows of tools at most (three on a phone held upright, on every tab). */
.bbe { position: fixed; z-index: 41; left: 50%; bottom: calc(var(--tk-real, var(--tk-h)) + 10px); transform: translateX(-50%); box-sizing: border-box; width: min(46rem, calc(100% - 16px)); border: 1px solid var(--press); background: var(--bg); color: var(--ink); box-shadow: 0 16px 44px var(--shadow), 0 2px 8px var(--lift); animation: bbe-in 0.18s ease-out; }
.bbe[hidden] { display: none; }
@keyframes bbe-in { from { opacity: 0; translate: 0 10px; } }
:where(.bbe) button { font: inherit; border-radius: 0; box-shadow: none; -webkit-tap-highlight-color: transparent; }        /* (no weight: a class of its own wins) */
.bbe button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.bbe svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }

/* the head: the choice's name, and the keys, Extend, Verse, Undo, Redo, Done */
.bbe-head { display: flex; align-items: center; gap: 2px; min-height: 2.95rem; padding: 0 5px 0 12px; border-bottom: 1px solid var(--rule); }
.bbe-name { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 0.4em; margin: 0 6px 0 0; overflow: hidden; white-space: nowrap; font-family: var(--caps); font-weight: var(--caps-wt); font-size: 1rem; letter-spacing: 0.01em; color: var(--rubric); }
/* the reference: the book, the only part ever cut short (js/bible-editor.js writes it short first), then the chapter
   and verses; the words quoted give way before it */
.bbe-ref { flex: 0 1 auto; display: flex; min-width: 0; }
.bbe-bk { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bbe-cv { flex: none; white-space: pre; }
.bbe-q { flex: 0 1000 auto; min-width: 0; padding-right: 0.15em; overflow: hidden; text-overflow: ellipsis; font-family: var(--text); font-style: normal; font-size: 1.04rem; letter-spacing: 0; color: var(--ink); }
.bbe-n { flex: none; font-size: 0.88em; color: var(--muted); }
.bbe-hint { font-family: var(--text); font-style: normal; font-size: 1.04rem; letter-spacing: 0; color: var(--muted); }
.bbe-hb { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 2.5rem; padding: 0 8px; border: 1px solid transparent; background: none; font-family: var(--caps); font-weight: var(--caps-wt); font-size: 0.86rem; letter-spacing: 0.01em; color: var(--ink); cursor: pointer; }
.bbe-hb svg { width: 17px; height: 17px; }
.bbe-ic { width: 2.5rem; padding: 0; }
.bbe-hb[aria-pressed="true"] { border-color: var(--rubric); color: var(--rubric); background: color-mix(in srgb, var(--rubric) 10%, transparent); }
.bbe-hb:disabled, .bbe-hb[aria-disabled="true"] { opacity: 0.32; cursor: default; }
.bbe-done { flex: none; margin-left: 4px; height: 2.5rem; padding: 0 13px; border: 1px solid var(--rubric); background: none; font-family: var(--caps); font-weight: var(--caps-wt); font-size: 0.92rem; letter-spacing: 0.01em; color: var(--rubric); cursor: pointer; }
/* the reader's marks hidden (Display): a line that says so, and the way to show them */
.bbe-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 0; padding: 4px 12px; border-bottom: 1px solid var(--rule); font-size: 0.92rem; font-style: normal; line-height: 1.3; color: var(--muted); }
.bbe-warn[hidden] { display: none; }
.bbe-warn button { min-height: 2.5rem; padding: 0 10px; border: 1px solid var(--rubric); background: none; font-family: var(--caps); font-weight: var(--caps-wt); font-style: normal; font-size: 0.86rem; letter-spacing: 0.01em; color: var(--rubric); cursor: pointer; }

/* the tabs */
.bbe-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
.bbe-tabs [role="tab"] { position: relative; min-width: 0; height: 2.35rem; padding: 0 2px; border: 0; background: none; font-family: var(--caps); font-weight: var(--caps-wt); font-size: 0.92rem; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); cursor: pointer; }
.bbe-tabs [aria-selected="true"] { color: var(--rubric); }
.bbe-tabs [aria-selected="true"]::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: -1px; height: 2px; background: var(--rubric); }

/* the tools: two rows at most, each scrolling sideways (with a shadow at the edge that hides more) where it is too wide
   (on a phone held upright, where none is: three) */
.bbe-body { padding: 5px 6px 6px; }
.bbe-p { display: flex; flex-direction: column; gap: 3px; min-height: calc(2 * 3rem + 3px); }
.bbe-p[hidden] { display: none; }
.bbe-row { display: flex; align-items: center; gap: 2px; min-height: 3rem; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  background: linear-gradient(to right, var(--bg) 40%, transparent) left center / 28px 100% no-repeat local, linear-gradient(to left, var(--bg) 40%, transparent) right center / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--bbe-cue), transparent) left center / 12px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, var(--bbe-cue), transparent) right center / 12px 100% no-repeat scroll; }
.bbe-row::-webkit-scrollbar { display: none; }
.bbe-t { flex: 1 0 auto; min-width: 3.5rem; height: 3rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 3px 5px 2px; border: 1px solid transparent; background: none; font-size: 0.8rem; line-height: 1.1; color: var(--ink); cursor: pointer; }
.bbe-t[hidden] { display: none; }
/* a row of the tabs that is the column's alone (Colour's Side: in the dock, the cell bar has it) */
.bbe-p .bbe-col-only { display: none; }
.bbe-tn { white-space: nowrap; }
.bbe-t[aria-pressed="true"], .bbe-t[aria-expanded="true"] { border-color: var(--rubric); color: var(--rubric); background: color-mix(in srgb, var(--rubric) 10%, transparent); }
.bbe-t:disabled, .bbe-step button:disabled, .bbe-chip:disabled, .bbe-t[aria-disabled="true"], .bbe-step button[aria-disabled="true"] { opacity: 0.32; cursor: default; }
.bbe-g { display: inline-block; height: 18px; font-family: var(--text); font-size: 1.08rem; line-height: 18px; letter-spacing: 0.02em; }
.bbe-g.is-b { font-weight: 700; }
.bbe-g.is-i { font-style: italic; }
.bbe-g.is-u { text-decoration: underline; text-underline-offset: 2px; }
.bbe-g.is-s { text-decoration: line-through; }
.bbe-g.is-pr { font-size: 2.1rem; line-height: 30px; height: 18px; overflow: visible; }
.bbe-gap { flex: 0 0 1px; align-self: stretch; margin: 7px 3px; background: var(--rule); }
/* a number made less or more: − , its value over its name, + ; each button the size of a finger */
.bbe-step { flex: 1 0 auto; display: inline-grid; grid-template-columns: 2.5rem minmax(2.6rem, auto) 2.5rem; height: 3rem; box-sizing: border-box; border: 1px solid color-mix(in srgb, var(--rule) 75%, transparent); }
.bbe-step button { padding: 0; border: 0; background: none; font-family: var(--text); font-size: 1.3rem; line-height: 1; color: var(--ink); cursor: pointer; }
.bbe-step [data-d="-1"] { border-right: 1px solid color-mix(in srgb, var(--rule) 75%, transparent); }
.bbe-step [data-d="1"] { border-left: 1px solid color-mix(in srgb, var(--rule) 75%, transparent); }
.bbe-step-v { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 5px; font-size: 0.8rem; line-height: 1.1; white-space: nowrap; }
.bbe-step-v b { font-size: 1.08rem; font-weight: 600; line-height: 18px; font-variant-numeric: lining-nums tabular-nums; color: var(--rubric); }
.bbe-step.is-off { opacity: 0.4; }
.bbe-step + .bbe-step { margin-left: 4px; }
/* a row of swatches, and on Colour its name before it (Band, Cell; Side, the column's alone) */
.bbe-sws { gap: 6px; padding: 0 4px; }
.bbe-lab { flex: none; width: 2.6rem; font-family: var(--caps); font-weight: var(--caps-wt); font-size: 0.8rem; letter-spacing: 0.01em; color: var(--muted); }
.bbe .bb-sw, .bbe-cb .bb-sw { flex: none; width: 2.25rem; height: 2.25rem; padding: 0; border: 1.5px solid var(--rule); border-radius: 50%; background-color: var(--bg); cursor: pointer; }
.bbe .bb-sw:not(.bb-sw-none), .bbe-cb .bb-sw:not(.bb-sw-none) { border-color: color-mix(in srgb, var(--sw) 75%, transparent); }
.bbe .bb-sw-none, .bbe-cb .bb-sw-none { display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--muted); }
/* a band (or a cell's shade): the pale wash it lays behind the lines, rimmed in its colour */
.bbe .bbe-band:not(.bb-sw-none), .bbe-cb .bbe-band:not(.bb-sw-none) { border-width: 2.5px; border-color: var(--sw); background-image: linear-gradient(var(--sw-bd), var(--sw-bd)); }
/* a swatch with nothing to do (the cells' shades, no cell chosen) */
.bbe .bb-sw[aria-disabled="true"], .bbe-cb .bb-sw[aria-disabled="true"] { opacity: 0.32; cursor: default; }
.bbe-note { margin: 0; padding: 2px 8px; font-size: 0.92rem; font-style: normal; line-height: 1.3; color: var(--muted); white-space: normal; }
/* the chiasm's letters, as keys */
.bbe-letters { gap: 3px; }
.bbe-t.bbe-l { flex: 1 0 2.5rem; min-width: 2.5rem; height: 2.6rem; border-color: color-mix(in srgb, var(--rule) 75%, transparent); font-family: var(--display); font-weight: 400; font-size: 1.3rem; }
.bbe-letters [data-ed="bank"] { flex: 1 0 auto; }
/* the link groups, as chips: the group's colour, its name, how many places */
.bbe-chips { display: flex; align-items: center; gap: 6px; padding: 0 2px; }
.bbe-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; max-width: 14rem; height: 2.35rem; padding: 0 10px; border: 1px solid var(--rule); background: none; font-size: 0.98rem; color: var(--ink); cursor: pointer; }
.bbe-chip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbe-chip-n { flex: none; font-size: 0.82rem; font-variant-numeric: lining-nums; color: var(--muted); }
.bbe-chip[aria-pressed="true"] { border-color: var(--sw); background: color-mix(in srgb, var(--sw) 16%, transparent); }
.bbe-dot { flex: none; display: inline-block; width: 0.72rem; height: 0.72rem; border-radius: 50%; background: var(--sw, var(--rubric)); }
.bbe-chip-row .bbe-note { padding: 0 4px; }
/* Search, My notes and Plans: on a phone only, where the dock stands over the row they are in */
.bbe-site { display: none; }
/* Table's second row, its cells' tools, drawn a little closer where the dock floats at the foot of a wide screen, so
   that Below, Move and Centre line fit beside them in sight */
@media (min-width: 781px) {
  #bbeP-table .bbe-row:first-of-type .bbe-t { min-width: 2.9rem; }
  #bbeP-table .bbe-row + .bbe-row .bbe-t { min-width: 3rem; }
}

/* a mouse's wheel turns a row too wide sideways (js/bible-editor.js); where a pointer hovers, a thin bar shows it too */
@media (hover: hover) and (pointer: fine) {
  .bbe-row, .bbe-p, .bb-act-colors { scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
}

/* only where a pointer hovers (not a finger, whose last tap would stay lit) */
@media (hover: hover) {
  .bbe-tabs [role="tab"]:not([aria-selected="true"]):hover, .bbe-set-tabs [role="tab"]:not([aria-selected="true"]):hover { color: var(--ink); }
  .bbe-hb:hover:not(:disabled, [aria-disabled="true"]) { border-color: var(--rule); color: var(--rubric); }
  .bbe-done:hover { background: color-mix(in srgb, var(--rubric) 12%, transparent); }
  .bbe-t:hover:not(:disabled, [aria-disabled="true"]) { border-color: var(--rule); color: var(--rubric); }
  .bbe-step button:hover:not(:disabled, [aria-disabled="true"]) { color: var(--rubric); background: color-mix(in srgb, var(--rubric) 8%, transparent); }
  .bbe-chip:hover:not(:disabled) { border-color: var(--sw); }
}

/* the page and the panes keep room at their foot, so that the last lines can be brought up above the dock */
body.bb-editing .page { padding-bottom: calc(var(--bbe-h, 12rem) + 1.5rem); }
body.bb-editing .bb.multi .bb-scroll { padding-bottom: calc(var(--bbe-h, 12rem) + 2rem); }
/* the player and marks shared in a link stand above it */
body.bb-editing #panel-bible .bb-audio, body.bb-editing #panel-bible .bb-shared { bottom: calc(var(--tk-real, var(--tk-h)) + var(--bbe-h, 12rem) + 18px); }

/* ---- a phone (or a window as narrow) ----
   The dock as wide as the screen, just above the site's bar, in the place of the row of study tools (css/reader.css);
   the panels stacked above it end where it begins, as they end above that row. */
@media (max-width: 780px) {
  .bbe { left: 0; right: 0; bottom: var(--tk-real, var(--tk-h)); transform: none; width: auto; padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); border: 0; border-top: 1px solid var(--press); box-shadow: 0 -12px 30px var(--shadow); }
  body.bb-editing .bb-rb-study { visibility: hidden; }
  body.bb-editing #panel-bible .bb-audio, body.bb-editing #panel-bible .bb-shared { bottom: calc(var(--tk-real, var(--tk-h)) + var(--bbe-h, 12rem) + 8px); }
  body.bb-editing #panel-bible .bb.multi .bb-work { height: calc(100vh - var(--tk-real, var(--tk-h, 0px)) - var(--bb-crumb-h, 0px) - var(--bb-rbar-h, 3.6rem) - var(--bbe-h, 12rem)); height: calc(100svh - var(--tk-real, var(--tk-h, 0px)) - var(--bb-crumb-h, 0px) - var(--bb-rbar-h, 3.6rem) - var(--bbe-h, 12rem)); }
  body.bb-editing .bb.multi .bb-scroll { padding-bottom: 3rem; }
  .bbe-tabs [role="tab"] { height: 2.45rem; font-size: 0.82rem; letter-spacing: 0.04em; }
  .bbe-body { padding: 4px 3px 5px; }
  .bbe-t { min-width: 2.65rem; padding: 3px 1px 2px; font-size: 0.72rem; }
  .bbe-step { grid-template-columns: 2.5rem minmax(2.4rem, auto) 2.5rem; }
  .bbe-step-v { padding: 0 1px; font-size: 0.72rem; }
  .bbe-step + .bbe-step { margin-left: 3px; }
  .bbe-gap { margin: 7px 1px; }
  .bbe-sws { gap: 6px; padding: 0 4px; }
  .bbe-t.bbe-l { min-width: 2.2rem; flex-basis: 2.2rem; }
  .bb-act-colors { gap: 6px; }
}
/* More (not on a short screen, where every tab is one strip): its tools, Search, My notes and Plans, which the dock
   stands over, and Experimental, in one grid, every one in sight, two rows of six, so that it is no taller than the
   other tabs and its tabs never move under the finger (a phone held upright: three rows of four, as every tab is three
   rows there) */
@media (max-width: 780px) and (min-height: 521px) {
  #bbeP-more:not([hidden]) { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 3rem; gap: 3px 2px; align-content: start; }
  .bbe-more, .bbe-site, .bbe-exp { display: contents; }
  .bbe-more .bbe-t, .bbe-site .bbe-t, .bbe-exp .bbe-t { min-width: 0; }
}
/* Labs (the experimental features, js/structure.js): its tools in a row, and beneath them what it does, in a few words */
.bbe-lab-note .bbe-note { white-space: normal; }

/* a narrow head (a phone held upright): the name on two short lines, the reference and beneath it how much is chosen;
   Extend and Verse their signs over their names, as the tools are */
@media (max-width: 600px) {
  .bbe-tabs [role="tab"] { font-size: 0.78rem; letter-spacing: 0.01em; }         /* the eight in a row, whole */
  .bbe-head { padding: 0 6px 0 10px; }
  .bbe-name { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; margin-right: 2px; font-size: 0.95rem; line-height: 1.12; }
  .bbe-ref { max-width: 100%; }
  .bbe-n { font-size: 0.74rem; letter-spacing: 0.06em; }
  .bbe-dotsep { display: none; }
  /* the words themselves and the version are said, not shown: the reference and the count are what fit */
  .bbe-q, .bbe-ver { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bbe-hb { padding: 0; }
  .bbe-ic { width: 2.45rem; }
  .bbe-hb:not(.bbe-ic) { flex-direction: column; gap: 2px; min-width: 2.7rem; padding: 3px 2px 2px; }
  .bbe-hb:not(.bbe-ic) span { font-size: 0.66rem; letter-spacing: 0.03em; line-height: 1; }
  .bbe-done { margin-left: 2px; padding: 0 10px; }
  /* the bar of chosen verses: its eleven swatches in one row, as wide as the screen allows, each with a ring around it
     the size of a finger to take the tap (the bar no taller for them) */
  .bb-act-colors { justify-content: space-between; gap: 0; overflow: visible; background: none; }
  .bb-act-colors .bb-sw { position: relative; width: min(2.25rem, calc((100vw - 92px) / 11)); height: min(2.25rem, calc((100vw - 92px) / 11)); }
  .bb-act-colors .bb-sw::before { content: ""; position: absolute; inset: -5px -4px; border-radius: 50%; }
}
/* A phone held upright: every tool the size of a finger and in sight, with no row to be scrolled sideways, so every
   tab is three rows high and the dock one height whichever is chosen. The ten colours and none in two rows (on Colour,
   Band's and Cell's, each in one row after its name, as wide as the screen allows, with a ring the size of a finger
   around each to take the tap); Lines' second row in two, its steppers and then Verses, Split and Reset (the rule
   between them a break); Table's first row in two, numbers and the table, then its rows, cells and Separate and Join
   (the same); More in rows of four; the first rows of Lines and Table, and Table's tools, drawn close enough to fit. */
@media (max-width: 600px) and (min-height: 521px) {
  .bbe-p { min-height: calc(3 * 3rem + 2 * 3px); }
  .bbe-row.bbe-sws { display: grid; grid-template-columns: repeat(6, 2.25rem); justify-content: space-evenly; gap: 6px; padding: 3px 4px; overflow: visible; background: none; }
  #bbeP-lines .bbe-row:first-of-type .bbe-t, #bbeP-table .bbe-t { flex-shrink: 1; min-width: 2.4rem; }
  #bbeP-lines .bbe-row + .bbe-row { flex-wrap: wrap; row-gap: 1.5px; overflow: visible; background: none; }
  #bbeP-lines .bbe-row + .bbe-row .bbe-gap { flex-basis: 100%; height: 0; margin: 0; }          /* (a line of its own: 1.5px each side) */
  #bbeP-table .bbe-row:first-of-type { flex-wrap: wrap; row-gap: 1.5px; overflow: visible; background: none; }
  #bbeP-table .bbe-brk { flex-basis: 100%; height: 0; margin: 0; }
  /* (Below, Move, Centre line and Box are the cell bar's here, where the row has no room for them) */
  #bbeP-table [data-ed="stack"], #bbeP-table [data-ed="cmove"], #bbeP-table [data-ed="cl"], #bbeP-table [data-ed="cbx"], #bbeP-table [data-ed="wrap"] ~ .bbe-gap { display: none; }
  #bbeP-colour .bbe-row.bbe-sws { display: flex; justify-content: space-between; gap: 0; padding: 0 4px; }
  #bbeP-colour .bbe-lab { width: 2.3rem; font-size: 0.74rem; letter-spacing: 0.03em; }
  #bbeP-colour .bb-sw { position: relative; width: min(2.25rem, calc((100vw - 2.3rem - 40px) / 11)); height: min(2.25rem, calc((100vw - 2.3rem - 40px) / 11)); }
  #bbeP-colour .bb-sw::before { content: ""; position: absolute; inset: -9px -2px; border-radius: 50%; }
  #bbeP-lines .bbe-step { flex: 1 1 0; min-width: 0; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }        /* the three share the line */
  #bbeP-more:not([hidden]) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* a phone, upright or on its side, has no keyboard: no keys in the head, where its room is the choice's name (? opens
   them still, where a keyboard is joined to it) */
@media (hover: none) and (pointer: coarse) and (max-width: 600px), (hover: none) and (pointer: coarse) and (max-height: 520px) {
  .bbe-head [data-ed="keys"] { display: none; }
}

/* the smallest phones: the tabs, the head and the tools closer still */
@media (max-width: 360px) {
  .bbe-tabs [role="tab"] { font-size: 0.76rem; letter-spacing: 0; }
  .bbe-hb:not(.bbe-ic) span { letter-spacing: 0; }
  .bbe-done { padding: 0 8px; letter-spacing: 0.04em; }
  .bbe-t { min-width: 2.5rem; }
  .bbe-step { grid-template-columns: 2.45rem minmax(2.2rem, auto) 2.45rem; }
  .bbe-letters { gap: 2px; }
  .bbe-t.bbe-l { min-width: 1.95rem; flex-basis: 1.95rem; }
  .bbe-letters [data-ed="bank"], #bbeP-lines .bbe-row:first-of-type .bbe-t, #bbeP-table .bbe-t { min-width: 2.15rem; }
}
@media (max-width: 340px) {
  .bbe-tabs [role="tab"] { font-size: 0.7rem; letter-spacing: 0; }
}

/* ---- a short screen (a phone turned on its side, a low window) ----
   The dock is two short rows across the foot of the screen, so that most of the screen is left to the text: the
   choice's name, the tabs and the head's buttons in one; beneath them the tab's tools in one strip that scrolls
   sideways. The panels end where it begins. */
@media (max-height: 520px) {
  .bbe { left: 0; right: 0; bottom: var(--tk-real, var(--tk-h)); transform: none; width: auto; display: grid; grid-template-columns: minmax(5.5rem, 1fr) minmax(0, 3fr) repeat(6, auto); align-items: center; padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); border: 0; border-top: 1px solid var(--press); box-shadow: 0 -12px 30px var(--shadow); }
  .bbe-head { display: contents; }
  .bbe-name { grid-area: 1 / 1; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; margin: 0; padding: 0 4px 0 10px; font-size: 0.9rem; line-height: 1.12; }
  .bbe-hint { white-space: normal; font-size: 0.9rem; line-height: 1.15; }
  .bbe-ref { max-width: 100%; }
  .bbe-n { font-size: 0.72rem; letter-spacing: 0.06em; }
  .bbe-dotsep { display: none; }
  .bbe-q, .bbe-ver { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* the tabs whole, in a row that scrolls sideways where the screen is too narrow for them all (js/bible-editor.js
     brings the one chosen into sight) */
  .bbe-tabs { grid-area: 1 / 2; grid-auto-columns: minmax(max-content, 1fr); border-bottom: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    background: linear-gradient(to right, var(--bg) 40%, transparent) left center / 28px 100% no-repeat local, linear-gradient(to left, var(--bg) 40%, transparent) right center / 28px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, var(--bbe-cue), transparent) left center / 12px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, var(--bbe-cue), transparent) right center / 12px 100% no-repeat scroll; }
  .bbe-tabs::-webkit-scrollbar { display: none; }
  .bbe-tabs [role="tab"] { height: 2.6rem; padding: 0 7px; font-size: 0.8rem; letter-spacing: 0.03em; overflow: visible; }
  .bbe-head [data-ed="keys"] { grid-area: 1 / 3; }
  .bbe-head [data-ed="extend"] { grid-area: 1 / 4; }
  .bbe-head [data-ed="verse"] { grid-area: 1 / 5; }
  .bbe-head [data-ed="undo"] { grid-area: 1 / 6; }
  .bbe-head [data-ed="redo"] { grid-area: 1 / 7; }
  .bbe-done { grid-area: 1 / 8; margin: 0 6px 0 4px; padding: 0 10px; }
  .bbe-hb, .bbe-hb:not(.bbe-ic) { width: 2.45rem; min-width: 0; padding: 0; }
  .bbe-hb span { display: none; }
  .bbe-warn { grid-area: 2 / 1 / 3 / -1; padding: 2px 10px; border-top: 1px solid var(--rule); border-bottom: 0; }
  .bbe-body { grid-area: 3 / 1 / 4 / -1; padding: 3px 3px 4px; border-top: 1px solid var(--rule); }
  .bbe-p { flex-direction: row; align-items: center; gap: 0; min-height: 3rem; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    background: linear-gradient(to right, var(--bg) 40%, transparent) left center / 28px 100% no-repeat local, linear-gradient(to left, var(--bg) 40%, transparent) right center / 28px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, var(--bbe-cue), transparent) left center / 12px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, var(--bbe-cue), transparent) right center / 12px 100% no-repeat scroll; }
  .bbe-p::-webkit-scrollbar { display: none; }
  .bbe-p > .bbe-row { flex: none; overflow: visible; background: none; }
  .bbe-p > .bbe-row + .bbe-row { margin-left: 4px; padding-left: 4px; border-left: 1px solid var(--rule); }
  .bbe-chip-row .bbe-note { white-space: nowrap; }
  .bbe-more { display: flex; }
  body.bb-editing #panel-bible .bb.multi .bb-work { height: calc(100vh - var(--tk-real, var(--tk-h, 0px)) - var(--bb-crumb-h, 0px) - var(--bb-rbar-h, 3.6rem) - var(--bbe-h, 12rem)); height: calc(100svh - var(--tk-real, var(--tk-h, 0px)) - var(--bb-crumb-h, 0px) - var(--bb-rbar-h, 3.6rem) - var(--bbe-h, 12rem)); }
  body.bb-editing .bb.multi .bb-scroll { padding-bottom: 3rem; }
}
@media (max-height: 520px) and (max-width: 780px) {
  .bbe-site { display: flex; padding-top: 0; border-top: 0; }
}
@media (max-height: 520px) and (hover: hover) and (pointer: fine) {
  .bbe-p { scrollbar-width: thin; }
}

/* ---- the Edit bar on the left (Tools; js/bible-editor.js, a wide screen only) ----
   The dock a column down the left side, from the top of the screen to the bar at its foot, nothing beneath it: the
   page stands beside it (the body set in by its width), and what floats over the page in the middle of the screen
   (the player, the marks shared in a link, a word to the reader) in the middle of the room beside it. Its head the
   choice's name over the keys, Extend, Verse, Undo and Redo (no Done: Edit is on while it stands); then no tabs, but
   the tools in groups, three across in equal columns, a thin rule between one group and the next and no name over
   any; the column scrolls where they are taller than the screen. At its foot, in sight however far it is scrolled (the
   groups pass beneath it), the panel of colours and settings: a row of tabs in small capitals, the one chosen in the
   rubric as the dock's own tabs are, over the ten colours and none, large, four across, or a setting's steppers. */
.bbe-col[hidden], .bbe-grp[hidden], .bbe-set[hidden], .bbe-set-p[hidden], .bbe-set-tabs [hidden] { display: none; }
@media (min-width: 1024px) {
  body.bbe-side { --bbe-side-w: clamp(17rem, 22vw, 22rem); padding-left: var(--bbe-side-w); }
  body.bbe-side #bbEditBtn { display: none; }
  /* the reader's text the whole width beside it, out to the edge of the screen, not a column in the middle */
  body.bbe-side .page { width: calc(100% - 48px); max-width: none; }
  body.bbe-side .bb:not(.multi) .bb-work { max-width: none; }
  body.bbe-side .bb-audio, body.bbe-side .bb-shared, body.bbe-side .bb-toast { margin-left: calc(var(--bbe-side-w) / 2); max-width: calc(100% - var(--bbe-side-w) - 24px); }
  /* (a column of its parts, so that the panel stands at its foot even where the tools are not as tall as the screen) */
  .bbe.is-side { left: 0; top: 0; right: auto; bottom: var(--tk-real, var(--tk-h)); transform: none; display: flex; flex-direction: column; width: var(--bbe-side-w); padding: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; border: 0; border-right: 1px solid var(--press); box-shadow: none; animation: none; }
  .bbe.is-side > * { flex: none; }
  /* (a tool brought into sight by the keys is brought clear of the panel, whose height this is) */
  .bbe.is-side { scroll-padding-bottom: calc(2.35rem + 3 * 3rem + 40px); }
  /* the head: the name over a row of the keys, Extend, Verse, Undo and Redo; the name the reference and how many words
     on its first line, the words quoted on a line of their own beneath */
  .bbe.is-side .bbe-head { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto auto; align-items: center; gap: 2px; min-height: 0; padding: 10px 6px 6px; }
  .bbe.is-side .bbe-head > * { grid-area: auto; }          /* (not where a short screen puts them in one row) */
  .bbe.is-side .bbe-name { grid-column: 1 / -1; flex-wrap: wrap; row-gap: 1px; margin: 0 0 4px; padding: 0 6px; }
  .bbe.is-side .bbe-q { order: 9; flex: 1 0 100%; padding-right: 0; }
  .bbe.is-side .bbe-hb { width: auto; min-width: 0; padding: 0 4px; font-size: 0.8rem; }
  .bbe.is-side .bbe-hb span { display: inline; }
  .bbe.is-side .bbe-hb.bbe-ic { width: 2.4rem; padding: 0; }
  .bbe.is-side .bbe-done, .bbe.is-side .bbe-tabs { display: none; }
  .bbe.is-side .bbe-warn { padding: 6px 12px; }
  .bbe.is-side .bbe-body { flex: 1 0 auto; display: flex; flex-direction: column; padding: 0 8px; border-top: 0; }
  /* the groups; in them, a row kept whole across the column (Chiasm's letters, three across as the tools are and three
     rows high whichever letters are shown; Links' groups, wrapped) */
  .bbe-grp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 8px 0; }
  .bbe-grp + .bbe-grp { border-top: 1px solid var(--rule); }
  .bbe-grp .bbe-t { min-width: 0; }
  .bbe-grp .bbe-tn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .bbe-grp > .bbe-row { grid-column: 1 / -1; flex-wrap: wrap; row-gap: 3px; min-height: 0; overflow: visible; background: none; }
  .bbe-grp > .bbe-letters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 2.6rem; gap: 3px; min-height: calc(3 * 2.6rem + 6px); align-content: start; }
  .bbe-grp .bbe-t.bbe-l { min-width: 0; }
  .bbe-grp .bbe-chips { flex-wrap: wrap; }
  .bbe-grp .bbe-chip-row .bbe-note { white-space: normal; }
  /* the panel at the foot: its tabs, as the dock's; the colours four across, large, or a setting's steppers one
     beneath another, the panel one height for either */
  .bbe.is-side .bbe-set { position: sticky; bottom: 0; z-index: 1; margin: auto -8px 0; padding: 0 12px 12px; border-top: 1px solid var(--press); background: var(--bg); }
  .bbe-set-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 -4px 10px; border-bottom: 1px solid var(--rule); }
  .bbe-set-tabs [role="tab"] { position: relative; min-width: 0; height: 2.35rem; padding: 0 2px; border: 0; background: none; font-family: var(--caps); font-weight: var(--caps-wt); font-size: 0.88rem; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); cursor: pointer; }
  .bbe-set-tabs [aria-selected="true"] { color: var(--rubric); }
  .bbe-set-tabs [aria-selected="true"]::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: -1px; height: 2px; background: var(--rubric); }
  .bbe-set-p { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 6px; justify-items: center; align-content: start; min-height: calc(3 * 3rem + 16px); }
  .bbe .bbe-set .bb-sw { width: 2.75rem; height: 2.75rem; }
  .bbe .bbe-set .bb-sw-none { font-size: 1.3rem; }
  .bbe-set .bbe-step { grid-column: 1 / -1; justify-self: stretch; grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem; }
  .bbe-set .bbe-step + .bbe-step { margin-left: 0; }
}

/* ---- the sheets: a new link, a table's headers, a row's label, a link's card, the keys, the examples ---- */
.bbe-sheet { max-width: 30rem; border-radius: 0; }
/* the examples (Labs): as wide as the screen allows, for a grid of three columns beside its gutter */
.bbe-sheet.bbe-wide { max-width: min(62rem, calc(100% - 16px)); max-height: min(92vh, 60rem); }
.bbe-shapes .st { margin-top: 0.6em; font-size: 1.05rem; }
:where(.bbe-sheet) button:where(:not(.bb-pick-x, .bb-sw)) { font: inherit; border-radius: 0; box-shadow: none; -webkit-tap-highlight-color: transparent; }
.bbe-sheet svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.bbe-card { max-width: 38rem; }
.bbe-sheet .bb-sheet-head h3 { display: flex; align-items: center; gap: 0.45em; }
.bbe-sheet .bb-sheet-head h3 span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bbe-sheet .bb-sheet-head .bbe-dot { width: 0.8rem; height: 0.8rem; }
.bbe-form-q { margin: 0 0 4px; font-style: normal; line-height: 1.4; color: var(--muted); }
.bbe-field { display: flex; flex-direction: column; gap: 5px; margin: 12px 0 0; }
.bbe-field input { box-sizing: border-box; width: 100%; height: 2.7rem; padding: 0 11px; border: 1px solid var(--rule); border-radius: 0; background: none; font: inherit; font-size: 1.08rem; color: var(--ink); }
.bbe-field input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.bbe-sws-in { display: flex; flex-wrap: wrap; gap: 7px; padding: 3px 2px; }
.bbe-sheet .bb-sw { width: min(2.15rem, calc((100vw - 120px) / 10)); height: min(2.15rem, calc((100vw - 120px) / 10)); padding: 0; border: 1.5px solid var(--rule); border-radius: 50%; background-color: var(--bg); cursor: pointer; }
.bbe-sheet .bb-sw:not(.bb-sw-none) { background-image: linear-gradient(var(--sw), var(--sw)); border-color: var(--bg); box-shadow: 0 0 0 1px var(--rule); }
.bbe-card-id { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 18px; margin-bottom: 6px; }
.bbe-card-id .bbe-field:first-child { margin-top: 2px; }
.bbe-card .bb-set-h2 { margin-top: 16px; }
/* its words, in the Bible's order */
.bbe-mem { margin: 0; padding: 0; list-style: none; }
.bbe-mem li { display: flex; align-items: stretch; border-bottom: 1px dotted var(--rule); }
.bbe-mem li.is-here { box-shadow: inset 3px 0 0 var(--sw, var(--rubric)); }
.bbe-mem-go { flex: 1; min-width: 0; display: block; padding: 8px 6px 9px 10px; border: 0; background: none; text-align: left; color: var(--ink); cursor: pointer; }
.bbe-mem-go:hover { background: color-mix(in srgb, var(--rubric) 7%, transparent); }
.bbe-mem-r { display: block; font-family: var(--caps); font-weight: var(--caps-wt); font-size: 0.92rem; letter-spacing: 0.01em; color: var(--rubric); }
.bbe-mem-v, .bbe-mem-h { font-size: 0.86em; color: var(--muted); }
.bbe-mem-t { display: block; margin-top: 1px; font-size: 1.04rem; line-height: 1.45; }
.bbe-mem-t mark { padding: 0.04em 0; background: var(--sw-hl, var(--hl-yellow)); color: inherit; box-shadow: inset 0 -2px 0 var(--sw, transparent); }
.bbe-mem-b, .bbe-mem-x { flex: none; width: 2.75rem; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.bbe-mem-x { font-size: 1.4rem; line-height: 1; }
.bbe-mem-b:hover, .bbe-mem-x:hover { color: var(--rubric); background: color-mix(in srgb, var(--rubric) 7%, transparent); }
.bbe-mem button:focus-visible, .bbe-sheet .bb-sw:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.bbe-mem .bbe-mem-none { display: block; padding: 10px 2px; font-style: normal; color: var(--muted); }
.bbe-card-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; margin-top: 16px; }
.bbe-card-ask { flex: 1 1 100%; margin: 0; font-style: normal; color: var(--muted); }
/* the keys: each shortcut's keys, drawn as keys, and beside them what it does; one column of keys for every group
   (each group's list takes its columns from the sheet's) */
.bbe-keys { max-width: 36rem; }
.bbe-keys .bb-sheet-body { display: grid; grid-template-columns: fit-content(48%) minmax(0, 1fr); align-content: start; }
.bbe-keys .bb-sheet-body:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.bbe-keys .bb-sheet-body.is-quiet:focus { outline: none; }
.bbe-keys .bb-set-h2 { grid-column: 1 / -1; }
.bbe-kl { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; margin: 0 0 4px; }
@supports not (grid-template-columns: subgrid) { .bbe-kl { grid-template-columns: fit-content(48%) minmax(0, 1fr); } }
.bbe-kl dt, .bbe-kl dd { padding: 6px 0; border-bottom: 1px dotted var(--rule); }
.bbe-kl dt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-right: 16px; }
.bbe-kl dd { display: flex; align-items: center; margin: 0; line-height: 1.35; }
.bbe-keys kbd { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 1.9rem; height: 1.9rem; padding: 0 7px; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 5%, transparent); font-family: var(--text); font-size: 0.92rem; line-height: 1; color: var(--ink); white-space: nowrap; }
.bbe-keys kbd > [aria-hidden] { font-size: 1.12em; }                 /* an arrow, as large as a letter */
.bbe-k-and { color: var(--muted); }
.bbe-k-w { font-style: normal; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .bbe { animation: none; } }
@media print { .bbe, .bbe-h, .bbe-cb, .bbe-sheet { display: none !important; } }
