/* 0.5.9: responsive archive/bookshelf, independent of reading templates. */
.mr-bookshelf-drawer-toggle { display:none; }
.mr-bookshelf-drawer { box-sizing:border-box; position:fixed; inset:0 0 0 auto; margin:0; width:min(320px,88vw); max-width:none; height:100%; max-height:none; padding:16px 20px 32px; border:0; background:var(--wp--preset--color--base,var(--mr-paper,#fff)); color:inherit; overflow-y:auto; overscroll-behavior:contain; }
.mr-bookshelf-drawer-right { inset:0 0 0 auto; }
.mr-bookshelf-drawer:not([open]) { display:none; }
.mr-bookshelf-drawer::backdrop { background:rgba(0,0,0,.28); }
.mr-bookshelf-drawer-close, .mr-bookshelf-drawer-toggle { border:0; padding:0; width:36px; height:36px; background:transparent; color:inherit; font:inherit; cursor:pointer; align-items:center; justify-content:center; }
.mr-bookshelf-drawer-close { display:flex; margin:0 0 8px auto; font-size:26px; line-height:1; }
.mr-bookshelf-drawer .mr-bookshelf-side { margin:0; }
html.mr-bookshelf-drawer-open { overflow:hidden; }
@media (max-width:1279px) {
  .mr-bookshelf, .mr-bookshelf.mr-bookshelf-reversed { grid-template-columns:minmax(0,1fr); max-width:960px; gap:24px; }
  .mr-bookshelf:not(.mr-bookshelf-drawer-ready) > .mr-bookshelf-side { grid-row:1; }
  .mr-bookshelf-drawer-ready > .mr-bookshelf-side { display:none; }
}
@media (max-width:959px) {
  .mr-bookshelf .wp-block-post-template { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:639px) {
  .mr-bookshelf, .mr-bookshelf.mr-bookshelf-reversed { padding:24px 16px 60px; }
  .mr-bookshelf .wp-block-post-template { grid-template-columns:minmax(0,1fr); gap:24px; }
  .mr-bookshelf-card { display:grid; grid-template-columns:minmax(0,1fr); gap:6px 12px; align-items:start; }
  .mr-bookshelf-card:has(> .wp-block-post-featured-image img) { grid-template-columns:minmax(0,1fr) minmax(0,35%); }
  .mr-bookshelf-card > .wp-block-post-featured-image { grid-column:2; grid-row:1 / span 2; align-self:center; }
  .mr-bookshelf-card > .wp-block-post-title { grid-column:1; grid-row:1; font-size:16px; }
  .mr-bookshelf-card > .mr-bookshelf-byline { grid-column:1; grid-row:2; }
  .mr-bookshelf-card > .wp-block-post-featured-image:not(:has(img)) { display:none; }
}

/* 0.5.10: mobile navigation and compact identity. */
.mr-mobile-bar[hidden], .mr-mobile-bar [hidden] { display:none !important; }
.mr-mobile-bar { box-sizing:border-box; position:fixed; z-index:1000; inset:0 0 auto; padding:6px 16px; background:var(--wp--preset--color--paper,#fff); color:inherit; transition:transform .18s ease; }
.mr-mobile-bar-away { transform:translateY(calc(-100% - 46px)); }
.mr-mobile-bar-row { display:flex; align-items:center; justify-content:space-between; min-height:44px; gap:12px; }
.mr-mobile-brand { min-width:0; flex:1; }
.mr-mobile-brand a { display:inline-block; text-decoration:none; font-weight:750; }
.mr-mobile-brand img { display:block; width:auto; max-width:min(200px,100%); max-height:36px; height:auto; object-fit:contain; }
.mr-mobile-actions { display:flex; align-items:center; gap:4px; flex:none; }
.mr-mobile-actions button { display:flex; align-items:center; justify-content:center; width:44px; height:44px; padding:0; background:transparent; color:inherit; border:0; cursor:pointer; }
.mr-mobile-search { padding:4px 0 8px; }
.mr-mobile-search .mr-bookshelf-search { margin:0 0 0 auto; width:min(100%,420px); }
html.mr-mobile-ready .wp-site-blocks > header { display:none; }
html.mr-mobile-ready .wp-site-blocks:has(> header) { padding-block-start:56px; }
.mr-reading-drawer-ready > :is(.mr-reading-left,.mr-reading-right,.mr-wide-left,.mr-wide-right) { display:none; }
.mr-reading-grid.mr-reading-drawer-ready { grid-template-columns:minmax(0,620px); justify-content:center; }
.mr-wide-grid.mr-reading-drawer-ready { grid-template-columns:minmax(0,920px); justify-content:center; }
.mr-bookshelf-drawer > :is(.mr-reading-left,.mr-reading-right,.mr-wide-left,.mr-wide-right) { display:block; margin:0; min-width:0; }
.mr-bookshelf-drawer > :is(.mr-reading-left,.mr-wide-left) + :is(.mr-reading-right,.mr-wide-right) { margin-block-start:24px; }
.mr-bookshelf-drawer { padding-block-start:max(16px,env(safe-area-inset-top)); padding-block-end:max(32px,env(safe-area-inset-bottom)); }
body.admin-bar .mr-mobile-bar { top:32px; }
@media(max-width:782px) { body.admin-bar .mr-mobile-bar { top:46px; } }
@media(max-width:600px) { body.admin-bar .mr-mobile-bar { top:0; } }
@media(prefers-reduced-motion:reduce) { .mr-mobile-bar { transition:none; } }

/* 0.5.11: opt-in bottom reading controls; ordinary block flow without mobile JS. */
html.mr-mobile-ready .mr-mobile-bottom-bar { box-sizing:border-box; position:fixed; z-index:1000; inset:auto 0 0; width:100%; max-width:none; margin:0; padding:6px 16px calc(6px + env(safe-area-inset-bottom, 0px)); background:var(--wp--preset--color--paper,#fff); transition:transform .18s ease; }
html.mr-mobile-ready .mr-mobile-bottom-bar.mr-mobile-bottom-away { transform:translateY(100%); }
@media(prefers-reduced-motion:reduce) { html.mr-mobile-ready .mr-mobile-bottom-bar { transition:none; } }
