/* One passage action system for the Bible reader, references and My Shelf. */
.bb-passage-actions,.bbr-shelf-panel,.bbr-shortcut-row{--bpa-ink:#172f40;--bpa-teal:#315e61;--bpa-line:#c9d8d7;--bpa-mist:#e8f0ee;font-family:system-ui,sans-serif;color:var(--bpa-ink)}
.bb-passage-actions{width:100%;min-width:0;margin:7px 0 0;font-size:.88rem;line-height:1.4}
.bb-passage-row{display:flex;flex-wrap:wrap;gap:7px}
.bb-passage-actions .bb-passage-action,.bbr-shelf-panel .bb-passage-action{flex:1 1 auto;min-height:44px;padding:8px 11px;border-radius:7px;border:1px solid #91aaa7;background:#fff;color:var(--bpa-ink);font:650 .87rem/1.25 system-ui,sans-serif;cursor:pointer}
.bb-passage-actions .bb-passage-action:hover,.bbr-shelf-panel .bb-passage-action:hover{background:#eff5f3}
.bb-passage-actions .bb-passage-action[aria-pressed="true"]{background:var(--bpa-mist);border-color:#3f6f73;color:var(--bpa-teal)}
.bb-passage-actions .bb-passage-action.bbs-primary{flex:1 0 100%;background:#315e61;color:#fff;border-color:#315e61}
.bb-passage-actions .bb-passage-action.bbs-primary:hover{background:#172f40}
.bb-passage-related{margin:8px 0 0;border-top:1px solid var(--bpa-line);padding-top:3px}
.bb-passage-related summary,.bbr-shelf-saved summary{min-height:44px;cursor:pointer;align-content:center;font-weight:700;color:var(--bpa-teal)}
.bb-passage-related ul,.bbr-shelf-saved ul{list-style:none!important;margin:0!important;padding:0!important;display:grid;gap:8px}
.bb-passage-related li{margin:0!important;padding:8px 10px;background:#fff;border:1px solid var(--bpa-line);border-radius:6px}
.bb-passage-related li small{display:block;color:#435d69;font-size:.72rem}
.bb-passage-related li a,.bb-scripture .bbs-footer .bb-passage-related li a{display:block;font:650 .88rem/1.4 system-ui,sans-serif;color:var(--bpa-teal);text-underline-offset:3px;min-height:28px;padding:3px 0}
.bb-passage-related>small{display:block;font-size:.75rem;color:#435d69;margin:8px 0 0}
.bb-passage-status{font:normal .8rem/1.4 system-ui,sans-serif;color:#315e61;margin:7px 0 0}
.bb-passage-status:empty{display:none}
.bb-passage-copy{box-sizing:border-box;width:100%;max-width:100%;font:inherit;padding:8px;border:1px solid #91aaa7;border-radius:6px}
.bb-passage-actions :focus-visible,.bbr-shelf-panel :focus-visible,.bbr-shortcut-row :focus-visible{outline:3px solid #38607c;outline-offset:3px}
.bbr-shortcut-row{display:flex;align-items:center;gap:6px 14px;flex-wrap:wrap;margin:9px 0 12px}
.bbr-shortcut-row .bbr-home-entry,.bbr-shelf-panel .bbr-shelf-resume{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 15px;border-radius:7px;background:#24465f;color:#fff!important;text-decoration:none;font:700 .9rem/1.3 system-ui,sans-serif}
.bbr-shortcut-row [data-bbr-continue]{min-height:44px;display:inline-flex;align-items:center;font:650 .86rem/1.3 system-ui,sans-serif;color:#315e61!important;text-underline-offset:3px}
[data-bbr-continue][hidden],.bbr-shelf-panel [hidden]{display:none!important}
.bbr-shelf-panel{background:#f7f1e7;border:1px solid #d9cdbb;border-radius:9px;padding:12px 16px;margin:0 28px 16px}
.bbr-shelf-panel h2{font:600 1.07rem/1.3 Georgia,serif;color:#172f40;margin:0 0 9px!important}
.bbr-shelf-saved{margin:6px 0 0}
.bbr-shelf-panel .bbr-shelf-empty{font:normal .79rem/1.4 system-ui,sans-serif;color:#435d69;margin:7px 0 0}
.bbr-shelf-saved li{display:flex;align-items:center;justify-content:space-between;gap:9px;background:#fff;padding:5px 9px;border-radius:6px;border:1px solid #d9cdbb}
.bbr-shelf-saved li a{color:#315e61;font-size:.9rem;font-weight:650;overflow-wrap:anywhere}
.bbr-shelf-saved .bb-passage-action{flex:0 0 auto;min-height:38px;font-size:.81rem}
.bb-sc-scripture{border-left:4px solid #3f6f73!important;background:#eff5f3!important}
.bbr-read-entry{margin:10px 0 16px!important;font:650 .9rem/1.35 system-ui,sans-serif}
.bbr-read-entry a{display:inline-flex;align-items:center;min-height:44px;padding:5px 13px;border:1px solid #b7cecb;border-radius:7px;background:#e8f0ee;color:#254f52!important;text-decoration:none}
.bbr-open-note{display:inline-block;font-size:.84rem;margin:8px 0 0}
@media(max-width:640px){.bbr-shelf-panel{margin-inline:16px;padding:11px 12px}.bbr-shortcut-row{gap:4px 11px}}

/* On phones, the Home launch belongs to the search panel rather than floating
   as a narrow standalone button. A saved reading position uses the same row. */
@media(max-width:640px){
  body.home .home-search .bbr-shortcut-row{display:flex;flex-wrap:nowrap;align-items:stretch;gap:6px;margin:7px 0 3px}
  body.home .home-search .bbr-shortcut-row :is(.bbr-home-entry,[data-bbr-continue]){box-sizing:border-box;display:flex;flex:1 1 0;min-width:0;align-items:center;justify-content:flex-start;gap:8px;min-height:44px;padding:7px 10px;border:1px solid #9fb7b3;border-radius:7px;background:#fff;color:#24465f!important;font:700 .88rem/1.3 system-ui,sans-serif;text-decoration:none;overflow-wrap:anywhere}
  body.home .home-search .bbr-shortcut-row .bbr-home-entry::before{content:'';flex:0 0 19px;width:19px;height:19px;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23315e61' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5C9.2 4.4 5.9 4 2.5 5.2v14.1c3.4-1.2 6.7-.8 9.5 1.3 2.8-2.1 6.1-2.5 9.5-1.3V5.2C18.1 4 14.8 4.4 12 6.5zM12 6.5v14.1'/%3E%3C/svg%3E")}
  body.home .home-search .bbr-shortcut-row :is(.bbr-home-entry,[data-bbr-continue])::after{content:'';flex:none;width:7px;height:7px;margin-left:auto;margin-right:2px;border-top:2px solid #315e61;border-right:2px solid #315e61;transform:rotate(45deg)}
  body.home .home-search .bbr-shortcut-row [data-bbr-continue]{background:#e1ece8;color:#315e61!important;font-size:.81rem}
  body.home .home-search .bbr-shortcut-row:has([data-bbr-continue]:not([hidden])) .bbr-home-entry::before{display:none}
  body.home .home-search .bbr-shortcut-row :is(.bbr-home-entry,[data-bbr-continue]):hover{background:#f3f7f5;border-color:#3f6f73}
}

/* Align the Bible reading panel with the four desktop My Shelf cards. */
@media screen and (min-width: 801px) {
  .bb-shelf-page .bb-shelf-hero + [data-bb-shelf] {
    margin-block-start: 16px;
  }
  .bb-shelf-page [data-bb-shelf] > .bbr-shelf-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) fit-content(43%);
    align-items: center;
    gap: 4px 24px;
    margin-block: 12px;
    padding: 14px 18px;
  }
  /* Match the lower padding of the four-card navigation band. */
  .bb-shelf-page [data-bb-shelf] > .bbr-shelf-panel + nav.bso-nav {
    padding-block-start: 20px;
  }
  .bb-shelf-page .bbr-shelf-panel > h2 {
    grid-area: 1 / 1;
    margin: 0 !important;
  }
  .bb-shelf-page .bbr-shelf-panel > .bbr-shelf-resume {
    grid-area: 1 / 2 / span 2;
    justify-self: end;
    min-width: 0;
    max-width: 100%;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .bb-shelf-page .bbr-shelf-panel > :is(.bbr-shelf-empty, .bbr-shelf-saved) {
    grid-area: 2 / 1;
    min-width: 0;
    margin: 0;
  }
  .bb-shelf-page .bbr-shelf-panel > .bbr-shelf-saved[open] {
    grid-column: 1 / -1;
  }
  .bb-shelf-page .bbr-shelf-panel:has(> .bbr-shelf-saved[open]:not([hidden])) > .bbr-shelf-resume {
    grid-row: 1;
  }
  .bb-shelf-page .bbr-shelf-saved > summary {
    align-content: center;
    min-height: 44px;
    width: fit-content;
    max-width: 100%;
    cursor: pointer;
  }
  .bb-shelf-page .bbr-shelf-panel > .bb-passage-status {
    grid-column: 1 / -1;
    margin: 0;
  }
}

/* My Bible reading: one compact disclosure for bookmarks and the original
   private Scripture notes, using the existing Shelf parchment identity. */
.bbr-shelf-panel .bbr-shelf-saved > summary{overflow-wrap:anywhere}
.bbr-shelf-saved > .bbr-shelf-entries > .bbr-shelf-entry{display:grid;grid-template-columns:minmax(0,1fr);justify-content:stretch;justify-items:stretch;gap:4px;min-width:0;padding:6px 10px;align-items:stretch}
.bbr-shelf-passage-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;min-width:0}
.bbr-shelf-saved .bbr-shelf-passage-link{display:flex;align-items:center;flex:1 1 120px;min-width:0;min-height:44px;text-underline-offset:3px;font-size:.95rem}
.bbr-shelf-saved .bbr-shelf-passage-head > .bb-passage-action{min-height:44px;margin-inline-start:auto}
.bbr-shelf-note-count{font:700 .79rem/1.4 system-ui,sans-serif;color:#716247;margin:0 0 2px!important}
.bbr-shelf-saved .bbr-shelf-note-list{gap:6px;margin:0 0 3px!important;padding:0!important;min-width:0}
.bbr-shelf-note-list > .bbr-shelf-note{display:grid;grid-template-columns:minmax(0,1fr);justify-items:stretch;justify-content:stretch;gap:0;min-width:0;border:0;border-radius:7px;padding:0 0 0 8px;background:transparent;border-inline-start:3px solid #d9cdbb}
.bbr-shelf-panel .bbr-shelf-note-list button.bbr-shelf-note-open{box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;width:100%;min-width:0;min-height:44px;padding:9px 11px;border:1px solid #d9cdbb;border-radius:7px;background:#faf7f1;color:#172f40;text-align:left;font:inherit;cursor:pointer}
.bbr-shelf-panel .bbr-shelf-note-list button.bbr-shelf-note-open:hover{background:#f2eadc;border-color:#aa9a80}
.bbr-shelf-note-main{display:grid;gap:3px;flex:1 1 140px;min-width:0;overflow-wrap:anywhere}
.bbr-shelf-note-title{font:700 .88rem/1.35 system-ui,sans-serif}
.bbr-shelf-note-preview{font:400 .83rem/1.4 system-ui,sans-serif;color:#435d69;overflow-wrap:anywhere}
.bbr-shelf-note-action{color:#315e61;font:700 .78rem/1.3 system-ui,sans-serif;margin-inline-start:auto;overflow-wrap:anywhere}
.bbr-shelf-note-list .bbr-shelf-note-ref,.bbr-shelf-note-list .bbr-shelf-note-origin{display:flex;align-items:center;min-height:44px;min-width:0;font:600 .78rem/1.35 system-ui,sans-serif;color:#315e61;text-underline-offset:3px;overflow-wrap:anywhere}
.bbr-shelf-note-edition{display:block;color:#716247;font:400 .74rem/1.35 system-ui,sans-serif;margin-top:5px}
.bbr-shelf-notice{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;font:400 .8rem/1.4 system-ui,sans-serif;color:#435d69;margin-top:7px}
.bbr-shelf-notice .bb-passage-action{flex:0 0 auto}
@media(min-width:801px){.bb-shelf-page .bbr-shelf-panel > .bbr-shelf-notice{grid-column:1 / -1;margin:0}}
