/* Open Library Theme — 2026-08-31 v68
 * Keep guest auth capsule geometry identical in light/dark mode on mobile.
 */
@media (max-width:767px){
  html body .openlib_topbar__account{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    flex:0 0 auto!important;
    margin-left:auto!important;
  }

  html body .openlib_account_cluster--guest,
  html[data-openlib-color-mode="dark"] body .openlib_account_cluster--guest{
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:36px auto auto!important;
    align-items:center!important;
    justify-content:start!important;
    gap:4px!important;
    width:max-content!important;
    min-width:0!important;
    max-width:none!important;
    min-height:44px!important;
    height:44px!important;
    margin:0!important;
    padding:4px!important;
    border:1px solid rgba(255,255,255,.9)!important;
    border-radius:14px!important;
    background:#fff!important;
    box-shadow:0 7px 18px rgba(104,9,17,.14)!important;
  }

  html body .openlib_account_cluster--guest > .openlib_color_mode_toggle,
  html[data-openlib-color-mode="dark"] body .openlib_account_cluster--guest > .openlib_color_mode_toggle{
    box-sizing:border-box!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    margin:0!important;
    padding:0!important;
    border:1px solid #dc2635!important;
    border-radius:10px!important;
    background:#dc2635!important;
    background-image:none!important;
    color:#fff!important;
    box-shadow:none!important;
    line-height:1!important;
  }

  html body .openlib_account_cluster--guest > .openlib_color_mode_toggle:hover,
  html body .openlib_account_cluster--guest > .openlib_color_mode_toggle:focus,
  html body .openlib_account_cluster--guest > .openlib_color_mode_toggle:active,
  html[data-openlib-color-mode="dark"] body .openlib_account_cluster--guest > .openlib_color_mode_toggle:hover,
  html[data-openlib-color-mode="dark"] body .openlib_account_cluster--guest > .openlib_color_mode_toggle:focus,
  html[data-openlib-color-mode="dark"] body .openlib_account_cluster--guest > .openlib_color_mode_toggle:active{
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    margin:0!important;
    padding:0!important;
    border-color:#dc2635!important;
    background:#dc2635!important;
    background-image:none!important;
    color:#fff!important;
    transform:none!important;
    box-shadow:0 0 0 2px rgba(220,38,53,.12)!important;
  }

  html body .openlib_account_cluster--guest > .openlib_color_mode_toggle .fa,
  html[data-openlib-color-mode="dark"] body .openlib_account_cluster--guest > .openlib_color_mode_toggle .fa{
    display:block!important;
    width:auto!important;
    margin:0!important;
    padding:0!important;
    color:#fff!important;
    font-size:14px!important;
    line-height:1!important;
  }

  html body .openlib_account_cluster--guest > .openlib_auth_switch__item,
  html[data-openlib-color-mode="dark"] body .openlib_account_cluster--guest > .openlib_auth_switch__item{
    box-sizing:border-box!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:0!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    margin:0!important;
    padding:0 11px!important;
    border:0!important;
    border-radius:10px!important;
    background:#fff!important;
    color:#dc2635!important;
    font-size:12px!important;
    font-weight:800!important;
    line-height:1!important;
    white-space:nowrap!important;
    box-shadow:none!important;
  }

  html body .openlib_account_cluster--guest > .openlib_auth_switch__item:hover,
  html body .openlib_account_cluster--guest > .openlib_auth_switch__item:focus-visible,
  html[data-openlib-color-mode="dark"] body .openlib_account_cluster--guest > .openlib_auth_switch__item:hover,
  html[data-openlib-color-mode="dark"] body .openlib_account_cluster--guest > .openlib_auth_switch__item:focus-visible{
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    margin:0!important;
    padding:0 11px!important;
    background:#fff4f5!important;
    color:#ba1e2b!important;
    transform:none!important;
    box-shadow:none!important;
  }

  /* Keep mobile brand/auth baseline the same in both modes. */
  html body .openlib_topbar__inner,
  html[data-openlib-color-mode="dark"] body .openlib_topbar__inner{
    align-items:center!important;
  }
}
